:root {
  --bg: #07090f;
  --bg-alt: #0c111b;
  --panel: rgba(13, 18, 28, 0.92);
  --panel-strong: rgba(9, 13, 20, 0.96);
  --panel-border: rgba(63, 225, 194, 0.18);
  --surface: rgba(13, 18, 30, 0.85);
  --surface-card: rgba(16, 22, 36, 0.92);
  --border: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(242, 156, 75, 0.4);
  --slide-settings-border: 1px solid rgba(255, 255, 255, 0.28);
  --slide-settings-bg: rgba(15, 20, 30, 0.6);
  --slide-settings-popover-bg: rgba(14, 18, 28, 0.98);
  --slide-settings-popover-border: 1px solid rgba(255, 255, 255, 0.18);
  --slide-settings-label-color: var(--text-muted);
  --slide-settings-select-border: 1px solid rgba(255, 255, 255, 0.22);
  --text: #f5f7ff;
  --muted: #a6b0c4;
  --text-muted: var(--muted);
  --accent: #3fe1c2;
  --accent-2: #f29c4b;
  --accent-3: #d7e36a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --glow-shadow: 0 0 0 1px rgba(63, 225, 194, 0.12), 0 18px 50px rgba(7, 10, 18, 0.6);
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-display: 'Fraunces', serif;
  --text-xxl: clamp(2.4rem, 4.8vw, 4rem);
  --text-xl: clamp(1.6rem, 2.6vw, 2.4rem);
  --text-lg: 1.15rem;
  --text-md: 1rem;
  --text-sm: 0.9rem;
  --text-xs: 0.78rem;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background: radial-gradient(circle at 15% 20%, rgba(63, 225, 194, 0.18) 0%, transparent 48%),
    radial-gradient(circle at 85% 10%, rgba(242, 156, 75, 0.2) 0%, transparent 42%),
    radial-gradient(circle at 70% 85%, rgba(215, 227, 106, 0.14) 0%, transparent 52%),
    linear-gradient(140deg, #05060a 0%, #0b111b 45%, #07090f 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}


.glow {
  position: fixed;
  inset: -40vh -20vw auto auto;
  height: 55vh;
  width: 55vh;
  background: radial-gradient(circle, rgba(63, 225, 194, 0.3), rgba(242, 156, 75, 0.18) 35%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: float 12s ease-in-out infinite alternate;
}

@keyframes float {
  from {
    transform: translate(-10%, -5%);
  }
  to {
    transform: translate(10%, 5%);
  }
}

/* ===== GLOBAL APP HEADER ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(7, 9, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(63, 225, 194, 0.1);
}

.app-header .brand-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.app-header .brand-compact .brand-mark {
  width: 32px;
  height: 32px;
}

.app-header .brand-compact .brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.beta-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  margin-left: 6px;
  line-height: 1.4;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.app-header-actions .ghost {
  padding: 6px 12px;
  font-size: var(--text-sm);
}

.app-header-actions .app-header-cta {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.app-header-actions .app-header-cta--primary {
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.96), rgba(242, 156, 75, 0.94));
  color: #04121a;
  box-shadow: 0 12px 24px rgba(63, 225, 194, 0.22), 0 8px 20px rgba(242, 156, 75, 0.18);
}

.app-header-actions .app-header-cta--primary:hover,
.app-header-actions .app-header-cta--primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(63, 225, 194, 0.28), 0 10px 24px rgba(242, 156, 75, 0.25);
}

.app-header-actions .app-header-cta:focus-visible {
  outline: 2px solid rgba(63, 225, 194, 0.75);
  outline-offset: 2px;
}

.app-header .app-email {
  font-size: var(--text-xs);
  color: var(--muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-header .account-credits {
  font-size: var(--text-xs);
  color: var(--accent);
  padding: 4px 10px;
  background: rgba(63, 225, 194, 0.1);
  border-radius: var(--radius-pill);
  cursor: pointer;
  user-select: none;
}

.app-header .account-credits:hover {
  background: rgba(63, 225, 194, 0.18);
}

.app-header .account-credits:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Credits warning badge — make clickable */
.credits-warning {
  cursor: pointer;
}

.credits-warning:hover {
  opacity: 0.9;
}

.credits-warning:focus-visible {
  outline: 2px solid #ffc107;
  outline-offset: 2px;
}

/* ===== CREDITS POPOVER ===== */
.credits-popover {
  position: fixed;
  width: 280px;
  background: var(--panel-strong);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glow-shadow);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.credits-popover.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.credits-popover__inner {
  padding: 16px;
}

.credits-popover__section {
  margin-bottom: 12px;
}

.credits-popover__section--history {
  border-top: 1px solid rgba(63, 225, 194, 0.1);
  padding-top: 12px;
}

.credits-popover__heading {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 600;
}

.credits-popover__balance {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.credits-popover__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text);
}

.credits-popover__row--muted {
  justify-content: flex-start;
}

.credits-popover__row--total {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(63, 225, 194, 0.08);
  font-weight: 600;
}

.credits-popover__row--concurrency {
  border-top: 1px solid rgba(63, 225, 194, 0.08);
  margin-top: 4px;
  padding-top: 8px;
}

.credits-popover__row--boost {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(242, 156, 75, 0.15);
}

.credits-popover__label {
  color: var(--muted);
}

.credits-popover__value {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.credits-popover__sublabel {
  font-size: var(--text-xs);
  color: var(--muted);
}

.credits-popover__history {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.credits-popover__history-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--text-xs);
  padding: 5px 0;
}

.credits-popover__history-main {
  min-width: 0;
  flex: 1;
}

.credits-popover__history-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.credits-popover__history-name {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.credits-popover__history-detail {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.35;
  white-space: normal;
}

.credits-popover__history-date {
  color: var(--muted);
  flex-shrink: 0;
}

.credits-popover__history-credits {
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
  margin-top: 1px;
}

.credits-popover__history-credits.is-negative {
  color: #ff9f6b;
}

.credits-popover__empty {
  font-size: var(--text-xs);
  color: var(--muted);
  font-style: italic;
}

.credits-popover__hint {
  margin: 0 0 8px;
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.35;
}

.credits-popover__link {
  display: block;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--accent);
  text-decoration: none;
  padding: 10px 0 0;
  border-top: 1px solid rgba(63, 225, 194, 0.1);
  margin-top: 12px;
}

.credits-popover__link:hover {
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .credits-popover {
    transition: opacity 0.15s ease;
    transform: none;
  }

  .credits-popover.is-open {
    transform: none;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 10px 16px;
  }

  .app-header .brand-compact .brand-name {
    display: none;
  }

  .app-header-actions {
    gap: 6px;
  }

  .app-header-actions .ghost {
    padding: 6px 10px;
    font-size: var(--text-xs);
  }

  .app-header-actions .app-header-cta {
    min-height: 44px;
    padding: 0 12px;
    font-size: var(--text-xs);
  }

  .app-header .app-email {
    display: none;
  }

  .app-header .account-credits {
    font-size: 10px;
    padding: 3px 8px;
  }
}

@media (max-width: 480px) {
  .app-header {
    padding: 8px 12px;
    gap: 8px;
  }

  .app-header-actions {
    gap: 4px;
  }

  .app-header-actions .ghost {
    padding: 4px 6px;
    font-size: 10px;
  }

  .app-header-actions .app-header-cta {
    min-height: 44px;
    padding: 0 10px;
    font-size: 11px;
  }

  /* On very small screens, hide some nav items */
  .app-header #appAdminBtn {
    display: none;
  }

  .app-header .account-credits {
    font-size: 9px;
    padding: 2px 6px;
  }
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  padding: 48px 8vw 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: var(--text-xs);
  color: var(--accent);
  margin-bottom: 16px;
  text-shadow: 0 0 18px rgba(63, 225, 194, 0.35);
}

.lede {
  color: rgba(245, 247, 255, 0.72);
  font-size: var(--text-lg);
}

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

.dropzone {
  border: 1.5px dashed rgba(63, 225, 194, 0.5);
  padding: 28px;
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  background: rgba(10, 14, 22, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(63, 225, 194, 0.1);
  box-shadow: 0 0 0 1px rgba(63, 225, 194, 0.35), 0 18px 40px rgba(5, 10, 18, 0.6);
}

.drop-title {
  margin: 0 0 6px;
  font-size: var(--text-lg);
  font-weight: 600;
}

.drop-sub {
  margin: 0;
  color: var(--muted);
}

.controls {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.review-config-panel {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(8, 12, 20, 0.65);
  display: grid;
  gap: 12px;
}

.review-config-row {
  display: grid;
  gap: 10px;
}

.review-config-panel .variant-config,
.review-config-panel .preview-config {
  margin-top: 0;
}

.review-config-panel .variant-config {
  flex-wrap: wrap;
  row-gap: 6px;
}

.review-config-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.review-config-panel .model-config {
  margin-top: 0;
}

.review-config-panel .estimate-summary {
  margin-top: 0;
}

.review-boost-controls {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(242, 156, 75, 0.2);
  background: rgba(242, 156, 75, 0.06);
}

.boost-level-selector {
  display: flex;
  gap: 2px;
  background: var(--surface-alt, #2a2a2a);
  border-radius: 8px;
  padding: 2px;
}

.boost-level-btn {
  flex: 1;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #999);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .boost-level-btn {
    transition: none;
  }
}

.boost-level-btn:hover:not(:disabled) {
  background: var(--surface-hover, #333);
  color: var(--text-primary, #eee);
}

.boost-level-btn.active {
  background: var(--accent, #e88c30);
  color: #fff;
}

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

.boost-capacity-note {
  font-size: 0.75rem;
  color: var(--warning, #e8a830);
  margin-top: 4px;
}

.review-boost-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}


.review-boost-hint {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.review-boost-hint a.boost-buy-link {
  color: var(--accent);
  text-decoration: underline;
}

.boost-surcharge-hint {
  color: var(--text-muted);
  font-weight: 500;
}

@media (min-width: 768px) {
  .review-config-row {
    grid-template-columns: minmax(240px, 1fr) minmax(220px, 1fr);
    align-items: center;
  }

  .review-config-row .preview-config {
    justify-self: end;
  }

  .review-config-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (min-width: 1024px) {
  .review-config-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

.output-target-toggle {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(6, 10, 18, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.output-target-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.output-target-option input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.output-target-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(110, 170, 255, 0.25);
  background: rgba(10, 14, 22, 0.55);
  color: rgba(211, 221, 244, 0.86);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.output-target-option:hover span {
  border-color: rgba(110, 170, 255, 0.45);
  color: rgba(235, 243, 255, 0.95);
}

.output-target-option.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.output-target-option input:checked + span {
  border-color: rgba(63, 225, 194, 0.68);
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.32), rgba(242, 156, 75, 0.25));
  color: rgba(241, 254, 251, 0.98);
  box-shadow: 0 10px 24px rgba(5, 10, 18, 0.45), inset 0 0 0 1px rgba(63, 225, 194, 0.24);
}

.output-target-option input:focus-visible + span {
  outline: 2px solid rgba(63, 225, 194, 0.7);
  outline-offset: 2px;
}

.video-options-panel {
  margin-top: 4px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(8, 12, 20, 0.55);
  display: grid;
  gap: 10px;
}

.video-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.video-options-grid .variant-config {
  margin-top: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(8, 12, 20, 0.58);
}

.video-options-grid .variant-config label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(211, 221, 244, 0.68);
}

.video-options-grid .variant-config select {
  width: 100%;
  min-height: 44px;
}

.video-options-grid .variant-config--checkbox .field-checkbox {
  text-transform: none;
  letter-spacing: normal;
  font-size: var(--text-sm);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-options-panel .panel-note {
  margin: 0;
  font-size: var(--text-xs);
  color: rgba(211, 221, 244, 0.72);
}

.video-scene-editor {
  margin-top: 4px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(110, 170, 255, 0.22);
  background: rgba(8, 12, 20, 0.5);
  display: grid;
  gap: 10px;
}

.video-scene-editor-header {
  display: grid;
  gap: 8px;
}

.video-scene-editor-header > span {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(211, 221, 244, 0.72);
}

.video-scene-list {
  display: grid;
  gap: 8px;
}

.video-scene-list .status-note {
  margin: 0;
  font-size: var(--text-xs);
}

.video-notify-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: var(--text-sm);
  color: rgba(225, 236, 255, 0.92);
}

.video-notify-option input[type='checkbox'] {
  width: 16px;
  height: 16px;
}

.video-notify-hint {
  margin-top: 4px;
}

.video-scene-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(110, 170, 255, 0.18);
  background: rgba(10, 14, 22, 0.64);
}

.video-scene-item-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(231, 241, 255, 0.96);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.scene-pacing-warning {
  color: #ffd166;
  font-size: 1rem;
  cursor: help;
  margin-left: 6px;
}

.video-scene-item textarea {
  width: 100%;
  min-height: 88px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(63, 225, 194, 0.22);
  background: rgba(6, 10, 18, 0.82);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  line-height: 1.45;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.video-scene-item textarea:focus {
  outline: none;
  border-color: rgba(63, 225, 194, 0.6);
  box-shadow: 0 0 0 2px rgba(63, 225, 194, 0.18);
}

.video-job-status-panel {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(8, 12, 20, 0.55);
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.video-job-status-panel .status-note {
  margin: 0;
}

.video-job-status-panel video {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(63, 225, 194, 0.24);
  background: rgba(3, 6, 12, 0.95);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.video-job-status-panel a:not(.video-job-action) {
  justify-self: start;
  min-height: 44px;
}

.video-job-status-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.video-job-status-actions .video-job-action {
  min-height: 40px;
  padding: 9px 12px;
  justify-self: stretch;
  font-size: var(--text-sm);
}

.video-job-status-actions > .video-merge-preview {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .video-job-status-actions {
    grid-template-columns: 1fr;
  }
}

.video-merge-preview {
  margin-top: 12px;
}

.video-merge-preview video {
  width: 100%;
  max-height: 480px;
  border-radius: 10px;
  background: #000;
}

.video-movie-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.video-movie-card {
  border: 1px solid rgba(63, 225, 194, 0.2);
  border-radius: var(--radius-sm);
  background: rgba(9, 14, 24, 0.72);
  padding: 10px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.video-movie-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.video-movie-card-head h4 {
  margin: 0;
  font-size: var(--text-sm);
  color: rgba(236, 243, 255, 0.94);
}

.video-movie-card-head .video-movie-card-meta {
  color: var(--muted);
  font-size: var(--text-xs);
}

.video-variant-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.video-variant-card {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(96, 120, 154, 0.32);
  background: rgba(7, 10, 18, 0.7);
  padding: 10px;
  display: grid;
  gap: 8px;
  contain: layout paint;
}

.video-variant-card.is-selected {
  border-color: rgba(63, 225, 194, 0.6);
  box-shadow: 0 0 0 1px rgba(63, 225, 194, 0.35);
}

.video-variant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.video-variant-select {
  border: 1px solid rgba(63, 225, 194, 0.32);
  border-radius: 999px;
  background: rgba(8, 13, 24, 0.92);
  color: var(--text);
  font: inherit;
  font-size: var(--text-xs);
  padding: 6px 12px;
  cursor: pointer;
}

.video-variant-select:hover,
.video-variant-select:focus-visible {
  border-color: rgba(63, 225, 194, 0.64);
  outline: none;
}

.video-variant-status {
  font-size: var(--text-xs);
  color: var(--muted);
}

.video-variant-player {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(3, 6, 12, 0.95);
  min-height: 160px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.video-variant-placeholder {
  min-height: 160px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.14);
  background: rgba(63, 225, 194, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-xs);
}

.video-variant-error {
  margin: 0;
  color: #ff9d9d;
  font-size: var(--text-xs);
}

.video-variant-meta {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

/* Video movie card header actions */
.video-movie-card-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.video-settings-btn,
.video-insert-btn {
  font-size: var(--text-sm);
  padding: 4px 6px;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.video-settings-btn:hover,
.video-settings-btn:focus-visible,
.video-insert-btn:hover,
.video-insert-btn:focus-visible {
  opacity: 1;
}

.video-settings-btn.has-override {
  opacity: 1;
  color: var(--accent);
}

/* Video variant loading states */
.video-variant-card.is-loading {
  border-color: rgba(63, 225, 194, 0.18);
}

.video-variant-card.is-loading .video-variant-placeholder {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.video-variant-card.is-queued .video-variant-placeholder {
  border-color: rgba(255, 209, 102, 0.25);
  background: rgba(255, 209, 102, 0.06);
}

.video-placeholder-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(63, 225, 194, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.video-placeholder-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(211, 221, 244, 0.7);
}

.video-variant-card.is-queued .video-placeholder-label {
  color: rgba(255, 209, 102, 0.8);
}

.video-variant-card.is-error {
  border-color: rgba(255, 120, 120, 0.3);
}

.video-variant-placeholder.is-error {
  border-color: rgba(255, 120, 120, 0.35);
  background: rgba(255, 120, 120, 0.06);
  gap: 6px;
}

.video-placeholder-error-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.video-placeholder-error-label {
  color: #ff9d9d;
}

.video-placeholder-error-detail {
  font-size: var(--text-xs);
  color: rgba(255, 157, 157, 0.7);
  max-width: 90%;
  text-align: center;
  word-break: break-word;
}

/* Video skeleton cards */
.video-movie-card.video-skeleton {
  animation: rise 0.3s ease both, skeleton-pulse 1.5s ease-in-out infinite;
}

.video-skeleton-spinner {
  width: 20px;
  height: 20px;
}

.video-skeleton-label {
  font-size: var(--text-xs);
  color: var(--muted);
}

/* Video variant archive state */
.video-variant-card.is-archived {
  opacity: 0.5;
  filter: grayscale(0.6);
}

.video-variant-download {
  font-size: 14px;
  padding: 2px 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.video-variant-download:hover,
.video-variant-download:focus-visible {
  opacity: 1;
  color: var(--accent);
}

.video-variant-archive {
  font-size: 12px;
  padding: 2px 4px;
  opacity: 0.4;
  transition: opacity 0.15s;
  margin-left: auto;
}

.video-variant-archive:hover,
.video-variant-archive:focus-visible {
  opacity: 1;
}

.video-variant-card.is-archived .video-variant-archive {
  opacity: 0.8;
  color: var(--accent);
}

/* Video prompt editing row */
.video-edit-row {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(96, 120, 154, 0.15);
  padding-top: 10px;
}

.video-edit-prompt {
  width: 100%;
  min-height: 48px;
  background: rgba(5, 8, 14, 0.85);
  border: 1px solid rgba(96, 120, 154, 0.28);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: var(--text-xs);
  padding: 8px;
  resize: vertical;
}

.video-edit-prompt:focus {
  border-color: rgba(63, 225, 194, 0.5);
  outline: none;
}

.video-edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.video-edit-actions button[data-tooltip] {
  position: relative;
  min-width: auto;
  font-size: 0.85rem;
}

.video-edit-actions button[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%);
  background: #0a0f18;
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  white-space: normal;
  max-width: 260px;
  width: max-content;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.video-edit-actions button[data-tooltip]:hover::after {
  opacity: 1;
}

.video-scene-details {
  border-top: 1px solid rgba(96, 120, 154, 0.12);
  padding-top: 8px;
}
.video-scene-details summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: rgba(180, 200, 220, 0.7);
  user-select: none;
}
.video-scene-details summary:hover {
  color: rgba(200, 220, 240, 0.9);
}
.video-scene-prompt-text {
  margin-top: 6px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(180, 200, 220, 0.65);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px 10px;
  background: rgba(5, 8, 14, 0.6);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(96, 120, 154, 0.12);
}

.video-edit-hint,
.edit-hint {
  display: block;
  font-size: 0.78rem;
  color: rgba(180, 200, 220, 0.5);
  margin-bottom: 2px;
}
.video-edit-scope {
  display: block;
  font-size: 0.76rem;
  color: rgba(63, 225, 194, 0.55);
  margin-bottom: 4px;
}

/* Video settings popover (reuses slide-settings styles) */
.video-settings-popover {
  position: fixed;
  z-index: 1000;
  background: rgba(12, 16, 28, 0.98);
  border: 1px solid rgba(63, 225, 194, 0.2);
  border-radius: var(--radius-md);
  padding: 0;
  min-width: 240px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  display: none;
}

.video-settings-popover.active {
  display: block;
}

@media (min-width: 480px) {
  .output-target-toggle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .video-scene-editor-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .video-options-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .output-target-option span,
  .video-scene-item textarea {
    transition: none;
  }
}

.variant-config {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.variant-config select {
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
  border: 1px solid rgba(63, 225, 194, 0.22);
  font-family: var(--font-body);
}

.variant-config input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.variant-config .dropdown-meta {
  flex: 1;
  margin: 0;
  font-size: var(--text-xs);
  color: var(--muted);
  opacity: 0.8;
}

.cost-estimate {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(63, 225, 194, 0.08);
  border: 1px solid rgba(63, 225, 194, 0.2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.cost-estimate .cost-label {
  color: var(--muted);
}

.cost-estimate .cost-value {
  font-weight: 600;
  color: var(--accent);
}

.cost-estimate .cost-unit {
  color: var(--muted);
  font-size: var(--text-xs);
}

.model-config {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.model-config.is-hidden {
  display: none;
}

.preview-config {
  margin-top: 16px;
  display: grid;
  gap: 6px;
}

.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: var(--text-sm);
  cursor: pointer;
  position: relative;
  user-select: none;
}

.toggle-field input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: rgba(9, 12, 20, 0.9);
  border: 1px solid rgba(63, 225, 194, 0.24);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(242, 255, 252, 0.9);
  box-shadow: 0 2px 6px rgba(3, 6, 12, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.toggle-field input:checked + .toggle-track {
  background: rgba(63, 225, 194, 0.3);
  border-color: rgba(63, 225, 194, 0.7);
}

.toggle-field input:checked + .toggle-track::after {
  transform: translateX(20px);
  background: rgba(8, 20, 20, 0.95);
}

.toggle-field input:focus-visible + .toggle-track {
  outline: 2px solid rgba(63, 225, 194, 0.6);
  outline-offset: 2px;
}

.preview-config .panel-note {
  margin: 0;
  font-size: var(--text-xs);
  color: rgba(245, 247, 255, 0.7);
}

.generation-config {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.generation-config .model-config {
  margin-top: 0;
}

.model-config select {
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
  border: 1px solid rgba(63, 225, 194, 0.22);
  font-family: var(--font-body);
}

.model-meta {
  font-size: var(--text-xs);
  color: rgba(211, 221, 244, 0.9);
  line-height: 1.5;
}

.model-meta a {
  color: var(--accent-2);
  text-decoration: none;
}

.model-meta a:hover {
  text-decoration: underline;
}

.estimate-summary,
.cost-summary {
  margin-top: 10px;
  font-size: var(--text-xs);
  color: rgba(211, 221, 244, 0.92);
  line-height: 1.5;
  border-radius: var(--radius-md);
  padding: 6px 8px;
}

.estimate-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cost-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.estimate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.estimate-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  color: rgba(211, 221, 244, 0.55);
}

.estimate-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.estimate-price {
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(231, 241, 255, 0.98);
}

.estimate-price-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  color: rgba(211, 221, 244, 0.6);
  margin-right: 4px;
}

.estimate-divider {
  margin: 0 6px;
  color: rgba(211, 221, 244, 0.35);
}

.estimate-delta {
  font-weight: 600;
}

.estimate-delta.is-over {
  color: rgba(255, 150, 150, 0.95);
}

.estimate-delta.is-under {
  color: rgba(140, 255, 210, 0.95);
}

.estimate-delta.is-even {
  color: rgba(211, 221, 244, 0.8);
}

.estimate-usd {
  font-weight: 500;
  color: rgba(211, 221, 244, 0.7);
}

.estimate-toggle {
  border: 1px solid rgba(110, 170, 255, 0.35);
  border-radius: 999px;
  background: rgba(14, 20, 35, 0.65);
  color: rgba(211, 221, 244, 0.9);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.estimate-toggle::after {
  content: '▾';
  display: inline-block;
  margin-left: 4px;
  font-size: 9px;
  transition: transform 0.2s ease;
}

.estimate-toggle[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.estimate-toggle:hover {
  border-color: rgba(110, 170, 255, 0.7);
  background: rgba(14, 20, 35, 0.85);
}

.estimate-toggle:focus-visible {
  outline: 2px solid rgba(140, 255, 225, 0.6);
  outline-offset: 2px;
}

.estimate-details {
  border-radius: var(--radius-md);
  border: 1px solid rgba(110, 170, 255, 0.18);
  background: rgba(10, 14, 22, 0.45);
  /* Animated expand/collapse via CSS grid row transition */
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  padding: 0 12px;
  border-width: 0;
  transition: grid-template-rows 0.25s ease, opacity 0.2s ease, padding 0.25s ease, border-width 0.25s ease;
}

.estimate-details-inner {
  overflow: hidden;
  min-height: 0;
}

.estimate-details.is-expanded {
  grid-template-rows: 1fr;
  opacity: 1;
  padding: 10px 12px;
  border-width: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .estimate-details {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide-selection-body {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edit-controls-wrapper {
    transition: none;
  }
}

.estimate-warning {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 120, 120, 0.35);
  background: rgba(35, 14, 18, 0.55);
  color: rgba(255, 220, 220, 0.9);
  padding: 8px 10px;
  margin-bottom: 10px;
}

.estimate-section + .estimate-section {
  margin-top: 12px;
}

.estimate-tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(110, 170, 255, 0.15);
}

.estimate-tab {
  all: unset;
  cursor: pointer;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(211, 221, 244, 0.55);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
}

.estimate-tab:hover {
  color: rgba(211, 221, 244, 0.85);
}

.estimate-tab.is-active {
  color: rgba(140, 255, 225, 0.95);
  border-bottom-color: rgba(140, 255, 225, 0.7);
}

.estimate-tab:focus-visible {
  outline: 2px solid rgba(140, 255, 225, 0.6);
  outline-offset: 2px;
  border-radius: 2px;
}

.estimate-tab-panel[hidden] {
  display: none;
}

.estimate-delta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(110, 170, 255, 0.15);
  background: rgba(10, 14, 22, 0.35);
  font-size: var(--text-xs);
}

.estimate-delta-label {
  color: rgba(211, 221, 244, 0.7);
  font-weight: 500;
}

.estimate-delta-value {
  font-weight: 700;
  white-space: nowrap;
}

.estimate-delta-value.is-over {
  color: rgba(255, 160, 120, 0.95);
}

.estimate-delta-value.is-under {
  color: rgba(140, 255, 225, 0.95);
}

.estimate-delta-value.is-even {
  color: rgba(211, 221, 244, 0.85);
}

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

.estimate-section-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  color: rgba(211, 221, 244, 0.55);
}

.estimate-section-total {
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(231, 241, 255, 0.95);
}

.estimate-block + .estimate-block {
  margin-top: 12px;
}

.estimate-block-title {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  color: rgba(211, 221, 244, 0.55);
  margin-bottom: 6px;
}

.estimate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  font-size: var(--text-xs);
}

.estimate-row {
  display: contents;
}

.estimate-key {
  color: rgba(211, 221, 244, 0.7);
}

.estimate-value {
  text-align: right;
  color: rgba(231, 241, 255, 0.98);
}

.estimate-row.is-total .estimate-key,
.estimate-row.is-total .estimate-value {
  border-top: 1px solid rgba(110, 170, 255, 0.2);
  padding-top: 8px;
  margin-top: 2px;
}

.estimate-row.is-total .estimate-key {
  font-weight: 600;
  color: rgba(231, 241, 255, 0.95);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

.estimate-row.is-total .estimate-value {
  font-weight: 700;
  font-size: var(--text-sm);
  color: rgba(231, 241, 255, 1);
}

.estimate-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(245, 247, 255, 0.25);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}

.estimate-note {
  margin-top: 8px;
  color: rgba(211, 221, 244, 0.7);
  font-size: var(--text-xs);
  line-height: 1.4;
}

.estimate-summary.is-open .estimate-toggle,
.cost-summary.is-open .estimate-toggle {
  border-color: rgba(140, 255, 225, 0.6);
}

@media (max-width: 720px) {
  .estimate-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .estimate-header-right {
    justify-content: flex-start;
  }

  .estimate-grid {
    grid-template-columns: 1fr;
  }

  .estimate-value {
    text-align: left;
  }
}

.estimate-summary.is-updated,
.cost-summary.is-updated {
  animation: estimatePulse 1.2s ease;
}

@keyframes estimatePulse {
  0% { box-shadow: 0 0 0 0 rgba(63, 225, 194, 0.4); }
  20% { box-shadow: 0 0 8px 2px rgba(63, 225, 194, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(63, 225, 194, 0); }
}

.estimate-summary em,
.cost-summary em {
  color: rgba(211, 221, 244, 0.7);
  font-style: normal;
}

.slide-selection {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(110, 170, 255, 0.18);
  background: rgba(10, 14, 22, 0.45);
}

.slide-selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--text-sm);
  color: rgba(211, 221, 244, 0.92);
}

.slide-selection-toggle {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  padding: 4px 10px;
}

.slide-selection-body {
  margin-top: 8px;
  /* Animated expand/collapse via CSS grid row transition */
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.25s ease, opacity 0.2s ease, margin-top 0.25s ease;
  opacity: 1;
}

.slide-selection-body-inner {
  overflow: hidden;
  min-height: 0;
}

.slide-selection.is-collapsed .slide-selection-body {
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
}

.slide-selection-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: var(--text-sm);
  color: rgba(211, 221, 244, 0.9);
}

.slide-selection-select-all input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.slide-selection-list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.slide-selection-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(8, 12, 18, 0.6);
  border: 1px solid rgba(110, 170, 255, 0.12);
}

.slide-selection-item.is-generated {
  opacity: 0.5;
}

.slide-selection-item input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.slide-selection-item span {
  display: block;
  font-size: var(--text-xs);
  color: rgba(211, 221, 244, 0.9);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.slide-selection-status {
  margin-top: 8px;
  font-size: var(--text-xs);
  color: rgba(211, 221, 244, 0.75);
}

button {
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px 18px;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
}

.ghost {
  padding: 6px 10px;
  background: transparent;
  border: 1px solid rgba(110, 170, 255, 0.3);
  color: rgba(211, 221, 244, 0.9);
  font-size: var(--text-xs);
}

.ghost:hover {
  border-color: rgba(110, 170, 255, 0.6);
  color: #f7fbff;
}

button.loading {
  position: relative;
  padding-right: 36px;
  color: rgba(245, 247, 255, 0.7);
}

button.loading::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid rgba(245, 247, 255, 0.35);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04121a;
  box-shadow: 0 12px 34px rgba(63, 225, 194, 0.25), 0 10px 30px rgba(242, 156, 75, 0.18);
}

button.secondary {
  background: rgba(10, 14, 22, 0.6);
  color: var(--text);
  border: 1px solid rgba(63, 225, 194, 0.3);
}

a.primary,
a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-family: var(--font-display);
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.primary {
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.95), rgba(242, 156, 75, 0.95));
  color: #04121a;
  box-shadow: 0 18px 40px rgba(4, 10, 18, 0.6);
}

a.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(63, 225, 194, 0.28);
}

a.primary:hover,
a.secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(110, 170, 255, 0.28);
  background: linear-gradient(145deg, rgba(18, 26, 40, 0.95), rgba(7, 12, 20, 0.75));
  color: rgba(211, 221, 244, 0.95);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 20px rgba(0, 0, 0, 0.35);
}

.icon-btn[data-tooltip] {
  position: relative;
}

.icon-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%);
  background: #0a0f18;
  color: var(--text);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.icon-btn[data-tooltip]:hover::after {
  opacity: 1;
}

.history-item-actions [data-tooltip] {
  position: relative;
}

.history-item-actions [data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%);
  background: #0a0f18;
  color: var(--text);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.history-item-actions [data-tooltip]:hover::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .icon-btn,
  .icon-btn[data-tooltip]::after,
  .history-item-actions [data-tooltip]::after {
    transition: none;
  }
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(110, 170, 255, 0.6);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(4, 8, 14, 0.55);
}

.icon-btn.is-active {
  color: #0c131c;
  border-color: rgba(99, 255, 209, 0.7);
  background: linear-gradient(135deg, rgba(99, 255, 209, 0.8), rgba(58, 196, 255, 0.75));
}

.icon-btn[data-state='collapsed'] svg {
  transform: rotate(180deg);
}

.meta {
  margin-top: 16px;
  font-size: var(--text-sm);
  color: var(--muted);
}

.paste-block {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.paste-block label {
  font-size: var(--text-sm);
  color: var(--muted);
}

.paste-block textarea {
  width: 100%;
  resize: vertical;
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
}

.text-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.text-note {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
}

.sample-json {
  margin-top: 16px;
  background: rgba(10, 14, 22, 0.7);
  border: 1px solid rgba(63, 225, 194, 0.12);
  border-radius: var(--radius-md);
  padding: 12px;
  max-height: 260px;
  overflow: auto;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.35;
  white-space: pre-wrap;
}

#reviewJsonPreview {
  max-height: 45vh;
  min-height: 260px;
}

@media (max-width: 720px) {
  #reviewJsonPreview {
    max-height: 38vh;
    min-height: 200px;
  }
}

.status {
  position: relative;
  z-index: 1;
  padding: 8px 8vw 24px;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.studio-video .status-row {
  flex-direction: column;
  align-items: stretch;
}

.studio-video .status-row > div:first-child {
  width: 100%;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status h2 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: var(--text-xl);
}

.timing {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(245, 247, 255, 0.3);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(245, 247, 255, 0.3);
  border-top-color: currentColor;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

.progress {
  height: 10px;
  background: rgba(63, 225, 194, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}

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

.download {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  text-decoration: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 40px 6vw;
  backdrop-filter: blur(6px);
}

.lightbox.active {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: min(1400px, 90vw);
  max-height: 90vh;
  width: 100%;
  background: #0a0f18;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.14);
  box-shadow: var(--shadow);
  padding: 16px;
}

.lightbox-inner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(10, 14, 22, 0.8);
  color: var(--text);
  padding: 8px 12px;
  font-size: var(--text-xs);
}

main {
  position: relative;
  z-index: 1;
  padding: 0 8vw 60px;
}

.slides {
  display: grid;
  gap: 28px;
}

.slide-card {
  background: linear-gradient(180deg, rgba(16, 22, 34, 0.96), rgba(10, 14, 22, 0.94));
  border: 1px solid rgba(63, 225, 194, 0.14);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  animation: rise 0.5s ease both;
}

.slide-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.slide-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.slide-collapse {
  border: 1px solid rgba(63, 225, 194, 0.24);
  background: transparent;
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  cursor: pointer;
  flex-shrink: 0;
}

.slide-collapse:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.slide-insert {
  border: 1px dashed rgba(63, 225, 194, 0.6);
  background: transparent;
  color: var(--accent);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.slide-insert:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.slide-archive {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: var(--muted);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.slide-archive:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.slide-archive-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 12px;
}

/* Slide Settings Button */
.slide-settings {
  border: var(--slide-settings-border);
  background: var(--slide-settings-bg);
  color: var(--text);
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.slide-settings:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(15, 20, 30, 0.9);
}

.slide-settings:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(63, 225, 194, 0.28);
  background: rgba(15, 20, 30, 0.9);
}

.slide-settings.has-settings {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(63, 225, 194, 0.18);
}

.slide-settings:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

/* Slide Settings Popover */
.slide-settings-popover {
  position: fixed;
  z-index: 1000;
  min-width: 260px;
  background: var(--slide-settings-popover-bg);
  border: var(--slide-settings-popover-border);
  border-radius: var(--radius);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.5);
  display: none;
}

.slide-settings-popover.active {
  display: block;
}

.slide-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.slide-settings-title {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text);
}

.slide-settings-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

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

.slide-settings-close:focus-visible {
  outline: 2px solid rgba(63, 225, 194, 0.8);
  outline-offset: 2px;
  border-radius: 6px;
  color: var(--text);
  text-shadow: none;
}

.slide-settings-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slide-settings-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slide-settings-field label {
  font-size: var(--text-xs);
  color: var(--slide-settings-label-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.slide-settings-select {
  background: rgba(10, 14, 22, 0.9);
  border: var(--slide-settings-select-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: var(--text-sm);
  color: var(--text);
  cursor: pointer;
}

.slide-settings-select option {
  background: rgba(10, 14, 22, 0.95);
  color: var(--text, #e8eaed);
  padding: 8px;
}

.slide-settings-select:focus,
.slide-settings-select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(63, 225, 194, 0.2);
}

.slide-settings-select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 22, 0.6);
}

.slide-settings-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.slide-settings-footer button {
  flex: 1;
}

.slide-settings-footer button:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(63, 225, 194, 0.25);
}

.slide-card.is-archived {
  opacity: 0.7;
  border-color: rgba(255, 255, 255, 0.08);
}

/* Non-selected slide during partial generation */
.slide-card.is-not-selected {
  opacity: 0.55;
  border-color: rgba(255, 255, 255, 0.06);
  border-style: dashed;
}

.slide-card.is-not-selected .variants,
.slide-card.is-not-selected .edit-controls,
.slide-card.is-not-selected .edit-controls-wrapper {
  display: none;
}

/* Show only the generate button on non-selected cards; hide other actions */
.slide-card.is-not-selected .slide-actions .slide-collapse,
.slide-card.is-not-selected .slide-actions .slide-settings,
.slide-card.is-not-selected .slide-actions .slide-insert,
.slide-card.is-not-selected .slide-actions .slide-archive {
  display: none;
}

.slide-not-selected-badge {
  display: none;
  font-size: var(--text-xs);
  color: rgba(211, 221, 244, 0.55);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  text-align: center;
  margin-top: 4px;
}

.slide-card.is-not-selected .slide-not-selected-badge {
  display: block;
}

.slide-card.is-not-selected .slide-header {
  margin-bottom: 0;
}

.edit-controls-wrapper {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.25s ease, opacity 0.2s ease;
  opacity: 1;
}

.edit-controls-wrapper-inner {
  overflow: hidden;
  min-height: 0;
}

.slide-card.is-collapsed .edit-controls-wrapper {
  grid-template-rows: 0fr;
  opacity: 0;
}

.slide-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.slide-purpose {
  color: var(--muted);
  font-size: var(--text-sm);
}

.slide-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
  font-size: var(--text-xs);
  color: var(--muted);
}

.slide-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.65rem;
  border: 1px solid rgba(48, 242, 255, 0.2);
  background: rgba(48, 242, 255, 0.08);
  color: var(--text);
}

.slide-status-pill[data-status="ready"] {
  border-color: rgba(72, 255, 195, 0.35);
  background: rgba(72, 255, 195, 0.15);
  color: #bfffe9;
}

.slide-status-pill[data-status="generating"] {
  border-color: rgba(48, 242, 255, 0.45);
  background: rgba(48, 242, 255, 0.2);
  color: #e3fbff;
}

.slide-status-pill[data-status="queued"] {
  border-color: rgba(255, 209, 102, 0.3);
  background: rgba(255, 209, 102, 0.16);
  color: #fff3c8;
}

.slide-status-pill[data-status="editing"] {
  border-color: rgba(255, 106, 213, 0.35);
  background: rgba(255, 106, 213, 0.18);
  color: #ffd8f4;
}

.slide-status-pill[data-status="error"],
.slide-status-pill[data-status="partial"] {
  border-color: rgba(255, 88, 88, 0.35);
  background: rgba(255, 88, 88, 0.18);
  color: #ffd0d0;
}

.slide-status-pill[data-status="archived"],
.slide-status-pill[data-status="empty"] {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.slide-timing {
  font-variant-numeric: tabular-nums;
  color: rgba(245, 247, 255, 0.7);
}

.slide-card[data-status="generating"] {
  border-color: rgba(48, 242, 255, 0.3);
  box-shadow: 0 0 0 1px rgba(48, 242, 255, 0.2), 0 20px 50px rgba(5, 10, 18, 0.5);
  animation: pulseGlow 2.4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(48, 242, 255, 0.2), 0 20px 50px rgba(5, 10, 18, 0.5);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(255, 106, 213, 0.25), 0 24px 60px rgba(5, 10, 18, 0.6);
  }
}

.variants {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.edit-controls {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.edit-scope {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--muted);
  font-size: var(--text-xs);
}

.edit-error {
  grid-column: 1 / -1;
  color: #ffd0d0;
  font-size: var(--text-xs);
  line-height: 1.5;
  background: rgba(255, 88, 88, 0.12);
  border: 1px solid rgba(255, 88, 88, 0.28);
  padding: 6px 10px;
  border-radius: var(--radius-md);
}

.edit-controls .edit-prompt {
  width: 100%;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  min-height: 44px;
  resize: vertical;
}

.edit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  align-self: start;
}

@media (max-width: 720px) {
  .edit-controls {
    grid-template-columns: 1fr;
  }
}

.variant {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.12);
  background: rgba(10, 14, 22, 0.7);
  cursor: pointer;
  transition: border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.variant.is-generating {
  border-color: rgba(48, 242, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(48, 242, 255, 0.18), 0 16px 30px rgba(6, 12, 20, 0.5);
}

.variant.is-ready {
  border-color: rgba(72, 255, 195, 0.3);
}

.variant.is-selected {
  border-color: rgba(72, 255, 195, 0.7);
  box-shadow: 0 18px 40px rgba(4, 10, 18, 0.55), 0 0 0 1px rgba(72, 255, 195, 0.35);
  background: rgba(10, 18, 24, 0.85);
}

@media (min-width: 900px) {
  .variants {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
  }

  .variant {
    flex: 1 1 0;
    min-width: 0;
  }
}

.variant.is-error {
  border-color: rgba(255, 88, 88, 0.3);
}

.variant.is-queued {
  border-color: rgba(255, 209, 102, 0.25);
}

.variant.is-editing {
  border-color: rgba(255, 106, 213, 0.3);
}

.variant.is-empty {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  opacity: 0.8;
}

.variant-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.variant-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.variant-download {
  background: rgba(63, 225, 194, 0.12);
}

.variant-copy {
  background: rgba(110, 170, 255, 0.12);
}

.variant-archive {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.variant-download[disabled],
.variant-copy[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.variant.is-archived {
  opacity: 0.65;
  border-color: rgba(255, 255, 255, 0.06);
}

.variant.is-archived input,
.variant.is-archived .preview,
.variant.is-archived .variant-actions {
  display: none;
}

.variant.is-archived .preview {
  filter: grayscale(1);
}

.variant:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 225, 194, 0.65);
  box-shadow: 0 16px 34px rgba(4, 8, 14, 0.55);
}

.variant input {
  accent-color: var(--accent);
}

.preview {
  position: relative;
  width: 100%;
  padding-top: 66.7%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #07090d;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.preview.is-loading {
  padding-top: 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(4, 6, 12, 0.85);
}

.preview.is-loading .preview-text,
.preview.is-loading .preview-notes {
  display: none;
}

.preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.55));
}

.preview-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  z-index: 2;
  pointer-events: none;
}

.preview.is-loading .preview-spinner {
  position: static;
  margin: 0;
}

.preview-status {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(211, 221, 244, 0.85);
  z-index: 2;
}

/* Queued: muted pulsing dot */
.preview.is-queued .preview-status {
  color: rgba(255, 209, 102, 0.8);
}

.preview.is-queued .preview-spinner {
  opacity: 0.35;
  animation: pulse-queue 2s ease-in-out infinite;
}

@keyframes pulse-queue {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.5; }
}

