/* ==============================================================================
   ATLANTIS PRIMENG THEME SYSTEM FOR SECURITY TRIAGE DASHBOARD
   Support: Dark Mode (Default) & Light Mode
   Raihanudin Rafif - Magister Teknik Informatika UNPAM 2026
   ============================================================================== */

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

:root {
  /* ================= DARK MODE TOKENS (DEFAULT) ================= */
  --bg-app: #111625;
  --bg-sidebar: #141824;
  --bg-topbar: #161c2b;
  --bg-surface: #171d2b;
  --bg-surface-alt: #1b2234;
  --bg-card: #181f2f;
  --bg-card-hover: #1e263a;
  
  --border-color: #232d42;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #00d1b2;
  
  /* Atlantis Accents */
  --primary: #00d1b2;            /* Atlantis Mint / Emerald */
  --primary-hover: #00b89c;
  --primary-glow: rgba(0, 209, 178, 0.25);
  
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-coral: #ef4444;
  --accent-amber: #f59e0b;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  
  /* Text Tokens */
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Component Surfaces */
  --track-bg: #131926;
  --input-bg: #141a27;
  --code-box-bg: #0f1420;
  --code-header-bg: #141926;
  --code-text: #93c5fd;
  --hero-card-bg: linear-gradient(135deg, #171d2c 0%, #1a2336 100%);
  --table-header-bg: #141a27;
  --sidebar-footer-bg: rgba(16, 22, 36, 0.85);
  
  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Dimensions */
  --sidebar-width: 260px;
  --topbar-height: 68px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
  
  /* Transitions & Shadows */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 25px rgba(0, 209, 178, 0.2);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==============================================================================
   LIGHT MODE PALETTE (ATLANTIS LIGHT)
   ============================================================================== */
body.light-mode {
  --bg-app: #f4f6fa;
  --bg-sidebar: #ffffff;
  --bg-topbar: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  
  --border-color: #e2e8f0;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-focus: #00b89c;
  
  --primary: #00b89c;
  --primary-hover: #009e85;
  --primary-glow: rgba(0, 184, 156, 0.2);
  
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --track-bg: #e2e8f0;
  --input-bg: #f8fafc;
  --code-box-bg: #111827;
  --code-header-bg: #0f172a;
  --code-text: #38bdf8;
  --hero-card-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --table-header-bg: #f1f5f9;
  --sidebar-footer-bg: #f8fafc;
  
  --shadow-card: 0 2px 14px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 20px rgba(0, 184, 156, 0.15);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ==============================================================================
   LAYOUT: SIDEBAR + MAIN CONTAINER
   ============================================================================== */
.layout-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* --- SIDEBAR (SOLID CLEAN, NO PATTERN) --- */
.layout-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  /* Solid clean background - pattern completely removed */
  background-image: none;
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
  overflow-y: auto;
}

/* Sidebar Menu */
.sidebar-menu {
  flex: 1;
  padding: 24px 14px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-category {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.category-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 12px 6px 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.menu-item:hover {
  color: var(--text-main);
  background: rgba(0, 209, 178, 0.06);
}

.menu-item.active {
  color: var(--primary);
  background: rgba(0, 209, 178, 0.1);
  font-weight: 600;
}

.menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--primary);
}

.menu-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  flex-shrink: 0;
}

.menu-icon img,
.logo-icon,
.brand-logo {
  width: 18px;
  height: 18px;
  max-width: 18px;
  max-height: 18px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  flex-shrink: 0;
}

.menu-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(0, 209, 178, 0.2);
  color: var(--primary);
}

/* Sidebar Profile Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background: var(--sidebar-footer-bg);
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #00d1b2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- MAIN CONTAINER --- */
.layout-main-container {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  background: var(--bg-app);
  transition: background-color 0.3s ease;
}

