/* ==========================================================================
   NQ57 DASHBOARD V2.1 — EXECUTIVE TASK DETAIL STUDIO
   Design System: Government Executive Dashboard (1440px Standard)
   ========================================================================== */

:root {
  /* Palette: Executive Slate & Deep Navy */
  --bg-app: #f4f6f9;
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  --border-color: #cbd5e1;
  --border-light: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Semantics (Government Standard) */
  --critical: #b91c1c;
  --critical-bg: #fef2f2;
  --critical-border: #fecaca;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --success: #047857;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --pending: #475569;
  --pending-bg: #f1f5f9;
  --pending-border: #cbd5e1;

  /* Methodology Explorer tokens (V2.1) — màu không thay text */
  --axis1: #0284c7;          /* Trục 1 — tiến độ & sản phẩm */
  --axis1-bg: #e0f2fe;
  --axis1-border: #7dd3fc;
  --axis2: #047857;          /* Trục 2 — kết quả, hiệu quả, tác động */
  --axis2-bg: #d1fae5;
  --axis2-border: #6ee7b7;
  --od: #b45309;             /* ⚑ Open Decision — warning */
  --od-bg: #fffbeb;
  --od-border: #f59e0b;
  --conflict: #9f1239;       /* Xung đột nguồn — warning mạnh */
  --conflict-bg: #fff1f2;
  --conflict-border: #fda4af;
  --demo: #475569;           /* DEMO_DATA — neutral */
  --demo-bg: #f1f5f9;
  --proposal: #6d28d9;       /* DESIGN_PROPOSAL */
  --proposal-bg: #f5f3ff;
  --proposal-border: #c4b5fd;
  --source: #0f766e;         /* NGUỒN 12/09/2026 (SOURCE_SNAPSHOT) */
  --source-bg: #f0fdfa;
  --source-border: #5eead4;
  --legacy: #7c2d12;         /* LEGACY_REFERENCE */
  --legacy-bg: #fff7ed;
  --legacy-border: #fdba74;

  /* Geometry & Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-drawer: -4px 0 24px rgba(15, 23, 42, 0.15);

  --max-width: 1440px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.45;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* -------------------------------------------------------------
   App Bar & Selector Top Banner
   ------------------------------------------------------------- */
.app-topbar {
  background: #0f2744; /* Deep Government Navy */
  color: #ffffff;
  padding: 10px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #b91c1c; /* Crimson Accent */
}

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

.topbar-badge {
  background: #b91c1c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.topbar-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.topbar-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-left: 8px;
}

.task-selector-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

.selector-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.task-nav-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  flex: 1;
}

.task-tab-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
}

.task-tab-btn:hover {
  background: #e2e8f0;
  color: var(--text-primary);
}

.task-tab-btn.active {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #1e3a8a;
  box-shadow: var(--shadow-sm);
}

.task-tab-btn .tab-mechanism {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.08);
}

.task-tab-btn.active .tab-mechanism {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* -------------------------------------------------------------
   Main Container Layout
   ------------------------------------------------------------- */
.app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px 60px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* -------------------------------------------------------------
   Component 1: TaskHeader
   ------------------------------------------------------------- */
.task-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.header-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-code {
  background: #e2e8f0;
  color: #1e293b;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.chip-type {
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.chip-mechanism {
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid #bfdbfe;
}

.tag-demo {
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 2px;
  border: 1px solid #fde68a;
  letter-spacing: 0.5px;
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-status {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-status.critical {
  background: var(--critical-bg);
  color: var(--critical);
  border: 1px solid var(--critical-border);
}

.badge-status.warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

.badge-status.success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge-movement {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.task-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 12px;
}

.header-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px 20px;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
  padding-top: 10px;
}

.meta-item {
  display: flex;
  gap: 6px;
}

.meta-label {
  color: var(--text-muted);
  font-weight: 500;
}

.meta-val {
  color: var(--text-primary);
  font-weight: 600;
}

.header-progress-highlight {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid #e2e8f0;
}

.progress-text-pill {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  background: #dbeafe;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

.current-stage-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* -------------------------------------------------------------
   Component 2: LeadershipSnapshot (5 fixed rows)
   ------------------------------------------------------------- */
.snapshot-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid #1e3a8a;
}

.snapshot-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.snapshot-header-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.snapshot-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  line-height: 1.4;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.snapshot-row:hover {
  background-color: #f1f5f9;
}

.snapshot-tag {
  width: 120px;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 3px;
  text-align: center;
  letter-spacing: 0.4px;
}

.snapshot-text {
  color: var(--text-primary);
  flex: 1;
}

/* -------------------------------------------------------------
   Level 1 Grid: Attention Issues (Left) | Decision Card (Right)
   ------------------------------------------------------------- */
.level-1-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

/* Component 3: AttentionIssueCard */
.attention-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.issue-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.issue-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--bg-subtle);
  transition: border-color 0.15s ease;
}

.issue-item.critical {
  border-left: 4px solid var(--critical);
  background: #fffafa;
}

.issue-item.warning {
  border-left: 4px solid var(--warning);
  background: #fffdfa;
}

.issue-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.issue-type-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 2px;
}