/* Generating: bright active spinner */
.preview.is-active .preview-status {
  color: rgba(48, 242, 255, 0.95);
}

.preview.is-active .preview-spinner {
  opacity: 1;
}

.preview-text {
  position: absolute;
  color: #f7fbff;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.7);
  max-width: 80%;
  white-space: pre-line;
  z-index: 1;
}

.preview-text.upper-center { top: 8%; left: 50%; transform: translateX(-50%); text-align: center; }
.preview-text.bottom-center { bottom: 8%; left: 50%; transform: translateX(-50%); text-align: center; }
.preview-text.center { top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.preview-text.left { top: 50%; left: 8%; transform: translateY(-50%); text-align: left; }
.preview-text.right { top: 50%; right: 8%; transform: translateY(-50%); text-align: right; }
.preview-text.upper-left { top: 8%; left: 8%; text-align: left; }
.preview-text.upper-right { top: 8%; right: 8%; text-align: right; }
.preview-text.bottom-left { bottom: 8%; left: 8%; text-align: left; }
.preview-text.bottom-right { bottom: 8%; right: 8%; text-align: right; }

.preview-notes {
  position: absolute;
  bottom: 6%;
  left: 6%;
  right: 6%;
  color: #f7fbff;
  font-size: var(--text-xs);
  line-height: 1.2;
  background: rgba(3, 5, 10, 0.6);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  display: none;
  z-index: 1;
}

body.show-notes .preview-notes {
  display: block;
}

.compact .variant {
  gap: 6px;
  padding: 10px;
}

.compact .variant .preview,
.compact .variant .variant-actions {
  display: none;
}

.compact .variant-status {
  font-size: var(--text-xs);
}

.variant-status {
  color: var(--muted);
  font-size: var(--text-sm);
}

.variant-cost {
  color: rgba(211, 221, 244, 0.92);
  font-size: var(--text-xs);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-3);
}

