/* ========================================================
   TATVAVID.COM - ENTERPRISE AI INTELLIGENCE PLATFORM
   Light Bluish & Crisp White Modern Design System
   ======================================================== */

:root {
  /* Tattvavid Light Bluish & White Palette */
  --bg-app: #f4f8fc;                /* Soft, refreshing light ice-blue background */
  --bg-surface: #ffffff;            /* Crisp pure white */
  --bg-subtle: #eef5fc;             /* Soft light blue tint */
  --bg-card-hover: #f0f7ff;         /* Gentle card hover */
  
  --text-main: #0b192c;             /* Deep rich navy slate */
  --text-muted: #334e68;            /* Refined slate blue */
  --text-light: #627d98;            /* Muted slate for subtitles and metadata */

  --accent-primary: #0284c7;        /* Tattvavid Sky / Cyan Blue */
  --accent-hover: #0369a1;          /* Deep Ocean Sapphire */
  --accent-light: #e0f2fe;          /* Ice blue highlight pill */
  --accent-subtle: #f0f9ff;         /* Ultra-light blue tint */
  --accent-glow: rgba(2, 132, 199, 0.15);

  --border-light: #dbeafe;          /* Subtle light blue border */
  --border-subtle: #e2e8f0;         /* Soft slate separator */
  --border-focus: #38bdf8;          /* Bright sky blue focus ring */

  --color-green-bg: #ecfdf5;
  --color-green-text: #065f46;
  --color-green-border: #a7f3d0;

  --color-red-bg: #fef2f2;
  --color-red-text: #991b1b;
  --color-red-border: #fecaca;

  --color-blue-bg: #eff6ff;
  --color-blue-text: #1d4ed8;
  --color-blue-border: #bfdbfe;

  --color-amber-bg: #fffbeb;
  --color-amber-text: #92400e;
  --color-amber-border: #fde68a;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(11, 25, 44, 0.04);
  --shadow-md: 0 4px 16px -2px rgba(11, 25, 44, 0.06);
  --shadow-lg: 0 10px 25px -4px rgba(11, 25, 44, 0.08);
  --shadow-xl: 0 20px 35px -6px rgba(11, 25, 44, 0.12);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Icon Spacing Utilities */
i.fa-solid, i.fa-regular, i.fa-brands {
  vertical-align: -0.05em;
}

.text-blue { color: var(--accent-primary) !important; }
.text-green { color: #10b981 !important; }
.text-amber { color: #f59e0b !important; }
.text-muted { color: var(--text-light) !important; }

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 100%);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* ========================================================
   HEADER & NAVIGATION BAR (Spacious 1440px layout)
   ======================================================== */
.app-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  padding: 0.85rem 2rem;
  box-shadow: 0 2px 10px rgba(11, 25, 44, 0.03);
}

.header-content {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

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

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

.brand-title {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.15;
}

.brand-domain {
  color: var(--accent-primary);
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent-hover);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(2, 132, 199, 0.15);
}

/* Mode Switcher Tabs */
.nav-mode-tabs {
  display: flex;
  background: var(--bg-subtle);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  gap: 6px;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.nav-tab-btn.active {
  background: var(--bg-surface);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.nav-tab-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.5);
}

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

.btn-ghost {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  color: var(--text-muted);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Privacy & User Badges */
.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #065f46;
}

.privacy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulsePrivacy 2s infinite;
}

