/* ========================================
   Vertical Video AI Platform — кастомные стили
   Дополняют Tailwind CSS (тёмная тема + акценты)
   ======================================== */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #2a2a2a;
  --bg-elevated: #222222;
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #6b6b6b;
  --accent-from: #6c3ce1;
  --accent-to: #e94057;
  --accent-gradient: linear-gradient(135deg, #6c3ce1 0%, #e94057 100%);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 12px;
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
  --transition: 0.25s ease;
}

/* Светлая тема */
body.light {
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e8e8ed;
  --bg-elevated: #ffffff;
  --border-color: rgba(0, 0, 0, 0.08);
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- Градиентный акцент ---- */
.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-bg {
  background: var(--accent-gradient);
}

.gradient-border {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
    var(--accent-gradient) border-box;
}

/* ---- Unified button system ---- */
.btn,
.btn-gradient,
.btn-ghost,
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 10px;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition),
    background var(--transition), border-color var(--transition);
}

.btn:active,
.btn-gradient:active,
.btn-ghost:active,
.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.97);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-primary,
.btn-gradient {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
}

.btn-primary:hover,
.btn-gradient:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(108, 60, 225, 0.4);
}

.btn-secondary,
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-weight: 500;
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: var(--bg-tertiary);
  border-color: rgba(108, 60, 225, 0.4);
}

/* Ripple on click */
.btn::after,
.btn-gradient::after,
.btn-ghost::after,
.btn-primary::after,
.btn-secondary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255, 255, 255, 0.35), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.btn:active::after,
.btn-gradient:active::after,
.btn-ghost:active::after,
.btn-primary:active::after,
.btn-secondary:active::after {
  opacity: 1;
  transition: opacity 0s;
}

/* ---- Glass-карточки ---- */
.glass-card {
  background: rgba(26, 26, 26, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glass);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

body.light .glass-card {
  background: rgba(255, 255, 255, 0.85);
}

.glass-card:hover {
  border-color: rgba(108, 60, 225, 0.3);
}

.glass-card.interactive:hover {
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 12px 40px rgba(108, 60, 225, 0.25);
}

/* ---- Layout приложения ---- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar-logo {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border-color);
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  margin: 0.15rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
  border: none;
  background: transparent;
  width: calc(100% - 1.5rem);
  text-align: left;
}

.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(108, 60, 225, 0.15);
  color: #fff;
  position: relative;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent-gradient);
}

body.light .nav-item.active {
  color: var(--accent-from);
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 1rem;
}

.app-body {
  padding: 1.5rem;
  flex: 1;
}

/* ---- Секции SPA ---- */
.app-section {
  display: none;
  animation: fadeIn 0.35s ease;
}

.app-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Прогресс-бар ---- */
.progress-track {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-fill.animated {
  background: linear-gradient(
    90deg,
    var(--accent-from) 0%,
    var(--accent-to) 40%,
    rgba(255, 255, 255, 0.55) 50%,
    var(--accent-to) 60%,
    var(--accent-from) 100%
  );
  background-size: 200% 100%;
  animation: progressShimmer 1.4s linear infinite;
}

@keyframes progressShimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* ---- Статусы ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.badge-neutral {
  background: rgba(160, 160, 160, 0.15);
  color: var(--text-secondary);
}

/* ---- Таблицы ---- */
.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 0.875rem 1rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  color: var(--text-primary);
}

.data-table tr:hover td {
  background: rgba(108, 60, 225, 0.05);
}

/* ---- Модалки ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.2, 0.9, 0.4, 1), visibility 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
  will-change: opacity;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1), opacity 0.3s cubic-bezier(0.2, 0.9, 0.4, 1);
  will-change: transform, opacity;
  opacity: 0.96;
}

.modal-overlay.open .modal-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-panel.modal-lg {
  max-width: 900px;
}

.modal-panel.modal-xl {
  max-width: 1100px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* ---- Тосты ---- */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: toastIn 0.3s ease;
  font-size: 0.875rem;
}

.toast.removing {
  animation: toastOut 0.25s ease forwards;
}

.toast-success {
  border-left: 3px solid var(--success);
}

.toast-error {
  border-left: 3px solid var(--danger);
}

.toast-info {
  border-left: 3px solid var(--info);
}

.toast-warning {
  border-left: 3px solid var(--warning);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* ---- Формы ---- */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent-from);
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

/* ---- Вкладки ---- */
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.tab-btn {
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--transition);
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: #fff;
  border-bottom-color: var(--accent-from);
}