@media (max-width: 720px) {
  .hero {
    padding: 32px 6vw 24px;
  }

  .status,
  main {
    padding: 0 6vw 40px;
  }

  .wizard {
    padding: 36px 6vw 64px;
  }

  .landing {
    padding: 36px 6vw 64px;
  }

  .auth-page {
    padding: 28px 6vw 56px;
  }

  .auth-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-card {
    width: 100%;
  }

  .hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .brand {
    gap: 12px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-actions a {
    width: 100%;
  }

  .panel-card {
    padding: 18px;
  }

  .slide-card {
    padding: 16px;
  }

  .admin-auth {
    flex-direction: column;
  }

  .admin-auth-field {
    min-width: auto;
  }

  .admin-jobs-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-jobs-toolbar input[type="search"] {
    max-width: none;
  }

  .admin-job {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .admin-user {
    grid-template-columns: 1fr;
  }

  .admin-users-controls {
    width: 100%;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-contact {
    align-items: flex-start;
  }
}

/* Wizard layout */
.landing {
  padding: 48px 8vw 80px;
}

.wizard {
  padding: 48px 8vw 80px;
}

.wizard-hero {
  max-width: 1200px;
  margin: 0 auto 36px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(145, 183, 238, 0.28);
  background: rgba(6, 10, 18, 0.58);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

.landing-hero-cta {
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.landing-hero-cta--secondary {
  background: rgba(245, 247, 255, 0.04);
  border-color: rgba(145, 183, 238, 0.38);
  color: rgba(226, 235, 252, 0.95);
}

.landing-hero-cta--primary {
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.96), rgba(242, 156, 75, 0.94));
  color: #04121a;
  box-shadow: 0 12px 24px rgba(63, 225, 194, 0.22), 0 8px 20px rgba(242, 156, 75, 0.18);
}

.landing-hero-cta:not(:disabled):hover,
.landing-hero-cta:not(:disabled):focus-visible {
  transform: translateY(-1px);
}

.landing-hero-cta--secondary:hover,
.landing-hero-cta--secondary:focus-visible {
  border-color: rgba(145, 183, 238, 0.64);
  color: #f7fbff;
  box-shadow: 0 10px 20px rgba(7, 12, 20, 0.4);
}

.landing-hero-cta--primary:hover,
.landing-hero-cta--primary:focus-visible {
  box-shadow: 0 14px 28px rgba(63, 225, 194, 0.28), 0 10px 24px rgba(242, 156, 75, 0.25);
}

.landing-hero-cta:active {
  transform: translateY(0);
}

.landing-hero-cta:focus-visible {
  outline: 2px solid rgba(63, 225, 194, 0.75);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .hero-actions {
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius-pill);
  }

  .landing-hero-cta {
    width: 100%;
    justify-content: center;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 18px rgba(5, 8, 14, 0.6));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.brand-tag {
  font-size: var(--text-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.brand:focus-visible {
  outline: 2px solid rgba(63, 225, 194, 0.6);
  outline-offset: 4px;
  border-radius: 12px;
}

.hero-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .landing .hero-shell {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Hero Slideshow */
.hero-slideshow {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-alt);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.slideshow-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slideshow-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  .slideshow-track {
    transition: none;
  }
}

.slideshow-slide {
  flex: 0 0 100%;
  position: relative;
  cursor: pointer;
}

.slideshow-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slideshow-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: center;
  pointer-events: none;
}

.slideshow-controls {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  z-index: 10;
}

.slideshow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.slideshow-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.slideshow-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.slideshow-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
}

.slideshow-pause .icon-play {
  display: none;
}

.slideshow-pause[aria-pressed="true"] .icon-pause {
  display: none;
}

.slideshow-pause[aria-pressed="true"] .icon-play {
  display: block;
}

.slideshow-dots {
  display: flex;
  gap: 6px;
}

.slideshow-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.slideshow-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.slideshow-dot[aria-selected="true"] {
  background: var(--accent);
  transform: scale(1.2);
}

.slideshow-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hidden - now using global .app-header instead */
.account-chip {
  display: none;
}

.account-meta {
  display: grid;
  gap: 4px;
}

.account-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.account-email {
  font-family: var(--font-display);
  font-size: var(--text-sm);
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-credits {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: var(--text-xs);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(63, 225, 194, 0.2);
  color: #9ff3dd;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.account-credits::after {
  content: "◆";
  display: inline-block;
  margin-left: 0.22em;
  font-size: 0.62em;
  line-height: 1;
  opacity: 0.92;
  color: currentColor;
  transform: translateY(-0.5px);
}

.account-credits:hover {
  background: rgba(63, 225, 194, 0.12);
}

.account-credits:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-page {
  padding: 32px 8vw 64px;
}

.auth-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.auth-shell {
  display: grid;
  gap: 28px;
  align-items: start;
}

.auth-intro {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

.auth-perks {
  display: grid;
  gap: 12px;
}

.auth-perk {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.72);
}

.auth-perk-title {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 4px;
}

.auth-perk-note {
  font-size: var(--text-sm);
  color: var(--muted);
}

.auth-card {
  width: min(420px, 100%);
  border-radius: calc(var(--radius-lg) + 4px);
  padding: 22px;
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(9, 13, 20, 0.82);
  box-shadow: var(--glow-shadow);
}

.auth-card-header {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: rgba(8, 12, 18, 0.7);
  border: 1px solid rgba(63, 225, 194, 0.16);
  margin-bottom: 16px;
}

.auth-tabs .tab {
  border: 0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.auth-tabs .tab.active {
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.25), rgba(242, 156, 75, 0.2));
  color: #f1fff9;
}

.auth-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(10, 14, 22, 0.8);
  box-shadow: var(--glow-shadow);
  max-width: 360px;
}

.auth-header {
  display: grid;
  gap: 6px;
}

.auth-panel .status-note {
  margin: 0;
}

.auth-activation-summary {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(8, 14, 22, 0.72);
}

.auth-activation-summary strong {
  font-size: var(--text-sm);
}

.auth-fields {
  display: grid;
  gap: 10px;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.auth-support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(63, 225, 194, 0.18);
  font-size: var(--text-xs);
  color: rgba(245, 247, 255, 0.6);
}

.auth-support .support-copy {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.62rem;
}

.auth-link {
  min-height: 44px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(242, 156, 75, 0.35);
  background: rgba(19, 12, 10, 0.65);
  color: rgba(255, 225, 200, 0.9);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(16, 9, 6, 0.45);
}

.auth-link:hover {
  border-color: rgba(242, 156, 75, 0.6);
  color: #fff4ea;
  transform: translateY(-1px);
}

.auth-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-panel .panel-note {
  margin: 0;
  font-size: var(--text-xs);
  color: rgba(245, 247, 255, 0.6);
}

.auth-panel code {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: #e6f2ff;
  background: rgba(110, 170, 255, 0.12);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: rgba(245, 247, 255, 0.4);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(245, 247, 255, 0.12);
}

.auth-social {
  display: flex;
  gap: 10px;
}

#authSocialBlock {
  display: grid;
  gap: 10px;
}

.auth-social-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 247, 255, 0.15);
  background: rgba(245, 247, 255, 0.06);
  color: rgba(245, 247, 255, 0.9);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.auth-social-btn:hover {
  background: rgba(245, 247, 255, 0.1);
  border-color: rgba(245, 247, 255, 0.3);
}
.auth-social-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.auth-social-btn svg {
  flex-shrink: 0;
}

.turnstile-container {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

body.auth-locked .auth-panel {
  border-color: rgba(242, 156, 75, 0.35);
}

body.auth-locked .wizard-body {
  display: none;
}

body.auth-locked #studio {
  pointer-events: none;
  opacity: 0.55;
  filter: grayscale(0.2) saturate(0.85);
}

@media (min-width: 1024px) {
  .hero-shell {
  }

  .auth-shell {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
  }

  .cta-band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: var(--text-xxl);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  text-shadow: 0 20px 40px rgba(5, 8, 14, 0.6);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(63, 225, 194, 0.25);
  background: rgba(8, 12, 20, 0.65);
  color: var(--muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero-visual-card {
  background: linear-gradient(170deg, rgba(16, 22, 34, 0.92), rgba(8, 12, 20, 0.85));
  border: 1px solid rgba(63, 225, 194, 0.18);
  border-radius: var(--radius-xl);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-visual {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid rgba(63, 225, 194, 0.18);
  box-shadow: var(--glow-shadow);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 60px rgba(4, 8, 14, 0.6);
}

.hero-visual-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  font-size: var(--text-xs);
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.caption-label {
  color: var(--accent);
}

.hero-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 26px;
}

.stat-card {
  background: rgba(9, 13, 20, 0.75);
  border: 1px solid rgba(63, 225, 194, 0.14);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--glow-shadow);
}

.stat-title {
  margin: 0 0 6px;
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
}

.stat-note {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--muted);
}

.wizard-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.step-pill {
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.7);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  cursor: pointer;
}

.step-pill.active {
  color: #031019;
  border-color: rgba(63, 225, 194, 0.8);
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.9), rgba(242, 156, 75, 0.9));
  box-shadow: 0 12px 24px rgba(4, 8, 14, 0.5);
}

.wizard-body {
  max-width: 1200px;
  margin: 0 auto;
}

.landing-section {
  max-width: 1200px;
  margin: 0 auto 36px;
}

.example-showcase-grid {
  display: grid;
  gap: 20px;
}

.example-showcase-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background:
    radial-gradient(circle at top right, rgba(63, 225, 194, 0.12), transparent 42%),
    linear-gradient(165deg, rgba(13, 19, 30, 0.96), rgba(7, 11, 19, 0.92));
  box-shadow: var(--glow-shadow);
}

.example-showcase-card--movie {
  border-color: rgba(242, 156, 75, 0.22);
  background:
    radial-gradient(circle at top right, rgba(242, 156, 75, 0.14), transparent 42%),
    linear-gradient(165deg, rgba(16, 18, 28, 0.97), rgba(9, 12, 20, 0.94));
}

.example-showcase-card__copy {
  display: grid;
  gap: 16px;
}

