:root {
  --bg: #09111C;
  --bg-card: #0F1E2E;
  --bg-dark: #0C1A28;
  --text: #F5F5F5;
  --text-muted: #7A9AB8;
  --text-light: #D8E8F0;
  --gold: #C4922A;
  --gold-dark: #6B4510;
  --gold-dim: rgba(196, 146, 42, 0.12);
  --blue: #5783AD;
  --divider: #172840;
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Lato', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
}

#app::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(196, 146, 42, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

.topbar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h1 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 26px;
  margin: 0;
  color: var(--text);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quota {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.topbar-icons {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Общий размер строгих line-иконок (SVG) во всех кнопках-иконках приложения —
   вместо emoji/decorative символов, см. maltsev-brand SKILL.md, п.13 */
.bell-btn svg,
.plan-btn svg,
.paywall-close svg,
.meeting-delete-btn svg,
.session-expand-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  color: var(--text-muted);
  transition: color .2s;
}

.bell-btn:hover svg,
.plan-btn:hover svg,
.paywall-close:hover svg,
.meeting-delete-btn:hover svg,
.session-expand-btn:hover svg {
  color: var(--gold);
}

.session-expand-btn svg {
  width: 12px;
  height: 12px;
  transition: transform .2s, color .2s;
}

.session-expand-btn.expanded svg {
  transform: rotate(90deg);
}

.bell-btn,
.plan-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
}

.bell-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--gold);
  color: var(--bg);
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  min-width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.notifications-dropdown {
  position: absolute;
  top: 52px;
  right: 16px;
  width: 280px;
  background: var(--bg-card);
  border-left: 2px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  z-index: 20;
  max-height: 320px;
  overflow-y: auto;
}

.notifications-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  padding: 14px 16px 8px;
}

.notifications-list {
  display: flex;
  flex-direction: column;
}

.notification-item {
  padding: 10px 16px;
  border-top: 1px solid var(--divider);
  font-size: 13px;
  color: var(--text-light);
}

.notification-item .n-date {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

.notifications-empty {
  padding: 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.new-client-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.input-hint-wrap {
  position: relative;
  flex: 1;
}

.new-client-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--divider);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
}

.new-client-form input:focus { outline: none; border-color: var(--gold); }

.input-hint-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  overflow: hidden;
  pointer-events: none;
  color: var(--text-muted);
  font-family: var(--body);
  font-size: 15px;
  white-space: nowrap;
}

.input-hint-overlay span { display: inline-block; }

.input-hint-overlay.marquee span {
  padding-left: 100%;
  animation: duration-marquee 9s linear infinite;
}

.new-client-form button,
#upload-btn,
#submit-text-btn,
#subscribe-btn {
  padding: 12px 18px;
  border-radius: 2px;
  border: none;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s;
}

.new-client-form button:hover,
#upload-btn:not(:disabled):hover,
#submit-text-btn:not(:disabled):hover,
#subscribe-btn:hover {
  background: #D4B65A;
  box-shadow: 0 8px 20px rgba(196, 146, 42, 0.2);
}

.new-client-form button:disabled,
#upload-btn:disabled,
#submit-text-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.clients-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.clients-list li {
  background: var(--bg-card);
  border-left: 2px solid var(--gold);
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: transform .25s, box-shadow .25s;
}

.clients-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--gold-dim);
}

.meeting-item-title {
  cursor: pointer;
  flex: 1;
}

.meeting-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  flex-shrink: 0;
}

.meeting-delete-btn:hover { color: #e05252; }

.file-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.file-input-row .upload-label {
  flex: 1;
}

.file-clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.file-clear-btn svg { width: 16px; height: 16px; display: block; }

.file-clear-btn:hover { color: #e05252; }

.guess-speakers-toggle {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}

.guess-speakers-toggle input {
  margin-top: 3px;
  accent-color: var(--gold);
  flex-shrink: 0;
}

.guess-speakers-hint {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 400;
}

.guess-speakers-cost {
  display: block;
  font-size: 10px;
  color: var(--gold);
  margin-top: 4px;
  font-weight: 700;
}

.hidden { display: none !important; }

.back-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0;
  margin-bottom: 18px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  display: block;
}

#client-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 24px;
  color: var(--text);
  position: relative;
  z-index: 1;
  margin: 0 0 20px;
}

