/* ─── Apple Pro Dark: CSS Variables & Design Tokens ───────────────────────── */
:root {
  /* Apple Pro Dark Canvas & Surface Palette */
  --bg-dark: #000000;                          /* Deep OLED Black */
  --bg-card: #161617;                          /* Apple Bento Surface */
  --bg-card-hover: #1c1c1e;                    /* Apple Bento Hover Elevation */
  --bg-surface: #121213;                       /* Deep Titanium Surface */
  --bg-surface-elevated: #1c1c1e;              /* Apple Control Inset */
  --bg-input: #1c1c1e;                         /* Apple Input Surface */
  --bg-input-focus: #242426;                   /* Apple Input Focus Surface */
  
  /* Hairlines & Apple Precision Borders */
  --border-subtle: rgba(255, 255, 255, 0.08); /* Apple Hairline Border */
  --border-hover: rgba(255, 255, 255, 0.16);  /* Card Hover Border */
  --border-active: #0071e3;                   /* Apple Electric Blue Border */
  --border-glow: rgba(0, 113, 227, 0.3);      /* Subtle Blue Specular Ring */
  
  /* Accents & Brand (Apple Signature Palette) */
  --primary: #0071e3;                          /* Apple Electric Blue */
  --primary-glow: rgba(0, 113, 227, 0.35);     /* Apple Blue Soft Glow */
  --primary-light: #2997ff;                    /* Apple Bright Blue */
  --primary-dark: #0062c4;                     /* Deep Cobalt */
  
  --accent-cyan: #2997ff;                      /* Apple Highlight Blue */
  --accent-emerald: #30d158;                   /* iOS Emerald Green */
  --accent-amber: #ff9f0a;                     /* iOS Amber Orange */
  --accent-rose: #ff453a;                      /* iOS Coral Red */
  
  /* Typography Hierarchy */
  --text-main: #f5f5f7;                        /* Apple Pure Silver-White */
  --text-muted: #86868b;                       /* Apple Signature Titanium Gray */
  --text-dim: #6e6e73;                         /* Apple Footnote Gray */
  
  /* Precision Radius (Apple Bento & Pill) */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-2xl: 28px;
  --radius-full: 980px;                        /* Apple Pill Standard */
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
  
  /* Apple Shadows & Optical Insets */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.75);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-card-hover: 0 16px 44px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --shadow-glow: 0 0 24px rgba(0, 113, 227, 0.25);

  /* Apple Smooth Spring Timing */
  --transition-apple: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ─── Base & Resets ────────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

/* Ambient Theatrical Studio Lighting (Subtle, Deep, Non-distracting) */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(160px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
}
.glow-top-left {
  top: -180px;
  left: 20%;
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 113, 227, 0.2) 0%, transparent 70%);
}
.glow-top-right {
  top: -140px;
  right: 15%;
  width: 500px;
  height: 350px;
  background: radial-gradient(circle, rgba(41, 151, 255, 0.12) 0%, transparent 70%);
}
.glow-bottom-center {
  bottom: -220px;
  left: 35%;
  width: 650px;
  height: 450px;
  background: radial-gradient(circle, rgba(48, 209, 88, 0.08) 0%, transparent 70%);
}

/* ─── Header Navigation (Apple Store Sticky Navbar Style) ─────────────────── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 54px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(41, 151, 255, 0.6);
  box-shadow: 0 0 14px rgba(41, 151, 255, 0.45);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}
.brand-logo-img:hover {
  transform: scale(1.08) rotate(3deg);
  box-shadow: 0 0 20px rgba(41, 151, 255, 0.7);
}
.logo-icon {
  width: 20px;
  height: 20px;
}
.logo-badge {
  position: absolute;
  bottom: -3px;
  right: -5px;
  background: #0071e3;
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
}
.brand-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.2;
}

.header-center {
  display: flex;
  align-items: center;
}

.antigravity-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: var(--transition-apple);
}
.antigravity-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text-main);
}
.antigravity-pill strong {
  color: var(--accent-emerald);
  font-weight: 600;
}
.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-ring 2s infinite;
}
.pill-icon {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

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

.api-status-group {
  display: flex;
  gap: 6px;
}
.status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-apple);
}
.status-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--border-hover);
}
.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
}
.chip-dot.green {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}
.chip-dot.red {
  background: var(--accent-rose);
}

/* ─── Apple Pill Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 500;
  font-size: 13.5px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-apple);
  text-decoration: none;
  line-height: 1;
}

/* Primary Apple Pill Button */
.btn-primary {
  background: #0071e3;
  color: #ffffff;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35);
  border: none;
}
.btn-primary:hover {
  background: #0077ed;
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 6px 20px rgba(0, 113, 227, 0.5);
}
.btn-primary:active {
  transform: translateY(0) scale(0.99);
}

/* Secondary Frosted Pill Button */
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 9px 18px;
  font-size: 13px;
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-secondary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-full);
}
.btn-outline:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-full);
}
.btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.btn-success {
  background: rgba(48, 209, 88, 0.16);
  color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.35);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
}
.btn-success:hover {
  background: #30d158;
  color: #000000;
  box-shadow: 0 4px 16px rgba(48, 209, 88, 0.4);
}

.btn-danger {
  background: rgba(255, 69, 58, 0.14);
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.32);
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
}
.btn-danger:hover {
  background: #ff453a;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(255, 69, 58, 0.45);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}
.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
}
.btn-icon-only {
  padding: 8px;
  border-radius: 50%;
  width: 34px;
  height: 34px;
}
.btn-block {
  width: 100%;
}
.btn-svg {
  width: 15px;
  height: 15px;
}
.btn-svg-sm {
  width: 13px;
  height: 13px;
}
.btn-svg-xs {
  width: 11px;
  height: 11px;
}


/* ─── App Main Layout ───────────────────────────────────────────────────────── */
.app-main {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 28px 60px;
}

/* ─── Apple Pro Dark: HORIZONTAL PIPELINE STEPPER ────────────────────────── */
.stepper-section {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: var(--transition-apple);
}
.stepper-section:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.stepper-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.stepper-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stepper-heading {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.stepper-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.02em;
}
.stepper-badge.rendering {
  background: rgba(41, 151, 255, 0.15);
  color: #2997ff;
  border-color: rgba(41, 151, 255, 0.4);
  animation: pulse-ring 1.5s infinite;
}
.stepper-badge.completed {
  background: rgba(48, 209, 88, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(48, 209, 88, 0.4);
}

.stepper-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
}
.stat-item {
  color: var(--text-muted);
}
.stat-item strong {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Stepper Track (Apple Pro Left-to-Right 8 Steps) */
.stepper-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  padding: 12px 0;
}

/* Connecting Line */
.stepper-progress-line {
  position: absolute;
  top: 28px;
  left: 4%;
  right: 4%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  z-index: 1;
}
.stepper-progress-fill {
  height: 100%;
  width: 0%;
  background: #0071e3;
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 0 10px rgba(0, 113, 227, 0.6);
}

/* Step Node */
.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: var(--transition-apple);
  min-width: 0;
}

.node-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1c1c1e;
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
  position: relative;
  transition: var(--transition-apple);
  flex-shrink: 0;
}

.node-number {
  display: block;
}
.node-icon-completed,
.node-spinner {
  display: none;
}