.example-showcase-card__lede {
  margin: 0;
  color: rgba(245, 247, 255, 0.8);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.example-showcase-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.example-showcase-card__list li {
  position: relative;
  padding-left: 18px;
  color: rgba(245, 247, 255, 0.76);
  font-size: var(--text-sm);
}

.example-showcase-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.example-showcase-card__media {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background:
    radial-gradient(circle at top right, rgba(63, 225, 194, 0.12), transparent 38%),
    linear-gradient(165deg, rgba(15, 19, 28, 0.97), rgba(8, 12, 20, 0.92));
  box-shadow: var(--shadow);
}

.example-showcase-card__media--movie {
  border-color: rgba(242, 156, 75, 0.22);
  background:
    radial-gradient(circle at top right, rgba(242, 156, 75, 0.14), transparent 38%),
    linear-gradient(165deg, rgba(15, 19, 28, 0.97), rgba(8, 12, 20, 0.92));
}

.section-header {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin: 0;
}

.section-header p {
  margin: 0;
  color: rgba(245, 247, 255, 0.7);
  max-width: 60ch;
}

.prop-grid,
.advantage-grid,
.timing-grid,
.steps-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.prop-card,
.advantage-card,
.timing-card,
.step-card {
  background: linear-gradient(170deg, rgba(14, 20, 32, 0.95), rgba(8, 12, 20, 0.88));
  border: 1px solid rgba(63, 225, 194, 0.16);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
}

.prop-card h3,
.advantage-card h3,
.timing-card h3,
.step-card h3 {
  font-family: var(--font-display);
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.prop-card p,
.advantage-card p,
.timing-card p,
.step-card p {
  margin: 0;
  color: rgba(245, 247, 255, 0.72);
  font-size: var(--text-sm);
}

/* How It Works steps — overrides for the shared grid/card base */
.steps-grid {
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-card {
  padding: 24px 18px 18px;
  text-align: center;
}

.step-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  color: var(--accent);
}

.step-icon svg {
  width: 100%;
  height: 100%;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #031019;
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: 8px;
}

.output-modes-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.output-mode-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background:
    radial-gradient(circle at top right, rgba(63, 225, 194, 0.12), transparent 42%),
    linear-gradient(165deg, rgba(13, 19, 30, 0.96), rgba(7, 11, 19, 0.92));
  box-shadow: var(--glow-shadow);
}

.output-mode-card--video {
  border-color: rgba(242, 156, 75, 0.26);
  background:
    radial-gradient(circle at top right, rgba(242, 156, 75, 0.16), transparent 42%),
    linear-gradient(165deg, rgba(16, 18, 28, 0.97), rgba(9, 12, 20, 0.94));
}

.output-mode-card__eyebrow {
  margin: 0;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.output-mode-card--video .output-mode-card__eyebrow {
  color: var(--accent-2);
}

.output-mode-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.output-mode-card p {
  margin: 0;
  color: rgba(245, 247, 255, 0.74);
  font-size: var(--text-sm);
}

.output-mode-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.output-mode-card__list li {
  position: relative;
  padding-left: 18px;
  color: rgba(245, 247, 255, 0.78);
  font-size: var(--text-sm);
}

.output-mode-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.section-header--left {
  text-align: left;
}

.section-header--left p {
  margin-left: 0;
  margin-right: 0;
}

.example-movie-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(242, 156, 75, 0.12);
  border: 1px solid rgba(242, 156, 75, 0.2);
  color: rgba(250, 230, 214, 0.92);
  font-size: var(--text-sm);
}

.example-movie-player {
  display: block;
  width: 100%;
  min-height: 260px;
  border-radius: calc(var(--radius-xl) - 6px);
  background: #050811;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

@media (min-width: 920px) {
  .example-showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Output examples grid */
.examples-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.example-card {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(170deg, rgba(14, 20, 32, 0.95), rgba(8, 12, 20, 0.88));
  border: 1px solid rgba(63, 225, 194, 0.16);
  box-shadow: var(--shadow);
}

.example-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.example-card figcaption {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
}

.example-card figcaption strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #f5f7ff;
}

.example-card figcaption span {
  font-size: var(--text-sm);
  color: rgba(245, 247, 255, 0.6);
}

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

.timing-tag {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-2);
}

.timing-value {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.timing-note {
  font-size: var(--text-xs);
  color: var(--muted);
}

/* Early Access / Beta Social Proof */
.early-access-banner {
  max-width: 800px;
  margin: 0 auto;
  padding: 28px 32px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: linear-gradient(135deg, rgba(14, 20, 32, 0.95), rgba(63, 225, 194, 0.06));
  box-shadow: var(--glow-shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.early-access-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(63, 225, 194, 0.35);
  border-radius: var(--radius-pill);
  padding: 3px 12px;
  margin: 0 auto 4px;
}

.early-access-copy h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin: 6px 0 0;
}

.early-access-desc {
  margin: 8px 0 0;
  color: rgba(245, 247, 255, 0.7);
  max-width: 52ch;
  line-height: 1.5;
}

.early-access-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.early-access-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.early-access-stat__value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
}

.early-access-stat__label {
  font-size: var(--text-sm);
  color: rgba(245, 247, 255, 0.6);
}

.early-access-cta .primary {
  font-size: 1rem;
  padding: 10px 28px;
}

@media (max-width: 600px) {
  .early-access-banner {
    padding: 22px 18px;
  }
  .early-access-stats {
    gap: 20px;
  }
  .early-access-stat__value {
    font-size: 1.3rem;
  }
}

.cta-band {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 20px 22px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.15), rgba(242, 156, 75, 0.12));
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  box-shadow: var(--glow-shadow);
}

.cta-band h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: var(--text-xl);
}

.cta-band p {
  margin: 0;
  color: rgba(245, 247, 255, 0.7);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Admin */
.admin {
  padding: 48px 8vw 80px;
}

.admin-shell {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Admin Tabs ── */
.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}
.admin-tab {
  position: relative;
  padding: 10px 20px;
  font-size: var(--text-sm);
  font-weight: 500;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.admin-tab:hover {
  color: rgba(255, 255, 255, 0.8);
}
.admin-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.admin-tab-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}
.admin-panel[hidden] { display: none; }
.admin-status { margin-bottom: 8px; }

/* ── Admin Loading Spinner ── */
.admin-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--text-sm);
}
.admin-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(63, 225, 194, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: admin-spin 0.8s linear infinite;
}
@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

.admin-auth {
  display: flex;
  gap: 12px;
  align-items: end;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.7);
}

.admin-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  min-width: 160px;
}

.admin-time-period {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(9, 13, 20, 0.8);
  color: var(--text);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.admin-time-period:hover {
  border-color: rgba(63, 225, 194, 0.4);
}

.admin-time-period:focus {
  outline: 2px solid rgba(63, 225, 194, 0.6);
  outline-offset: 2px;
}

.admin-stats {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-config-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.7);
  display: grid;
  gap: 14px;
}

.admin-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.admin-config-advanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.admin-config-collapse-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 4px;
}
.admin-config-collapse-controls .admin-collapse-all-btn {
  font-size: var(--text-xs);
  padding: 3px 10px;
  min-height: unset;
}

details.admin-config-group {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.12);
  background: rgba(8, 12, 20, 0.6);
}
details.admin-config-group > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  user-select: none;
}
details.admin-config-group > summary::-webkit-details-marker { display: none; }
details.admin-config-group > summary::before {
  content: '\25B6';
  font-size: 0.65em;
  transition: transform 0.15s ease;
  flex-shrink: 0;
  margin-top: 3px;
}
details.admin-config-group[open] > summary::before {
  transform: rotate(90deg);
}
details.admin-config-group > summary .summary-note {
  flex-basis: 100%;
  margin: 0;
  display: block;
}
details.admin-config-group > *:not(summary) {
  margin-top: 10px;
}

.admin-config-group {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.12);
  background: rgba(8, 12, 20, 0.6);
  display: grid;
  gap: 10px;
}

.admin-config-group h4 {
  font-family: var(--font-display);
  margin: 0;
  font-size: var(--text-lg);
}

.admin-marketing-assets {
  gap: 14px;
}

.admin-marketing-preview {
  display: grid;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(6, 10, 18, 0.78);
}

.admin-marketing-preview-media {
  min-width: 0;
}

.admin-marketing-preview-video {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: #05070c;
  aspect-ratio: 16 / 9;
}

.admin-marketing-preview-meta {
  display: grid;
  gap: 10px;
}

.admin-marketing-preview-meta h5 {
  margin: 0;
  font-size: var(--text-base);
  font-family: var(--font-display);
}

.admin-marketing-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.admin-marketing-facts div {
  display: grid;
  gap: 4px;
}

.admin-marketing-facts dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.admin-marketing-facts dd {
  margin: 0;
  color: var(--text);
  word-break: break-word;
}

.admin-marketing-source-value {
  color: var(--muted);
}

.admin-marketing-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-marketing-links a {
  font-size: var(--text-sm);
}

.admin-marketing-mode-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-marketing-mode-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(8, 12, 20, 0.72);
  cursor: pointer;
  font-size: var(--text-sm);
}

.admin-marketing-mode-option input {
  margin: 0;
}

.admin-marketing-fields {
  display: grid;
  gap: 12px;
}

@media (min-width: 920px) {
  .admin-marketing-preview {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    align-items: start;
  }

  .admin-marketing-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.admin-landing-preview {
  margin-top: 8px;
}

.admin-landing-preview-img,
.admin-landing-preview-video {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.16);
  object-fit: cover;
  aspect-ratio: 16 / 9;
  background: rgba(6, 10, 18, 0.78);
}

.admin-credit-packages-list {
  display: grid;
  gap: 12px;
}

.admin-boost-pack-list {
  display: grid;
  gap: 12px;
}

.admin-boost-pack {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(242, 156, 75, 0.2);
  background: rgba(242, 156, 75, 0.05);
  display: grid;
  gap: 10px;
}

.admin-storage-plan-list {
  display: grid;
  gap: 12px;
}

.admin-storage-plan {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(100, 160, 255, 0.2);
  background: rgba(100, 160, 255, 0.05);
  display: grid;
  gap: 10px;
}

.admin-credit-package {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.10);
  background: rgba(8, 12, 20, 0.4);
  display: grid;
  gap: 10px;
}

.admin-credit-package.admin-pkg-inactive {
  opacity: 0.5;
}

.admin-credit-package__header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-credit-package__header strong {
  font-size: var(--text-base);
}

.admin-credit-package__slug {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-family: var(--font-mono);
}

.admin-credit-package__active-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  cursor: pointer;
}

.admin-credit-package__active-toggle input[type="checkbox"] {
  cursor: pointer;
}

.admin-model-editor {
  display: grid;
  gap: 10px;
}

.admin-model-list {
  display: grid;
  gap: 8px;
}

.admin-model-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(12, 18, 28, 0.9);
  flex-wrap: wrap;
}

.admin-model-name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
}

.admin-model-tags {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-model-tag {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(10, 14, 22, 0.8);
  color: var(--muted);
}

.admin-model-tag.is-known {
  border-color: rgba(63, 225, 194, 0.4);
  color: #9ff3dd;
}

.admin-model-tag.is-custom {
  border-color: rgba(242, 156, 75, 0.35);
  color: #f2c38f;
}

.admin-model-tag.is-default {
  border-color: rgba(120, 200, 255, 0.45);
  color: #a6d8ff;
}

.admin-model-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-model-add {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-model-add input {
  flex: 1;
  min-width: 200px;
}

/* Text model pricing styles */
.admin-text-model-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
}

.admin-model-name-section {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-text-pricing {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-pricing-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.admin-pricing-field span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-pricing-field input {
  width: 80px;
  padding: 4px 8px;
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(10, 14, 22, 0.8);
  color: var(--text);
}

.admin-pricing-field input:focus {
  border-color: rgba(63, 225, 194, 0.5);
  outline: none;
}

@media (max-width: 600px) {
  .admin-text-model-row {
    grid-template-columns: 1fr;
  }

  .admin-text-pricing {
    justify-content: flex-start;
  }
}

.admin-config-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-config-actions--compact {
  justify-content: flex-start;
}

.admin-stat {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(12, 18, 28, 0.9);
  box-shadow: var(--shadow);
}

.admin-stat-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 6px;
}

.admin-stat-value {
  font-size: var(--text-lg);
  font-weight: 600;
}

.admin-section h3 {
  font-family: var(--font-display);
  margin: 0 0 12px;
}

.admin-users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-users-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-users-controls input {
  min-width: 220px;
}

.admin-users {
  display: grid;
  gap: 10px;
}

.admin-user {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(120px, auto) minmax(240px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.12);
  background: rgba(9, 13, 20, 0.75);
  font-size: var(--text-sm);
}

.admin-user.is-suspended {
  border-color: rgba(255, 120, 120, 0.35);
  background: rgba(24, 10, 12, 0.7);
  box-shadow: 0 0 0 1px rgba(255, 120, 120, 0.08);
}

.admin-user-meta {
  display: grid;
  gap: 4px;
}

.admin-user-email {
  font-family: var(--font-display);
}

.admin-user-sub {
  font-size: var(--text-xs);
  color: var(--muted);
}

.admin-user-roles {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(12, 18, 28, 0.9);
  color: var(--muted);
}

.admin-role-owner {
  border-color: rgba(242, 156, 75, 0.45);
  color: #f2c38f;
}

.admin-role-admin {
  border-color: rgba(63, 225, 194, 0.35);
  color: #9ff3dd;
}

.admin-role-suspended {
  border-color: rgba(255, 120, 120, 0.45);
  color: #ffb2b2;
}

.admin-user-credits {
  font-weight: 600;
}

.admin-user-balance {
  display: grid;
  gap: 4px;
}

.admin-user-storage {
  font-weight: 600;
}

.admin-user-storage-note {
  color: var(--muted);
  font-size: var(--text-xs);
}

.admin-user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-suspend-btn {
  border-color: rgba(255, 120, 120, 0.35);
  color: #ffb2b2;
}

.admin-suspend-btn.is-suspended {
  background: rgba(255, 120, 120, 0.15);
  border-color: rgba(255, 120, 120, 0.55);
  color: #ffe2e2;
}

.admin-user-actions input {
  width: 120px;
}

.admin-user-actions input[data-storage-slots] {
  width: 96px;
}

.admin-pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.admin-jobs-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-jobs-toolbar input[type="search"] {
  flex: 1;
  max-width: 320px;
}

.admin-jobs {
  display: grid;
  gap: 10px;
}

.admin-job {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(120px, 150px) repeat(3, minmax(90px, auto));
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.12);
  background: rgba(9, 13, 20, 0.75);
  font-size: var(--text-sm);
}

.admin-job-id {
  font-family: var(--font-display);
}

.admin-job-email {
  color: var(--muted);
  font-size: var(--text-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-job-status {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--text-xs);
  color: var(--accent);
}

.admin-job-meta {
  color: var(--muted);
  font-size: var(--text-xs);
}

/* Admin Pricing Table */
.admin-pricing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-pricing-header h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
}

.admin-pricing-table {
  display: grid;
  gap: 16px;
}

.admin-pricing-model-group {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.7);
}

.admin-pricing-model-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin: 0 0 12px;
  color: var(--accent);
}

.admin-pricing-grid {
  display: grid;
  gap: 8px;
}

.admin-pricing-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(100px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(8, 12, 20, 0.6);
  font-size: var(--text-sm);
}

.admin-pricing-row.is-header {
  background: rgba(63, 225, 194, 0.08);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-xs);
  color: var(--muted);
}

.admin-pricing-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-pricing-cell input {
  width: 100%;
  max-width: 100px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(63, 225, 194, 0.22);
  background: rgba(10, 14, 22, 0.8);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
}

.admin-pricing-cell input:focus {
  outline: none;
  border-color: rgba(63, 225, 194, 0.55);
  box-shadow: 0 0 0 2px rgba(63, 225, 194, 0.15);
}

.admin-pricing-cell input.is-invalid {
  border-color: rgba(255, 120, 120, 0.55);
  background: rgba(255, 120, 120, 0.08);
}

.admin-pricing-cell .pricing-error {
  font-size: var(--text-xs);
  color: #ffb2b2;
  margin-top: 2px;
}

.admin-pricing-images-per-credit {
  color: var(--muted);
  font-size: var(--text-xs);
}

@media (max-width: 768px) {
  .admin-pricing-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .admin-pricing-row.is-header {
    display: none;
  }

  .admin-pricing-cell::before {
    content: attr(data-label);
    font-size: var(--text-xs);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 2px;
  }
}

/* ── Admin Analytics ── */

.admin-analytics-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-analytics-presets {
  display: flex;
  gap: 4px;
}

.admin-analytics-preset {
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(12, 18, 28, 0.9);
  color: var(--muted);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.admin-analytics-preset:hover {
  border-color: rgba(63, 225, 194, 0.35);
  color: var(--fg);
}

.admin-analytics-preset.is-active {
  border-color: rgba(63, 225, 194, 0.5);
  color: var(--accent);
  background: rgba(63, 225, 194, 0.08);
}

.admin-analytics-custom {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-analytics-custom .field-inline {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.admin-analytics-custom input[type="date"] {
  padding: 5px 8px;
  font-size: var(--text-xs);
  border-radius: var(--radius);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(12, 18, 28, 0.9);
  color: var(--fg);
}

.admin-analytics-bucket select {
  padding: 6px 10px;
  font-size: var(--text-xs);
  border-radius: var(--radius);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(12, 18, 28, 0.9);
  color: var(--fg);
}

.admin-analytics-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 20px;
}

.admin-analytics-kpis-hosted {
  margin-bottom: 16px;
}

.admin-kpi {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(12, 18, 28, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.admin-kpi-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 6px;
}

.admin-kpi-value {
  font-size: var(--text-xl, 1.5rem);
  font-weight: 700;
  line-height: 1.2;
}

.admin-kpi.is-positive .admin-kpi-value {
  color: #6ee7b7;
}

.admin-kpi.is-negative .admin-kpi-value {
  color: #fca5a5;
}
.admin-kpi.is-muted .admin-kpi-value {
  color: #6b7280;
  font-size: 0.85em;
}

.admin-analytics-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}

.admin-analytics-chart {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(12, 18, 28, 0.9);
  box-shadow: var(--shadow);
  min-height: 260px;
  position: relative;
}

.admin-analytics-section {
  margin-top: 28px;
}

.admin-analytics-grid-hosted {
  align-items: start;
}

.admin-analytics-table-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(12, 18, 28, 0.9);
  box-shadow: var(--shadow);
  min-height: 260px;
}

.admin-analytics-table-scroll {
  overflow-x: auto;
}

.admin-analytics-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.admin-analytics-table th,
.admin-analytics-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(63, 225, 194, 0.08);
  text-align: left;
  font-size: var(--text-xs);
  color: var(--fg);
}

.admin-analytics-table th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
}

.admin-analytics-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-analytics-link {
  color: var(--accent);
  text-decoration: none;
}

.admin-analytics-link:hover,
.admin-analytics-link:focus-visible {
  color: #8df3df;
  text-decoration: underline;
}

.admin-analytics-empty td {
  color: var(--muted);
}