body.light .tab-btn.active {
  color: var(--accent-from);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ---- Wizard steps ---- */
.wizard-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.wizard-step {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  position: relative;
}

.wizard-step.active {
  background: rgba(108, 60, 225, 0.2);
  color: #c4a8ff;
}

.wizard-step.done {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

/* ---- Редактор сценариев ---- */
.script-editor-layout {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 1rem;
  min-height: 480px;
}

@media (max-width: 1100px) {
  .script-editor-layout {
    grid-template-columns: 1fr;
  }
}

.structure-block {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.structure-block:hover,
.structure-block.active {
  border-color: var(--accent-from);
  background: rgba(108, 60, 225, 0.1);
}

.timing-highlight {
  background: rgba(108, 60, 225, 0.2);
  border-radius: 2px;
  padding: 0 2px;
}

/* ---- Аватары галерея ---- */
.avatar-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

/* ---- Календарь контент-плана ---- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .calendar-grid {
    grid-template-columns: 1fr;
  }
}

.calendar-day {
  min-height: 140px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
}

.plan-card {
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  border-left: 3px solid;
}

.plan-card.pattern {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--success);
}

.plan-card.scale {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--info);
}

.plan-card.hypothesis {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
}

/* ---- Псевдо-DnD календарь публикаций ---- */
.dnd-slot {
  min-height: 80px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 0.5rem;
  transition: border-color var(--transition), background var(--transition);
}

.dnd-slot:hover {
  border-color: var(--accent-from);
  background: rgba(108, 60, 225, 0.05);
}

.dnd-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  cursor: grab;
  margin-bottom: 0.35rem;
}

/* ---- Видео превью ---- */
.video-thumb {
  width: 48px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
}

.video-player-mock {
  aspect-ratio: 9 / 16;
  max-height: 420px;
  background: #000;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.video-player-mock img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

/* ---- Лендинг ---- */
.landing-page {
  overflow-x: hidden;
}

.landing-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.landing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(108, 60, 225, 0.35), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(233, 64, 87, 0.2), transparent),
    var(--bg-primary);
  z-index: -1;
}

.hero-waves {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 40% 30% at 10% 80%, rgba(108, 60, 225, 0.12), transparent),
    radial-gradient(ellipse 35% 25% at 90% 20%, rgba(233, 64, 87, 0.1), transparent);
  animation: landing-wave-shift 14s ease-in-out infinite alternate;
}

@keyframes landing-wave-shift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2%, 1.5%, 0) scale(1.05); }
}

.hero-float-icons {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.float-icon {
  position: absolute;
  font-size: 1.5rem;
  color: rgba(196, 168, 255, 0.25);
  animation: landing-float 8s ease-in-out infinite;
  will-change: transform;
}

.float-icon:nth-child(1) { top: 18%; left: 8%; animation-delay: 0s; }
.float-icon:nth-child(2) { top: 28%; right: 10%; animation-delay: 1.2s; font-size: 1.75rem; }
.float-icon:nth-child(3) { bottom: 22%; left: 14%; animation-delay: 2s; }
.float-icon:nth-child(4) { bottom: 30%; right: 16%; animation-delay: 0.6s; color: rgba(233, 64, 87, 0.2); }
.float-icon:nth-child(5) { top: 55%; left: 48%; animation-delay: 1.8s; font-size: 1.25rem; }

@keyframes landing-float {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-14px); opacity: 0.55; }
}

.landing-nav {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.landing-hamburger {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.landing-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.landing-nav-overlay.open {
  opacity: 1;
}

.landing-mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: min(300px, 86vw);
  height: 100%;
  z-index: 50;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  padding: 5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.4, 1);
}

.landing-mobile-nav.open {
  transform: translateX(0);
}

.landing-mobile-nav a {
  color: var(--text-secondary, #a0a0b8);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.5rem 0;
}

.landing-mobile-nav a:hover {
  color: #fff;
}

body.landing-nav-open {
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  max-width: 920px;
  margin: 0 auto;
}

.promo-countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.75rem;
  margin-bottom: 1.25rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #e8d48b;
}

.price-chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 1.15rem;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.price-chip-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #4ade80;
}