/* --- TOPBAR (FOCUSED ON THESIS TITLE & THEME TOGGLE) --- */
.layout-topbar {
  min-height: var(--topbar-height);
  background-color: var(--bg-topbar);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 28px;
  gap: 20px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.topbar-header-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-title-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.topbar-title-text span {
  color: var(--primary);
}

.topbar-subtext {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* Light / Dark Mode Toggle Button */
.theme-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.theme-switch-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.theme-switch-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* --- MAIN CONTENT CANVAS --- */
.layout-content {
  flex: 1;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Section Anchor Padding */
.section-anchor {
  scroll-margin-top: 85px;
}

/* Hero / Overview Summary Card */
.atlantis-hero-card {
  background: var(--hero-card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: rgba(0, 209, 178, 0.1);
  border: 1px solid rgba(0, 209, 178, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.hero-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 10px;
}

.hero-heading span {
  color: var(--primary);
}

.hero-meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

/* --- TOP KPI ROW (SPARKLINES) --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 209, 178, 0.3);
  background: var(--bg-card-hover);
}

.kpi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.kpi-badge.badge-red {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

.kpi-badge.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.kpi-badge.badge-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.kpi-badge.badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
}

.kpi-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.kpi-sparkline {
  width: 90px;
  height: 38px;
}

.kpi-sparkline svg {
  width: 100%;
  height: 100%;
}

.kpi-footer {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==============================================================================
   SECTION: LATAR BELAKANG & LITERATUR UTAMA
   ============================================================================== */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  position: relative;
  border-top: 3px solid var(--primary);
}

.problem-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 209, 178, 0.3);
  background: var(--bg-card-hover);
}

.problem-card.rose {
  border-top-color: var(--accent-rose);
}

.problem-card.amber {
  border-top-color: var(--accent-amber);
}

.problem-card.cyan {
  border-top-color: var(--accent-cyan);
}

.problem-card.emerald {
  border-top-color: var(--accent-emerald);
}

.problem-badge {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.problem-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
}

.problem-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.problem-stat {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--input-bg);
  align-self: flex-start;
  margin-top: auto;
}

/* Literature Review Showcase Card */
.lit-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.lit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lit-tab-btn {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.lit-tab-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.lit-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

.lit-content-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 22px;
}

.lit-header-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 209, 178, 0.15);
  color: var(--primary);
  margin-bottom: 10px;
}

.lit-paper-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.35;
}

.lit-authors {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.lit-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lit-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.lit-points li .bullet {
  color: var(--primary);
  font-weight: 700;
}

.lit-gap-box {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: var(--border-radius-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lit-gap-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-rose);
}

.lit-gap-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.lit-response-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--border-radius-sm);
  padding: 14px 18px;
  margin-top: auto;
}

.lit-response-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-emerald);
  margin-bottom: 4px;
}

.lit-response-desc {
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* ==============================================================================
   MASTER DUAL GRID: GRAPH + TIMELINE
   ============================================================================== */
.atlantis-dual-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.atlantis-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: background 0.3s ease, border-color 0.3s ease;
}

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

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.panel-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.atlantis-select {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.atlantis-select:focus {
  border-color: var(--primary);
  color: var(--text-main);
}

/* Graph Header Highlights */
.graph-highlights {
  display: flex;
  gap: 36px;
  margin-bottom: 16px;
}

.graph-stat-group {
  display: flex;
  flex-direction: column;
}

.graph-stat-num {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.graph-stat-num.mint {
  color: var(--primary);
}

.graph-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

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

.graph-desc a {
  color: var(--primary);
  text-decoration: none;
}

/* Chart Legend */
.chart-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.78rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.legend-swatch {
  width: 14px;
  height: 8px;
  border-radius: 2px;
}

.legend-swatch.plan {
  background: var(--accent-rose);
}

.legend-swatch.actual {
  background: var(--primary);
}

/* Ablation Bar Chart Display */
.ablation-chart-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 10px;
}

.chart-bar-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.bar-name {
  font-weight: 600;
  color: var(--text-main);
}

.bar-values {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary);
}

.bar-track {
  height: 20px;
  background: var(--track-bg);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #00d1b2, #05c46b);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.bar-fill.baseline {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

.bar-fill.highlight {
  background: linear-gradient(90deg, #00d1b2, #38bdf8);
  box-shadow: 0 0 14px rgba(0, 209, 178, 0.4);
}

.baseline-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-rose);
  z-index: 5;
}

/* Right Card: Activity / Transaction Timeline */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: -10px;
  width: 2px;
  background: var(--border-color);
}

.timeline-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
  flex-shrink: 0;
  z-index: 2;
}

.timeline-icon.icon-blue {
  background: #2563eb;
}

.timeline-icon.icon-red {
  background: #dc2626;
}

.timeline-icon.icon-green {
  background: #059669;
}

.timeline-icon.icon-magenta {
  background: #db2777;
}

.timeline-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.timeline-stat {
  font-size: 0.82rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.timeline-stat.pos {
  color: var(--accent-emerald);
}

.timeline-stat.neg {
  color: var(--accent-rose);
}

.timeline-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.timeline-desc {
  font-size: 0.77rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ==============================================================================
   SECTION 1: PIPELINE STEPPER
   ============================================================================== */
.section-title-wrap {
  margin-bottom: 20px;
}

.section-tag-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 6px;
}

.section-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.section-desc-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 900px;
  margin-top: 4px;
}

/* Stepper Bar */
.stepper-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.step-card-btn {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 14px 12px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step-card-btn:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 209, 178, 0.3);
}