@media (max-width: 900px) {
  .admin-analytics-kpis {
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-analytics-grid {
    grid-template-columns: 1fr;
  }

  .admin-analytics-table {
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .admin-analytics-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-analytics-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-analytics-preset {
    padding: 10px 14px;
    min-height: 44px;
  }

  .admin-analytics-custom .field-inline {
    flex: 1 1 45%;
  }

  .admin-analytics-custom button {
    flex: 1 1 100%;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-footer {
  padding: 32px 8vw 48px;
  color: var(--muted);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 32px;
  border-top: 1px solid rgba(63, 225, 194, 0.12);
  padding-top: 24px;
  font-size: var(--text-sm);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-title {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text);
}

.footer-by {
  font-weight: 400;
  color: var(--muted);
}

.footer-tagline {
  font-size: var(--text-xs);
  opacity: 0.7;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social-link {
  color: var(--muted);
  transition: color 0.15s;
  display: flex;
  align-items: center;
  padding: 4px;
}

.footer-social-link:hover {
  color: var(--accent);
}

.footer-legal-row {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(63, 225, 194, 0.06);
  padding-top: 12px;
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--text-xs);
}

.footer-link:hover {
  color: #eafff7;
}

.footer-legal {
  font-size: var(--text-xs);
  opacity: 0.7;
}

.wizard-start {
  background: rgba(9, 13, 20, 0.6);
  border: 1px solid rgba(63, 225, 194, 0.16);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.wizard-start-header {
  margin-bottom: 16px;
}

#wizard-start {
  scroll-margin-top: 120px;
}

.wizard-start-header h2 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  font-size: var(--text-xl);
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.mode-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.mode-card {
  position: relative;
  background: linear-gradient(160deg, rgba(16, 22, 34, 0.95), rgba(10, 14, 22, 0.9));
  border: 1px solid rgba(63, 225, 194, 0.16);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
  border: 1px solid rgba(63, 225, 194, 0.25);
  color: var(--text);
  background: rgba(63, 225, 194, 0.12);
}

.badge-beginner {
  border-color: rgba(72, 255, 195, 0.35);
  background: rgba(72, 255, 195, 0.18);
}

.badge-advanced {
  border-color: rgba(242, 156, 75, 0.35);
  background: rgba(242, 156, 75, 0.2);
}

.badge-pro {
  border-color: rgba(255, 106, 213, 0.35);
  background: rgba(255, 106, 213, 0.18);
}

.badge-example {
  border-color: rgba(215, 227, 106, 0.4);
  background: rgba(215, 227, 106, 0.2);
  color: #f6ffe0;
}

.badge-video {
  border-color: rgba(133, 182, 255, 0.45);
  background: rgba(133, 182, 255, 0.2);
  color: #e6f1ff;
}

.mode-card h3 {
  font-family: var(--font-display);
  margin-bottom: 6px;
  color: var(--text);
  font-size: var(--text-lg);
  text-shadow: 0 10px 22px rgba(5, 8, 14, 0.55);
}

.mode-card:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 225, 194, 0.6);
  box-shadow: 0 18px 36px rgba(4, 8, 14, 0.55);
}

.wizard-panel {
  display: none;
}

.wizard-panel.active {
  display: block;
}

.json-guidance {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.65);
  color: var(--muted);
  font-size: var(--text-sm);
}

.json-guidance summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.json-guidance summary::marker {
  color: var(--accent);
}

.json-guidance ul {
  padding-left: 18px;
  margin: 0 0 12px;
}

.json-guidance li {
  margin-bottom: 6px;
}

.json-guidance pre {
  margin: 0;
  white-space: pre-wrap;
  border-radius: var(--radius-md);
  background: rgba(6, 10, 18, 0.8);
  border: 1px solid rgba(63, 225, 194, 0.12);
  padding: 12px;
  font-size: var(--text-xs);
  color: rgba(245, 247, 255, 0.85);
}

.text-guidance {
  margin: 10px 0 14px;
}

.demo-card .panel-note {
  margin-bottom: 8px;
}

.demo-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.demo-steps {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.demo-step-pill {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: rgba(10, 14, 22, 0.6);
  color: var(--muted);
  padding: 6px 12px;
  font-size: var(--text-xs);
  cursor: pointer;
}

.demo-step-pill.active {
  border-color: rgba(63, 225, 194, 0.7);
  color: #031019;
  background: linear-gradient(120deg, rgba(63, 225, 194, 0.9), rgba(242, 156, 75, 0.8));
}

.demo-body {
  display: grid;
  gap: 16px;
}

.demo-assets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.demo-nav {
  justify-content: space-between;
}

.wizard-nav {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.panel-card {
  background: linear-gradient(180deg, rgba(14, 20, 32, 0.96), rgba(9, 12, 20, 0.92));
  border: 1px solid rgba(63, 225, 194, 0.14);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel-note {
  color: rgba(245, 247, 255, 0.7);
  margin-bottom: 16px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.status-note {
  color: var(--muted);
  margin-top: 12px;
}

.status-note.is-error,
.inline-status.is-error {
  color: #ffd0d0;
  background: rgba(255, 88, 88, 0.12);
  border: 1px solid rgba(255, 88, 88, 0.35);
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

.status-note.is-success,
.inline-status.is-success {
  color: #bfffe9;
  background: rgba(72, 255, 195, 0.12);
  border: 1px solid rgba(72, 255, 195, 0.35);
  padding: 8px 12px;
  border-radius: var(--radius-md);
}

.inline-status {
  margin: 12px 0 0;
  font-size: var(--text-sm);
  opacity: 1;
}

.status-note.fade-out,
.inline-status.fade-out {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.wizard-status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.wizard-status-line .status-note {
  margin: 0;
}

/* Builder */
.builder {
  display: grid;
  grid-template-columns: minmax(220px, 260px) 1fr;
  gap: 18px;
}

.builder-sidebar {
  background: rgba(9, 12, 20, 0.65);
  border: 1px solid rgba(63, 225, 194, 0.12);
  border-radius: var(--radius-lg);
  padding: 16px;
  height: 100%;
  box-shadow: var(--glow-shadow);
}

.builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.slide-list {
  display: grid;
  gap: 10px;
}

.slide-item {
  background: rgba(12, 16, 26, 0.8);
  border: 1px solid rgba(63, 225, 194, 0.12);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: grid;
  gap: 6px;
  cursor: grab;
  min-width: 0;
  transition: border 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.slide-item.active {
  border-color: rgba(63, 225, 194, 0.6);
  box-shadow: 0 16px 30px rgba(4, 8, 14, 0.45);
}

.slide-item-title {
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.slide-item-meta {
  font-size: var(--text-xs);
  color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.slide-item-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.slide-item button {
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
}

.builder-main {
  background: rgba(9, 12, 20, 0.65);
  border: 1px solid rgba(63, 225, 194, 0.12);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--glow-shadow);
}

.builder-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.builder-tabs .tab {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(10, 14, 22, 0.6);
  border: 1px solid rgba(63, 225, 194, 0.18);
  color: var(--muted);
  cursor: pointer;
  font-size: var(--text-xs);
  transition: border 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.builder-tabs .tab.active {
  color: var(--text);
  border-color: rgba(63, 225, 194, 0.7);
  background: rgba(63, 225, 194, 0.12);
}

.builder-panel {
  display: block;
}

.form-section {
  margin-bottom: 20px;
}

.form-section h4 {
  font-family: var(--font-display);
  margin-bottom: 10px;
  font-size: var(--text-lg);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--muted);
}

.field input,
.field textarea,
.field select {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(10, 14, 22, 0.7);
  color: var(--text);
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  resize: vertical;
}

.field-with-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

.field-with-button > input {
  width: 100%;
}

.field-with-button > .secondary {
  white-space: nowrap;
  padding: 8px 10px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(63, 225, 194, 0.6);
  box-shadow: 0 0 0 2px rgba(63, 225, 194, 0.18);
}

.field-inline {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.field-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  justify-self: start;
  accent-color: var(--accent);
}

.field-hint {
  color: rgba(245, 247, 255, 0.55);
  font-size: var(--text-xs);
}

.variant-count-status {
  color: rgba(245, 247, 255, 0.6);
  font-size: var(--text-xs);
}

.field .info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid rgba(63, 225, 194, 0.2);
  font-size: var(--text-xs);
  color: var(--muted);
  cursor: help;
  position: relative;
  background: none;
  padding: 0;
  outline: none;
}

.field .info:focus-visible {
  border-color: var(--accent, #3fe1c2);
  box-shadow: 0 0 0 2px rgba(63, 225, 194, 0.3);
}

.field .info::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  background: #0a0f18;
  color: var(--text);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  width: 280px;
  max-width: min(320px, calc(100vw - 24px));
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 5;
}

.field .info:hover::after,
.field .info:focus::after,
.field .info:focus-visible::after {
  opacity: 1;
}

/* Hide browser-native datalist dropdown arrow — we use our own toggle */
.combo-wrap input[list]::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none;
}
.combo-wrap input[list] {
  -moz-appearance: textfield;
}

/* Combo-box wrapper for inputs with datalist */
.field .combo-wrap {
  position: relative;
  display: flex;
  width: 100%;
}
.field .combo-wrap input {
  flex: 1;
  padding-right: 28px;
}
.field .combo-wrap .combo-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  opacity: 0.5;
  transition: opacity 0.15s;
  border-radius: var(--radius-sm);
}
.field .combo-wrap .combo-toggle:hover {
  opacity: 1;
  color: var(--accent, #3fe1c2);
}

.field.span-2 {
  grid-column: span 2;
}

@media (max-width: 720px) {
  .field-with-button {
    grid-template-columns: 1fr;
  }
}

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

  .admin-config-advanced {
    grid-template-columns: 1fr;
  }
}

/* Studio wrapper */
.studio {
  padding-top: 12px;
}

.notes-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.notes-toggle input {
  accent-color: var(--accent);
}


.mode-card.active {
  border-color: rgba(63, 225, 194, 0.8);
  box-shadow: 0 18px 40px rgba(4, 8, 14, 0.6);
}

.mode-card p {
  color: rgba(245, 247, 255, 0.7);
}

.variant-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.variant-toggle {
  border-color: rgba(63, 225, 194, 0.2);
  color: var(--muted);
  width: 28px;
  height: 28px;
}

.variant.is-collapsed .preview {
  padding-top: 13.34%;
  background-position: top center;
}

.variant.is-collapsed .preview-text,
.variant.is-collapsed .preview-notes {
  display: none;
}

.variant.is-collapsed .variant-status {
  font-size: var(--text-xs);
}

.variants-collapsed .variant .preview {
  padding-top: 13.34%;
  background-position: top center;
}

.variants-collapsed .variant .preview-text,
.variants-collapsed .variant .preview-notes {
  display: none;
}

.variants-collapsed .variant-toggle {
  display: none;
}

.slide-card.is-collapsed .variant .preview {
  padding-top: 13.34%;
  background-position: top center;
}

.slide-card.is-collapsed .variant .preview-text,
.slide-card.is-collapsed .variant .preview-notes {
  display: none;
}

/* History Panel */
.history-panel {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(63, 225, 194, 0.12);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.history-panel.is-collapsed .history-header {
  margin-bottom: 0;
}

.history-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text);
}

.history-toggle:hover {
  color: var(--accent);
}

.history-toggle-icon {
  display: inline-block;
  font-size: 10px;
  transition: transform 0.2s ease;
}

.history-panel:not(.is-collapsed) .history-toggle-icon {
  transform: rotate(90deg);
}

.history-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  margin: 0;
  color: inherit;
}

.history-body {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  max-height: 500px;
  opacity: 1;
}

.history-panel.is-collapsed .history-body {
  max-height: 0;
  opacity: 0;
}

.history-status {
  padding: 8px 12px;
  margin-bottom: 12px;
  font-size: var(--text-sm);
  color: rgba(245, 247, 255, 0.7);
  background: rgba(16, 22, 34, 0.6);
  border-radius: var(--radius);
}

.history-status.is-error {
  color: var(--error);
  background: rgba(255, 87, 87, 0.1);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(160deg, rgba(16, 22, 34, 0.8), rgba(10, 14, 22, 0.7));
  border: 1px solid rgba(63, 225, 194, 0.1);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, opacity 0.18s ease, transform 0.18s ease;
}

.history-item:hover {
  border-color: rgba(63, 225, 194, 0.3);
}

.history-item.is-removing {
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
}

.history-item-info {
  flex: 1;
  min-width: 0;
}

.history-item-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s;
}
.history-item-title:hover {
  border-bottom-color: var(--muted);
}
.history-item-title-input {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--accent, #3fe1c2);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  width: 100%;
  outline: none;
}

.history-item-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
}

.history-item-date {
  font-size: var(--text-xs);
  color: rgba(245, 247, 255, 0.5);
}

.history-item-slides {
  font-size: var(--text-xs);
  color: rgba(245, 247, 255, 0.4);
}

.history-item-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(245, 247, 255, 0.5);
}

.history-item-status.is-ready {
  background: rgba(63, 225, 194, 0.12);
  color: var(--accent);
}

.history-item-status.is-partial {
  background: rgba(255, 200, 87, 0.12);
  color: #ffc857;
}

.history-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.history-view-btn,
.history-present-btn,
.history-hosted-urls-btn,
.history-embed-btn,
.history-json-btn,
.history-zip-btn {
  padding: 5px 10px;
  font-size: var(--text-xs);
}

.history-download-btn {
  padding: 6px 12px;
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: rgba(63, 225, 194, 0.1);
  border: 1px solid rgba(63, 225, 194, 0.2);
  border-radius: var(--radius-sm);
  color: var(--accent);
  cursor: pointer;
  transition: all 0.15s ease;
}

.history-download-btn:hover {
  background: rgba(63, 225, 194, 0.2);
  border-color: rgba(63, 225, 194, 0.4);
}

.history-download-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.history-empty {
  text-align: center;
  padding: 20px;
  color: rgba(245, 247, 255, 0.5);
  font-size: var(--text-sm);
}

/* JSON Editor Modal */
.json-editor-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 11;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.json-editor-modal.active {
  display: flex;
}

.json-editor-modal-inner {
  position: relative;
  max-width: min(720px, 95vw);
  max-height: 90vh;
  width: 100%;
  background: linear-gradient(170deg, rgba(16, 22, 34, 0.96), rgba(8, 12, 20, 0.94));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.2);
  box-shadow: var(--shadow), 0 0 80px rgba(63, 225, 194, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.json-editor-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(63, 225, 194, 0.12);
  background: rgba(8, 12, 20, 0.4);
}

.json-editor-modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
}

.json-editor-modal-close {
  padding: 8px 14px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(10, 14, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.json-editor-modal-close:hover {
  background: rgba(10, 14, 22, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text);
}

.json-editor-modal-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 20px 0;
  border-bottom: 1px solid rgba(63, 225, 194, 0.1);
}

.json-editor-modal-tabs .tab {
  padding: 10px 18px;
  font-size: var(--text-sm);
  font-weight: 500;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: -1px;
}

.json-editor-modal-tabs .tab:hover {
  color: var(--text);
}

.json-editor-modal-tabs .tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.json-editor-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.json-editor-panel {
  height: 100%;
}

.json-editor-panel textarea {
  width: 100%;
  min-height: 380px;
  padding: 14px 16px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: var(--text-sm);
  line-height: 1.5;
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid rgba(63, 225, 194, 0.15);
  border-radius: var(--radius-md);
  color: var(--text);
  resize: vertical;
}

.json-editor-panel textarea:focus {
  outline: none;
  border-color: rgba(63, 225, 194, 0.4);
  box-shadow: 0 0 0 3px rgba(63, 225, 194, 0.1);
}

.json-editor-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.json-editor-form .form-section {
  padding: 16px;
  background: rgba(8, 12, 20, 0.4);
  border: 1px solid rgba(63, 225, 194, 0.1);
  border-radius: var(--radius-md);
}

.json-editor-form .form-section h4 {
  margin: 0 0 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.json-editor-form .form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.json-editor-form .form-grid .span-2 {
  grid-column: span 2;
}

.json-editor-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.json-editor-form .field input,
.json-editor-form .field textarea {
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  text-transform: none;
  letter-spacing: normal;
  background: rgba(10, 14, 22, 0.7);
  border: 1px solid rgba(63, 225, 194, 0.15);
  border-radius: var(--radius-sm);
  color: var(--text);
}

.json-editor-form .field input:focus,
.json-editor-form .field textarea:focus {
  outline: none;
  border-color: rgba(63, 225, 194, 0.35);
}

.json-editor-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-top: 1px solid rgba(63, 225, 194, 0.12);
  background: rgba(8, 12, 20, 0.4);
}

.json-editor-modal-footer .status-note {
  margin: 0;
  flex: 1;
  font-size: var(--text-xs);
  color: var(--muted);
}

.json-editor-modal-actions {
  display: flex;
  gap: 10px;
}

@media (max-width: 600px) {
  .json-editor-form .form-grid {
    grid-template-columns: 1fr;
  }

  .json-editor-form .form-grid .span-2 {
    grid-column: span 1;
  }

  .json-editor-modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .json-editor-modal-actions {
    justify-content: stretch;
  }

  .json-editor-modal-actions button {
    flex: 1;
  }
}

/* Skeleton loading states */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.skeleton-card {
  background: linear-gradient(180deg, rgba(16, 22, 34, 0.96), rgba(10, 14, 22, 0.94));
  border: 1px solid rgba(63, 225, 194, 0.14);
  border-radius: var(--radius-lg);
  padding: 20px;
  animation: rise 0.3s ease both, skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.skeleton-title {
  height: 24px;
  width: 180px;
  background: rgba(63, 225, 194, 0.15);
  border-radius: var(--radius-sm);
}

.skeleton-actions {
  display: flex;
  gap: 8px;
}

.skeleton-btn {
  height: 32px;
  width: 32px;
  background: rgba(63, 225, 194, 0.1);
  border-radius: var(--radius-sm);
}

.skeleton-variants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.skeleton-variant {
  aspect-ratio: 16 / 10;
  background: rgba(63, 225, 194, 0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.skeleton-variant::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid rgba(63, 225, 194, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Generate More Panel */
.generate-more-panel {
  margin: 16px 24px;
  padding: 16px;
  background: rgba(63, 225, 194, 0.04);
  border: 1px solid rgba(63, 225, 194, 0.12);
  border-radius: var(--radius-md);
}

.generate-more-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.generate-more-panel.is-collapsed .generate-more-header {
  margin-bottom: 0;
}

.generate-more-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}

.generate-more-toggle:hover {
  color: var(--accent);
}

.generate-more-toggle-icon {
  display: inline-block;
  font-size: 10px;
  transition: transform 0.2s ease;
}

.generate-more-panel:not(.is-collapsed) .generate-more-toggle-icon {
  transform: rotate(90deg);
}

.generate-more-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  margin: 0;
  color: inherit;
}

.generate-more-status {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.generate-more-body {
  margin-top: 12px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 600px;
  opacity: 1;
}

.generate-more-panel.is-collapsed .generate-more-body {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.generate-more-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: var(--text-sm);
  color: rgba(211, 221, 244, 0.9);
}

.generate-more-select-all input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.generate-more-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
}

.generate-more-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(63, 225, 194, 0.1);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.generate-more-item:hover {
  background: rgba(63, 225, 194, 0.08);
  border-color: rgba(63, 225, 194, 0.2);
}

.generate-more-item.is-selected {
  background: rgba(63, 225, 194, 0.12);
  border-color: var(--accent);
}

.generate-more-item.is-generated {
  opacity: 0.5;
  cursor: default;
}

.generate-more-item.is-generated:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(63, 225, 194, 0.1);
}

.generate-more-item input[type="checkbox"] {
  accent-color: var(--accent);
}

.generate-more-item-info,
.generate-more-item-label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.generate-more-item-label strong {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text);
}

.generate-more-item-name {
  font-size: var(--text-sm);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

.generate-more-item-status {
  font-size: 11px;
  color: var(--text-muted);
}

.generate-more-item-status.is-ready {
  color: var(--accent);
}

.generate-more-item-thumb {
  width: 40px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
}

.generate-more-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(63, 225, 194, 0.1);
}

.generate-more-selected {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Generate More Tabs */
.generate-more-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.generate-more-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.generate-more-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.generate-more-tab.active {
  color: var(--accent);
  background: rgba(63, 225, 194, 0.1);
}

.generate-more-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.generate-more-tab.active .generate-more-tab-count {
  background: var(--accent);
  color: var(--bg);
}

.generate-more-item-badge {
  justify-self: end;
  align-self: start;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  padding: 2px 6px;
  background: rgba(63, 225, 194, 0.15);
  border-radius: 4px;
}

.generate-more-item-badge.pending {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.1);
}

.generate-more-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: var(--text-sm);
  padding: 24px;
}

@media (max-width: 520px) {
  .generate-more-item {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .generate-more-item-badge {
    grid-column: 2;
    justify-self: start;
  }
}

/* ===== HISTORY DRAWER (Global) ===== */
.history-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  justify-content: flex-end;
}

.history-drawer[hidden] {
  display: none;
}

.history-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.history-drawer-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(16, 24, 36, 0.98) 0%, rgba(10, 14, 22, 0.98) 100%);
  border-left: 1px solid rgba(63, 225, 194, 0.15);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
  animation: slideInRight 0.25s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.history-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(63, 225, 194, 0.12);
}

.history-drawer-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.history-drawer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.history-drawer-actions .ghost {
  padding: 6px 12px;
  font-size: var(--text-sm);
}