.price-chip-meta {
  font-size: 0.8rem;
  color: var(--text-muted, #6b6b80);
}

.price-success {
  color: #4ade80;
}

.gold-accent {
  color: #e8d48b;
}

.hero-calculator {
  text-align: left;
}

.volume-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.volume-pill {
  padding: 0.55rem 0.25rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary, #a0a0b8);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.15s;
}

.volume-pill:hover {
  border-color: rgba(108, 60, 225, 0.5);
  color: #fff;
}

.volume-pill.active {
  background: rgba(108, 60, 225, 0.25);
  border-color: rgba(108, 60, 225, 0.7);
  color: #fff;
}

.hero-calc-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-calc-rub {
  font-size: 1.5rem;
  font-weight: 800;
  color: #4ade80;
  margin-right: 0.4rem;
}

.landing-select {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  padding: 0.35rem 0.55rem;
  font-size: 0.85rem;
}

/* Demo pipeline */
.demo-pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

.demo-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(196, 168, 255, 0.45);
  font-size: 1rem;
  padding-top: 1.5rem;
}

.demo-card {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  min-height: 280px;
  transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s;
}

.demo-card--active {
  border-color: rgba(108, 60, 225, 0.65);
  box-shadow: 0 0 0 1px rgba(108, 60, 225, 0.35), 0 12px 40px rgba(108, 60, 225, 0.15);
  transform: translateY(-2px);
}

.demo-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.demo-card-body {
  flex: 1;
}

.demo-skeleton {
  color: var(--text-muted, #6b6b80);
  font-size: 0.85rem;
}

.demo-avatar-row {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.demo-avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.demo-result-layout {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.demo-thumb-wrap {
  position: relative;
  width: 72px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  background: #000;
}

.demo-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

.demo-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.25);
}

.demo-price-bar {
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(108, 60, 225, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c4a8ff;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-icon--spin i {
  transition: transform 0.5s ease;
}

.feature-card-link:hover .feature-icon--spin i {
  transform: rotate(20deg);
}

.feature-icon--spin-slow i {
  transition: transform 0.6s ease;
}

.feature-card-link:hover .feature-icon--spin-slow i {
  transform: rotate(45deg);
}

.feature-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.feature-link-hint {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: #c4a8ff;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* Testimonials */
.testimonials-carousel {
  display: none;
  overflow: hidden;
  position: relative;
}

.testimonials-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.4, 1);
}

.testimonial-slide {
  min-width: 100%;
  box-sizing: border-box;
}

.testimonials-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.testimonial-dot.active {
  background: #c4a8ff;
  transform: scale(1.2);
}

/* Pricing */
.payg-banner {
  border-color: rgba(212, 175, 55, 0.3);
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-card ul {
  flex: 1;
}

.pricing-card--featured {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.2), 0 16px 48px rgba(108, 60, 225, 0.12);
}

.pricing-badge {
  position: absolute;
  top: -10px;
  right: 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4af37, #f0d77b);
  color: #1a1205;
}

.landing-final-cta {
  padding: 2.75rem 2rem;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 80% 80% at 50% 0%, rgba(108, 60, 225, 0.35), transparent 60%),
    radial-gradient(ellipse 60% 60% at 80% 100%, rgba(233, 64, 87, 0.2), transparent 55%),
    var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.btn-pulse {
  animation: landing-cta-pulse 2.4s ease-in-out infinite;
}

@keyframes landing-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108, 60, 225, 0.45); }
  50% { box-shadow: 0 0 0 12px rgba(108, 60, 225, 0); }
}

/* Reveal on scroll */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Demo modal */
.demo-modal-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.demo-modal-preview {
  max-height: 320px;
  width: 100%;
}

.demo-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.demo-modal-steps {
  list-style: decimal;
  padding-left: 1.1rem;
}

