/*
  RevenueAligned v5.0 - Modern Premium UI with WOW Factor
  Design System: Glassmorphism, Vibrant Gradients, Smooth Animations
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  /* Modern Gradient Palette */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-dark: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

  /* Colors */
  --bg-primary: #0a0e27;
  --bg-secondary: #141b3d;
  --bg-workspace: #f8f9fd;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.1);
  --bg-glass-hover: rgba(255, 255, 255, 0.15);

  --text-primary: #1a1d3f;
  --text-secondary: #6b7280;
  --text-inverse: #ffffff;
  --text-muted: #9ca3af;
  --text-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  --accent-purple: #667eea;
  --accent-pink: #f5576c;
  --accent-cyan: #00f2fe;
  --accent-success: #10b981;
  --accent-warn: #f59e0b;
  --accent-fail: #ef4444;

  --border-glass: rgba(255, 255, 255, 0.18);

  /* Typography */
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  /* Shadows & Blur */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.16);
  --shadow-glow: 0 0 32px rgba(102, 126, 234, 0.4);
  --blur-glass: blur(20px);
}

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

body {
  font-family: var(--font-ui);
  background: var(--gradient-dark);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(245, 87, 108, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(0, 242, 254, 0.1) 0%, transparent 50%);
  animation: backgroundShift 20s ease infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes backgroundShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* --- Sidebar --- */
.sidebar {
  width: 320px;
  background: rgba(10, 14, 39, 0.9);
  backdrop-filter: var(--blur-glass);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  z-index: 100;
  position: relative;
}

.sidebar-header {
  padding: 32px 24px;
  border-bottom: 1px solid var(--border-glass);
}

.logo-area {
  margin-bottom: 24px;
  text-align: center;
}

.logo-img {
  max-width: 140px;
  filter: brightness(1.5) drop-shadow(0 0 16px rgba(102, 126, 234, 0.6));
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.btn-new-manifest {
  width: 100%;
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 16px 24px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-new-manifest::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn-new-manifest:hover::before {
  left: 100%;
}

.btn-new-manifest:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

.job-archives {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.job-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}

.job-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-glass);
  transform: translateX(4px);
}

.job-item.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 12px;
  animation: pulse 2s infinite;
}

.status-dot.success {
  background: var(--accent-success);
  box-shadow: 0 0 12px var(--accent-success);
}