/* Node States: Active / In Progress */
.step-node.in_progress .node-circle,
.step-node.active .node-circle {
  border-color: #2997ff;
  color: #2997ff;
  box-shadow: 0 0 16px rgba(41, 151, 255, 0.45);
  background: rgba(41, 151, 255, 0.12);
}
.step-node.in_progress .node-number {
  display: none;
}
.step-node.in_progress .node-spinner {
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(41, 151, 255, 0.3);
  border-top-color: #2997ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Node States: Completed */
.step-node.completed .node-circle {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(48, 209, 88, 0.4);
}
.step-node.completed .node-number {
  display: none;
}
.step-node.completed .node-icon-completed {
  display: block;
  width: 15px;
  height: 15px;
}

/* Node Content */
.node-content {
  width: 100%;
  overflow: hidden;
}
.node-step-label {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  display: block;
}
.node-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 2px;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-node.active .node-title,
.step-node.in_progress .node-title,
.step-node.completed .node-title {
  color: var(--text-main);
}
.node-desc {
  font-size: 10.5px;
  color: var(--text-dim);
  line-height: 1.2;
}

@media (max-width: 900px) {
  .stepper-track {
    overflow-x: auto;
    padding-bottom: 12px;
    display: flex;
    gap: 12px;
  }
  .step-node {
    min-width: 90px;
  }
  .stepper-progress-line {
    display: none;
  }
}

/* Live Meter Sub-bar */
.live-progress-bar-container {
  margin-top: 20px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  border: 1px solid var(--border-subtle);
}
.live-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}
.live-progress-status {
  font-weight: 600;
  color: var(--accent-cyan);
}
.live-progress-percent {
  font-family: var(--font-mono);
  font-weight: 700;
}
.live-progress-meter {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.live-progress-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  border-radius: var(--radius-full);
  transition: width 0.2s;
}

/* Log Drawer */
.log-drawer {
  margin-top: 16px;
  border-radius: var(--radius-md);
  background: #05070a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: none;
}
.log-drawer.open {
  display: block;
}
.log-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.log-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.terminal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }
.log-title {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  margin-left: 6px;
}
.log-terminal {
  padding: 12px 14px;
  max-height: 180px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
}
.log-line {
  color: var(--text-muted);
}
.log-line.info { color: #38bdf8; }
.log-line.success { color: #34d399; }
.log-line.error { color: #f87171; }

/* ─── Studio Two-Column Grid ────────────────────────────────────────────────── */
.studio-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

.panel-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  transition: var(--transition-apple);
}
.panel-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.panel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.panel-subheading {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.panel-subdesc {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Tab Headers (Apple Segmented Style) */
.tab-header {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 14px;
  margin-bottom: 20px;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-apple);
}
.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}
.tab-btn.active {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.tab-svg {
  width: 15px;
  height: 15px;
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

/* Forms & Apple Inset Inputs */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-main);
  padding: 11px 16px;
  transition: var(--transition-apple);
  outline: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.25);
  background: var(--bg-input-focus);
}
.form-textarea {
  resize: vertical;
  line-height: 1.5;
}
.textarea-wrapper {
  position: relative;
}
.btn-inline-suggest {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(8px);
}
.btn-inline-suggest:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
  color: #fff;
}
.suggest-sparkle {
  margin-right: 4px;
}

.topic-meta-badge {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-main);
  animation: fadeIn 0.3s ease;
}
.topic-meta-badge .meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.topic-meta-badge .meta-text {
  color: var(--text-muted);
  font-size: 11.5px;
}

.url-article-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: #34d399;
  animation: fadeIn 0.3s ease;
}
.url-article-badge .url-badge-icon {
  font-size: 16px;
}
.url-article-badge .url-badge-text {
  font-weight: 500;
  line-height: 1.4;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Scene Editor Cards */
.scenes-editor-section {
  margin-top: 24px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}
.scenes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.scenes-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.badge-count {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.scenes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.scene-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scene-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.5);
}
.scene-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.scene-type-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}
.scene-type-tag.hook {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.scene-type-tag.body {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.3);
}
.scene-type-tag.ending {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.scene-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.scene-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  font-family: inherit;
  resize: vertical;
}
.scene-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.scene-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

/* Quick Config Bar */
.quick-config-bar {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 14px;
}
.config-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.radio-pill-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.radio-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}
.radio-pill input:checked + span {
  color: var(--text-main);
  font-weight: 600;
}
.radio-pill.locked {
  cursor: not-allowed;
  opacity: 0.85;
}
.radio-pill.locked input {
  cursor: not-allowed;
}
.input-locked {
  cursor: not-allowed !important;
}
.select-compact {
  padding: 8px 10px;
  font-size: 12px;
}

/* Giant Apple Pro Render Button */
.action-submit-area {
  margin-top: 24px;
}
.btn-render-primary {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #0071e3;
  border: none;
  border-radius: var(--radius-full);
  padding: 16px 28px;
  color: white;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 4px 18px rgba(0, 113, 227, 0.4);
  transition: var(--transition-apple);
}
.btn-render-primary:hover {
  background: #0077ed;
  transform: translateY(-2px) scale(1.008);
  box-shadow: 0 8px 28px rgba(0, 113, 227, 0.55);
}
.btn-render-primary:active {
  transform: translateY(0) scale(0.99);
}
.btn-render-svg {
  width: 24px;
  height: 24px;
  fill: white;
}
.btn-text-main {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.btn-text-sub {
  font-size: 11.5px;
  opacity: 0.9;
  font-weight: 400;
}
.btn-glow-pulse {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: shimmer 3s infinite;
}

/* ─── Video Preview Box ─────────────────────────────────────────────────────── */
.preview-card {
  padding: 20px;
}
.status-indicator-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.status-indicator-tag.ready {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.video-container {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 480px;
  background: #000000;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  max-width: 320px;
}
.placeholder-icon-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-muted);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.placeholder-svg {
  width: 24px;
  height: 24px;
}
.video-placeholder h4 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-bottom: 8px;
}
.video-placeholder p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.45;
}

.studio-video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── Templates Explorer ────────────────────────────────────────────────────── */
.template-filter-search {
  width: 180px;
}
.form-input-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.category-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.cat-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.cat-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}
.cat-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.template-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.template-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.6);
}
.template-card.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
}

.template-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.template-aspect-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.template-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}
.template-name-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.template-name-vi {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
  margin: 0;
}
.template-name-en {
  font-size: 10.5px;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.3px;
}
.template-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Modals ────────────────────────────────────────────────────────────────── */
/* ─── Apple Liquid Glass Modals ─────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: rgba(22, 22, 23, 0.94);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  animation: modal-pop 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}
.modal-dialog.modal-lg {
  max-width: 780px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #2997ff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-icon-badge svg {
  width: 18px;
  height: 18px;
}
.modal-title {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-main);
}
.modal-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}
.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition-apple);
}
.modal-close-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.modal-body {
  padding: 26px 28px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
}

/* Settings Cards */
.settings-group-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.antigravity-card {
  background: rgba(16, 185, 129, 0.03);
  border-color: rgba(16, 185, 129, 0.2);
}
.group-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.title-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}
.title-with-icon h4 {
  font-size: 14px;
  font-weight: 700;
}
.group-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.4;
}
.provider-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}
.provider-badge.gemini {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}
.provider-badge.groq {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
}
.provider-badge.antigravity {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
.link-external {
  font-size: 12px;
  color: var(--primary-light);
  text-decoration: none;
}
.link-external:hover {
  text-decoration: underline;
}

.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.btn-toggle-vis {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.6;
}
.btn-toggle-vis:hover { opacity: 1; }

.antigravity-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.ag-feat-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  gap: 8px;
}
.ag-feat-icon {
  font-size: 18px;
}
.ag-feat-item strong {
  display: block;
  font-size: 12px;
  color: var(--text-main);
  margin-bottom: 2px;
}
.ag-feat-item p {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.3;
}

