:root {
  /* Matte Obsidian & Medical Dark Palette */
  --bg-deep: #07090d;
  --bg-surface: #0e121a;
  --bg-panel: #131822;
  --bg-hover: #1c2433;
  --bg-active: #242e42;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-highlight: rgba(0, 210, 255, 0.35);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;

  --accent-cyan: #38bdf8;
  --accent-glow: #00d2ff;
  --accent-emerald: #10b981;
  --accent-gold: #f59e0b;
  --accent-blue: #2563eb;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.app-header {
  height: 60px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  position: relative;
  z-index: 100;
}

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

/* Korvyn Brand Symbol */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  user-select: none;
}

.korvyn-brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: #000;
  border: 1px solid rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.korvyn-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.brand-corp {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.brand-corp strong {
  color: var(--accent-cyan);
}

/* Segmented Control for Presets */
.preset-segmented-control {
  display: flex;
  align-items: center;
  background-color: #080c14;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.segmented-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.segmented-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.segmented-btn.active {
  background-color: var(--bg-panel);
  color: var(--accent-cyan);
  border: 1px solid var(--border-medium);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-icon {
  flex-shrink: 0;
}

/* Buttons */
.btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.btn-primary {
  background-color: #0284c7;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background-color: #0369a1;
}

.btn-secondary {
  background-color: var(--bg-panel);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--bg-hover);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

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

/* Pro Badge in Header */
.btn-pro-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-pro-badge:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.btn-pro-badge.is-active-pro {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.25));
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-pro {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #0b0f17;
  font-weight: 700;
}

.btn-pro:hover {
  filter: brightness(1.1);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* ==========================================================================
   Main App Layout
   ========================================================================== */
.app-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 330px;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* Viewport Stage */
.stage-section {
  position: relative;
  background-color: #080a0f;
  background-image: radial-gradient(ellipse at 50% 30%, #111726 0%, #07090d 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

/* Empty Dropzone State */
.empty-state {
  width: 100%;
  max-width: 500px;
}

.empty-card {
  background: rgba(14, 18, 26, 0.7);
  backdrop-filter: blur(16px);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 38px 30px;
  text-align: center;
  transition: var(--transition);
}

.clickable-dropzone {
  cursor: pointer;
  user-select: none;
}

.clickable-dropzone:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(14, 22, 36, 0.85);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.1);
}

.empty-state.dragover .empty-card {
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.06);
}

.upload-illustration {
  margin-bottom: 14px;
}

.upload-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.2), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin: 0 auto;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.15);
  transition: var(--transition);
}

.clickable-dropzone:hover .upload-icon-circle {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.3);
  border-color: var(--accent-cyan);
}

.empty-actions-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.empty-korvyn-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 16px;
}

.empty-korvyn-logo {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.empty-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  color: #fff;
}

.empty-desc {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.empty-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.empty-compliance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

/* ==========================================================================
   Comparison Stage
   ========================================================================== */
.comparison-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewport-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 50;
}

.zoom-group {
  display: flex;
  align-items: center;
  background: rgba(14, 18, 26, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.control-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

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

.control-btn-wide {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  height: 28px;
  padding: 0 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.control-btn-wide:hover {
  color: var(--text-primary);
  background-color: var(--bg-panel);
}

.control-separator {
  width: 1px;
  height: 16px;
  background: var(--border-subtle);
  margin: 0 2px;
}

.zoom-indicator {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  padding: 0 8px;
}

.image-stage {
  position: relative;
  max-width: 92%;
  max-height: 85%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--border-medium);
  cursor: ew-resize;
  user-select: none;
  transform-origin: center center;
  transition: transform 0.15s ease-out;
}

.base-image, .enhanced-image {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  pointer-events: none;
}

.clipped-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% 100%);
  pointer-events: none;
}

.clipped-overlay img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.split-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 20;
}