.status-dot.running {
  background: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

/* --- Activity Log (Terminal) --- */
.console-wrapper {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: var(--blur-glass);
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.console-wrapper.collapsed {
  height: 36px;
}

.console-wrapper.expanded {
  height: 280px;
}

.console-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  min-height: 36px;
  flex-shrink: 0;
}

.console-wrapper.expanded .console-header span::after {
  content: '  ● LIVE';
  color: var(--accent-cyan);
  font-weight: bold;
  animation: blink 1.5s infinite;
}

.btn-toggle-terminal {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 10px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.btn-toggle-terminal:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

@keyframes terminalFlash {
  0%, 100% { background: rgba(0, 0, 0, 0.4); }
  50% { background: rgba(239, 68, 68, 0.15); }
}

.console-wrapper.collapsed.flash {
  animation: terminalFlash 0.6s ease 2;
}

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

.console-output {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.8);
}

.console-output::-webkit-scrollbar {
  width: 4px;
}

.console-output::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.console-line {
  margin-bottom: 6px;
  display: flex;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

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

.ts {
  color: rgba(255, 255, 255, 0.3);
  min-width: 70px;
}

.type-TASK {
  color: var(--accent-cyan);
  font-weight: 700;
}

.type-AUDIT {
  color: rgba(255, 255, 255, 0.6);
}

.type-WARN {
  color: var(--accent-warn);
  font-weight: 700;
}

.type-FAIL {
  color: var(--accent-fail);
  font-weight: 700;
}

/* --- Workspace --- */
.workspace {
  flex: 1;
  background: var(--bg-workspace);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* --- Progress Tracker --- */
.progress-tracker {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-sm);
  z-index: 10;
  position: relative;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  border: 3px solid #e5e7eb;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.step.active .step-num {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  transform: scale(1.15);
  box-shadow: var(--shadow-glow);
  animation: stepPulse 2s infinite;
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 24px rgba(102, 126, 234, 0.6); }
  50% { box-shadow: 0 0 32px rgba(102, 126, 234, 0.8); }
}

.step.active {
  color: var(--text-primary);
  transform: scale(1.05);
}

.step.complete .step-num {
  background: var(--gradient-success);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

.step.complete {
  color: var(--text-primary);
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(100% + 16px);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #e5e7eb 0%, #f3f4f6 100%);
  border-radius: 4px;
}

.step.complete:not(:last-child)::after {
  background: var(--gradient-success);
}

/* --- Screens --- */
.screen {
  flex: 1;
  padding: 64px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  animation: screenEnter 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.screen.active {
  display: flex;
}

@keyframes screenEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Screen 1: Input --- */
.input-container {
  max-width: 800px;
  width: 100%;
  text-align: center;
}

.headline {
  font-size: 4.5rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f5576c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
  background-size: 200% 200%;
}

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

.subtext {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-weight: 500;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.3s forwards;
}

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

.input-pill {
  display: flex;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: var(--blur-glass);
  border: 2px solid rgba(102, 126, 234, 0.2);
  border-radius: var(--radius-pill);
  padding: 8px;
  box-shadow: var(--shadow-xl);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.5s forwards;
}

.input-pill:focus-within {
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  transform: translateY(-4px);
}

.url-input {
  flex: 1;
  border: none;
  padding: 20px 32px;
  font-size: 1.125rem;
  border-radius: var(--radius-pill);
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 500;
  background: transparent;
}

.url-input::placeholder {
  color: #cbd5e1;
}

.btn-map-dna {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 20px 56px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-map-dna::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn-map-dna:hover::before {
  left: 100%;
}

.btn-map-dna:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.feature-pills {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 48px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.7s forwards;
}

.pill-badge {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: var(--blur-glass);
  border: 1px solid rgba(102, 126, 234, 0.2);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.pill-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-purple);
}

.pill-dot {
  width: 8px;
  height: 8px;
  background: var(--gradient-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(102, 126, 234, 0.6);
  animation: pulse 2s infinite;
}

/* --- Screen 2: Analyzing --- */
.loader-container {
  text-align: center;
}

.dna-loader {
  width: 120px;
  height: 120px;
  border: 8px solid rgba(102, 126, 234, 0.1);
  border-top-color: var(--accent-purple);
  border-right-color: var(--accent-pink);
  border-bottom-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  margin: 0 auto 32px;
  box-shadow: 0 0 48px rgba(102, 126, 234, 0.3);
}

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

.analyzing-text {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 16px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.progress-percent {
  font-size: 6rem;
  font-weight: 900;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.05em;
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}

/* --- Screen 3: Strategy Matrix --- */
.matrix-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  width: 100%;
  max-width: 1600px;
  height: 100%;
}

.strategy-column {
  overflow-y: auto;
  padding-right: 20px;
}

.strategy-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: var(--blur-glass);
  border-radius: var(--radius-xl);
  padding: 48px;
  margin-bottom: 32px;
  border: 2px solid rgba(102, 126, 234, 0.1);
  box-shadow: var(--shadow-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.strategy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.strategy-card:hover::before {
  transform: scaleX(1);
}

.strategy-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl), 0 0 48px rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.3);
}

.intent-badge {
  background: var(--gradient-primary);
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-block;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.card-title {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.card-rationale {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  padding-left: 20px;
  border-left: 4px solid var(--accent-purple);
  font-weight: 500;
}

.btn-deploy {
  background: var(--gradient-primary);
  color: white;
  width: 100%;
  padding: 20px;
  border: none;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-deploy::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn-deploy:hover::before {
  left: 100%;
}

.btn-deploy:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.data-column {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: var(--blur-glass);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 2px solid rgba(102, 126, 234, 0.1);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.data-header {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 24px;
  letter-spacing: 0.1em;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--accent-purple);
}

.revenue-unit-item {
  background: rgba(102, 126, 234, 0.05);
  padding: 20px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  border: 2px solid rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
}

.revenue-unit-item:hover {
  background: rgba(102, 126, 234, 0.1);
  border-color: var(--accent-purple);
  transform: translateX(4px);
}

.ru-name {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.ru-type {
  font-size: 0.75rem;
  color: var(--accent-purple);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ru-price {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* --- Screen 4: Asset Viewer --- */
.asset-split {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 40px;
  max-width: 1800px;
}

.document-pane {
  flex: 2;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: var(--blur-glass);
  border-radius: var(--radius-lg);
  padding: 80px;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  font-family: var(--font-ui);
  line-height: 1.8;
  font-size: 1.125rem;
  color: #1f2937;
  border: 2px solid rgba(102, 126, 234, 0.1);
}

.document-pane h1 {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.document-pane h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 48px;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

.document-pane p {
  margin-bottom: 24px;
  color: #374151;
}

.verify-badge {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-left: 8px;
  border: 2px solid #fca5a5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hud-pane {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.score-card {
  background: var(--gradient-dark);
  color: white;
  padding: 48px;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.score-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
  animation: rotate 10s linear infinite;
}

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

.score-val {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
}

.score-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.gate-metrics {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: var(--blur-glass);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(102, 126, 234, 0.1);
  box-shadow: var(--shadow-lg);
}

.metric-bar-group {
  margin-bottom: 24px;
}

.metric-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-track {
  height: 8px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.metric-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 12px rgba(102, 126, 234, 0.5);
}

.cta-ladder {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cta-block {
  padding: 20px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-soft {
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(102, 126, 234, 0.2);
  color: var(--text-secondary);
}

.cta-trust {
  background: rgba(102, 126, 234, 0.1);
  border: 2px solid var(--accent-purple);
  color: var(--text-primary);
  font-weight: 700;
}

.cta-transactional {
  background: var(--gradient-primary);
  color: white;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.05em;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  border: none;
}

.cta-transactional:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
}

.btn-export {
  width: 100%;
  padding: 20px;
  background: white;
  border: 3px solid var(--text-primary);
  color: var(--text-primary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.btn-export:hover {
  background: var(--text-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.5);
  border-radius: 10px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.8);
}

/* ===================================================================
   TOOLTIP SYSTEM
   =================================================================== */

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(102, 126, 234, 0.15);
  color: var(--accent-purple);
  font-size: 0.65rem;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  margin-left: 6px;
  border: 1px solid rgba(102, 126, 234, 0.3);
  transition: all 0.2s ease;
  font-family: var(--font-ui);
  -webkit-text-fill-color: var(--accent-purple);
  -webkit-background-clip: unset;
  background-clip: unset;
}

.tooltip-icon:hover {
  background: rgba(102, 126, 234, 0.25);
  border-color: var(--accent-purple);
}

.tooltip-icon.tooltip-dark {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.7);
}

.tooltip-icon.tooltip-dark:hover {
  background: rgba(255, 255, 255, 0.2);
}

.headline-tooltip {
  font-size: 0.5rem;
  width: 22px;
  height: 22px;
  vertical-align: super;
}

.tooltip-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  color: var(--text-inverse);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
  width: 260px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  font-family: var(--font-ui);
  -webkit-text-fill-color: var(--text-inverse);
}

.tooltip-popover.visible {
  opacity: 1;
  pointer-events: auto;
}

.tooltip-popover::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bg-secondary);
}

.tooltip-popover.tooltip-below {
  bottom: auto;
  top: calc(100% + 10px);
}

.tooltip-popover.tooltip-below::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: var(--bg-secondary);
}

/* ===================================================================
   HELPER TEXT & INLINE GUIDANCE
   =================================================================== */

.input-helper-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.9s forwards;
}

.screen-helper-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 16px;
  font-weight: 500;
}

.screen-helper-text.strategy-helper {
  text-align: left;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.screen-helper-text.analyzing-helper {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===================================================================
   DOCUMENT TOOLBAR & COPY BUTTON
   =================================================================== */

.document-pane-wrapper {
  flex: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.document-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: var(--blur-glass);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 2px solid rgba(102, 126, 234, 0.1);
  border-bottom: 1px solid rgba(102, 126, 234, 0.08);
}

.document-toolbar .screen-helper-text {
  margin-bottom: 0;
  text-align: left;
  font-size: 0.8rem;
}

.btn-copy-blog {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  letter-spacing: 0.02em;
}

.btn-copy-blog:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.btn-copy-blog.copied {
  background: var(--accent-success);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.document-pane-wrapper .document-pane {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border-top: none;
}

/* ===================================================================
   LOGIN SCREEN & AUTH UI
   =================================================================== */

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-dark);
  overflow: hidden;
}

/* Animated gradient background for login */
.login-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 50%, rgba(245, 87, 108, 0.1) 0%, transparent 50%);
  animation: loginBgPulse 8s ease-in-out infinite alternate;
}

@keyframes loginBgPulse {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-2%, 2%) scale(1.05); }
}