.issue-type-badge.critical {
  background: var(--critical);
  color: #fff;
}

.issue-type-badge.warning {
  background: var(--warning);
  color: #fff;
}

.issue-type-badge.data_exception {
  background: #6366f1;
  color: #fff;
}

.issue-type-badge.dependency {
  background: #64748b;
  color: #fff;
}

.issue-escalation {
  font-size: 11px;
  font-weight: 700;
  color: var(--critical);
}

.issue-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.issue-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Component 4: LeadershipDecisionCard */
.decision-card {
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--critical);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.decision-head-badge {
  background: var(--critical-bg);
  color: var(--critical);
  border: 1px solid var(--critical-border);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  align-self: flex-start;
}

.decision-question-box {
  background: #fff5f5;
  border: 1px dashed #f87171;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.decision-question-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--critical);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.decision-question-text {
  font-size: 14px;
  font-weight: 700;
  color: #7f1d1d;
  line-height: 1.4;
}

.decision-options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.decision-option-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
}

.decision-option-item strong {
  color: #1e3a8a;
  margin-right: 4px;
}

.decision-meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
}

.decision-footer-disclaimer {
  font-size: 11px;
  font-style: italic;
  color: var(--text-muted);
}

/* -------------------------------------------------------------
   Level 2: Trục 1 — Quản trị tiến độ & Sản phẩm
   ------------------------------------------------------------- */
.axis-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
}

.axis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 2px solid #0284c7;
  padding-bottom: 8px;
}

.axis-header.axis2 {
  border-bottom-color: #059669;
}

.axis-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

/* Component 5: StageTimeline */
.stage-timeline-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

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

.stage-step-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg-subtle);
  position: relative;
}

.stage-step-card.active {
  border: 2px solid #0284c7;
  background: #f0f9ff;
}

.stage-step-card.critical {
  border: 2px solid var(--critical);
  background: #fffafa;
}

.stage-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.stage-code-chip {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.stage-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  min-height: 36px;
}

.stage-dates {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.stage-variance {
  font-size: 12px;
  font-weight: 600;
}

.stage-variance.success { color: var(--success); }
.stage-variance.critical { color: var(--critical); }

.stage-product-pill {
  margin-top: 8px;
  font-size: 11px;
  padding: 3px 6px;
  background: #e2e8f0;
  border-radius: 3px;
  color: #1e293b;
  font-weight: 500;
}

/* Component 6: PeriodTimeline Table */
.period-table, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 14px;
}

.period-table th, .data-table th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
}

.period-table td, .data-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.period-table tr:hover, .data-table tr:hover {
  background: #f8fafc;
}

/* Component 7: ProductMilestoneList */
.milestone-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 14px 0 8px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.milestone-notice-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  font-style: italic;
}

.operational-indicators-row {
  display: flex;
  gap: 20px;
  font-size: 12px;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-light);
  color: var(--text-secondary);
  margin-top: 10px;
}

/* -------------------------------------------------------------
   Level 2: Trục 2 — Quản trị kết quả & KPI Cards
   ------------------------------------------------------------- */