.split-thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  color: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.tag {
  position: absolute;
  bottom: 12px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 30;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.tag-original {
  left: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: var(--text-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tag-enhanced {
  right: 12px;
  background: rgba(14, 165, 233, 0.2);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* ==========================================================================
   Sidebar: Diagnostics & Precision Tuning
   ========================================================================== */
.sidebar {
  background-color: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.sidebar-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

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

.panel-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.panel-action-link {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
}

.latency-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Featured Metric */
.metric-row-featured {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 8px;
}

.featured-metric-label {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.featured-metric-number {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--accent-emerald);
  margin: 2px 0;
}

.featured-metric-caption {
  font-size: 0.65rem;
  color: var(--text-tertiary);
}

/* Dual Metric Grid */
.metric-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.metric-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 8px;
}

.metric-caption {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  display: block;
  margin-bottom: 4px;
}

.metric-comparison {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.val-before {
  color: var(--text-tertiary);
  text-decoration: line-through;
  font-size: 0.75rem;
}

.val-divider {
  color: var(--text-tertiary);
  font-size: 0.7rem;
}

.val-after {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Tuning Controls */
.control-item {
  margin-bottom: 12px;
}

.control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  margin-bottom: 6px;
}

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

.control-value {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-size: 0.75rem;
}

.minimal-slider {
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
}

.minimal-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #00d2ff;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 210, 255, 0.4);
}

.control-description {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  display: block;
  margin-top: 4px;
  line-height: 1.3;
}

.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.clean-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.clean-toggle input {
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* ==========================================================================
   Propaganda Oficial KORVYN (In-App Ad Banner Slot)
   ========================================================================== */
.ad-banner-slot.korvyn-ad-slot {
  background: linear-gradient(180deg, #101624, #080c14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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

.ad-tag.korvyn-tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
}

.ad-remove {
  font-size: 0.65rem;
  color: var(--accent-gold);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.ad-remove:hover {
  text-decoration: underline;
}

.korvyn-ad-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.korvyn-slot-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: #000;
  object-fit: cover;
  flex-shrink: 0;
}

.ad-badge-brand {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
}

.ad-headline {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.ad-subtext {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 10px;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   Modals: Interstitial KORVYN Video Ad & Pricing
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 8, 0.88);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.interstitial-card.korvyn-interstitial-card {
  width: 100%;
  max-width: 520px;
  background: #0d121c;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 25px rgba(56, 189, 248, 0.15);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.korvyn-live-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.06em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ad-counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Simulated Video Player */
.korvyn-video-showcase {
  background: #05070c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.video-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(14, 18, 26, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.korvyn-native-video {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  background: #000;
  display: block;
}

.video-korvyn-brand {
  height: 24px;
  object-fit: contain;
}

.video-time-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
}

.video-screen-content {
  padding: 16px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(circle at 50% 30%, #0d1525 0%, #05070c 80%);
}

.chat-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.75rem;
  line-height: 1.35;
  position: relative;
}

.chat-user {
  align-self: flex-start;
  background: #1e293b;
  color: #e2e8f0;
  border-bottom-left-radius: 2px;
}

.chat-korvyn-bot {
  align-self: flex-end;
  background: linear-gradient(135deg, #0369a1, #0284c7);
  color: #ffffff;
  border-bottom-right-radius: 2px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.chat-success {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  align-self: center;
  text-align: center;
  font-weight: 600;
  font-size: 0.72rem;
}

.bot-badge-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}

.bot-avatar-tiny {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.bubble-sender {
  font-size: 0.62rem;
  color: #94a3b8;
  display: block;
  margin-bottom: 2px;
}

.bubble-sender-bot {
  font-size: 0.65rem;
  font-weight: 700;
  color: #e0f2fe;
}

.bubble-time {
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.6);
  float: right;
  margin-top: 4px;
  margin-left: 6px;
}

.video-progress-container {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  width: 100%;
}

.video-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  transition: width 0.2s linear;
}

.interstitial-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Pricing Card (Pro Modal) */
.pricing-card {
  width: 100%;
  max-width: 600px;
  background: #0f1420;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close-btn:hover {
  color: #fff;
}

.pricing-header {
  text-align: center;
  margin-bottom: 24px;
}

.pricing-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.pricing-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.pricing-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.pricing-tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.tier-box {
  background: #080c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.tier-box.recommended {
  border-color: rgba(56, 189, 248, 0.4);
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.05), #080c14);
}

.tier-pill {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--accent-cyan);
  color: #070a10;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.tier-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.tier-price {
  font-family: var(--font-mono);
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 14px;
}

.tier-price .currency {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tier-price .amount {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.tier-price .period {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.tier-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
  flex: 1;
}

.tier-features li strong {
  color: #fff;
}

.license-key-area {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.license-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.license-input-group {
  display: flex;
  gap: 6px;
}

.license-field {
  background: #080c14;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 5px 10px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  outline: none;
  width: 130px;
}

.license-field:focus {
  border-color: var(--accent-cyan);
}

.license-hint {
  display: block;
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-top: 8px;
  line-height: 1.3;
}

.license-hint strong {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Google Sign-In Button & Divider
   ========================================================================== */
.btn-google {
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-google:hover {
  background: #f1f5f9 !important;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 14px 0 16px;
  color: var(--text-tertiary);
  font-size: 0.72rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-divider span {
  padding: 0 10px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 1200;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   User Auth Badge & Headers
   ========================================================================== */
.user-auth-box {
  display: flex;
  align-items: center;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
}

.user-avatar-initials {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #07090d;
}

.user-info-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.user-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-plan-pill {
  font-size: 0.65rem;
  color: var(--accent-cyan);
}

.user-plan-pill.pro {
  color: #10b981;
  font-weight: 700;
}

.btn-logout {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.btn-logout:hover {
  color: #f87171;
}

/* ==========================================================================
   Auth Modal & Forms
   ========================================================================== */
.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 420px;
  padding: 28px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
}

.auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

.auth-form .form-group {
  margin-bottom: 14px;
  text-align: left;
}

.auth-form label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.auth-form .form-input {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition);
}

.auth-form .form-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.15);
}

.auth-error-msg {
  color: #f87171;
  font-size: 0.75rem;
  margin-bottom: 12px;
  text-align: center;
}

/* ==========================================================================
   Pix Checkout Modal (Asaas)
   ========================================================================== */
.pix-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 440px;
  padding: 26px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.9);
}

.pix-header {
  text-align: center;
  margin-bottom: 18px;
}

.pix-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 6px;
}

.pix-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.pix-amount-pill {
  display: inline-block;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 1.05rem;
}

.pix-loading-state {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.pix-qrcode-frame {
  background: #ffffff;
  padding: 12px;
  border-radius: var(--radius-md);
  width: 210px;
  height: 210px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pix-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pix-instructions {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.4;
}

.pix-copy-box {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.pix-copy-input {
  flex: 1;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  outline: none;
}

.btn-copy-pix {
  padding: 8px 12px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.pix-status-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  animation: pulseDot 1.5s infinite;
}

.pix-footer-link {
  text-align: center;
  margin-top: 14px;
}

.pix-footer-link a {
  color: var(--text-tertiary);
  font-size: 0.72rem;
  text-decoration: none;
  transition: var(--transition);
}

.pix-footer-link a:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.pix-success-screen {
  text-align: center;
  padding: 24px 0;
}

.success-checkmark-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.success-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 6px;
}

.success-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.spinner-medical {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid var(--accent-cyan);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
  margin: 16px auto 10px;
}

@keyframes pulseDot {
  0% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0.3; transform: scale(0.9); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .sidebar {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }
  .pricing-tiers {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Korvyn Institutional Contacts Section (Sidebar & Modals)
   ========================================================================== */
.korvyn-contacts-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.contacts-brand-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.contacts-brand-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.contacts-brand-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.contacts-links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.72rem;
  text-decoration: none;
  transition: var(--transition);
}

.contact-item svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.contact-item:hover {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--text-primary);
  transform: translateX(2px);
}

/* Modal Korvyn Contacts */
.modal-korvyn-contact {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  text-align: left;
}

.modal-contact-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-contact-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.contact-pill {
  padding: 5px 10px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
}

.contact-pill:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