.login-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 48px 56px;
  background: rgba(20, 27, 61, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 0 80px rgba(102, 126, 234, 0.08);
  max-width: 420px;
  width: 90%;
  animation: loginFadeIn 0.6s ease-out;
}

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

.login-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.3));
}

.login-title {
  font-family: var(--font-ui);
  font-size: 28px;
  font-weight: 800;
  background: var(--text-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  max-width: 300px;
}

.btn-google-signin {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: #3c4043;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.btn-google-signin:hover {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 40px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.btn-google-signin:active {
  transform: translateY(0);
}

.btn-google-signin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

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

.login-error {
  color: var(--accent-fail);
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  width: 100%;
}

.login-footer {
  font-size: 11px;
  color: rgba(156, 163, 175, 0.5);
  margin-top: 8px;
}

/* App Container (wraps sidebar + workspace) */
.app-container {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* --- User Badge in Sidebar --- */
.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 0 12px 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.user-badge:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-purple);
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-inverse);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-sign-out {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-sign-out:hover {
  color: var(--accent-fail);
  background: rgba(239, 68, 68, 0.15);
}

/* Loading spinner for login button */
.btn-google-signin.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-google-signin.loading .google-icon {
  animation: spin 1s linear infinite;
}

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

/* ===================================================================
   MOBILE HAMBURGER TOGGLE
   =================================================================== */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 56px;
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
}