.history-drawer-controls {
  display: flex;
  gap: 8px;
  padding: 0 24px 8px;
}

.history-drawer-controls select {
  font-size: var(--text-xs);
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.history-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px 24px;
}

.history-drawer .history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-drawer .history-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(63, 225, 194, 0.08);
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.history-drawer .history-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(63, 225, 194, 0.2);
}

.history-drawer .history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  overflow: hidden;
}

.history-drawer .history-item-info {
  flex: 1;
  min-width: 0;
}

.history-drawer .history-item-title {
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--text);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-drawer .history-item-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.history-drawer .history-item-video-meta {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: rgba(203, 216, 240, 0.88);
}

.history-drawer .history-item-cost {
  margin-top: 4px;
  font-size: var(--text-xs);
  color: var(--text);
  opacity: 0.9;
}

.history-drawer .history-item-badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.history-drawer .history-badge {
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.history-drawer .history-badge.slides {
  background: rgba(63, 225, 194, 0.1);
  color: var(--accent);
}

.history-drawer .history-badge.complete {
  background: rgba(63, 225, 194, 0.15);
  color: var(--accent);
}

.history-drawer .history-badge.partial {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
}

.history-drawer .history-badge.economy {
  background: rgba(100, 181, 246, 0.15);
  color: #64b5f6;
}

.history-drawer .history-item-checked {
  font-size: var(--text-xs);
  color: var(--text-muted);
  opacity: 0.7;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item--highlighted {
  animation: history-highlight 3s ease-out;
}

@keyframes history-highlight {
  0% { box-shadow: 0 0 0 2px var(--accent); }
  100% { box-shadow: none; }
}

.admin-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-xs);
  margin-bottom: 1rem;
}

.admin-stats-table th,
.admin-stats-table td {
  padding: 4px 8px;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-stats-table th:first-child,
.admin-stats-table td:first-child {
  text-align: left;
}

.admin-stats-table th {
  font-weight: 600;
  color: var(--text-secondary);
}

.history-drawer .history-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-drawer .history-item-actions button {
  flex: 1;
  min-width: 80px;
  padding: 8px 12px;
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-drawer .history-item-actions button:hover {
  background: rgba(63, 225, 194, 0.1);
  border-color: rgba(63, 225, 194, 0.3);
  color: var(--accent);
}

.history-drawer .history-item-actions button.primary-action {
  background: rgba(63, 225, 194, 0.1);
  border-color: rgba(63, 225, 194, 0.25);
  color: var(--accent);
}

.history-drawer .history-item-actions button.primary-action:hover {
  background: rgba(63, 225, 194, 0.2);
  border-color: rgba(63, 225, 194, 0.4);
}

.history-drawer .history-status {
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  text-align: center;
}

.history-drawer .history-status.error {
  background: rgba(255, 82, 82, 0.1);
  color: #ff5252;
}

.history-drawer .history-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.history-drawer .history-empty-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.history-drawer .history-empty-text {
  font-size: var(--text-sm);
}

.history-urls-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.history-urls-modal[hidden] {
  display: none;
}

.history-urls-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.82);
  backdrop-filter: blur(4px);
}

.history-urls-modal-content {
  position: relative;
  margin: clamp(18px, 6vh, 48px) auto;
  width: min(1120px, 96vw);
  max-height: calc(100vh - 64px);
  overflow: hidden;
  border: 1px solid rgba(63, 225, 194, 0.2);
  border-radius: var(--radius-lg);
  background: linear-gradient(165deg, rgba(16, 22, 34, 0.98), rgba(8, 12, 20, 0.96));
  box-shadow: var(--shadow), 0 0 80px rgba(63, 225, 194, 0.08);
  display: flex;
  flex-direction: column;
}

.history-urls-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-urls-modal-header h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.history-urls-modal-description {
  margin: 0;
  padding: 10px 18px 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.history-urls-status {
  margin: 10px 18px 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.history-urls-status.error {
  color: #ff8f8f;
  background: rgba(255, 82, 82, 0.14);
}

.history-urls-status.success {
  color: var(--accent);
  background: rgba(63, 225, 194, 0.12);
}

.history-urls-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px 0;
}

.history-urls-confirm {
  margin: 12px 18px 0;
  padding: 12px;
  border: 1px solid rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.08);
  border-radius: var(--radius-sm);
  color: rgba(255, 230, 160, 0.95);
}

.history-urls-confirm p {
  margin: 0 0 10px;
  font-size: var(--text-sm);
}

.history-urls-confirm-actions {
  display: flex;
  gap: 8px;
}

.history-urls-table-wrap {
  margin: 14px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  overflow: auto;
}

.history-urls-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.history-urls-table th,
.history-urls-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--text-xs);
  vertical-align: top;
}

.history-urls-table th {
  position: sticky;
  top: 0;
  background: rgba(9, 14, 25, 0.96);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.history-urls-url-cell a {
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}

@media (max-width: 720px) {
  .history-urls-modal-content {
    width: 98vw;
    max-height: calc(100vh - 24px);
    margin: 12px auto;
  }

  .history-urls-modal-actions button {
    flex: 1 1 calc(50% - 8px);
  }

  .history-urls-confirm-actions {
    flex-direction: column;
  }
}

/* History item retention badges */
.history-item-retention {
  font-size: var(--text-xs);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  white-space: nowrap;
}

.history-item-retention.retention-permanent {
  background: rgba(76, 175, 80, 0.15);
  color: #66bb6a;
}

.history-item-retention.retention-temporary {
  background: rgba(255, 193, 7, 0.15);
  color: #ffca28;
}

.history-item-retention.retention-grace {
  background: rgba(255, 82, 82, 0.15);
  color: #ff5252;
}

.history-item-retention.retention-expired {
  background: rgba(158, 158, 158, 0.15);
  color: #9e9e9e;
}

.retention-countdown {
  font-size: 0.85em;
  opacity: 0.8;
}

.history-item.is-grace {
  border-left: 3px solid rgba(255, 82, 82, 0.5);
  opacity: 0.85;
  padding-left: 13px;
}

.history-item.is-temporary {
  border-left: 3px solid rgba(255, 193, 7, 0.5);
  padding-left: 13px;
}

.history-plan-card {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(8, 12, 20, 0.72);
}

.history-permanent-slot-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.history-permanent-slot-summary__row {
  display: grid;
  gap: 3px;
}

.history-permanent-slot-summary__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.history-permanent-slot-summary__value {
  font-size: var(--text-sm);
  color: var(--text);
}

.history-plan-card__note {
  margin: 12px 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.history-delete-btn,
.history-restore-btn {
  background: transparent !important;
  border: none !important;
  padding: 4px 8px !important;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.history-delete-btn:hover {
  opacity: 1;
}

.history-restore-btn {
  color: var(--accent);
  opacity: 0.8;
}

.history-restore-btn:hover {
  opacity: 1;
}

.history-restore-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Legacy .history-retention-toggle removed — videos now use unified .history-permanent-slot-btn */

.history-permanent-slot-btn {
  background: rgba(63, 225, 194, 0.08) !important;
  border: 1px solid rgba(63, 225, 194, 0.25) !important;
  color: var(--accent) !important;
}

.history-permanent-slot-btn--pinned {
  background: rgba(76, 175, 80, 0.12) !important;
  border-color: rgba(76, 175, 80, 0.35) !important;
  color: #81c784 !important;
}

.history-permanent-slot-btn--warning {
  background: rgba(242, 156, 75, 0.08) !important;
  border-color: rgba(242, 156, 75, 0.28) !important;
  color: #ffd2a5 !important;
}

.history-permanent-slot-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.history-item.is-grace .history-item-title {
  color: rgba(255, 82, 82, 0.9);
}

.history-item.is-grace .history-view-btn,
.history-item.is-grace .history-present-btn,
.history-item.is-grace .history-hosted-urls-btn,
.history-item.is-grace .history-embed-btn,
.history-item.is-grace .history-json-btn,
.history-item.is-grace .history-zip-btn {
  opacity: 0.6;
}

.history-item.is-grace .history-view-btn:hover,
.history-item.is-grace .history-present-btn:hover,
.history-item.is-grace .history-hosted-urls-btn:hover,
.history-item.is-grace .history-embed-btn:hover,
.history-item.is-grace .history-json-btn:hover,
.history-item.is-grace .history-zip-btn:hover {
  opacity: 0.8;
}

/* Presenter view */
.presenter {
  min-height: 100vh;
  padding: clamp(14px, 2vw, 24px);
}

.presenter-shell {
  max-width: min(1200px, 96vw);
  margin: 0 auto;
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(6, 11, 20, 0.88);
  border-radius: 20px;
  padding: clamp(12px, 1.8vw, 20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.presenter.is-embed .presenter-toolbar-actions .ghost {
  display: none;
}

.presenter-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.presenter-heading h2 {
  margin: 0;
}

.presenter-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.presenter-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.presenter-stage {
  position: relative;
  margin-top: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  background: rgba(2, 5, 11, 0.95);
}

.presenter-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 5, 11, 0.85);
  z-index: 2;
}

.presenter-spinner-ring {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(63, 225, 194, 0.2);
  border-top-color: rgba(63, 225, 194, 0.8);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.presenter-image {
  width: 100%;
  height: auto;
  display: block;
}

.presenter-caption {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  color: var(--text-secondary);
}

.presenter-notes {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(63, 225, 194, 0.22);
  background: rgba(10, 28, 26, 0.42);
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.video-movie-share-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(5, 10, 18, 0.82);
  display: grid;
  gap: 14px;
}

.video-movie-share-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.video-movie-share-card__header h3 {
  margin: 0 0 4px;
}

.video-movie-share-card__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.share-stats-badge {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.55));
  line-height: 1.3;
}

.video-movie-share-regenerate {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 159, 67, 0.28);
  background: rgba(44, 25, 6, 0.45);
  display: grid;
  gap: 10px;
}

.video-movie-share-regenerate p {
  margin: 0;
  color: var(--text-secondary);
}

.video-movie-share-regenerate__actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.watcher {
  min-height: 100vh;
  padding: clamp(14px, 2vw, 24px);
}

.watcher-shell {
  max-width: min(1120px, 96vw);
  margin: 0 auto;
  border: 1px solid rgba(63, 225, 194, 0.18);
  background: rgba(6, 11, 20, 0.88);
  border-radius: 20px;
  padding: clamp(12px, 1.8vw, 20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 14px;
}

.watcher.is-minimal .watcher-shell {
  border-color: rgba(255, 255, 255, 0.12);
}

.watcher-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.watcher-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.watcher.is-embed .watcher-toolbar-actions .ghost {
  display: none;
}

.watcher-branding h2 {
  margin: 6px 0 0;
}

.watcher-brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(63, 225, 194, 0.14);
  border: 1px solid rgba(63, 225, 194, 0.22);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.watcher-player-frame {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(2, 5, 11, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.watcher-player-frame video {
  width: 100%;
  display: block;
  background: #000;
}

.watcher-unavailable {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 107, 107, 0.24);
  background: rgba(47, 15, 15, 0.42);
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  .video-movie-share-field__row {
    grid-template-columns: 1fr;
  }
}

.history-item-retention.retention-grace {
  animation: gracePulse 2s ease-in-out infinite;
}

@keyframes gracePulse {
  0%, 100% { background: rgba(255, 82, 82, 0.15); box-shadow: none; }
  50% { background: rgba(255, 82, 82, 0.25); box-shadow: 0 0 8px rgba(255, 82, 82, 0.3); }
}

/* ============================================================================
   ACTION TOASTS
   ============================================================================ */

.action-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: 420px;
  padding: 12px 14px;
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.action-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.action-toast--danger {
  border-color: rgba(255, 82, 82, 0.35);
}

.action-toast--warning {
  border-color: rgba(255, 196, 120, 0.35);
}

.action-toast-body {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.4;
}

.action-toast-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-toast-action {
  padding: 8px 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(140, 255, 210, 0.35);
  background: rgba(140, 255, 210, 0.12);
  color: rgba(220, 255, 245, 0.95);
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.action-toast-action:hover {
  filter: brightness(1.08);
}

.action-toast-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.action-toast-undo {
  padding: 8px 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 82, 82, 0.35);
  background: rgba(255, 82, 82, 0.12);
  color: rgba(255, 240, 240, 0.95);
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.action-toast-undo:hover {
  filter: brightness(1.08);
}

.action-toast-undo:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.action-toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 8px;
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.action-toast-close:hover {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .action-toast {
    transition: none;
  }

  .history-item {
    transition: none;
  }
}

/* ============================================================================
   UPSELL NOTIFICATIONS
   ============================================================================ */

.upsell-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 380px;
  padding: 16px 20px;
  background: var(--panel-strong);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1500;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.upsell-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

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

.upsell-toast-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #ffca28;
}

.upsell-toast-icon {
  width: 18px;
  height: 18px;
}

.upsell-toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1.2rem;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.upsell-toast-close:hover { opacity: 1; }

.upsell-toast-body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.upsell-toast-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: var(--text-xs);
  color: #ff8a80;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.upsell-toast-link:hover { filter: brightness(1.1); }

.upsell-toast-actions {
  display: flex;
  gap: 8px;
}

.upsell-toast-actions button {
  flex: 1;
  padding: 8px 12px;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.upsell-toast-actions .upsell-upgrade-btn {
  background: linear-gradient(135deg, #ffca28 0%, #f29c4b 100%);
  border: none;
  color: #1a1a1a;
}

.upsell-toast-actions .upsell-upgrade-btn:hover { filter: brightness(1.1); }

.upsell-toast-actions .upsell-dismiss-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.upsell-toast-actions .upsell-dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.upsell-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.upsell-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.upsell-modal-content {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.upsell-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.upsell-modal-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: #ffca28;
}

.upsell-modal-icon {
  width: 18px;
  height: 18px;
}

.upsell-modal-header button { font-size: 1.5rem; line-height: 1; padding: 4px 8px; }

.upsell-modal-body { padding: 24px; }

.upsell-slot-status { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.upsell-slot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
}

.upsell-slot-label { font-size: var(--text-sm); color: var(--text-muted); }
.upsell-slot-value { font-weight: 600; }
.upsell-slot-value.is-full { color: #ff5252; }
.upsell-slot-value.is-available { color: var(--accent); }

.upsell-modal-message {
  padding: 16px;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.15);
  border-radius: var(--radius-sm);
  text-align: center;
}

.upsell-modal-message p { margin: 0; font-size: var(--text-sm); color: var(--text-muted); line-height: 1.5; }
.upsell-modal-message strong { color: var(--text); }

.upsell-modal-actions { display: flex; gap: 12px; padding: 0 24px 24px; }
.upsell-modal-actions button { flex: 1; padding: 12px 16px; font-weight: 500; }

.upsell-modal-actions .upsell-primary {
  background: linear-gradient(135deg, #ffca28 0%, #f29c4b 100%);
  border: none;
  color: #1a1a1a;
}

.upsell-modal-actions .upsell-primary:hover { filter: brightness(1.1); }

.history-upgrade-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: #ffca28;
  text-decoration: none;
  transition: all 0.15s ease;
}

.history-upgrade-prompt:hover {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 193, 7, 0.3);
}

.history-upgrade-prompt-icon {
  width: 14px;
  height: 14px;
}
.history-upgrade-prompt-text { white-space: nowrap; }

.history-drawer-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 12px;
}

.upsell-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 82, 82, 0.1);
  border-bottom: 1px solid rgba(255, 82, 82, 0.2);
}

.upsell-banner-content { display: flex; align-items: center; gap: 10px; flex: 1; }
.upsell-banner-icon {
  width: 16px;
  height: 16px;
  color: #ff5252;
}
.upsell-banner-text { font-size: var(--text-sm); color: var(--text-muted); }
.upsell-banner-text strong { color: #ff5252; }

.upsell-banner-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: #ff8a80;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upsell-banner-link:hover { filter: brightness(1.1); }

.upsell-banner-action {
  padding: 6px 12px;
  font-size: var(--text-xs);
  font-weight: 500;
  background: rgba(255, 82, 82, 0.15);
  border: 1px solid rgba(255, 82, 82, 0.3);
  border-radius: var(--radius-sm);
  color: #ff5252;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.upsell-banner-action:hover { background: rgba(255, 82, 82, 0.25); }

.upsell-banner-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.6;
}

.upsell-banner-close:hover { opacity: 1; }

@media (max-width: 480px) {
  .action-toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .upsell-toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
  .upsell-modal-content { max-width: none; margin: 16px; }
  .history-upgrade-prompt { padding: 4px 8px; }
  .history-upgrade-prompt-text { display: none; }
  .upsell-banner { flex-wrap: wrap; gap: 8px; }
  .upsell-banner-action { flex: 1; text-align: center; }
}

/* ============================================================================
   PRICING PAGE
   ============================================================================ */

.pricing {
  min-height: 100vh;
  padding: 80px 20px 40px;
  background: var(--bg);
}

.pricing-shell {
  max-width: 1200px;
  margin: 0 auto;
}

/* Back button */
.pricing-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  padding: 6px 14px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.pricing-back-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Header — centered */
.pricing-header {
  text-align: center;
  margin-bottom: 40px;
}

.pricing-header .eyebrow {
  margin: 0 0 4px;
}

.pricing-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 8px 0 12px;
}

.pricing-header .panel-note {
  max-width: 480px;
  margin: 0 auto;
  color: var(--text-muted);
  line-height: 1.5;
}

.pricing-recommended-presets {
  margin-bottom: 28px;
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(63, 225, 194, 0.18);
  background:
    radial-gradient(circle at top left, rgba(63, 225, 194, 0.12), transparent 42%),
    linear-gradient(155deg, rgba(15, 22, 34, 0.95), rgba(8, 12, 20, 0.9));
  box-shadow: var(--glow-shadow);
}

.pricing-recommended-presets__copy {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.pricing-recommended-presets__copy h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.pricing-recommended-presets__copy .panel-note {
  margin: 0;
  max-width: 64ch;
}

.pricing-recommended-presets__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.pricing-preset-card {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 13, 22, 0.72);
}

.pricing-preset-card__label {
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.pricing-preset-card__value {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: rgba(245, 247, 255, 0.84);
}

.pricing-preset-card--movie {
  border-color: rgba(242, 156, 75, 0.2);
  background:
    radial-gradient(circle at top right, rgba(242, 156, 75, 0.14), transparent 44%),
    rgba(8, 13, 22, 0.76);
}

.pricing-beta-banner {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 20px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  background: rgba(242, 156, 75, 0.08);
  border: 1px solid rgba(242, 156, 75, 0.2);
  border-radius: var(--radius-pill);
}

/* Trust badges */
.pricing-trust-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.trust-badge svg {
  flex-shrink: 0;
}

/* Cards grid — wrapped rows keep dynamic plan combinations centered */
.pricing-cards-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 48px;
}

.pricing-paid-cards {
  display: contents;
}

/* Card base */
.pricing-card {
  flex: 1 1 220px;
  min-width: 220px;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px 24px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Free card variant */
.pricing-card--free {
  background: linear-gradient(135deg, rgba(63, 225, 194, 0.05) 0%, var(--surface-card) 50%);
  border-color: rgba(63, 225, 194, 0.18);
}

/* Best value card */
.pricing-card--best-value {
  border-color: var(--border-highlight);
  box-shadow: 0 0 24px rgba(242, 156, 75, 0.08);
}

.pricing-card--best-value:hover {
  border-color: rgba(242, 156, 75, 0.55);
  box-shadow: 0 12px 40px rgba(242, 156, 75, 0.12);
}

/* Badge — sits above the card */
.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  background: linear-gradient(135deg, #f29c4b, #e8822a);
  color: #fff;
  border-radius: 999px;
}

.pricing-card__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 4px;
}

.pricing-card__tagline {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0 0 16px;
  min-height: 2.4em;
}

.pricing-card__price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 2px;
}