@media (max-width: 900px) {
  .demo-pipeline {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .demo-arrow {
    padding: 0;
    transform: rotate(90deg);
  }

  .demo-card {
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .landing-nav {
    padding: 1rem 1.25rem;
  }

  .hero-content {
    padding: 1.25rem 1rem 2.5rem;
  }

  .hero-calculator {
    max-width: 100%;
  }

  .testimonials-desktop {
    display: none;
  }

  .testimonials-carousel {
    display: block;
  }

  .demo-modal-grid {
    grid-template-columns: 1fr;
  }

  .demo-modal-preview {
    max-width: 160px;
    margin: 0 auto;
  }

  .float-icon {
    font-size: 1.15rem;
    opacity: 0.5;
  }
}

/* ---- Мобильное меню ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 35;
}

.sidebar-overlay.open {
  display: block;
}

.hamburger-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .hamburger-btn {
    display: block;
  }

  .app-body {
    padding: 1rem;
  }

  .search-input-wrap {
    display: none !important;
  }
}

/* ---- Утилиты ---- */
.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kpi-change.up {
  color: var(--success);
}

.kpi-change.down {
  color: var(--danger);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  font-size: 0.9rem;
}

.icon-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* Скроллбар */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* ========================================
   Filter System — чипсы, панель, пагинация
   ======================================== */

.filter-root {
  margin-bottom: 1rem;
}

.filter-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.filter-chip:hover {
  border-color: rgba(108, 60, 225, 0.4);
  color: var(--text-primary);
}

.filter-chip.active {
  background: rgba(108, 60, 225, 0.2);
  border-color: var(--accent-from);
  color: #c4a8ff;
}

body.light .filter-chip.active {
  color: var(--accent-from);
}

.filter-chip .chip-count {
  opacity: 0.7;
  font-size: 0.7rem;
}

.filter-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.filter-search-wrap .form-input {
  padding-left: 2.25rem;
}

.filter-search-wrap .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-glass);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.filter-autocomplete.open {
  display: block;
}

.filter-autocomplete button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.875rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

.filter-autocomplete button:hover,
.filter-autocomplete button[aria-selected="true"] {
  background: rgba(108, 60, 225, 0.15);
}

.filter-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 0;
}

.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(108, 60, 225, 0.12);
  border: 1px solid rgba(108, 60, 225, 0.3);
  font-size: 0.75rem;
  color: #c4a8ff;
}

body.light .active-chip {
  color: var(--accent-from);
}

.active-chip button {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
}

.active-chip button:hover {
  opacity: 1;
}

.filter-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.filter-result-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.filter-meta-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.advanced-filters {
  display: none;
  margin-top: 0.75rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  animation: fadeIn 0.25s ease;
}

.advanced-filters.open {
  display: block;
}

.advanced-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.filter-group h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  cursor: pointer;
}

.filter-check input {
  accent-color: var(--accent-from);
}

.filter-range-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.filter-range-row .form-input {
  flex: 1;
}

.hashtag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.hashtag-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-tertiary);
  font-size: 0.75rem;
}

.advanced-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.filter-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
}

.pagination-pages {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent-from);
  color: var(--text-primary);
}