.alert-banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  margin-bottom: 16px;
  line-height: 1.4;
}
.alert-banner.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.alert-banner.error {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

/* Gallery Modal */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gallery-card:hover {
  border-color: var(--primary);
}
.gallery-title {
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
}
.gallery-meta {
  font-size: 11px;
  color: var(--text-dim);
}

/* ─── Keyframe Animations ───────────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

@keyframes shimmer {
  100% { left: 100%; }
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ─── Responsive Media Queries ──────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .stepper-track {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 24px;
  }
  .stepper-progress-line {
    display: none;
  }
}

@media (max-width: 768px) {
  .app-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .stepper-track {
    grid-template-columns: 1fr;
  }
  .form-row-3,
  .quick-config-bar,
  .antigravity-features-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Action Buttons Area (Dual Render & Stop Controls) ────────────────────── */
.action-buttons-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 14px;
  align-items: stretch;
}
@media (max-width: 768px) {
  .action-buttons-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Stop Render Button & Danger Elements ─────────────────────────────────── */
.btn-render-stop {
  position: relative;
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  text-align: center;
}
.btn-render-stop.standby {
  background: rgba(239, 68, 68, 0.08);
  border: 1px dashed rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  cursor: pointer;
  box-shadow: none;
}
.btn-render-stop.standby:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.8);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}
.btn-render-stop.active,
.btn-render-stop.pulsing-stop {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  border: 1px solid rgba(254, 202, 202, 0.7);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.75);
  animation: pulseStopGlow 1.4s infinite alternate;
}
.btn-render-stop.active:hover,
.btn-render-stop.pulsing-stop:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #b91c1c 100%);
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.95);
}
.btn-render-stop:active {
  transform: translateY(0);
}

@keyframes pulseStopGlow {
  0% {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.9);
    transform: scale(1.02);
  }
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.stepper-badge.stopped {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

/* ─── Clean Prompt Status Notice (Tab 1 - No scenes clutter) ───────────────── */
.prompt-ai-status {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-top: 14px;
  animation: modal-pop 0.3s ease-out;
}
.prompt-ai-status-icon {
  font-size: 20px;
  background: rgba(99, 102, 241, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.prompt-ai-status-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}
.prompt-ai-status-text strong {
  color: #ffffff;
  font-size: 13px;
}
.prompt-ai-status-text span {
  color: var(--text-muted);
}

.raw-script-helpers {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
}
.scenes-subhint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* ─── Continuous Raw Script Input & Splitter (Tab 2) ────────────────────────── */
.raw-script-group {
  margin-top: 12px;
  margin-bottom: 20px;
}
.form-label-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.label-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}
.raw-script-actions {
  margin-top: 10px;
}
.btn-split-script {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 700;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-split-script:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* TOP MAIN NAVIGATION TAB BAR                                                 */
/* ═══════════════════════════════════════════════════════════════════════════ */
.studio-main-nav {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 54px;
  z-index: 90;
  padding: 8px 32px;
  transition: var(--transition-fast);
}

.main-nav-container {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow-x: auto;
}

.main-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-apple);
  white-space: nowrap;
  position: relative;
}

.main-nav-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.main-nav-btn.active {
  color: #ffffff;
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.main-nav-btn.active::after {
  display: none;
}

.nav-icon {
  font-size: 16px;
  line-height: 1;
}

.nav-label-box {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.nav-main-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.nav-sub-title {
  font-size: 10.5px;
  color: var(--text-dim);
  font-weight: 400;
}

.main-nav-btn.active .nav-sub-title {
  color: var(--text-muted);
}

.nav-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.nav-tag.highlight {
  background: rgba(255, 69, 58, 0.16);
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.35);
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* BATCH PRODUCTION HUB STYLES (TAB 1)                                         */
/* ═══════════════════════════════════════════════════════════════════════════ */
.batch-toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: var(--transition-apple);
}

.batch-toolbar-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.batch-toolbar-card::before {
  display: none;
}

.batch-toolbar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.toolbar-title-group {
  flex: 1;
  min-width: 320px;
}

.toolbar-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #2997ff;
  background: rgba(41, 151, 255, 0.12);
  border: 1px solid rgba(41, 151, 255, 0.28);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.toolbar-heading {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}

.toolbar-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 820px;
}

.toolbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-lg {
  padding: 13px 26px;
  font-size: 13.5px;
  font-weight: 600;
}

.batch-config-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.batch-config-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.batch-config-col.flex-2 {
  flex: 2;
  min-width: 300px;
}

.batch-config-col.flex-1 {
  flex: 1;
  min-width: 250px;
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button .form-input {
  flex: 1;
}

.batch-ops-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.ops-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Apple Intelligence / Siri-inspired Gradient Button */
.btn-magic {
  background: linear-gradient(135deg, #0071e3 0%, #7c3aed 50%, #f43f5e 100%);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.35);
  transition: var(--transition-apple);
  padding: 8px 18px;
}

.btn-magic:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 22px rgba(124, 58, 237, 0.5);
  filter: brightness(1.08);
}

.magic-sparkle {
  font-size: 14px;
}

.ops-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
}

.ops-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.badge-slot-count {
  font-size: 12.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.badge-slot-count strong {
  color: var(--text-main);
  font-weight: 700;
}

/* Batch Dashboard (Apple Bento Style) */
.batch-dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-xl);
  padding: 22px 26px;
  margin-bottom: 24px;
  animation: fadeIn 0.3s ease;
  transition: var(--transition-apple);
}

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

.dashboard-status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.dashboard-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.dashboard-meta strong {
  color: var(--text-main);
}

.batch-progress-meter {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 16px;
}

.batch-progress-meter-fill {
  height: 100%;
  width: 0%;
  background: #0071e3;
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 0 10px rgba(0, 113, 227, 0.6);
}