.pricing-card__period {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card__price-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0 0 16px;
}

/* Feature list with checkmarks */
.pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 20px;
}

.pricing-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.35;
}

.pricing-card__features li svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.pricing-card__features li strong {
  color: var(--text);
  font-weight: 600;
}

/* CTA / Action */
.pricing-card__action {
  margin-top: auto;
}

.pricing-card__action button {
  width: 100%;
}

.pricing-card__current {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
}

.pricing-card__savings {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 999px;
}

/* Promotion banner */
.pricing-promo-banner {
  margin-bottom: 32px;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(242, 156, 75, 0.15), rgba(255, 193, 7, 0.1));
  border: 1px solid rgba(242, 156, 75, 0.3);
  border-radius: var(--radius-lg);
  text-align: center;
}

.pricing-promo-banner__content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pricing-promo-banner__badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: #fff;
  background: rgba(242, 156, 75, 0.9);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-promo-banner__label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.pricing-promo-banner__bonus {
  font-size: 1rem;
  font-weight: 700;
  color: #f29c4b;
}

.pricing-promo-banner__countdown {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
}

/* Card promo styles */
.pricing-card__base-credits {
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-decoration: line-through;
  margin-right: 4px;
}

.pricing-card__promo-credits {
  color: #f29c4b;
}

.pricing-card__promo-badge {
  display: inline-block;
  margin-bottom: 4px;
  margin-left: 4px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #f29c4b;
  background: rgba(242, 156, 75, 0.12);
  border-radius: 999px;
}

.pricing-card__volume-badge {
  display: inline-block;
  margin-bottom: 4px;
  margin-left: 4px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 999px;
}

/* Skeleton loading placeholder */
.pricing-cards-skeleton {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* Section toggle (Credits / Storage) */
.pricing-section-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 40px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-section-toggle__btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px;
  background: var(--surface-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: left;
  color: var(--text-muted);
}

.pricing-section-toggle__btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.pricing-section-toggle__btn--active {
  border-color: var(--accent-2);
  box-shadow: 0 0 20px rgba(242, 156, 75, 0.1);
  color: var(--text);
}

.pricing-section-toggle__btn--active .pricing-section-toggle__label {
  color: var(--text);
}

.pricing-section-toggle__label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pricing-section-toggle__desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.pricing-section-toggle__btn svg {
  color: var(--accent-2);
}

/* Sections */
.pricing-section {
  margin-bottom: 32px;
}

.pricing-boost-pack-section {
  margin-top: 20px;
}

.pricing-storage-plan-section {
  margin-top: 20px;
}

.pricing-boost-pack-header h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
}

.pricing-boost-pack-header .panel-note {
  margin: 0 0 14px;
}

.pricing-boost-pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.boost-pack-card {
  border: 1px solid rgba(242, 156, 75, 0.24);
  border-radius: var(--radius-md);
  background: rgba(11, 15, 24, 0.72);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.boost-pack-card__name {
  margin: 0;
  font-size: var(--text-base);
}

.boost-pack-card__meta {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.boost-pack-card button {
  margin-top: 6px;
  width: 100%;
}

/* Storage subsections */
.storage-subsection {
  margin-bottom: 32px;
}

.storage-subsection__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 4px;
  text-align: center;
  color: var(--text);
}

.storage-subsection__desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 20px;
}

/* Current plan button state for subscription cards */
.pricing-card__current-btn {
  opacity: 0.7;
  cursor: default;
}

.pricing-card__cancel-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  margin: 6px 0 0;
}

/* FAQ */
.pricing-faq {
  margin-bottom: 40px;
}

.pricing-faq h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 20px;
  text-align: center;
}

.pricing-faq__list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pricing-faq__item {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pricing-faq__item summary {
  padding: 16px 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pricing-faq__item summary::-webkit-details-marker {
  display: none;
}

.pricing-faq__item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.pricing-faq__item[open] summary::after {
  content: "\2212";
}

.pricing-faq__item p {
  margin: 0;
  padding: 0 20px 16px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  /* Let cards grow a bit on tablets to avoid overly narrow columns. */
  .pricing-card {
    flex-basis: 210px;
    min-width: 210px;
    max-width: 320px;
  }

  .pricing-section-toggle {
    max-width: 100%;
  }
}

@media (max-width: 520px) {
  .pricing-cards-grid {
    gap: 14px;
  }

  .pricing-card {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }

  .pricing-section-toggle {
    grid-template-columns: 1fr;
  }
}

/* Billing center */
.pricing-shell.billing-shell {
  position: relative;
}

.pricing-content--billing {
  gap: 1.5rem;
}

.billing-hero {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(63, 225, 194, 0.16);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top left, rgba(63, 225, 194, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(8, 14, 24, 0.92), rgba(5, 9, 17, 0.98));
  box-shadow: 0 1.5rem 3rem rgba(3, 8, 16, 0.26);
}

.billing-hero__copy,
.billing-hero__meta {
  display: grid;
  gap: 0.75rem;
}

.billing-hero__meta {
  padding: 1rem 1.125rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  align-content: start;
}

.billing-hero__eyebrow,
.billing-card-heading__eyebrow {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--text-xs);
}

.billing-hero__title {
  font-size: 1.125rem;
  line-height: 1.2;
  color: var(--text);
}

.billing-hero__note {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.billing-hero__facts {
  margin: 0;
  padding-left: 1.125rem;
  display: grid;
  gap: 0.5rem;
  color: var(--text);
}

.billing-grid {
  display: grid;
  gap: 1rem;
}

.billing-section-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(11, 18, 30, 0.92), rgba(5, 10, 18, 0.98));
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.billing-card-heading {
  display: grid;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.billing-card-heading h3,
.billing-card-heading h4 {
  margin: 0;
  font-family: var(--font-display);
}

.billing-section-card--plan {
  padding: 1.5rem;
}

.billing-plan-list {
  margin: 0;
  padding-left: 1.125rem;
  display: grid;
  gap: 0.625rem;
  color: var(--text-muted);
}

.billing-balance {
  margin-bottom: 0;
  height: 100%;
}

.billing-status-note {
  margin: 0;
}

.billing-provider-grid {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}

.billing-provider-copy,
.billing-provider-catalog {
  display: grid;
  gap: 0.875rem;
}

.billing-provider-catalog h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
}

.billing-provider-note {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(242, 156, 75, 0.36);
  background: rgba(242, 156, 75, 0.08);
  color: #ffd0a7;
}

.billing-action-grid {
  display: grid;
  gap: 0.75rem;
}

.billing-action-grid button,
.billing-ledger-actions a {
  min-height: 2.75rem;
}

.billing-plan-catalog {
  gap: 0.875rem;
}

.billing-section-card--ledger {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}

.billing-ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pricing-account-cta {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(63, 225, 194, 0.16);
  background: linear-gradient(135deg, rgba(8, 14, 24, 0.88), rgba(11, 18, 30, 0.96));
}

.pricing-account-cta__copy,
.pricing-account-cta__actions {
  display: grid;
  gap: 0.75rem;
}

.pricing-account-cta__copy h3 {
  margin: 0;
  font-family: var(--font-display);
}

.pricing-account-cta__actions {
  align-content: start;
}

@media (min-width: 768px) {
  .billing-hero {
    grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 1fr);
    align-items: stretch;
  }

  .billing-provider-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }

  .billing-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pricing-account-cta {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .pricing-account-cta__actions {
    grid-auto-flow: column;
  }
}

@media (min-width: 1024px) {
  .billing-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
  }

  .billing-section-card--usage,
  .billing-section-card--ledger {
    grid-column: 1 / 2;
  }

  .billing-section-card--provider {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
    align-self: stretch;
  }
}

/* Pricing Balance */
.balance-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.balance-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-balance {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}

.pricing-balance h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin: 0 0 20px;
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
}

.balance-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.balance-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.balance-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.balance-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.balance-item .balance-note {
  line-height: 1.4;
}

.balance-total {
  padding-left: 24px;
  border-left: 1px solid var(--border);
}

.balance-total .balance-value {
  color: var(--accent);
}

/* Pricing History */
.pricing-history {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.pricing-history .history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.pricing-history .history-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-history h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin: 0;
}

.pricing-history-note {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.pricing-history .history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-history .history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pricing-history .history-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pricing-history .history-item-name {
  font-weight: 500;
  color: var(--text);
}

.pricing-history .history-item-date {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.pricing-history .history-item-details {
  text-align: right;
}

.pricing-history .history-item-price {
  font-weight: 500;
  color: var(--text);
}

.pricing-history .history-item-credits {
  font-size: var(--text-sm);
  color: var(--accent);
}

.pricing-history .history-item-credits.is-negative {
  color: #ff9f6b;
}

.pricing-history .history-item-validity {
  font-size: var(--text-sm);
  color: var(--text-dim);
}

.pricing-history .history-item--expired {
  opacity: 0.55;
}

.pricing-history-actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-history-retry {
  margin-top: 16px;
}

.addon-details {
  margin-top: 0.25rem;
}

.addon-detail {
  font-size: var(--text-xs, 0.75rem);
  color: var(--text-dim);
  line-height: 1.4;
}

/* Purchase Modal */
.purchase-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.purchase-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.purchase-modal-content {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.purchase-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.purchase-modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin: 0;
}

.purchase-modal-header button {
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px 8px;
}

.purchase-modal-body {
  padding: 24px;
}

.purchase-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

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

.purchase-row span {
  color: var(--text-muted);
}

.purchase-row strong {
  color: var(--text);
}

.purchase-warning {
  padding: 16px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: var(--radius-sm);
  text-align: center;
}

.purchase-warning strong {
  display: block;
  color: #ffc107;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.purchase-warning p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.purchase-modal-actions {
  display: flex;
  gap: 12px;
  padding: 0 24px 24px;
}

.purchase-modal-actions button {
  flex: 1;
}

.purchase-modal .status-note {
  margin: 0 24px 20px;
  text-align: center;
}

.purchase-modal .status-note.error {
  color: #ff5252;
}

.purchase-modal .status-note.success {
  color: var(--accent);
}

/* Grace Period Deletion Confirmation Modal */
.grace-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.grace-delete-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.grace-delete-modal-content {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.grace-delete-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}

.grace-delete-modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  margin: 0;
  color: #ff5252;
}

.grace-delete-modal-header button { font-size: 1.5rem; line-height: 1; padding: 4px 8px; }

.grace-delete-modal-body { padding: 24px; }

.grace-delete-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 82, 82, 0.1);
  border: 1px solid rgba(255, 82, 82, 0.3);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.grace-delete-icon {
  width: 22px;
  height: 22px;
  color: #ff5252;
  flex-shrink: 0;
}
.grace-delete-warning p { margin: 0; font-size: var(--text-sm); color: var(--text); line-height: 1.5; }
.grace-delete-warning strong { color: #ff5252; }

.grace-delete-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.grace-delete-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.grace-delete-row span { color: var(--text-muted); font-size: var(--text-sm); }
.grace-delete-row strong { color: var(--text); font-size: var(--text-sm); text-align: right; word-break: break-word; max-width: 60%; }
.grace-delete-note { margin: 0; font-size: var(--text-sm); color: var(--text-muted); text-align: center; }

.grace-delete-modal-actions { display: flex; gap: 12px; padding: 0 24px 24px; }
.grace-delete-modal-actions button { flex: 1; }

.grace-delete-modal-actions button.danger {
  background: rgba(255, 82, 82, 0.15);
  border-color: rgba(255, 82, 82, 0.3);
  color: #ff5252;
}

.grace-delete-modal-actions button.danger:hover {
  background: rgba(255, 82, 82, 0.25);
  border-color: rgba(255, 82, 82, 0.5);
}

.grace-delete-modal .status-note { margin: 0 24px 20px; text-align: center; }
.grace-delete-modal .status-note.error { color: #ff5252; }
.grace-delete-modal .status-note.success { color: var(--accent); }

/* Low credits warning in header */
.credits-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.3);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: #ffc107;
}

@keyframes creditsDecreasePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
  }
  35% {
    box-shadow: 0 0 0 6px rgba(255, 82, 82, 0.22);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
  }
}

.account-credits.credits-decrease-pulse,
.credits-warning.credits-decrease-pulse {
  animation: creditsDecreasePulse 450ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .account-credits.credits-decrease-pulse,
  .credits-warning.credits-decrease-pulse {
    animation: none;
  }
}

.credits-warning-icon {
  font-size: 1rem;
}

.credits-warning a {
  color: #ffc107;
  text-decoration: underline;
  font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .balance-grid {
    grid-template-columns: 1fr;
  }

  .balance-total {
    padding-left: 0;
    padding-top: 16px;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .pricing-history .history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .pricing-history .history-item-details {
    text-align: left;
  }

  .pricing-history .history-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .pricing-history .history-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .billing-action-grid,
  .pricing-account-cta__actions,
  .billing-ledger-actions {
    grid-template-columns: 1fr;
  }

  .billing-ledger-actions,
  .pricing-account-cta__actions {
    display: grid;
  }
}

/* Pricing Loading State */
.pricing-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 16px;
  color: var(--text-muted);
}

.pricing-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pricing-content {
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== GENERATION MODE TOGGLE (High-Tech Lab Aesthetic) ===== */

/* Generation Mode Section Container */
.gen-mode-section {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(8, 12, 22, 0.95), rgba(12, 18, 30, 0.88));
  border: 1px solid rgba(63, 225, 194, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 20px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

/* Subtle scan line effect for lab aesthetic */
.gen-mode-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(63, 225, 194, 0.015) 2px,
    rgba(63, 225, 194, 0.015) 4px
  );
  pointer-events: none;
}

/* Header with label and price */
.gen-mode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.gen-mode-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(63, 225, 194, 0.8);
  font-weight: 600;
}

/* Price Display - Prominent */
.gen-mode-price {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(63, 225, 194, 0.08);
  border: 1px solid rgba(63, 225, 194, 0.2);
  box-shadow: 0 0 20px rgba(63, 225, 194, 0.1);
}

.gen-mode-price-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(211, 221, 244, 0.5);
}

.gen-mode-price-value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(63, 225, 194, 0.4);
}

/* 3-Way Toggle Container */
.gen-mode-toggle {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 6px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: rgba(4, 8, 16, 0.85);
  border: 1px solid rgba(63, 225, 194, 0.15);
  position: relative;
  z-index: 1;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Sliding Indicator (animated background) */
.gen-mode-indicator {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(25% - 4.5px);
  height: calc(100% - 12px);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(63, 225, 194, 0.25), rgba(63, 225, 194, 0.15));
  border: 1px solid rgba(63, 225, 194, 0.4);
  box-shadow:
    0 0 20px rgba(63, 225, 194, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}

/* Indicator positions based on selection (order: draft, balanced, best, custom) */
.gen-mode-toggle:has([value="draft"]:checked) .gen-mode-indicator {
  transform: translateX(0);
}

.gen-mode-toggle:has([value="balanced"]:checked) .gen-mode-indicator {
  transform: translateX(calc(100% + 4px));
}

.gen-mode-toggle:has([value="best"]:checked) .gen-mode-indicator {
  transform: translateX(calc(200% + 8px));
}

.gen-mode-toggle:has([value="custom"]:checked) .gen-mode-indicator {
  transform: translateX(calc(300% + 12px));
}

/* Individual Option */
.gen-mode-option {
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.gen-mode-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.gen-mode-option-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
}

.gen-mode-option-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(211, 221, 244, 0.5);
  transition: all 0.25s ease;
}

.gen-mode-option-icon svg {
  width: 20px;
  height: 20px;
}

.gen-mode-option-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.gen-mode-option-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(211, 221, 244, 0.7);
  transition: all 0.25s ease;
}

.gen-mode-option-desc {
  font-size: 10px;
  color: rgba(211, 221, 244, 0.4);
  transition: all 0.25s ease;
}

/* Hover State */
.gen-mode-option:hover .gen-mode-option-icon {
  color: rgba(63, 225, 194, 0.7);
}

.gen-mode-option:hover .gen-mode-option-title {
  color: rgba(211, 221, 244, 0.9);
}

/* Active/Selected State */
.gen-mode-option input:checked ~ .gen-mode-option-inner .gen-mode-option-icon {
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(63, 225, 194, 0.5));
}

.gen-mode-option input:checked ~ .gen-mode-option-inner .gen-mode-option-title {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(63, 225, 194, 0.3);
}

.gen-mode-option input:checked ~ .gen-mode-option-inner .gen-mode-option-desc {
  color: rgba(63, 225, 194, 0.8);
}

/* Focus State for Accessibility */
.gen-mode-option input:focus-visible ~ .gen-mode-option-inner {
  outline: 2px solid rgba(63, 225, 194, 0.6);
  outline-offset: 2px;
}

/* Specs Display (below toggle) */
.gen-mode-specs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: rgba(4, 8, 16, 0.6);
  border: 1px solid rgba(63, 225, 194, 0.08);
  position: relative;
  z-index: 1;
}

.gen-mode-spec {
  font-size: 11px;
  font-weight: 500;
  color: rgba(211, 221, 244, 0.85);
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.02em;
}

.gen-mode-spec-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(63, 225, 194, 0.4);
}

.gen-mode-spec-price {
  color: var(--accent);
  font-weight: 600;
}

/* ===== CUSTOM CONTROLS SECTION ===== */

.gen-custom-controls {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(6, 10, 18, 0.75);
  border: 1px solid rgba(63, 225, 194, 0.1);
  margin-top: 4px;
  max-height: 500px; /* Large enough for content */
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              margin-top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease,
              border-color 0.3s ease;
}

/* Collapsed state (when not in Custom mode) - smooth animation */
.gen-custom-controls.is-collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  border-color: transparent;
  pointer-events: none;
}

/* Alternative: fade/disable instead of hide */
.gen-custom-controls.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.3);
}

.gen-custom-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gen-custom-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(211, 221, 244, 0.5);
  font-weight: 500;
}

.gen-custom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* Control Group */
.gen-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gen-control-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gen-control-label-text {
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(211, 221, 244, 0.9);
}