.step-card-btn.active {
  background: rgba(0, 209, 178, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 209, 178, 0.15);
}

.step-badge-num {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.step-card-btn.active .step-badge-num {
  color: var(--primary);
}

.step-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.step-card-btn.active .step-card-title {
  color: var(--text-main);
}

.pipeline-view-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: background 0.3s ease;
}

.pipeline-stage-info {
  display: flex;
  flex-direction: column;
}

.stage-badge-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(0, 209, 178, 0.15);
  color: var(--primary);
  margin-bottom: 12px;
}

.stage-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.stage-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.stage-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.stage-points li .bullet {
  color: var(--primary);
  font-weight: 700;
}

/* Code Preview Container */
.code-box {
  background: var(--code-box-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.code-box-header {
  background: var(--code-header-bg);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.code-box-header span:last-child {
  color: var(--primary);
}

.code-box-body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--code-text);
  overflow-x: auto;
  white-space: pre;
}

/* ==============================================================================
   SECTION 2: DATATABLE NOVELTY MATRIX
   ============================================================================== */
.atlantis-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table-scroll-hint {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--primary);
  background: rgba(0, 209, 178, 0.08);
  border-bottom: 1px solid var(--border-color);
}

.table-scroll-hint svg {
  flex-shrink: 0;
  animation: pulseHint 2s infinite ease-in-out;
}

@keyframes pulseHint {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.p-datatable {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.p-datatable thead th {
  background: var(--table-header-bg);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.p-datatable thead th.col-highlight {
  background: rgba(0, 209, 178, 0.15);
  color: var(--primary);
  border-left: 1px solid rgba(0, 209, 178, 0.3);
  border-right: 1px solid rgba(0, 209, 178, 0.3);
}

.p-datatable tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.p-datatable tbody tr:hover {
  background: rgba(0, 209, 178, 0.03);
}

.p-datatable tbody td.col-highlight {
  background: rgba(0, 209, 178, 0.05);
  border-left: 1px solid rgba(0, 209, 178, 0.2);
  border-right: 1px solid rgba(0, 209, 178, 0.2);
}

.badge-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-emerald);
  font-weight: 800;
  font-size: 0.8rem;
}

.badge-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-muted);
  font-weight: 600;
}

/* ==============================================================================
   SECTION 3: McNEMAR STATISTICAL VALIDATOR
   ============================================================================== */
.mcnemar-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}

.matrix-2x2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.matrix-input-cell {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  text-align: center;
  transition: var(--transition);
}

.matrix-input-cell.discordant-pos {
  border-color: rgba(0, 209, 178, 0.4);
  background: rgba(0, 209, 178, 0.08);
}

.matrix-input-cell.discordant-neg {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.08);
}

.matrix-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.matrix-num-input {
  width: 100%;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-main);
  font-family: var(--font-mono);
  outline: none;
}

.matrix-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-metric-card {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

.stat-metric-val {
  font-size: 2.1rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  margin: 4px 0;
}

/* ==============================================================================
   SECTION 4: ENTERPRISE CASE STUDIES (TABVIEW)
   ============================================================================== */
.tabview-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.tabview-btn {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.tabview-btn:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.tabview-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
}

/* ==============================================================================
   SECTION 5: SSVC LIVE SIMULATOR
   ============================================================================== */
.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sim-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.sim-form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.sim-form-select {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: var(--border-radius-sm);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.sim-form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 209, 178, 0.2);
}

.triage-result-pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  margin: 10px 0;
}

.triage-result-pill.not-exploitable {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.triage-result-pill.potentially-exploitable {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.triage-result-pill.exploitable {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.4);
}

/* ==============================================================================
   SECTION 6: CONCLUSIONS & SUGGESTIONS
   ============================================================================== */
.conclusions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.conclusion-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 22px;
  border-top: 3px solid var(--primary);
  box-shadow: var(--shadow-card);
  transition: background 0.3s ease;
}

.conclusion-card.coral {
  border-top-color: var(--accent-rose);
}

.conclusion-card.cyan {
  border-top-color: var(--accent-cyan);
}

.conclusion-card.mint {
  border-top-color: var(--primary);
}

.conclusion-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.conclusion-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==============================================================================
   LAYOUT FOOTER
   ============================================================================== */