.batch-counters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.counter-item {
  background: #1c1c1e;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: var(--transition-apple);
}
.counter-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.counter-num {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.counter-lbl {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.counter-item.total .counter-num { color: var(--text-main); }
.counter-item.completed .counter-num { color: var(--accent-emerald); }
.counter-item.running .counter-num { color: var(--accent-amber); animation: pulse 1s infinite; }
.counter-item.queued .counter-num { color: #2997ff; }
.counter-item.error .counter-num { color: var(--accent-rose); }

.batch-terminal-wrapper {
  margin-top: 10px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.batch-terminal {
  background: #000000;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 14px;
  max-height: 180px;
  overflow-y: auto;
  color: #30d158;
  line-height: 1.6;
}

/* Batch Slots Grid (Apple Bento Cards) */
.batch-slots-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.batch-slot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  transition: var(--transition-apple);
  position: relative;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.batch-slot-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.batch-slot-card.status-running {
  border-color: #2997ff;
  box-shadow: 0 0 24px rgba(41, 151, 255, 0.25), inset 0 1px 0 rgba(41, 151, 255, 0.2);
}

.batch-slot-card.status-completed {
  border-color: rgba(48, 209, 88, 0.4);
  background: rgba(48, 209, 88, 0.03);
}

.batch-slot-card.status-error {
  border-color: rgba(255, 69, 58, 0.45);
}

.slot-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.slot-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slot-index-badge {
  font-size: 11.5px;
  font-weight: 700;
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
}

.slot-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.slot-status-pill.ready { background: rgba(41, 151, 255, 0.12); color: #2997ff; border: 1px solid rgba(41, 151, 255, 0.25); }
.slot-status-pill.running { background: rgba(255, 159, 10, 0.15); color: #ff9f0a; border: 1px solid rgba(255, 159, 10, 0.3); animation: pulse 1.2s infinite; }
.slot-status-pill.completed { background: rgba(48, 209, 88, 0.15); color: #30d158; border: 1px solid rgba(48, 209, 88, 0.3); }
.slot-status-pill.error { background: rgba(255, 69, 58, 0.15); color: #ff453a; border: 1px solid rgba(255, 69, 58, 0.3); }

.btn-slot-delete {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  transition: all 0.2s ease;
}

.btn-slot-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.slot-body-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .slot-body-grid {
    grid-template-columns: 1fr;
  }
}

.slot-template-box, .slot-channel-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.locked-template-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

.batch-creative-defaults-row {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.creative-defaults-badge {
  font-size: 12px;
  font-weight: 700;
  color: #c7d2fe;
}

.batch-creative-defaults-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.batch-creative-field {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.slot-extra-options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-sm);
}

.slot-extra-field {
  flex: 1 1 155px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.creative-options-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.creative-options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.creative-opt-badge {
  font-size: 12px;
  font-weight: 700;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.creative-opt-hint {
  font-size: 11.5px;
  color: #94a3b8;
}

.creative-options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.creative-opt-field {
  flex: 1 1 210px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.slot-content-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slot-mode-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

.slot-unified-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.slot-auto-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.slot-auto-type-badge.prompt {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
  border: 1px solid rgba(192, 132, 252, 0.4);
}

.slot-auto-type-badge.url {
  background: rgba(14, 165, 233, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.slot-smart-hint {
  font-size: 11px;
  color: #64748b;
  font-style: italic;
}

.mode-pills {
  display: flex;
  gap: 6px;
}

.mode-pill {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-pill.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
}

.slot-input-wrapper {
  position: relative;
}

.slot-textarea {
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  line-height: 1.5;
}

.slot-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.slot-actions-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.slot-custom-folder {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.slot-custom-folder input {
  padding: 4px 8px;
  font-size: 11px;
  width: 220px;
}

/* Slot Result Card */
.slot-result-box {
  margin-top: 14px;
  padding: 14px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.slot-result-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.slot-result-thumb-wrap {
  position: relative;
  width: 76px;
  height: 108px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #05070e;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  display: block;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.slot-result-thumb-wrap:hover {
  transform: scale(1.04);
  border-color: #60a5fa;
}

.slot-result-video-preview {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.slot-result-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 20, 0.32);
  color: #fff;
  font-size: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
  transition: background 0.2s ease;
}

.slot-result-thumb-wrap:hover .slot-result-play-badge {
  background: rgba(37, 99, 235, 0.45);
}

.video-preview-modal-dialog {
  max-width: 720px;
  width: min(94vw, 720px);
}

.video-preview-modal-body {
  padding: 18px 20px 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #05070e;
}

.video-preview-modal-body video {
  max-height: 74vh;
  max-width: 100%;
  border-radius: 12px;
  background: #000;
  outline: none;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65);
}

.slot-result-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.slot-result-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.slot-result-actions {
  display: flex;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* BRANDING HUB STYLES (TAB 3)                                                 */
/* ═══════════════════════════════════════════════════════════════════════════ */
.branding-hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-apple);
}

.branding-hub-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.branding-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.branding-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

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

.channel-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.channel-card-item {
  background: #1c1c1e;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition-apple);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.channel-card-item:hover {
  background: #242426;
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.channel-card-item.active {
  background: #1c1c1e;
  border-color: #0071e3;
  box-shadow: 0 0 16px rgba(0, 113, 227, 0.25);
}

.channel-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-item-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: #1e293b;
  background-image: 
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.08) 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
  padding: 4px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.channel-item-details h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.channel-item-details p {
  font-size: 11px;
  color: var(--text-muted);
}

.branding-editor-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .branding-editor-col {
    grid-template-columns: 1fr;
  }
}

.logo-upload-box {
  background: rgba(255, 255, 255, 0.03);
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logo-upload-box:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.logo-preview-area img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background-color: #1e293b;
  background-image: 
    linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.08) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0px;
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.logo-upload-prompt strong {
  display: block;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 2px;
}

.logo-upload-prompt span {
  font-size: 11px;
  color: var(--text-muted);
}

.position-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pos-btn {
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.pos-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.pos-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.pos-icon {
  font-size: 16px;
}

/* 9:16 Phone Mockup */
.mockup-preview-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-mockup-wrapper {
  margin: 10px auto;
}

.phone-mockup-frame {
  width: 260px;
  height: 462px; /* 9:16 aspect ratio */
  background: #11141e;
  border: 8px solid #222938;
  border-radius: 36px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.phone-screen {
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
  overflow: hidden;
}

.mockup-watermark-overlay {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  transition: all 0.2s ease;
}

.mockup-watermark-overlay img {
  max-height: 38px;
  max-width: 100px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.mockup-dummy-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 14px 28px 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.95) 100%);
}

.mockup-scene-bg {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1585829365295-ab7cd400c167?w=600&auto=format&fit=crop&q=80') center/cover no-repeat;
  opacity: 0.35;
}

.mockup-badge {
  align-self: flex-start;
  font-size: 9px;
  font-weight: 800;
  background: #ef4444;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  z-index: 10;
}

.mockup-headline {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 12px;
  z-index: 10;
}

.mockup-subtitles {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  z-index: 10;
}

.mockup-word {
  color: #fff;
  margin-right: 3px;
}

.mockup-word.active {
  color: #fbbf24;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.8);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* TEMPLATES SHOWCASE STYLES (TAB 4)                                           */
/* ═══════════════════════════════════════════════════════════════════════════ */
.templates-showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 30px;
}

.category-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.showcase-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.showcase-template-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-template-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.showcase-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.showcase-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  background: #000000;
  pointer-events: auto;
}

/* Phóng to video đúng chuẩn 9:16 - Không tràn viền, xem được toàn bộ video */
video:fullscreen,
video:-webkit-full-screen,
.showcase-video-wrapper video:fullscreen,
.showcase-video-wrapper video:-webkit-full-screen,
:fullscreen video,
:-webkit-full-screen video,
::backdrop video {
  object-fit: contain !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  background: #000000 !important;
}

/* Disable video download button and hide download menu in WebKit/Blink */
.showcase-video-wrapper video::-internal-media-controls-download-button,
video::-internal-media-controls-download-button {
  display: none !important;
}

.showcase-video-wrapper video::-webkit-media-controls-enclosure {
  overflow: hidden;
}

.showcase-num-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 10px rgba(99, 102, 241, 0.5);
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.showcase-demo-badge {
  display: none !important;
}

.showcase-meta-box h4 {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.showcase-meta-box p {
  font-size: 12px;
  color: var(--text-dim);
}

.showcase-tags-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.showcase-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.showcase-actions-row {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.showcase-actions-row .btn {
  flex: 1;
  min-width: 120px;
  font-size: 12px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* ── Article Topic & Live Newspaper Link Box ────────────────────────────── */
.showcase-article-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 6px 0;
  transition: border-color 0.2s ease;
}

.showcase-template-card:hover .showcase-article-box {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(15, 23, 42, 0.9);
}

.article-source-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-source {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
}

.badge-genre {
  font-size: 10.5px;
  font-weight: 600;
  color: #c084fc;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
}

.article-headline-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.4;
}

.article-topic-desc {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

.article-url-row {
  display: flex;
  align-items: center;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  margin-top: 2px;
}

.article-link-btn {
  font-size: 11.5px;
  font-weight: 600;
  color: #60a5fa;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.article-link-btn:hover {
  color: #93c5fd;
  text-decoration: underline;
  transform: translateX(2px);
}

/* ── Clean Template Info Notice Bar (Simplified & Informative) ─────────────── */
.quick-config-clean-bar {
  display: flex;
  align-items: stretch;
  gap: 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
}

.config-clean-col-template {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.config-clean-col-notice {
  flex: 1.4 1 420px;
  display: flex;
  align-items: center;
}

.template-info-notice-card {
  width: 100%;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.notice-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notice-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notice-live-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-ring 2s infinite;
}

.notice-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notice-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px;
}

.notice-pill-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.notice-pill-val {
  font-weight: 700;
  color: #f1f5f9;
}

.btn-voice-mini {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-voice-mini:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #ffffff;
  border-color: #818cf8;
}

/* ── Storage & Folder Picker Improvements ──────────────────────────────────── */
.input-with-action {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-with-action .form-control {
  flex: 1;
}

.quick-folder-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.preset-title {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}

.folder-preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.folder-preset-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #e2e8f0;
}

.input-feedback-note {
  font-size: 11.5px;
  color: #10b981;
  font-weight: 500;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.input-guide-note {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.4;
}

/* ── Google Drive Sync Warning & Guide Box ─────────────────────────────────── */
.drive-sync-warning-box {
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 10px;
}

.drive-warning-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drive-warning-title {
  font-size: 12px;
  font-weight: 700;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drive-warning-text {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

.drive-warning-steps {
  font-size: 11.5px;
  color: #e2e8f0;
  margin: 2px 0 0 16px;
  padding: 0;
  line-height: 1.6;
}

.drive-warning-steps li {
  margin-bottom: 2px;
}

.drive-warning-tip {
  font-size: 11px;
  color: #94a3b8;
  font-style: italic;
}

/* ── Stepper Current Config Notice Bar ─────────────────────────────────────── */
.stepper-current-config-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  margin: 12px 0 16px 0;
  flex-wrap: wrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.stepper-cfg-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.cfg-pill-icon {
  font-size: 13px;
}

.cfg-pill-label {
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 500;
}

.cfg-pill-val {
  color: #38bdf8;
  font-weight: 700;
  font-size: 12px;
}

.clean-stepper-track .node-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-top: 4px;
  line-height: 1.35;
  color: #cbd5e1;
}

.clean-stepper-track .step-node.active .node-title,
.clean-stepper-track .step-node.in_progress .node-title,
.clean-stepper-track .step-node.completed .node-title {
  color: #ffffff;
}

.clean-stepper-track .step-node {
  padding: 6px 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* MODERN TOGGLE SWITCH & DRIVE CLOUD PANEL                                  */
/* ═══════════════════════════════════════════════════════════════════════════ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(120, 120, 128, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 30px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.toggle-switch input:checked + .toggle-slider {
  background: #30d158;
  border-color: #30d158;
  box-shadow: 0 0 12px rgba(48, 209, 88, 0.35);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
  background-color: #ffffff;
}

/* Batch Hub Drive Panel (Apple Settings Section Style) */
.batch-drive-sync-panel {
  background: #1c1c1e;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition-apple);
}

.batch-drive-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drive-toggle-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.drive-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13.5px;
  display: block;
}

.drive-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.drive-badge-status {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.drive-badge-status.active {
  background: rgba(48, 209, 88, 0.15);
  color: var(--accent-emerald);
  border-color: rgba(48, 209, 88, 0.35);
}

.batch-drive-url-container {
  background: #121213;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  animation: fadeInDown 0.25s ease-out;
}

.drive-hint-warning {
  font-size: 11.5px;
  color: var(--accent-amber);
  margin-top: 6px;
  margin-bottom: 0;
  line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* TAB 4: REDESIGNED SHOWCASE LIBRARY (IMAGES 3 & 4 STYLE)                   */
/* ═══════════════════════════════════════════════════════════════════════════ */
.showcase-sections-wrapper {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-top: 24px;
}

.showcase-category-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 26px 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  transition: var(--transition-apple);
}

.showcase-category-section:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.category-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.category-header-title-box h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-header-title-box p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  max-width: 780px;
}

.category-header-badge {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.category-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* 9:16 Vertical Card (Apple Store Product Card Style) */
.showcase-template-card {
  background: #1c1c1e;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition-apple);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.showcase-template-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--border-hover);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

/* Apple Pill Badges */
.tramai-tags-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.tag-price {
  background: #0071e3;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  display: inline-block;
}

.tag-price.free {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-weight: 600;
  border-radius: var(--radius-full);
}

.tag-new {
  background: rgba(255, 69, 58, 0.18);
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.35);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  display: inline-block;
}

.showcase-card-title {
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.3;
  margin-bottom: 4px;
}

.showcase-card-desc {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.showcase-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #020617;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.4);
}

.showcase-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  display: block;
  background: #020617;
}

.showcase-demo-badge {
  display: none !important;
}

/* ─── CỰC KỲ NỔI BẬT: CHỮ MẪU TRÊN GÓC TRÁI (SHOWCASE NUMBER BADGE) ─── */
.showcase-num-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 10px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ff1361 0%, #ff5e3a 50%, #fbb034 100%);
  color: #ffffff !important;
  font-family: var(--font-mono, 'Geist Mono', 'JetBrains Mono', monospace);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: 
    0 4px 18px rgba(255, 19, 97, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.45),
    0 0 12px rgba(251, 176, 52, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.showcase-template-card:hover .showcase-num-badge {
  transform: translateY(-2px) scale(1.06);
  box-shadow: 
    0 8px 26px rgba(255, 19, 97, 0.75),
    0 0 20px rgba(251, 176, 52, 0.65),
    inset 0 1px 1px rgba(255, 255, 255, 1);
  border-color: #ffffff;
}

.badge-glow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff, 0 0 14px #ffe600;
  display: inline-block;
  animation: badgeGlowPulse 1.4s ease-in-out infinite alternate;
}

.badge-glow-dot.waiting {
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff, 0 0 14px #38bdf8;
}

@keyframes badgeGlowPulse {
  0% { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.25); opacity: 1; filter: drop-shadow(0 0 6px #fff); }
}

/* ─── BADGE DEMO TRỰC TIẾP (GÓC PHẢI) ─── */
.showcase-demo-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.28);
  color: #34d399 !important;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  border: 1px solid rgba(52, 211, 153, 0.55);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 12px rgba(16, 185, 129, 0.3);
  pointer-events: none;
}

/* ─── Waiting for render placeholder card ─── */
.showcase-waiting-placeholder {
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-height: 420px;
  background: radial-gradient(circle at 50% 25%, rgba(30, 41, 59, 0.85) 0%, rgba(11, 15, 25, 0.98) 100%);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  text-align: center;
  position: relative;
  border: 1.5px dashed rgba(99, 102, 241, 0.35);
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.showcase-template-card:hover .showcase-waiting-placeholder {
  border-color: rgba(99, 102, 241, 0.65);
  background: radial-gradient(circle at 50% 25%, rgba(49, 46, 129, 0.5) 0%, rgba(11, 15, 25, 0.98) 100%);
}

.waiting-pattern-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
  pointer-events: none;
  opacity: 0.6;
}

.waiting-content-box {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 90%;
}

.waiting-icon-pulse {
  font-size: 42px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 16px rgba(99, 102, 241, 0.55));
  animation: floatBounce 3s ease-in-out infinite;
}

.waiting-badge-pill {
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

.waiting-main-text {
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 8px 0;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.waiting-sub-text {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}

.showcase-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.showcase-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 6px;
}

.showcase-card-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.showcase-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.showcase-card-actions .btn {
  flex: 1;
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 10px;
  justify-content: center;
  border-radius: 8px;
}

/* Branding Hub None Logo Notice */
.branding-none-notice-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.branding-none-notice-box strong {
  color: #f87171;
  font-size: 13.5px;
  display: block;
  margin-bottom: 4px;
}

.branding-none-notice-box p {
  font-size: 12px;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.5;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

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

/* ═══════════════════════════════════════════════════════════════════════════ */
/* TAB 5: BẢN QUYỀN & MÃ PHẦN CỨNG MÁY TÍNH (HWID)                             */
/* ═══════════════════════════════════════════════════════════════════════════ */
.license-dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition-apple);
}

.license-dashboard-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.license-dashboard-card::before {
  display: none;
}

.license-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.license-title-group {
  max-width: 820px;
}

.license-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.license-panel {
  background: #1c1c1e;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  position: relative;
  transition: var(--transition-apple);
}
.license-panel:hover {
  border-color: var(--border-hover);
}

.license-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}

.license-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.license-panel-icon {
  font-size: 18px;
}

/* HWID Code Box Display (Apple Hardware Token Box) */
.hwid-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hwid-code-box {
  background: #121213;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: var(--transition-apple);
}

.hwid-code-box:hover {
  border-color: #2997ff;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 16px rgba(41, 151, 255, 0.2);
}

.hwid-val-text {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #2997ff;
  word-break: break-all;
  user-select: all;
}

/* Steps list */
.license-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.license-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.license-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* License Status Display Card */
.license-status-banner {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.license-status-banner.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.license-status-banner.inactive {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(185, 28, 28, 0.1) 100%);
  border: 1px solid rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.15);
}

.license-status-icon {
  font-size: 32px;
  line-height: 1;
}

.license-status-content h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.license-status-banner.active h4 {
  color: #34d399;
}

.license-status-banner.inactive h4 {
  color: #f87171;
}

.license-status-content p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* License Info Table Rows */
.license-details-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.license-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.license-row-label {
  color: var(--text-dim);
  font-weight: 500;
}

.license-row-val {
  color: var(--text-main);
  font-weight: 600;
}

.license-row-val.badge-val {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
}

/* Key Input Textarea */
.form-textarea-code {
  width: 100%;
  background: rgba(10, 16, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #a5f3fc;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.5;
  transition: all 0.2s ease;
  word-break: break-all;
}

.form-textarea-code:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* Admin Generator Panel */
.admin-generator-panel {
  border-color: rgba(99, 102, 241, 0.35);
  background: linear-gradient(180deg, rgba(17, 24, 48, 0.9) 0%, rgba(11, 17, 33, 0.95) 100%);
}

.admin-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.gen-result-card {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 🍎 APPLE PRO DARK - LỊCH SỬ RENDER (RENDER HISTORY GALLERY)                */
/* ═══════════════════════════════════════════════════════════════════════════ */

.history-modal-dialog {
  max-width: 1020px !important;
  width: 92vw;
  background: rgba(18, 18, 19, 0.94) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 26px !important;
  backdrop-filter: blur(40px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(40px) saturate(180%) !important;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
  overflow: hidden;
}

.history-modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(0, 113, 227, 0.12);
  border: 1px solid rgba(41, 151, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2997ff;
  flex-shrink: 0;
}
.history-modal-icon-badge svg {
  width: 24px;
  height: 24px;
}

.history-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f5f5f7;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Thanh tìm kiếm & bộ lọc */
.history-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.history-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 580px;
  background: rgba(28, 28, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 980px;
  padding: 8px 16px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.history-search-box:focus-within {
  border-color: #2997ff;
  background: rgba(28, 28, 30, 1);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.25);
}
.history-search-box svg {
  width: 16px;
  height: 16px;
  color: #86868b;
  flex-shrink: 0;
}
.history-search-box input {
  background: transparent;
  border: none;
  color: #f5f5f7;
  font-size: 13px;
  width: 100%;
  outline: none;
  font-family: inherit;
}
.history-search-box input::placeholder {
  color: #636366;
}

.history-stats-pill {
  font-size: 12px;
  color: #86868b;
  padding: 6px 14px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.history-stats-pill strong {
  color: #2997ff;
  font-weight: 700;
}

/* Danh sách container */
.history-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Từng thẻ video */
.history-item-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 18px;
  background: rgba(24, 24, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 14px 18px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.history-item-card:hover {
  background: rgba(32, 32, 35, 0.95);
  border-color: rgba(41, 151, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Cột visual icon/thumbnail */
.history-item-visual {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  background: linear-gradient(145deg, #1c1c1e 0%, #0d0d0f 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.history-item-visual:hover {
  border-color: #2997ff;
}
.history-visual-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 113, 227, 0.2);
  color: #2997ff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.history-item-visual:hover .history-visual-thumb {
  transform: scale(1.12);
  background: #0071e3;
  color: #ffffff;
}
.history-visual-icon {
  width: 14px;
  height: 14px;
  margin-left: 2px;
}
.history-visual-duration {
  font-size: 10.5px;
  font-weight: 600;
  color: #a1a1a6;
  font-variant-numeric: tabular-nums;
}

/* Cột thông tin chi tiết */
.history-item-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.history-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Pill Mẫu số mấy */
.history-pill-template {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 980px;
  background: rgba(0, 113, 227, 0.15);
  border: 1px solid rgba(41, 151, 255, 0.35);
  color: #2997ff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.history-pill-template .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2997ff;
  box-shadow: 0 0 6px #2997ff;
}

/* Pill Thời gian render */
.history-pill-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1a6;
  font-size: 11.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.history-pill-time svg {
  width: 13px;
  height: 13px;
  color: #86868b;
}

.history-pill-size {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.04);
  color: #86868b;
  font-size: 11px;
}

/* Tiêu đề video */
.history-title-text {
  font-size: 15px;
  font-weight: 600;
  color: #f5f5f7;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}
.history-title-text:hover {
  color: #2997ff;
}

/* Khung hiển thị vị trí lưu file */
.history-path-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 14, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 4px 10px;
  max-width: 100%;
}
.history-path-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #86868b;
  flex-shrink: 0;
}
.history-path-badge svg {
  width: 12px;
  height: 12px;
  color: #2997ff;
}
.history-path-string {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  color: #a1a1a6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.history-btn-copy {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #86868b;
  padding: 2px 7px;
  font-size: 10.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.history-btn-copy:hover {
  background: rgba(41, 151, 255, 0.15);
  border-color: rgba(41, 151, 255, 0.4);
  color: #2997ff;
}
.history-btn-copy svg {
  width: 12px;
  height: 12px;
}

/* Cột nút hành động */
.history-item-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.history-item-actions .btn-pill {
  border-radius: 980px !important;
  font-size: 11.5px !important;
  padding: 5px 14px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

/* Empty & Loading states */
.history-empty-card,
.history-loading-box {
  padding: 48px 24px;
  text-align: center;
  background: rgba(24, 24, 26, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  margin: 10px 0;
}
.history-loading-box p {
  color: #86868b;
  font-size: 13px;
  margin-top: 12px;
}
.spinner-circle {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #2997ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

/* ── HWID Horizontal Single-Row Bar ── */
.hwid-panel-compact {
  padding: 16px 20px !important;
  background: rgba(18, 18, 20, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-lg) !important;
}
.hwid-horizontal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(10, 10, 12, 0.6);
  border: 1px solid rgba(41, 151, 255, 0.25);
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}
.hwid-bar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.hwid-label-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f5f5f7;
  letter-spacing: -0.1px;
}
.hwid-val-text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: #2997ff;
  background: rgba(255, 255, 255, 0.04);
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.5px;
  user-select: all;
  text-align: center;
}
.btn-hwid-compact {
  padding: 7px 16px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  border-radius: 980px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #0071e3 !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.35) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer;
  white-space: nowrap;
}
.btn-hwid-compact:hover {
  transform: scale(1.04);
  background: #0077ed !important;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.5) !important;
}

/* ── Legal Terms & Liability Disclaimer Modal ── */
.legal-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.legal-modal-dialog {
  background: #161618;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 50px rgba(41, 151, 255, 0.15);
  max-width: 840px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: legalModalFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes legalModalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(14px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.legal-modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(28, 28, 30, 0.7);
}
.legal-brand-identity {
  display: flex;
  align-items: center;
  gap: 16px;
}
.legal-brand-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #2997ff;
  box-shadow: 0 0 16px rgba(41, 151, 255, 0.5);
}
.legal-title {
  font-size: 16.5px;
  font-weight: 800;
  color: #f5f5f7;
  margin: 0;
  letter-spacing: -0.2px;
}
.legal-subtitle {
  font-size: 11px;
  font-weight: 700;
  color: #2997ff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.legal-modal-body {
  padding: 22px 28px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.legal-callout-warning {
  background: rgba(255, 159, 10, 0.12);
  border: 1px solid rgba(255, 159, 10, 0.35);
  border-radius: 12px;
  padding: 14px 18px;
  color: #ffd60a;
  font-size: 12.5px;
  line-height: 1.6;
}
.legal-terms-scroll-area {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 22px;
}
.legal-clause h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: #2997ff;
  margin: 0 0 6px 0;
}
.legal-clause p {
  font-size: 12.5px;
  color: #d1d1d6;
  line-height: 1.65;
  margin: 0;
}
.legal-modal-footer {
  padding: 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(22, 22, 24, 0.95);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.legal-agreement-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.legal-agreement-checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #0071e3;
  cursor: pointer;
}
.agreement-text {
  font-size: 12.5px;
  color: #f5f5f7;
  line-height: 1.55;
  font-weight: 500;
}
.btn-legal-submit {
  width: 100%;
  justify-content: center;
  font-weight: 700;
  padding: 13px;
  font-size: 13.5px;
  border-radius: 980px;
  background: #0071e3;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(0, 113, 227, 0.4);
}
.btn-legal-submit:hover:not(:disabled) {
  transform: scale(1.02);
  background: #0077ed;
  box-shadow: 0 6px 24px rgba(0, 113, 227, 0.55);
}
.btn-legal-submit:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(1);
}

/* ─── MODAL TƯƠNG TÁC XÁC NHẬN VỚI AI AGENT (OPTIONS & SELECTION) ────────── */
.agent-q-prompt-box {
  padding: 16px 18px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  font-size: 14px;
  color: #f8fafc;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.agent-q-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.agent-q-option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.agent-q-option-card:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

.agent-q-option-card.selected {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.28) !important;
}

.agent-q-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s ease;
  background: transparent;
}

.agent-q-option-card.selected .agent-q-radio {
  border-color: #38bdf8;
  background: #38bdf8;
}

.agent-q-radio-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0f172a;
  display: none;
}

.agent-q-option-card.selected .agent-q-radio-dot {
  display: block;
}

.agent-q-option-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #e2e8f0;
  flex: 1;
  word-break: break-word;
}

.agent-q-badge-rec {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
  margin-right: 6px;
  vertical-align: middle;
}

.agent-q-other-input-wrap {
  margin-top: 8px;
  animation: fadeInOther 0.25s ease-out;
}

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

.agent-q-other-input-wrap textarea {
  width: 100%;
  padding: 11px 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 13px;
  resize: vertical;
  min-height: 65px;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.5;
  transition: all 0.2s ease;
}

.agent-q-other-input-wrap textarea:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.35);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* 💎 GÓI BẢN QUYỀN 399K TRỌN ĐỜI & DANH SÁCH CHỨC NĂNG BAOX STUDIO          */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* 1. Hero Pricing Card (Thiết Kế Nổi Bật 399K Trọn Đời) */
.license-pricing-hero {
  position: relative;
  background: radial-gradient(120% 120% at 50% 0%, rgba(99, 102, 241, 0.18) 0%, rgba(30, 27, 75, 0.45) 40%, rgba(15, 23, 42, 0.96) 100%);
  border: 1.5px solid rgba(99, 102, 241, 0.45);
  border-radius: var(--radius-2xl);
  padding: 32px 36px;
  margin-bottom: 26px;
  display: grid;
  grid-template-columns: 1.28fr 0.72fr;
  gap: 32px;
  align-items: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 35px rgba(99, 102, 241, 0.22);
  overflow: hidden;
  animation: heroBorderGlow 4s ease-in-out infinite alternate;
}

@keyframes heroBorderGlow {
  0% {
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(99, 102, 241, 0.2);
  }
  50% {
    border-color: rgba(56, 189, 248, 0.65);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(56, 189, 248, 0.3);
  }
  100% {
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 158, 11, 0.25);
  }
}

.license-pricing-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.pricing-hero-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 2;
}

.pricing-badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(217, 119, 6, 0.35) 100%);
  border: 1px solid rgba(245, 158, 11, 0.65);
  color: #fef08a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  width: fit-content;
  box-shadow: 0 2px 14px rgba(245, 158, 11, 0.3);
}

.pricing-hero-title {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.25;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pricing-hero-desc {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.6;
  margin: 0;
}

.pricing-perks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
  margin-top: 6px;
}

.pricing-perk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #e2e8f0;
}

.pricing-perk-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Right Pricing CTA Box */
.pricing-hero-cta-card {
  position: relative;
  z-index: 2;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.pricing-hero-cta-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.55);
}

.pricing-badge-save {
  font-size: 11px;
  font-weight: 800;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.price-old-val {
  font-size: 14px;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 500;
  margin-bottom: -4px;
}

.price-main-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.price-main-num {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  font-family: var(--font-sans);
  filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.35));
}

.price-currency-badge {
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  background: rgba(56, 189, 248, 0.15);
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.price-sub-note {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.4;
}

.pricing-hero-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.pricing-contact-hint {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 2px;
}

.pricing-contact-hint strong {
  color: #38bdf8;
  font-family: var(--font-mono);
}

.pricing-contact-link {
  font-size: 12px;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 4px;
  padding: 6px 16px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pricing-contact-link:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.55);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.2);
}

.pricing-contact-link svg {
  color: #38bdf8;
  flex-shrink: 0;
}

.pricing-contact-link strong {
  color: #38bdf8;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 2. Three Step Onboarding Strip */
.activation-steps-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: rgba(18, 18, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.act-step-col {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.act-step-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  border: 1.5px solid #6366f1;
  color: #a5b4fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.act-step-body h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 3px 0;
}

.act-step-body p {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
  margin: 0;
}

/* 3. Capabilities Section (Những chức năng mà web làm được) */
.license-capabilities-section {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.capabilities-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.capabilities-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.capabilities-title {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.3;
}

.capabilities-desc {
  font-size: 13.5px;
  color: #94a3b8;
  max-width: 880px;
  line-height: 1.6;
  margin: 0;
}

.capabilities-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

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

@media (max-width: 860px) {
  .license-pricing-hero {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }
  .pricing-perks-grid {
    grid-template-columns: 1fr;
  }
  .activation-steps-banner {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .capabilities-bento-grid {
    grid-template-columns: 1fr;
  }
}

.capability-card {
  background: rgba(22, 22, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.capability-card:hover {
  background: rgba(28, 28, 34, 0.95);
  border-color: rgba(99, 102, 241, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(99, 102, 241, 0.15);
}

.capability-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.capability-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.capability-card:hover .capability-icon-wrap {
  transform: scale(1.1) rotate(4deg);
}

.capability-badge-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.capability-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.35;
}

.capability-card-desc {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
}

.capability-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

.capability-tag {
  font-size: 11px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 7px;
  border-radius: 5px;
}

/* 4. Bottom Trust & Guarantee Bar */
.license-trust-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-top: 10px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #cbd5e1;
  font-weight: 600;
}

.trust-icon {
  font-size: 18px;
}

/* ─── Remote Trial & Demo Online Warning Banner Styles ─────────────────── */
.demo-trial-sticky-banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(90deg, #9a3412 0%, #b45309 35%, #b91c1c 70%, #9a3412 100%);
  background-size: 200% 200%;
  animation: demoBannerShine 8s ease infinite;
  color: #ffffff;
  padding: 8px 24px;
  border-bottom: 1.5px solid rgba(254, 240, 138, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  font-family: var(--font-sans);
}

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

.demo-trial-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.demo-trial-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.demo-trial-badge {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(254, 240, 138, 0.6);
  color: #fef08a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}

.demo-trial-text {
  font-size: 13px;
  line-height: 1.4;
  color: #fef3c7;
}

.demo-trial-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.demo-trial-price {
  font-size: 12px;
  font-weight: 700;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.demo-trial-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #9a3412;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
}

.demo-trial-btn:hover {
  background: #fef08a;
  color: #7c2d12;
  transform: translateY(-1px);
}

.demo-trial-badge-tab {
  background: #f59e0b !important;
  color: #000000 !important;
  font-weight: 700 !important;
}









/* ═══════════════════════════════════════════════════════════════════════════
   BAOX LUXURY PRECISION SYSTEM (Linear / Vercel Geist / Raycast Inspired)
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --bg-dark: #07080c;
  --bg-surface: #0c0e14;
  --bg-card: rgba(16, 19, 27, 0.85);
  --bg-card-hover: rgba(22, 26, 37, 0.94);
  --bg-input: #0a0c12;
  --bg-input-focus: #0e1119;
  --border-subtle: rgba(255, 255, 255, 0.075);
  --border-hover: rgba(255, 255, 255, 0.15);
  --border-active: #2997ff;
  --font-sans: "Geist", "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

body {
  background: var(--bg-dark);
  font-family: var(--font-sans);
  letter-spacing: -0.012em;
}

.ambient-glow {
  opacity: 0.16;
  filter: blur(180px);
}

/* Header & Main Navigation — Crisp Carbon Glass */
.app-header {
  height: 58px;
  background: rgba(7, 8, 12, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.studio-main-nav {
  background: rgba(10, 12, 18, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 24px;
}

.main-nav-container {
  gap: 8px;
}

.main-nav-btn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
}

.main-nav-btn.active {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.35);
}

.nav-main-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Cards & Surfaces — Specular Inner Top Hairline */
.panel-card,
.batch-toolbar-card,
.batch-dashboard-card,
.branding-hub-card,
.templates-showcase-card,
.license-dashboard-card,
.license-panel,
.studio-card {
  background: linear-gradient(180deg, rgba(20, 24, 34, 0.72) 0%, rgba(13, 16, 23, 0.88) 100%) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 18px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.toolbar-heading {
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
  color: #f8fafc !important;
}

/* Form Controls & Presets */
.form-input,
.form-select,
.form-textarea,
.form-textarea-code {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 11px !important;
  font-size: 13.5px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.form-textarea-code:focus {
  border-color: rgba(41, 151, 255, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.14) !important;
  background: var(--bg-input-focus) !important;
}

.preset-pill {
  font-size: 12px !important;
  padding: 4px 11px !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 999px !important;
  color: var(--text-muted) !important;
}

.preset-pill:hover {
  color: #f5f5f7 !important;
  border-color: var(--border-hover) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Custom Slide Upload & Drive Box — Remove Cheap Dashed Noise */
.custom-slide-upload-card,
.drive-sync-box,
.batch-drive-sync-panel {
  background: rgba(14, 17, 25, 0.7) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 14px !important;
  padding: 16px 18px !important;
}

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

.slide-card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #f5f5f7;
}

.slide-card-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.slide-drop-zone {
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, background 0.2s;
}

.slide-drop-zone:hover {
  border-color: rgba(41, 151, 255, 0.55);
  background: rgba(41, 151, 255, 0.06);
}

.slide-drop-text {
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 500;
}

/* Creative AI Upload Grid & Audio Toggles */
.creative-media-upload-card {
  margin-bottom: 12px;
  border-color: rgba(56, 189, 248, 0.25) !important;
  background: linear-gradient(180deg, rgba(16, 23, 38, 0.88) 0%, rgba(12, 16, 26, 0.92) 100%) !important;
}

.creative-media-hint {
  margin-top: 5px;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
}

.creative-media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.creative-media-card {
  position: relative;
  width: 128px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(11, 15, 25, 0.96);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.creative-media-thumb-wrap {
  position: relative;
  width: 100%;
  height: 92px;
  background: #070a12;
  overflow: hidden;
}

.creative-media-thumb-wrap img,
.creative-media-thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.creative-media-badge {
  position: absolute;
  bottom: 5px;
  left: 5px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  color: #fff;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.creative-media-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(239, 68, 68, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.creative-media-meta {
  padding: 6px 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.creative-media-name {
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creative-media-audio-btn {
  width: 100%;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.creative-media-audio-btn.keep-audio {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

.slot-creative-media-box {
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(56, 189, 248, 0.06);
  border: 1.5px dashed rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  transition: all 0.2s ease;
}

/* Primary Buttons — Precision Gradient without Oversized Neon Glow */
.btn-render-primary,
.btn-primary {
  background: linear-gradient(180deg, #1b82f2 0%, #0066d6 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 16px rgba(0, 102, 214, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

.btn-render-primary:hover,
.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-1px);
}

/* Showcase Cards — Clean Editorial Proportions */
.showcase-template-card {
  background: rgba(15, 18, 26, 0.88) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 16px !important;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease !important;
}

.showcase-template-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18) !important;
}

.showcase-card-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}

.showcase-card-desc {
  font-size: 12.5px !important;
  color: #94a3b8 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* Category Pills — Geist Style */
.filter-chip {
  padding: 7px 14px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border-subtle) !important;
  color: #9ca3af !important;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #f8fafc !important;
}

.filter-chip.active {
  background: #f8fafc !important;
  color: #07080c !important;
  border-color: #f8fafc !important;
  font-weight: 600 !important;
}

/* License Tab — Raycast Pro Pricing Aesthetic */
.license-pricing-hero {
  background: linear-gradient(145deg, rgba(19, 25, 40, 0.92) 0%, rgba(11, 13, 20, 0.96) 100%) !important;
  border: 1px solid rgba(41, 151, 255, 0.28) !important;
  border-radius: 20px !important;
  padding: 28px 32px !important;
  gap: 28px !important;
}

.pricing-hero-cta-card {
  background: rgba(9, 11, 17, 0.85) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 16px !important;
  padding: 24px !important;
}

.activation-steps-banner.compact-steps {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 14px !important;
  padding: 14px 18px !important;
  background: rgba(14, 17, 25, 0.72) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 14px !important;
}

.activation-steps-banner.compact-steps .act-step-col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.activation-steps-banner.compact-steps h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #e2e8f0;
}

.capabilities-bento-grid.compact-capabilities {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 14px !important;
}

.capabilities-bento-grid.compact-capabilities .capability-card {
  padding: 18px 20px !important;
  border-radius: 14px !important;
  background: rgba(14, 17, 25, 0.75) !important;
  border: 1px solid var(--border-subtle) !important;
}

.capabilities-bento-grid.compact-capabilities .capability-card-title {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  margin-bottom: 6px !important;
}

.capabilities-bento-grid.compact-capabilities .capability-card-desc {
  font-size: 13px !important;
  color: #94a3b8 !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

@media (max-width: 900px) {
  .activation-steps-banner.compact-steps,
  .capabilities-bento-grid.compact-capabilities {
    grid-template-columns: 1fr !important;
  }
}

/* Modal Crisp Backdrop */
.modal-dialog {
  background: #0d1018 !important;
  border: 1px solid var(--border-hover) !important;
  border-radius: 18px !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.85) !important;
}

/* ══ LICENSE_LOCK_OVERLAY_SYSTEM ══ */
.main-nav-btn.nav-locked {
  opacity: 0.72;
}
.main-nav-btn.nav-locked::after {
  content: '🔒';
  font-size: 11px;
  margin-left: 6px;
  opacity: 0.85;
}
.main-tab-view {
  position: relative;
}
.locked-blur-content {
  filter: blur(5px) saturate(0.6) brightness(0.45);
  pointer-events: none !important;
  user-select: none !important;
  transition: filter 0.25s ease;
}
.license-lock-overlay {
  position: fixed;
  top: 132px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(7, 8, 12, 0.45) 0%, rgba(7, 8, 12, 0.82) 100%);
  backdrop-filter: blur(6px);
}
.license-lock-card {
  max-width: 460px;
  width: 100%;
  text-align: center;
  padding: 32px 28px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(19, 24, 36, 0.96) 0%, rgba(11, 14, 21, 0.98) 100%);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.license-lock-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.license-lock-title {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 700;
  color: #f8fafc;
}
.license-lock-desc {
  margin: 0 0 20px;
  font-size: 13.5px;
  line-height: 1.55;
  color: #94a3b8;
}
body.baox-unlicensed #btnOpenSettings,
body.baox-unlicensed #btnOpenGallery,
body.baox-unlicensed #chipGemini,
body.baox-unlicensed #chipGroq {
  opacity: 0.55;
}


/* ===== MOBILE RESPONSIVE POLISH FOR VERCEL WEB DEMO ===== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  .demo-trial-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    font-size: 12px !important;
  }
  .demo-trial-right {
    width: 100% !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .studio-header, .top-bar, header {
    padding: 10px 12px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .main-nav, .nav-tabs, .studio-tabs {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    padding-bottom: 4px !important;
  }
  .main-nav button, .nav-tab, .tab-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 12.5px !important;
    padding: 8px 12px !important;
  }
  .studio-main, .tab-content, .workspace-container {
    padding: 12px !important;
  }
  .studio-grid, .single-grid, .batch-layout, .pricing-hero-card, .license-grid, .settings-grid {
    grid-template-columns: 1fr !important;
    display: grid !important;
    gap: 14px !important;
  }
  .template-gallery-grid, .gallery-grid {
    grid-template-columns: 1fr !important;
  }
  .modal-content, .modal-dialog, .demo-modal-card {
    width: 94vw !important;
    max-width: 94vw !important;
    margin: 12px auto !important;
    max-height: 90vh !important;
  }
}