.gen-control-label-hint {
  font-size: 10px;
  color: rgba(211, 221, 244, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Select Styling */
.gen-control-select {
  appearance: none;
  padding: 12px 40px 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 225, 194, 0.2);
  background: rgba(8, 12, 20, 0.9);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233fe1c2' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

.gen-control-select:hover {
  border-color: rgba(63, 225, 194, 0.4);
  background-color: rgba(10, 16, 26, 0.95);
}

.gen-control-select:focus {
  outline: none;
  border-color: rgba(63, 225, 194, 0.6);
  box-shadow: 0 0 0 3px rgba(63, 225, 194, 0.1);
}

/* Control Meta/Description */
.gen-control-meta {
  font-size: var(--text-xs);
  color: rgba(211, 221, 244, 0.6);
  line-height: 1.4;
  padding-left: 2px;
}

/* ===== MODE-SPECIFIC STYLING ===== */

/* Draft Mode - Lightning bolt accent */
.gen-mode-toggle:has([value="draft"]:checked) .gen-mode-indicator {
  background: linear-gradient(135deg, rgba(215, 227, 106, 0.25), rgba(215, 227, 106, 0.15));
  border-color: rgba(215, 227, 106, 0.4);
  box-shadow: 0 0 20px rgba(215, 227, 106, 0.2);
}

.gen-mode-option[data-mode="draft"] input:checked ~ .gen-mode-option-inner .gen-mode-option-icon {
  color: var(--accent-3);
  filter: drop-shadow(0 0 8px rgba(215, 227, 106, 0.5));
}

.gen-mode-option[data-mode="draft"] input:checked ~ .gen-mode-option-inner .gen-mode-option-desc {
  color: rgba(215, 227, 106, 0.8);
}

/* Balanced Mode - Default teal accent (uses default indicator styling) */
.gen-mode-option[data-mode="balanced"] input:checked ~ .gen-mode-option-inner .gen-mode-option-icon {
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(63, 225, 194, 0.5));
}

.gen-mode-option[data-mode="balanced"] input:checked ~ .gen-mode-option-inner .gen-mode-option-desc {
  color: rgba(63, 225, 194, 0.8);
}

/* Best Mode - Star/premium accent */
.gen-mode-toggle:has([value="best"]:checked) .gen-mode-indicator {
  background: linear-gradient(135deg, rgba(242, 156, 75, 0.25), rgba(242, 156, 75, 0.15));
  border-color: rgba(242, 156, 75, 0.4);
  box-shadow: 0 0 20px rgba(242, 156, 75, 0.2);
}

.gen-mode-option[data-mode="best"] input:checked ~ .gen-mode-option-inner .gen-mode-option-icon {
  color: var(--accent-2);
  filter: drop-shadow(0 0 8px rgba(242, 156, 75, 0.5));
}

.gen-mode-option[data-mode="best"] input:checked ~ .gen-mode-option-inner .gen-mode-option-desc {
  color: rgba(242, 156, 75, 0.8);
}

/* Custom Mode - Purple accent for customization */
.gen-mode-toggle:has([value="custom"]:checked) .gen-mode-indicator {
  background: linear-gradient(135deg, rgba(168, 139, 255, 0.25), rgba(168, 139, 255, 0.15));
  border-color: rgba(168, 139, 255, 0.4);
  box-shadow: 0 0 20px rgba(168, 139, 255, 0.2);
}

.gen-mode-option[data-mode="custom"] input:checked ~ .gen-mode-option-inner .gen-mode-option-icon {
  color: #a88bff;
  filter: drop-shadow(0 0 8px rgba(168, 139, 255, 0.5));
}

.gen-mode-option[data-mode="custom"] input:checked ~ .gen-mode-option-inner .gen-mode-option-desc {
  color: rgba(168, 139, 255, 0.8);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (max-width: 600px) {
  .gen-mode-section {
    padding: 12px;
  }

  .gen-mode-toggle {
    gap: 2px;
    padding: 4px;
  }

  .gen-mode-option-inner {
    padding: 8px 4px;
    gap: 4px;
  }

  .gen-mode-option-icon {
    width: 24px;
    height: 24px;
  }

  .gen-mode-option-icon svg {
    width: 16px;
    height: 16px;
  }

  .gen-mode-option-title {
    font-size: 11px;
  }

  .gen-mode-option-desc {
    display: none;
  }

  /* Adjust indicator geometry for reduced padding/gap */
  .gen-mode-indicator {
    top: 4px;
    left: 4px;
    width: calc(25% - 2.5px);
    height: calc(100% - 8px);
  }

  .gen-mode-toggle:has([value="balanced"]:checked) .gen-mode-indicator {
    transform: translateX(calc(100% + 2px));
  }

  .gen-mode-toggle:has([value="best"]:checked) .gen-mode-indicator {
    transform: translateX(calc(200% + 4px));
  }

  .gen-mode-toggle:has([value="custom"]:checked) .gen-mode-indicator {
    transform: translateX(calc(300% + 6px));
  }

  .gen-mode-specs {
    flex-wrap: wrap;
    gap: 8px;
  }

  .gen-custom-grid {
    grid-template-columns: 1fr;
  }

  /* Boost panel mobile adjustments */
  .review-boost-controls {
    padding: 8px 10px;
  }

  .boost-level-selector {
    gap: 1px;
    padding: 2px;
  }

  .boost-level-btn {
    padding: 5px 6px;
    font-size: 0.72rem;
  }

  .review-boost-hint {
    font-size: 0.68rem;
    line-height: 1.35;
  }
}

@media (max-width: 380px) {
  .boost-level-btn {
    padding: 5px 4px;
    font-size: 0.68rem;
  }

  .gen-mode-option-icon {
    width: 20px;
    height: 20px;
  }

  .gen-mode-option-icon svg {
    width: 14px;
    height: 14px;
  }

  .gen-mode-option-title {
    font-size: 10px;
  }
}

/* Animation for price updates */
@keyframes pricePulse {
  0% {
    box-shadow: 0 0 20px rgba(63, 225, 194, 0.1);
  }
  50% {
    box-shadow: 0 0 30px rgba(63, 225, 194, 0.3);
  }
  100% {
    box-shadow: 0 0 20px rgba(63, 225, 194, 0.1);
  }
}

.gen-mode-price.is-updated {
  animation: pricePulse 0.6s ease;
}

/* Glow animation for active state */
@keyframes subtleGlow {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(63, 225, 194, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow:
      0 0 30px rgba(63, 225, 194, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
}

.gen-mode-indicator {
  animation: subtleGlow 3s ease-in-out infinite;
}

/* ===== LEGAL PAGES (Terms, Privacy, Contact) ===== */
.legal-page {
  padding: 48px 8vw 80px;
}

.legal-page-inner {
  max-width: 760px;
  margin: 0 auto;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin: 0 0 8px;
}

.legal-page h2 {
  font-size: var(--text-lg);
  margin: 32px 0 8px;
  color: var(--accent);
}

.legal-page p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 12px;
}

.legal-page ul {
  color: var(--muted);
  line-height: 1.7;
  padding-left: 24px;
  margin: 0 0 12px;
}

.legal-page a {
  color: var(--accent);
  text-decoration: none;
}

.legal-page a:hover {
  text-decoration: underline;
}

.legal-meta {
  font-size: var(--text-sm);
  opacity: 0.6;
  margin-bottom: 32px !important;
}

.legal-back-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  cursor: pointer;
  margin-bottom: 24px;
  transition: color 0.2s, border-color 0.2s;
}

.legal-back-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.contact-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 24px;
}

.contact-card h2 {
  margin-top: 0;
}

.contact-email a {
  font-size: var(--text-lg);
  font-weight: 600;
}

/* ── Contact form ────────────────────────────────────────────── */
.contact-login-prompt {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 24px;
  max-width: 600px;
}

.contact-login-prompt h2 {
  margin-top: 0;
}

.contact-login-prompt p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.contact-form-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 24px;
  max-width: 600px;
}

.contact-form-card h2 {
  margin-top: 0;
}

.contact-form input[readonly] {
  opacity: 0.7;
  cursor: default;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-attachment-dropzone {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-card) 88%, var(--accent) 12%);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.contact-attachment-dropzone:hover,
.contact-attachment-dropzone:focus-visible,
.contact-attachment-dropzone.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--surface-card) 78%, var(--accent) 22%);
  transform: translateY(-1px);
}

.contact-attachment-dropzone-copy {
  display: grid;
  gap: 6px;
}

.contact-attachment-dropzone-copy p,
.contact-attachment-dropzone-note {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.contact-attachment-dropzone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.contact-attachment-list {
  display: grid;
  gap: 10px;
}

.contact-attachment-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.48);
}

.contact-attachment-item strong {
  display: block;
  margin-bottom: 4px;
}

.contact-attachment-item-meta {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.contact-attachment-remove {
  align-self: center;
}

.contact-form-status {
  font-size: var(--text-sm);
  padding: 8px 12px;
  border-radius: var(--radius);
}
.contact-form-status.is-success {
  color: var(--accent);
}
.contact-form-status.is-pending {
  color: var(--text-muted);
}
.contact-form-status.is-error {
  color: var(--red);
}

/* ── Admin contact panel ─────────────────────────────────────── */
.admin-contact-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-contact-toolbar select {
  max-width: 180px;
}

.admin-contact-status-counts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-contact-count-badge {
  display: inline-block;
  font-size: var(--text-xs);
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-card);
  border: 1px solid var(--border);
}
.admin-contact-count-new { border-color: var(--accent); color: var(--accent); }
.admin-contact-count-read { opacity: 0.7; }
.admin-contact-count-replied { border-color: var(--blue, #60a5fa); color: var(--blue, #60a5fa); }
.admin-contact-count-archived { opacity: 0.5; }

.admin-contact-list {
  display: grid;
  gap: 10px;
}

.admin-contact-item {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.admin-contact-item-header {
  display: grid;
  grid-template-columns: 140px 1fr 1fr 1.5fr auto auto;
  gap: 8px;
  align-items: center;
  font-size: var(--text-sm);
}

.admin-contact-date {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.admin-contact-name {
  font-weight: 600;
}

.admin-contact-email {
  color: var(--accent);
}

.admin-contact-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-contact-status-select {
  font-size: var(--text-xs);
  padding: 2px 6px;
}

.admin-contact-message {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.admin-contact-message-body {
  white-space: pre-wrap;
  font-size: var(--text-sm);
  line-height: 1.5;
  margin-bottom: 12px;
}

.admin-contact-attachments {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.admin-contact-attachment {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.42);
}

.admin-contact-attachment strong {
  display: block;
  margin-bottom: 4px;
}

.admin-contact-attachment-meta {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.admin-contact-reply-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: var(--text-sm);
  margin-bottom: 12px;
}

.admin-contact-reply-form {
  display: grid;
  gap: 8px;
}

.admin-contact-reply-input {
  width: 100%;
  font-size: var(--text-sm);
  resize: vertical;
}

.admin-contact-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  font-size: var(--text-sm);
}

.admin-waitlist-facts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.admin-waitlist-facts > div {
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(8, 12, 20, 0.42);
  font-size: var(--text-sm);
}

.admin-waitlist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-waitlist-search {
  min-width: min(320px, 100%);
}

.admin-waitlist-search input {
  min-width: min(320px, 100%);
}

.admin-waitlist-count-approved {
  border-color: rgba(96, 165, 250, 0.6);
  color: rgba(96, 165, 250, 0.95);
}

.admin-waitlist-count-rejected {
  border-color: rgba(244, 114, 182, 0.45);
  color: rgba(255, 196, 219, 0.95);
}

.admin-waitlist-count-activated {
  border-color: rgba(134, 239, 172, 0.45);
  color: rgba(187, 247, 208, 0.95);
}

@media (max-width: 768px) {
  .contact-attachment-item,
  .admin-contact-attachment {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-contact-item-header {
    grid-template-columns: 1fr;
  }
  .admin-contact-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-waitlist-facts {
    grid-template-columns: 1fr;
  }
}

/* ── Admin Ops panel ─────────────────────────────────────────────── */
.admin-ops-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: start;
}

.admin-ops-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(63, 225, 194, 0.16);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(63, 225, 194, 0.08), transparent 42%),
    linear-gradient(165deg, rgba(10, 14, 22, 0.88), rgba(6, 10, 18, 0.92));
  box-shadow: var(--glow-shadow);
}

.admin-ops-card--result {
  min-height: 100%;
}

.admin-ops-card-header {
  display: grid;
  gap: 6px;
}

.admin-ops-card-header h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
}

.admin-ops-kicker {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.admin-ops-search {
  display: grid;
  gap: 10px;
}
.admin-ops-headline {
  display: grid;
  gap: 6px;
}
.admin-ops-note {
  flex: 1 1 100%;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: var(--text-sm);
}
.admin-ops-note + .admin-ops-note {
  margin-top: -4px;
}
.admin-ops-guide {
  margin: 0 0 6px;
  color: var(--text);
  font-size: var(--text-sm);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 8px;
  padding: 8px 10px;
}
.admin-ops-guide strong {
  color: var(--accent);
}
.admin-ops-steps {
  margin: 0 0 10px 22px;
  padding: 0;
  color: var(--text);
  font-size: var(--text-xs);
  line-height: 1.55;
  display: grid;
  gap: 6px;
}
.admin-ops-steps li {
  margin: 0;
  padding-left: 2px;
}
.admin-ops-subnote {
  flex: 1 1 100%;
  margin: 2px 0 6px;
  color: var(--muted);
  font-size: var(--text-xs);
}
.admin-ops-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  align-items: center;
}
.admin-ops-mode-select:focus-visible,
.admin-ops-scope-select:focus-visible,
#adminOpsQuery:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.admin-ops-scope-label,
.admin-ops-mode-label {
  color: var(--muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.admin-ops-mode-select {
  min-width: 180px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2, #0b1220);
  color: var(--text);
}
.admin-ops-scope-select {
  min-width: 280px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2, #0b1220);
  color: var(--text);
}
.admin-ops-label {
  width: 100%;
  color: var(--muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.admin-ops-input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}
.admin-ops-input-row input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
}
.admin-ops-input-row .primary {
  min-width: 170px;
}
.admin-ops-input-row .ghost {
  min-width: 220px;
}
.admin-ops-input-row button {
  min-width: 160px;
  flex: 0 1 auto;
}
.admin-ops-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.admin-ops-search input {
  flex: 1;
  min-width: 0;
}
.admin-ops-recovery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.admin-ops-scope-note {
  color: var(--muted);
  font-size: var(--text-xs);
  margin: 4px 0 0;
  width: 100%;
  letter-spacing: 0.08em;
}
.admin-ops-movie-header h4 {
  margin: 0 0 8px;
}
.admin-ops-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  font-size: var(--text-sm);
  margin-bottom: 12px;
}
.admin-ops-meta dt { color: var(--muted); }
.admin-ops-meta dd { margin: 0; }
.admin-ops-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: var(--text-sm);
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px dashed rgba(63, 225, 194, 0.22);
  border-radius: 12px;
  background: rgba(8, 12, 20, 0.58);
}
.admin-ops-summary .ok { color: var(--green, #22c55e); }
.admin-ops-summary .error { color: var(--red, #ef4444); }
.admin-ops-jobs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.admin-ops-jobs-table th,
.admin-ops-jobs-table td {
  padding: 6px 8px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.admin-ops-jobs-table thead { background: var(--bg-alt, #f8fafc); }
.admin-ops-jobs-table tr.ok td:nth-child(2) { color: var(--green, #22c55e); }
.admin-ops-jobs-table tr.error td:nth-child(2) { color: var(--red, #ef4444); }
.admin-ops-error-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-ops-jobs-table td code {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-ops-jobs-table th:last-child,
.admin-ops-jobs-table td:last-child {
  width: 1%;
}
.admin-ops-unstack {
  font-size: var(--text-xs);
  padding: 7px 12px;
  white-space: nowrap;
}

.admin-ops-unstack[data-state="active"] {
  border-color: var(--warning);
}

.admin-ops-lookup {
  font-size: var(--text-xs);
  padding: 7px 10px;
  white-space: nowrap;
}

.admin-ops-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
  margin-right: 6px;
  white-space: nowrap;
}

.admin-ops-chip.warn {
  color: #ffd27d;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: rgba(109, 63, 5, 0.5);
}

.admin-ops-chip.error {
  color: #ffb4b4;
  border: 1px solid rgba(239, 68, 68, 0.55);
  background: rgba(120, 18, 18, 0.46);
}

.admin-ops-chip.critical {
  color: #efc7ff;
  border: 1px solid rgba(168, 85, 247, 0.55);
  background: rgba(82, 26, 119, 0.5);
}

.admin-ops-chip.muted {
  color: var(--muted);
  border: 1px solid var(--border);
  background: transparent;
}

.admin-ops-chip-legend {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-ops-chip-legend .admin-ops-chip {
  margin-right: 0;
}

.admin-ops-reason {
  display: inline-block;
  color: var(--muted);
  font-size: var(--text-xs);
}

.admin-ops-result-shell {
  min-height: 280px;
}

.admin-ops-empty-state {
  display: grid;
  gap: 12px;
  padding: 16px;
  min-height: 100%;
  border: 1px dashed rgba(63, 225, 194, 0.18);
  border-radius: var(--radius-md);
  background: rgba(8, 12, 20, 0.42);
}

.admin-ops-empty-state__title {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.admin-ops-empty-state__body {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

@media (max-width: 768px) {
  .admin-ops-layout {
    grid-template-columns: 1fr;
  }
  #adminOpsResult {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }

  .admin-ops-mode-row {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-ops-mode-select {
    width: 100%;
  }
  .admin-ops-scope-select {
    min-width: 0;
    width: 100%;
  }
  .admin-ops-input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-ops-input-row button {
    width: 100%;
  }
  .admin-ops-search-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-ops-unstack,
  .admin-ops-lookup {
    width: 100%;
    justify-content: center;
  }
}

/* Scene pacing warning blocks (Task 7) */
div.scene-pacing-warning {
  font-size: 0.78rem;
  color: #f0ad4e;
  padding: 4px 8px;
  margin-top: 4px;
  border-left: 2px solid #f0ad4e;
  background: rgba(240, 173, 78, 0.08);
}

/* Video Characters panel */
.video-characters-panel {
  margin-top: 12px;
}
.video-characters-panel summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: rgba(63, 225, 194, 0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}
.video-characters-panel .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent, #3fe1c2);
  color: #0a0f18;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  line-height: 1;
}
.video-characters-content {
  margin-top: 8px;
}
.video-characters-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.video-character-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm, 6px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.video-character-select {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.video-character-name {
  font-size: 0.88rem;
  font-weight: 500;
}
.video-character-date {
  font-size: 0.75rem;
  opacity: 0.5;
  margin-left: auto;
}
.video-characters-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.video-character-create-form {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm, 6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.video-character-create-form .field {
  margin-bottom: 8px;
}
.video-character-create-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.btn-xs {
  padding: 2px 8px;
  font-size: 0.75rem;
}

/* Movie directives panel (Task 6) */
.movie-directives-panel {
  margin-top: 12px;
}
.movie-directives-panel summary {
  cursor: pointer;
  font-size: 0.88rem;
  color: rgba(63, 225, 194, 0.7);
}
.movie-directives-fields {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.field-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
}

.field-checkbox input[type="checkbox"] {
  margin: 0;
}

.field-checkbox[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%);
  background: #0a0f18;
  color: var(--text);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  white-space: normal;
  max-width: 300px;
  width: max-content;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  z-index: 20;
}

.field-checkbox[data-tooltip]:hover::after {
  opacity: 1;
}
.pacing-hint {
  font-size: 0.8em;
  color: var(--text-muted, #888);
  margin-top: 2px;
}
.pacing-hint.pacing-warn {
  color: var(--color-warning, #e67e22);
}
.pacing-hint.pacing-ok {
  color: var(--color-success, #27ae60);
}