.upload-block {
  background: var(--bg-card);
  border-left: 2px solid var(--gold);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

#mode-media,
#mode-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.upload-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.upload-label input,
.upload-label textarea {
  display: block;
  margin-top: 10px;
  width: 100%;
  color: var(--text);
}

.or-divider {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  position: relative;
}

.or-divider::before,
.or-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--divider);
}

.or-divider::before { left: 0; }
.or-divider::after { right: 0; }

.upload-label textarea {
  font-family: var(--body);
  font-size: 14px;
  padding: 10px;
  border-radius: 6px;
  background: var(--bg-dark);
  border: 1px solid var(--divider);
  resize: vertical;
}

.upload-label textarea:focus { outline: none; border-color: var(--gold); }

#upload-status {
  font-size: 12px;
  color: var(--text-muted);
  min-height: 18px;
}

.file-limit-note {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
}

.truncated-warning {
  font-size: 12px;
  color: var(--gold);
  background: var(--gold-dim);
  border-left: 2px solid var(--gold);
  padding: 10px 12px;
  border-radius: 4px;
  line-height: 1.5;
}

.duration-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: -6px;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}

.duration-hint span {
  display: inline-block;
}

.duration-hint.marquee span {
  padding-left: 100%;
  animation: duration-marquee 8s linear infinite;
}

@keyframes duration-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.progress-wrap {
  height: 4px;
  background: var(--bg-dark);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  transition: width .3s;
}

.progress-bar.indeterminate {
  width: 40% !important;
  animation: progress-slide 1.2s ease-in-out infinite;
}

@keyframes progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

.mode-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.mode-tab {
  flex: 1;
  padding: 9px;
  border: 1px solid var(--divider);
  background: var(--bg-dark);
  border-radius: 4px;
  font-family: var(--body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .25s;
}

.mode-tab.active {
  background: var(--gold);
  color: var(--bg);
  border-color: transparent;
}

.sessions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.session-card {
  background: var(--bg-card);
  border-left: 2px solid var(--gold);
  border-radius: 6px;
  padding: 16px;
}

.session-card .date {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.session-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.session-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}

.session-delete-btn:hover { color: #e05252; }

.session-entry-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-expand-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 10px;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}

.transcript-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transcript-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.transcript-text {
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-light);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  user-select: text;
}

.transcript-actions {
  display: flex;
  gap: 16px;
}

.transcript-download,
.transcript-copy {
  font-size: 11px;
  color: var(--gold);
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;
  background: none;
  border: none;
  font-family: var(--body);
  padding: 0;
}

.session-card h3 {
  font-family: var(--display);
  font-style: italic;
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--text);
}

.session-card .field {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 8px;
  color: var(--text-light);
}

.session-card .field b {
  display: block;
  font-size: 10px;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.paywall {
  position: fixed;
  inset: 0;
  background: rgba(9, 17, 28, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.paywall-box {
  background: var(--bg-card);
  border-left: 2px solid var(--gold);
  border-radius: 8px;
  padding: 28px;
  text-align: center;
  max-width: 320px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paywall-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.paywall-close:hover { color: var(--text); }

.paywall-later-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 6px;
  text-decoration: underline;
}

.paywall-box p {
  margin-top: 0;
  color: var(--text-light);
  font-size: 15px;
}

.plan-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 300;
  font-size: 24px;
  color: var(--text);
  margin: 0 0 20px;
}

.plan-card {
  background: var(--bg-card);
  border-left: 2px solid var(--gold);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.plan-current-name {
  font-family: var(--display);
  font-style: italic;
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
}

.plan-usage {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.plan-progress-wrap {
  height: 6px;
  background: var(--bg-dark);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.plan-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  transition: width .3s;
}

.plan-renewal-note {
  font-size: 11px;
  color: var(--text-muted);
}

.plan-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.plan-action-btn {
  padding: 14px 18px;
  border-radius: 4px;
  border: none;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s;
}

.plan-action-btn:hover {
  background: #D4B65A;
  box-shadow: 0 8px 20px rgba(196, 146, 42, 0.2);
}

.plan-action-secondary {
  background: var(--bg-card);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.plan-action-secondary:hover {
  background: var(--gold-dim);
  box-shadow: none;
}

.plan-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-info-row {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.plan-info-row b {
  color: var(--gold);
}