.axis2-summary-box {
  display: flex;
  justify-content: space-between;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  gap: 16px;
  flex-wrap: wrap;
}

.summary-official {
  font-weight: 700;
  color: #166534;
}

.summary-provisional {
  color: #854d0e;
  font-weight: 600;
}

/* Component 8: KPIResultCard (3 Tier Architecture) */
.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .kpi-cards-grid {
    grid-template-columns: 1fr;
  }
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: box-shadow 0.15s ease;
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
}

.kpi-card.critical { border-top: 3px solid var(--critical); }
.kpi-card.warning { border-top: 3px solid var(--warning); }
.kpi-card.success { border-top: 3px solid var(--success); }
.kpi-card.info { border-top: 3px solid var(--info); }

/* Tầng 1: Kết quả */
.kpi-tier-1 {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
  margin-bottom: 8px;
}

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

.kpi-code {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: monospace;
}

.kpi-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 8px;
  min-height: 36px;
}

.kpi-metric-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.kpi-actual-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.kpi-target-val {
  font-size: 12px;
  color: var(--text-muted);
}

.kpi-ui-state-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.kpi-ui-state-pill.critical { background: var(--critical-bg); color: var(--critical); border: 1px solid var(--critical-border); }
.kpi-ui-state-pill.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.kpi-ui-state-pill.success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.kpi-ui-state-pill.info { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-border); }

/* Xung đột nguồn Box */
.kpi-conflict-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 6px 0;
  font-size: 12px;
}

.conflict-source-line {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: #991b1b;
}

/* E4 Box */
.kpi-e4-box {
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  margin: 6px 0;
  font-size: 11px;
  color: #92400e;
}

/* Tầng 2: Diễn biến 3 kỳ */
.kpi-tier-2 {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 8px;
  font-size: 12px;
}

.kpi-trend-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}

.kpi-history-chips {
  font-family: monospace;
  font-weight: 600;
  color: #1e3a8a;
}

/* Tầng 3: Độ tin cậy (Evidence) */
.kpi-tier-3 {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.evidence-btn-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: #1e40af;
  transition: all 0.15s ease;
}

.evidence-btn-tag:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.kpi-sublabels {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: var(--text-muted);
}

/* Component 9: Strategic Contribution */
.strategic-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
}

.strategic-notice {
  font-size: 12px;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* Component 10: Context Indicator (Collapse) */
.context-section {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.context-header-btn {
  width: 100%;
  background: #f8fafc;
  border: none;
  padding: 10px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.context-header-btn:hover {
  background: #f1f5f9;
}

.context-content {
  padding: 14px 18px;
  border-top: 1px solid var(--border-light);
  display: none;
}

.context-content.open {
  display: block;
}

/* -------------------------------------------------------------
   Level 3: Component 12 — EvidenceDrawer
   ------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  z-index: 99;
  display: none;
}

.drawer-backdrop.open {
  display: block;
}

.evidence-drawer {
  position: fixed;
  top: 0;
  right: -600px;
  width: 580px;
  max-width: 90vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: var(--shadow-drawer);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: right 0.25s ease-out;
}

.evidence-drawer.open {
  right: 0;
}

.drawer-header {
  background: #0f2744;
  color: #ffffff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-size: 14px;
  font-weight: 700;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
}

.drawer-tabs-bar {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-color);
}

.drawer-tab-btn {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  text-align: center;
}

.drawer-tab-btn.active {
  color: #1e3a8a;
  border-bottom-color: #1e3a8a;
  background: #ffffff;
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.drawer-tab-content {
  display: none;
}

.drawer-tab-content.active {
  display: block;
}

.drawer-prop-row {
  margin-bottom: 12px;
  font-size: 13px;
}

.drawer-prop-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.drawer-prop-val {
  color: var(--text-primary);
  font-weight: 500;
}

.drawer-prop-val.code {
  font-family: monospace;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
}

.drawer-alert-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #92400e;
  margin-top: 14px;
}

.drawer-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
}

.btn-ghost {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-ghost:hover {
  background: #f1f5f9;
}