.page-btn.active {
  background: rgba(108, 60, 225, 0.25);
  border-color: var(--accent-from);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.filter-skeleton {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.75rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.filter-skeleton.visible {
  opacity: 1;
}

.filter-skeleton::after {
  content: '';
  display: block;
  height: 100%;
  width: 40%;
  background: var(--accent-gradient);
  animation: skeletonSlide 0.8s ease-in-out infinite;
}

@keyframes skeletonSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.filter-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.filter-empty i {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.table-row-fade {
  animation: fadeIn 0.3s ease;
}

.preset-dropdown {
  position: relative;
}

.preset-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 260px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--shadow-glass);
  z-index: 60;
  padding: 0.35rem;
  max-height: 280px;
  overflow-y: auto;
}

.preset-menu.open {
  display: block;
}

.preset-menu button {
  display: flex;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.preset-menu button:hover {
  background: rgba(108, 60, 225, 0.12);
}

.preset-menu .preset-del {
  opacity: 0.5;
  font-size: 0.75rem;
}

.preset-menu .preset-del:hover {
  opacity: 1;
  color: var(--danger);
}

.group-header {
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  background: rgba(108, 60, 225, 0.08);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .filter-search-row {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-meta-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---- Adult mode banner (Аватары) ---- */
.adult-mode-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(233, 64, 87, 0.12), rgba(108, 60, 225, 0.1));
  border: 1px solid rgba(233, 64, 87, 0.35);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.adult-mode-banner.is-on {
  border-color: rgba(233, 64, 87, 0.7);
  box-shadow: 0 0 24px rgba(233, 64, 87, 0.15);
}

.adult-mode-banner__text {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.adult-mode-banner__badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e94057, #6c3ce1);
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.adult-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}

.adult-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.adult-switch__track {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  position: relative;
  transition: background 0.35s cubic-bezier(0.2, 0.9, 0.4, 1), border-color 0.35s cubic-bezier(0.2, 0.9, 0.4, 1);
}

.adult-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.4, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.adult-switch input:checked + .adult-switch__track {
  background: linear-gradient(135deg, #e94057, #6c3ce1);
  border-color: transparent;
}

.adult-switch input:checked + .adult-switch__track .adult-switch__thumb {
  transform: translateX(20px);
}

.adult-switch__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 2.5rem;
}

.adult-switch input:checked ~ .adult-switch__label {
  color: #e94057;
}

.avatar-card.is-adult {
  position: relative;
}

.avatar-card.is-adult::after {
  content: '18+';
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(233, 64, 87, 0.9);
  color: #fff;
  z-index: 2;
}

.avatar-card img {
  background: var(--bg-tertiary);
}

/* ---- Catalog mode segment (Аватары) ---- */
.catalog-mode-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.catalog-mode-btn {
  padding: 0.55rem 1rem;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease;
}

.catalog-mode-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.catalog-mode-btn.active {
  background: rgba(108, 60, 225, 0.2);
  color: #c4a8ff;
}

.catalog-mode-btn--adult.active {
  background: linear-gradient(135deg, rgba(233, 64, 87, 0.25), rgba(108, 60, 225, 0.2));
  color: #ff8fa3;
}

.catalog-mode-btn--custom.active {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.avatar-card.is-custom::after {
  content: 'Custom';
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  background: rgba(59, 130, 246, 0.9);
  color: #fff;
  z-index: 2;
}

.avatar-card .avatar-username {
  font-size: 0.75rem;
  color: #93c5fd;
  margin-top: 0.15rem;
}

/* ---- Section skeletons ---- */
.skeleton-block,
.skeleton-row,
.skeleton-card {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, rgba(108, 60, 225, 0.12) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeletonSlide 1.2s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-block {
  height: 72px;
  margin-bottom: 0.75rem;
}

.skeleton-row {
  height: 44px;
  margin-bottom: 0.5rem;
}

.skeleton-card {
  height: 220px;
  border-radius: var(--radius);
}

.skeleton-wrap {
  display: grid;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.skeleton-wrap.cols-3 {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.skeleton-wrap.cols-4 {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

/* ---- Render ETA timer ---- */
.render-eta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.render-eta-ring {
  position: relative;
  width: 96px;
  height: 96px;
}

.render-eta-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.render-eta-ring .eta-bg {
  fill: none;
  stroke: var(--bg-tertiary);
  stroke-width: 6;
}

.render-eta-ring .eta-fg {
  fill: none;
  stroke: url(#etaGradient);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.4s ease;
}

.eta-digits {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.eta-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Period chips / column picker ---- */
.period-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.period-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.period-chip:hover {
  color: var(--text-primary);
  border-color: rgba(108, 60, 225, 0.4);
}

.period-chip.active {
  background: rgba(108, 60, 225, 0.25);
  border-color: var(--accent-from);
  color: #fff;
}

/* ---- Dashboard marketer panels ---- */
.dash-banners {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  line-height: 1.35;
  position: relative;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.dash-banner.is-hiding {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.dash-banner.is-appearing {
  animation: dashBannerIn 0.35s ease;
}

@keyframes dashBannerIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dash-banner.danger {
  background: rgba(233, 64, 87, 0.12);
  border-color: rgba(233, 64, 87, 0.35);
  color: #ffb4bf;
}

.dash-banner.warning {
  background: rgba(245, 166, 35, 0.12);
  border-color: rgba(245, 166, 35, 0.35);
  color: #ffd59a;
}

.dash-banner.info {
  background: rgba(108, 60, 225, 0.12);
  border-color: rgba(108, 60, 225, 0.35);
  color: #d4c4ff;
}

.dash-banner-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
}

.banner-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-family: inherit;
}

.banner-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.dash-kpis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .dash-kpis-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dash-kpi-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.dash-kpi-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.dash-kpi-label i {
  opacity: 0.75;
  width: 1rem;
  text-align: center;
}

.dash-kpi-clickable {
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dash-kpi-clickable:hover {
  border-color: rgba(108, 60, 225, 0.45);
  background: rgba(108, 60, 225, 0.06);
}

.dash-kpi-balance .btn-gradient {
  align-self: flex-start;
}

.dash-kpi-card .kpi-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.35rem;
}

.kpi-change.zero {
  color: var(--text-muted);
}

.kpi-trend {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.kpi-trend.up {
  color: var(--success);
}

.kpi-trend.down {
  color: var(--danger);
}

.romi-good {
  color: var(--success);
}

.romi-mid {
  color: #f5a623;
}

.romi-bad {
  color: var(--danger);
}

.dash-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .dash-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .dash-quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dash-action-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-card, rgba(255, 255, 255, 0.03));
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: var(--text-primary);
  transition: border-color 0.2s ease, transform 0.15s ease, background 0.2s ease;
  min-width: 0;
}

.dash-action-card:hover {
  border-color: rgba(108, 60, 225, 0.5);
  background: rgba(108, 60, 225, 0.08);
  transform: translateY(-1px);
}

.dash-action-card .action-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 60, 225, 0.2);
  color: #c4a8ff;
  flex-shrink: 0;
}

.dash-action-card .action-text {
  min-width: 0;
  flex: 1;
}

.dash-action-card .action-label {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
}

.dash-action-card .action-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-eta-value {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.queue-eta-value.eta-tick {
  animation: etaPulse 0.35s ease;
}

@keyframes etaPulse {
  0% {
    opacity: 0.4;
    transform: translateY(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.queue-row-enter {
  animation: queueRowIn 0.35s ease both;
}

@keyframes queueRowIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dash-video-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
}

.dash-video-row:last-child {
  border-bottom: none;
}

.dash-video-row .video-thumb {
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.dash-video-metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.dash-chart-peaks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-peak-chip {
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: rgba(233, 64, 87, 0.12);
  border: 1px solid rgba(233, 64, 87, 0.25);
  color: var(--text-secondary);
  max-width: 100%;
}

.dash-peak-chip strong {
  color: var(--text-primary);
}

.dash-tips-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .dash-tips-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dash-tip-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.dash-tip-card.warning {
  border-color: rgba(245, 166, 35, 0.35);
}

.dash-tip-card summary {
  list-style: none;
  cursor: pointer;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.dash-tip-card summary::-webkit-details-marker {
  display: none;
}

.dash-tip-card .tip-body {
  padding: 0 1rem 0.9rem 3.1rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.dash-queue-error-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(233, 64, 87, 0.1);
  border: 1px solid rgba(233, 64, 87, 0.25);
  font-size: 0.8rem;
  color: #ffb4bf;
}

.dash-pub-chart-wrap {
  height: 180px;
  margin-top: 0.25rem;
}

.queue-eta {
  display: inline-flex;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}

.eta-mins,
.eta-secs {
  display: inline-block;
}

.eta-secs.eta-pulse {
  animation: etaDigitPulse 0.2s ease;
}

@keyframes etaDigitPulse {
  0% {
    transform: translateY(2px);
    color: #2dd4a8;
  }
  100% {
    transform: translateY(0);
    color: inherit;
  }
}

.queue-done {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #2dd4a8;
  font-weight: 600;
  font-size: 0.85rem;
  animation: queueCheckIn 0.35s ease;
}

.queue-done i {
  font-size: 1rem;
}

@keyframes queueCheckIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.queue-row-completed {
  border-radius: 8px;
  background: rgba(45, 212, 168, 0.08);
  outline: 1px solid rgba(45, 212, 168, 0.25);
  padding-left: 0.35rem;
  padding-right: 0.35rem;
}

.queue-row-fadeout {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.period-custom-dates {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

.column-picker {
  position: relative;
  display: inline-block;
}

.column-picker-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem;
  z-index: 30;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  display: none;
}

.column-picker-menu.open {
  display: block;
}

.column-picker-menu label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.bulk-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.bulk-template-card {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  text-align: left;
  font-family: inherit;
  color: var(--text-primary);
}

.bulk-template-card:hover {
  border-color: rgba(108, 60, 225, 0.5);
  transform: translateY(-1px);
}

.bulk-template-card strong {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.bulk-template-card span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.avatar-stats-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.avatar-stats-mini span {
  background: rgba(108, 60, 225, 0.12);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
}

.avatar-cell-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

.avatar-cell-link img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.theme-link {
  color: #93c5fd;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.view-toggle {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.filter-extra-group {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.filter-extra-group summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.toast-action-btn {
  margin-left: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.user-dropdown-notifs {
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  margin-bottom: 0.25rem;
}

.user-dropdown-notifs .notif-item {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.user-dropdown-notifs .notif-item strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.8rem;
}

/* ---- Print styles (analytics PDF) ---- */
@media print {
  .sidebar,
  .app-header,
  .filter-bar,
  .period-chips,
  .period-custom-dates,
  .view-toggle,
  #btn-export-analytics,
  #btn-export-pdf,
  .column-picker,
  .toast-container,
  .modal-overlay,
  [data-nav],
  .hamburger-btn,
  #hamburger-btn {
    display: none !important;
  }

  .main-content {
    margin: 0 !important;
    width: 100% !important;
  }

  .app-section:not(#section-analytics) {
    display: none !important;
  }

  #section-analytics {
    display: block !important;
  }

  .glass-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }
}