.layout-footer {
  background: var(--bg-topbar);
  border-top: 1px solid var(--border-color);
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  gap: 12px;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

/* Mobile Overlay for Sidebar */
.layout-mask {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 950;
  backdrop-filter: blur(4px);
}

/* Mobile Menu Controls & Mobile Drawer Header */
.mobile-menu-btn {
  display: none !important;
}

.sidebar-mobile-header {
  display: none !important;
}

/* ==============================================================================
   COMPREHENSIVE RESPONSIVE DESIGN BREAKPOINTS
   ============================================================================== */

/* --- LARGE DESKTOP & LAPTOPS (<= 1200px) --- */
@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lit-content-grid {
    grid-template-columns: 1fr;
  }
  .atlantis-dual-grid {
    grid-template-columns: 1fr;
  }
  .stepper-nav {
    grid-template-columns: repeat(3, 1fr);
  }
  .pipeline-view-grid, .mcnemar-split, .simulator-layout {
    grid-template-columns: 1fr;
  }
  .conclusions-grid {
    grid-template-columns: 1fr;
  }
}

/* --- TABLETS & MEDIUM SCREENS (<= 991px) --- */
@media (max-width: 991px) {
  .mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-main);
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
  }

  .mobile-menu-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
  }

  .sidebar-mobile-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 14px 18px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
  }

  .mobile-nav-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .mobile-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition);
  }

  .mobile-close-btn:hover {
    color: var(--accent-rose);
    background: rgba(244, 63, 94, 0.1);
  }

  .layout-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 85vw;
    z-index: 1000;
    transform: translateX(-100%);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .layout-sidebar.active {
    transform: translateX(0);
  }

  .layout-main-container {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
  }

  .layout-mask.active {
    display: block;
  }

  .layout-topbar {
    padding: 12px 18px;
    gap: 14px;
  }

  .stepper-nav {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 10px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .step-card-btn {
    min-width: 185px;
    flex-shrink: 0;
  }
}

/* --- SMALL TABLETS & LARGE SMARTPHONES (<= 768px) --- */
@media (max-width: 768px) {
  .layout-topbar {
    padding: 10px 14px;
    gap: 12px;
    min-height: 58px;
  }

  .topbar-title-text {
    font-size: 0.86rem;
    line-height: 1.28;
  }

  .topbar-subtext {
    display: none;
  }

  .layout-content {
    padding: 16px 14px;
    gap: 18px;
  }

  .atlantis-hero-card {
    padding: 16px 18px;
  }

  .hero-heading {
    font-size: 1.18rem;
  }

  .lit-tabs {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .lit-tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .lit-content-grid {
    padding: 16px;
  }

  .graph-highlights {
    flex-direction: column;
    gap: 12px;
  }

  .graph-stat-num {
    font-size: 1.55rem;
  }

  .tabview-nav {
    flex-direction: column;
    gap: 8px;
  }

  .tabview-btn {
    width: 100%;
    text-align: center;
    padding: 10px 14px;
    font-size: 0.82rem;
  }

  .matrix-2x2-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .matrix-input-cell {
    padding: 12px 10px;
  }

  .matrix-num-input {
    font-size: 1.4rem;
  }

  .stat-metric-val {
    font-size: 1.6rem;
  }

  .layout-footer {
    padding: 16px;
    text-align: center;
    justify-content: center;
    font-size: 0.76rem;
  }
}

/* --- SMARTPHONES (<= 480px) --- */
@media (max-width: 480px) {
  .layout-topbar {
    padding: 8px 10px;
    gap: 8px;
  }

  .mobile-menu-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
  }

  .topbar-title-text {
    font-size: 0.78rem;
    line-height: 1.22;
  }

  #themeToggleLabel {
    display: none;
  }

  .theme-switch-btn {
    padding: 0;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    min-width: 34px;
    justify-content: center;
  }

  .layout-content {
    padding: 12px 10px;
    gap: 16px;
  }

  .kpi-grid, .problem-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .kpi-card {
    padding: 14px;
  }

  .kpi-value {
    font-size: 1.55rem;
  }

  .problem-card {
    padding: 16px;
  }

  .hero-meta-badges {
    flex-direction: column;
    gap: 6px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .atlantis-select {
    width: 100%;
  }

  .chart-legend {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .matrix-2x2-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .matrix-num-input {
    font-size: 1.35rem;
  }

  .sim-form-select {
    font-size: 0.78rem;
    padding: 8px 10px;
  }

  .step-card-btn {
    min-width: 170px;
  }

  .timeline-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .timeline-content {
    padding-left: 10px;
  }
}

/* --- EXTRA SMALL SMARTPHONES (<= 360px) --- */
@media (max-width: 360px) {
  .topbar-title-text {
    font-size: 0.72rem;
  }

  .step-card-btn {
    min-width: 155px;
  }

  .stat-metric-val {
    font-size: 1.35rem;
  }

  .kpi-value {
    font-size: 1.4rem;
  }
}