.mobile-header .mobile-logo {
  height: 28px;
  filter: brightness(1.5);
}

.btn-hamburger {
  background: none;
  border: none;
  color: var(--text-inverse);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}

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

.btn-hamburger svg {
  width: 24px;
  height: 24px;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ===================================================================
   RESPONSIVE: TABLET (max-width: 1024px)
   =================================================================== */

@media (max-width: 1024px) {
  /* Sidebar narrower */
  .sidebar {
    width: 260px;
  }

  /* Screen padding reduced */
  .screen {
    padding: 32px;
  }

  /* Progress tracker smaller gaps */
  .progress-tracker {
    gap: 40px;
    height: 80px;
  }

  .step:not(:last-child)::after {
    width: 40px;
  }

  .step-num {
    width: 40px;
    height: 40px;
    font-size: 0.875rem;
  }

  .step:not(:last-child)::after {
    top: 20px;
    left: calc(100% + 8px);
    width: 32px;
  }

  /* Headline smaller */
  .headline {
    font-size: 3rem;
  }

  .subtext {
    font-size: 1.125rem;
    margin-bottom: 32px;
  }

  /* Strategy matrix */
  .strategy-card {
    padding: 32px;
  }

  .card-title {
    font-size: 1.75rem;
  }

  /* Asset viewer */
  .document-pane {
    padding: 40px;
  }

  .score-card {
    padding: 32px;
  }

  .score-val {
    font-size: 4rem;
  }

  /* Console smaller */
  .console-wrapper.expanded {
    height: 200px;
  }
}

/* ===================================================================
   RESPONSIVE: MOBILE (max-width: 768px)
   =================================================================== */

@media (max-width: 768px) {
  /* Show mobile header */
  .mobile-header {
    display: flex;
  }

  .sidebar-overlay {
    display: block;
    pointer-events: none;
  }

  .sidebar-overlay.visible {
    pointer-events: auto;
  }

  /* Body can now scroll */
  body {
    overflow: auto;
    flex-direction: column;
  }

  /* App container becomes vertical */
  .app-container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: auto;
    padding-top: 56px; /* Mobile header height */
  }

  /* Sidebar: off-screen drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

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

  /* Workspace fills full width, allow scroll */
  .workspace {
    flex: 1;
    min-height: calc(100vh - 56px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Progress tracker: compact */
  .progress-tracker {
    height: auto;
    padding: 12px 16px;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }

  .step {
    flex-direction: row;
    gap: 6px;
    min-width: auto;
    font-size: 0.65rem;
    flex-shrink: 0;
  }

  .step-num {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .step.active .step-num {
    transform: scale(1.05);
  }

  /* Hide step connectors on mobile */
  .step:not(:last-child)::after {
    display: none;
  }

  /* Screens: reduced padding, top-align for scrolling */
  .screen {
    padding: 24px 16px;
    justify-content: flex-start;
    padding-top: 32px;
    min-height: auto;
  }

  .screen.active {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* --- Screen 1: Input --- */
  .input-container {
    max-width: 100%;
  }

  .headline {
    font-size: 2rem;
    margin-bottom: 12px;
  }

  .subtext {
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.5;
  }

  .input-pill {
    flex-direction: column;
    border-radius: var(--radius-md);
    padding: 6px;
    gap: 6px;
  }

  .url-input {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    width: 100%;
  }

  .btn-map-dna {
    padding: 14px 24px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    width: 100%;
  }

  .feature-pills {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    justify-content: center;
  }

  .pill-badge {
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  /* --- Screen 2: Analyzing --- */
  .dna-loader {
    width: 80px;
    height: 80px;
    border-width: 6px;
    margin-bottom: 24px;
  }

  .analyzing-text {
    font-size: 0.8rem;
  }

  .progress-percent {
    font-size: 3.5rem;
  }

  /* --- Screen 3: Strategy Matrix --- */
  .matrix-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    height: auto;
    max-width: 100%;
  }

  .strategy-column {
    padding-right: 0;
    order: 1;
  }

  .data-column {
    order: 2;
    padding: 20px;
  }

  .strategy-card {
    padding: 24px;
    margin-bottom: 16px;
    border-radius: var(--radius-md);
  }

  .strategy-card:hover {
    transform: none;
    box-shadow: var(--shadow-lg);
  }

  .strategy-card:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }

  .card-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
  }

  .card-rationale {
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding-left: 12px;
  }

  .intent-badge {
    padding: 6px 14px;
    font-size: 0.65rem;
    margin-bottom: 16px;
  }

  .btn-deploy {
    padding: 14px;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
  }

  .data-header {
    font-size: 0.75rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .revenue-unit-item {
    padding: 14px;
    margin-bottom: 10px;
  }

  .ru-name {
    font-size: 0.9rem;
  }

  /* --- Screen 4: Asset Viewer --- */
  .asset-split {
    flex-direction: column;
    gap: 20px;
    height: auto;
    max-width: 100%;
  }

  .document-pane {
    padding: 24px 16px;
    font-size: 1rem;
    border-radius: var(--radius-md);
    min-height: 300px;
    max-height: none;
    flex: none;
  }

  .document-pane h1 {
    font-size: 1.75rem;
    margin-bottom: 20px;
  }

  .document-pane h2 {
    font-size: 1.35rem;
    margin-top: 32px;
    margin-bottom: 16px;
  }

  .hud-pane {
    flex: none;
  }

  .score-card {
    padding: 24px;
  }

  .score-val {
    font-size: 3.5rem;
  }

  .score-label {
    font-size: 0.75rem;
    margin-top: 8px;
  }

  .gate-metrics {
    padding: 20px;
  }

  .cta-block {
    padding: 14px;
    font-size: 0.9rem;
  }

  .btn-export {
    padding: 14px;
    font-size: 0.8rem;
  }

  /* --- Console: bottom sheet on mobile --- */
  .console-wrapper.expanded {
    height: 160px;
  }

  .console-output {
    padding: 10px 14px;
    font-size: 0.65rem;
    line-height: 1.6;
  }

  .console-line {
    gap: 6px;
  }

  .ts {
    min-width: 55px;
    font-size: 0.6rem;
  }

  /* Login screen adjustments */
  .login-container {
    padding: 32px 24px;
    width: 94%;
  }

  .login-title {
    font-size: 22px;
  }

  .login-subtitle {
    font-size: 13px;
  }

  .btn-google-signin {
    padding: 12px 24px;
    font-size: 14px;
    width: 100%;
    justify-content: center;
  }

  /* User badge compact on mobile sidebar */
  .user-badge {
    margin: 0 8px 8px;
    padding: 8px 12px;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
  }

  .user-name {
    font-size: 12px;
  }

  .user-email {
    font-size: 10px;
  }

  /* Tooltip narrower on mobile */
  .tooltip-popover {
    width: 200px;
    font-size: 0.75rem;
  }

  /* Document toolbar stacks on mobile */
  .document-toolbar {
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
  }

  .document-toolbar .screen-helper-text {
    text-align: center;
  }

  /* Document pane wrapper mobile */
  .document-pane-wrapper {
    flex: none;
  }
}

/* ===================================================================
   RESPONSIVE: SMALL MOBILE (max-width: 480px)
   =================================================================== */

@media (max-width: 480px) {
  .headline {
    font-size: 1.6rem;
  }

  .subtext {
    font-size: 0.85rem;
  }

  .progress-percent {
    font-size: 2.5rem;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .card-rationale {
    font-size: 0.85rem;
  }

  .strategy-card {
    padding: 18px;
  }

  .document-pane {
    padding: 18px 12px;
  }

  .document-pane h1 {
    font-size: 1.4rem;
  }

  .score-val {
    font-size: 2.5rem;
  }

  .score-card {
    padding: 20px;
  }

  .btn-map-dna {
    padding: 12px 16px;
    font-size: 0.8rem;
  }

  .url-input {
    padding: 12px 14px;
    font-size: 0.85rem;
  }

  /* Sidebar narrower on small phones */
  .sidebar {
    width: 280px;
  }

  .sidebar-header {
    padding: 20px 16px;
  }

  .logo-area {
    margin-bottom: 16px;
  }

  .logo-img {
    max-width: 100px;
  }

  .btn-new-manifest {
    padding: 12px 16px;
    font-size: 0.75rem;
  }

  .tooltip-popover {
    width: 180px;
    font-size: 0.7rem;
    padding: 10px 12px;
  }
}