@keyframes pulsePrivacy {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.user-avatar-icon {
  font-size: 1.1rem;
  color: var(--accent-primary);
}

.btn-logout {
  background: transparent;
  border: none;
  color: #dc2626;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-logout:hover {
  background: #fef2f2;
}

/* ========================================================
   APPLICATION WRAPPER & BALANCED SPACING
   ======================================================== */
.app-wrapper {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.view {
  display: none;
  width: 100%;
}

.view.active {
  display: block;
}

/* ========================================================
   VIEW 1 & 2: HERO & INPUT SECTIONS
   ======================================================== */
.hero-section {
  max-width: 1240px;
  margin: 3.5rem auto 4.5rem auto;
  padding: 0 16px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  background: var(--accent-light);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.badge-compare {
  background: #fdf2f8 !important;
  color: #db2777 !important;
  border-color: #fbcfe8 !important;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.4rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 820px;
  margin: 0 auto 2.5rem auto;
}

/* Search Box */
.search-box {
  display: flex;
  gap: 12px;
  max-width: 780px;
  margin: 0 auto 1.5rem auto;
  background: #ffffff;
  padding: 10px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-glow), var(--shadow-xl);
}

.input-group {
  display: flex;
  align-items: center;
  flex: 1;
  padding-left: 14px;
}

.input-icon {
  font-size: 1.15rem;
  color: var(--accent-primary);
  margin-right: 12px;
  opacity: 0.85;
}

.domain-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 1.08rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border: none;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  font-family: inherit;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.btn-arrow-icon {
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.btn-primary:hover .btn-arrow-icon {
  transform: translateX(3px);
}

.error-banner {
  background: var(--color-red-bg);
  color: var(--color-red-text);
  border: 1px solid var(--color-red-border);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  margin: 1.25rem auto;
  max-width: 780px;
  font-size: 0.92rem;
  font-weight: 600;
}

.quick-examples {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 3.5rem;
}

.quick-label {
  font-size: 0.88rem;
  color: var(--text-light);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.example-pill {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.example-pill:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* Battlecard Multi-Input Styles */
.compare-search-container {
  max-width: 960px;
  margin: 0 auto 1.5rem auto;
  background: #ffffff;
  padding: 26px;
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-lg);
}

.compare-inputs-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.input-card {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: left;
  transition: all 0.15s ease;
}

.input-card:focus-within {
  border-color: var(--accent-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-card-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 8px;
}

.vs-badge {
  font-size: 0.82rem;
  font-weight: 900;
  color: #db2777;
  background: #fdf2f8;
  border: 1.5px solid #fbcfe8;
  padding: 6px 10px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.compare-submit-btn {
  width: 100%;
  justify-content: center;
  padding: 16px;
  font-size: 1.05rem;
}

/* ========================================================
   LOCAL REPOSITORY VAULT (Zero Server Storage Grid)
   ======================================================== */
.repository-section {
  text-align: left;
  margin-top: 3.5rem;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 16px;
}

.section-heading-text h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.subtext {
  font-size: 0.86rem;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.repo-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-tool {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.btn-tool:hover {
  background: var(--bg-subtle);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.repo-card {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.repo-card:hover {
  background: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.repo-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.repo-company {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-main);
}

.repo-domain {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 2px;
}

.btn-delete-card {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-delete-card:hover {
  color: #ef4444;
  background: #fef2f2;
}

.repo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-light);
  border-top: 1px solid rgba(219, 234, 254, 0.7);
  padding-top: 10px;
}

.badge-instant {
  background: #ecfdf5;
  color: #059669;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #a7f3d0;
  font-size: 0.74rem;
}

/* ========================================================
   VIEW 3: MISSION CONTROL / PROGRESS (EXPANDED TO 1360px)
   ======================================================== */
.progress-mission-control {
  max-width: 1360px;
  margin: 2rem auto 4.5rem auto;
  padding: 0 16px;
}

.mission-header {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 2.2rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.target-radar-wrapper {
  flex-shrink: 0;
}

.radar-circle {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: #0b192c;
  position: relative;
  overflow: hidden;
  border: 3px solid #1e3a5f;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.3);
}

.radar-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg at 50% 50%, rgba(2, 132, 199, 0.65) 0deg, transparent 65deg, transparent 360deg);
  animation: radar-spin 2.2s linear infinite;
  border-radius: 50%;
}

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

.radar-blip {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 10px #38bdf8;
  animation: blip-pulse 2s infinite ease-out;
}

.blip-1 { top: 28%; left: 62%; animation-delay: 0.3s; }
.blip-2 { top: 58%; left: 24%; animation-delay: 1.1s; }
.blip-3 { top: 72%; left: 68%; animation-delay: 1.7s; }

@keyframes blip-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.mission-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mission-target-name {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 10px;
}

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

.target-domain-badge, .target-status-badge, .timer-badge {
  font-size: 0.84rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.target-status-badge {
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
}

.progress-bar-container {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.8rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: var(--bg-subtle);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

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

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* 5 Stages Grid - Generous 5-column layout without cramped text */
.stages-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 1.5rem;
}

.stage-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.15rem;
  min-height: 145px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.stage-card.running {
  border-color: var(--accent-primary);
  background: #f0f9ff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.stage-card.complete {
  border-color: #86efac;
  background: #f0fdf4;
}

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

.stage-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-light);
  letter-spacing: 0.06em;
}

.stage-status-icon {
  font-size: 1rem;
}

.stage-title {
  font-weight: 800;
  font-size: 0.96rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.stage-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 4px;
}

.stage-detail {
  font-size: 0.74rem;
  color: var(--text-light);
  font-weight: 600;
}

/* Terminal Feed */
.terminal-container {
  width: 100%;
  background: #0b192c;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid #1e3a5f;
}

.terminal-header {
  background: #10243e;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #1e3a5f;
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-live {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: #38bdf8;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.terminal-body {
  padding: 18px 22px;
  max-height: 280px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #38bdf8;
  line-height: 1.7;
}

.log-entry {
  margin-bottom: 6px;
  word-break: break-word;
}
.log-sys { color: #94a3b8; }
.log-ok { color: #4ade80; }
.log-err { color: #f87171; }

/* ========================================================
   VIEW 4: REPORT VIEW (Spacious 1440px Grid)
   ======================================================== */
.report-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem 16px;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 36px;
}

.report-sidebar {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-header {
  margin-bottom: 1.25rem;
}

.sidebar-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar-company {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

.toc-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}

.toc-link {
  display: block;
  padding: 8px 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  font-weight: 500;
  margin-bottom: 2px;
}

.toc-link:hover, .toc-link.active {
  background: var(--accent-light);
  color: var(--accent-primary);
  font-weight: 700;
}

.sidebar-footer {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-light);
  padding-top: 1.25rem;
}

.btn-sidebar-action {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-sidebar-action:hover {
  background: #0369a1;
}

.btn-sidebar-ghost {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 9px 14px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-sidebar-ghost:hover {
  background: #ffffff;
  color: var(--text-main);
  border-color: var(--text-light);
}

.btn-sidebar-danger {
  background: transparent;
  border: 1px solid #fee2e2;
  color: #dc2626;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.btn-sidebar-danger:hover {
  background: #fef2f2;
}

.report-main {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
}

.report-header-block {
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}

.report-type-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 8px;
}

.report-main-title {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 12px;
}

.report-meta-row {
  display: flex;
  gap: 16px;
  font-size: 0.86rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  align-items: center;
}

.confidence-pill {
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
}
.conf-high { background: #dcfce7; color: #166534; }
.conf-med { background: #fef9c3; color: #854d0e; }

.report-section {
  margin-bottom: 3.5rem;
  scroll-margin-top: 100px;
}

.section-h2 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1.5px solid var(--border-light);
  padding-bottom: 8px;
  margin-bottom: 1.25rem;
}

.section-body {
  font-size: 1.02rem;
  line-height: 1.75;
  color: #1e293b;
}

.section-body p {
  margin-bottom: 1.25rem;
}

.citation-code {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-hover);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin: 0 2px;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.callout-box {
  background: var(--bg-subtle);
  border-left: 4px solid var(--accent-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.callout-head {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* SWOT Grid */
.swot-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 1.5rem 0;
}

.swot-column {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1.5px solid transparent;
}

.swot-s { background: #f0fdf4; border-color: #bbf7d0; }
.swot-w { background: #fef2f2; border-color: #fecaca; }
.swot-o { background: #eff6ff; border-color: #bfdbfe; }
.swot-t { background: #fffbeb; border-color: #fde68a; }

.swot-col-title {
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 12px;
}

.swot-card-item {
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.swot-point {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 3px;
}

.swot-evidence {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.swot-implication-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Tables */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.styled-table th {
  background: var(--bg-subtle);
  color: var(--text-main);
  text-align: left;
  padding: 12px 14px;
  font-weight: 700;
  border-bottom: 2px solid var(--border-light);
}

.styled-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.styled-table tr:hover td {
  background: #f8fafc;
}

/* ========================================================
   VIEW 5: BATTLECARD COMPARISON
   ======================================================== */
.battlecard-wrapper {
  max-width: 1360px;
  margin: 2rem auto 4.5rem auto;
  padding: 0 16px;
}

.battlecard-topbar {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.8rem 2.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.battlecard-h1 {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 6px;
}

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

.battlecard-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.voc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.voc-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.voc-card-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.voc-comp-title {
  font-size: 1.3rem;
  font-weight: 800;
}

.voc-comp-pos {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 2px;
}

.voc-scores-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.score-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}

.voc-box-green {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.voc-box-red {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.voc-box-title {
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.voc-list {
  padding-left: 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.voc-list li {
  margin-bottom: 4px;
}

.cheat-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.cheat-scenario {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.cheat-pitch {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.cheat-trap {
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: #92400e;
}

/* ========================================================
   AUTHENTICATION OVERLAY & MODAL
   ======================================================== */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 25, 44, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -12px rgba(11, 25, 44, 0.35);
  max-width: 440px;
  width: 100%;
  padding: 2.6rem;
  animation: fadeInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-brand-badge {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.auth-logo-img {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.auth-header h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 600;
}

.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-form .input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-form .field-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
  color: var(--accent-primary);
  opacity: 0.8;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.96rem;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
  background: var(--bg-subtle);
}

.auth-form input:focus {
  background: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.auth-submit-btn {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.auth-footer-note {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.45;
  text-align: center;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .stages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .stages-grid {
    grid-template-columns: 1fr;
  }
  .report-wrapper {
    grid-template-columns: 1fr;
  }
  .report-sidebar {
    position: static;
    max-height: none;
  }
  .swot-grid-container {
    grid-template-columns: 1fr;
  }
  .compare-inputs-row {
    grid-template-columns: 1fr;
  }
  .vs-badge {
    display: none;
  }
}
