/* Multiple Load Plan BRD Visualization — Styles */
/* Microsoft Fluent-inspired design system */

:root {
  --primary: #0078d4;
  --primary-dark: #106ebe;
  --primary-light: #deecf9;
  --accent: #0063b1;
  --success: #107c10;
  --success-light: #dff6dd;
  --warning: #ffb900;
  --warning-light: #fff4ce;
  --danger: #d13438;
  --danger-light: #fde7e9;
  --info: #0078d4;
  --purple: #8764b8;
  --purple-light: #f0ecf5;
  --teal: #008272;
  --orange: #ca5010;

  --bg: #f5f5f5;
  --bg-card: #ffffff;
  --bg-sidebar: #1b1b1f;
  --bg-sidebar-hover: #2d2d32;
  --text: #323130;
  --text-secondary: #605e5c;
  --text-light: #a19f9d;
  --text-inverse: #ffffff;
  --border: #e1dfdd;
  --border-light: #edebe9;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-width: 260px;
  --header-height: 64px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #1a1a1e;
  --bg-card: #2b2b30;
  --text: #e5e5e5;
  --text-secondary: #b3b3b3;
  --text-light: #8a8a8a;
  --border: #3a3a3f;
  --border-light: #333338;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --primary-light: #1a3a5c;
  --success-light: #1a3a1a;
  --warning-light: #3a3010;
  --danger-light: #3a1a1c;
  --purple-light: #2a2040;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--text-inverse);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 24px; }
.logo-text { font-size: 18px; font-weight: 700; letter-spacing: 0.5px; }

.version-badge {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.nav-links {
  list-style: none;
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 13px;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background: var(--bg-sidebar-hover);
  color: white;
}

.nav-link.active {
  background: var(--bg-sidebar-hover);
  color: white;
  border-left-color: var(--primary);
}

.nav-icon { font-size: 16px; width: 22px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  cursor: pointer;
  font-size: 20px;
  padding: 4px;
  border-radius: 4px;
  transition: background var(--transition);
}
.theme-toggle:hover { background: var(--bg-sidebar-hover); }

.author-info { color: rgba(255,255,255,0.5); }
.author-info small { font-size: 11px; line-height: 1.6; }

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* Header */
.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

.page-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.header-right { display: flex; gap: 8px; align-items: center; }

.status-badge {
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.draft {
  background: var(--warning-light);
  color: #8a6914;
  border: 1px solid var(--warning);
}

.status-badge.version {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid var(--primary);
}

/* Sections */
.section {
  display: none;
  padding: 32px;
  max-width: 1400px;
  animation: fadeIn 0.3s ease;
}

.section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--primary);
}

.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.section-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.stat-card .stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card:nth-child(2) { border-left-color: var(--success); }
.stat-card:nth-child(2) .stat-value { color: var(--success); }
.stat-card:nth-child(3) { border-left-color: var(--orange); }
.stat-card:nth-child(3) .stat-value { color: var(--orange); }
.stat-card:nth-child(4) { border-left-color: var(--danger); }
.stat-card:nth-child(4) .stat-value { color: var(--danger); }
.stat-card:nth-child(5) { border-left-color: var(--purple); }
.stat-card:nth-child(5) .stat-value { color: var(--purple); }
.stat-card:nth-child(6) { border-left-color: var(--teal); }
.stat-card:nth-child(6) .stat-value { color: var(--teal); }

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.dash-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.dash-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

/* Progress Ring */
.progress-ring-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.progress-ring { width: 100px; height: 100px; }

.progress-ring circle {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
}

.progress-ring .bg { stroke: var(--border-light); }
.progress-ring .fill { stroke: var(--success); transition: stroke-dashoffset 1s ease; }

.progress-ring-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Objectives Grid */
.objectives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.objective-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
  transition: transform var(--transition);
}

.objective-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.objective-card .obj-icon { font-size: 32px; margin-bottom: 12px; }
.objective-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.objective-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.overview-intro {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  border-left: 4px solid var(--primary);
}

.overview-intro p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

/* Problem Cards */
.problem-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.problem-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--danger);
  cursor: pointer;
  transition: all var(--transition);
}

.problem-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.problem-card .pc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.problem-card .pc-icon { font-size: 28px; }
.problem-card h3 { font-size: 15px; font-weight: 600; }
.problem-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* Callouts */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius);
  margin: 20px 0;
}

.callout-critical {
  background: var(--danger-light);
  border-left: 4px solid var(--danger);
}

.callout-warning {
  background: var(--warning-light);
  border-left: 4px solid var(--warning);
}

.callout-icon { font-size: 24px; flex-shrink: 0; }
.callout p, .callout div { font-size: 14px; line-height: 1.6; }

/* Trigger List */
.trigger-scenarios { margin-top: 28px; }
.trigger-scenarios h3 { font-size: 18px; margin-bottom: 16px; }

.trigger-list {
  display: grid;
  gap: 10px;
}

.trigger-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  transition: transform var(--transition);
}

.trigger-item:hover { transform: translateX(4px); }

.trigger-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Outcomes Grid */
.outcomes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.outcome-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.outcome-card .oc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
}

.outcome-card .oc-icon { font-size: 24px; }
.outcome-card h3 { font-size: 15px; font-weight: 600; }

.outcome-card ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.outcome-card li {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.outcome-card li::before {
  content: "•";
  position: absolute;
  left: 6px;
  color: var(--danger);
  font-weight: 700;
}

/* Process Flow */
.flow-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.flow-btn {
  padding: 10px 24px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text);
}

.flow-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.flow-btn:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.process-flow-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flow-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  position: relative;
}

.flow-step-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 48px;
}

.flow-step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  z-index: 2;
  flex-shrink: 0;
}

.flow-step.broken .flow-step-num { background: var(--danger); }

.flow-step-line {
  width: 3px;
  flex: 1;
  min-height: 20px;
  background: var(--primary);
  opacity: 0.3;
}

.flow-step.broken .flow-step-line { background: var(--danger); }

.flow-step-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  flex: 1;
  margin-bottom: 12px;
  transition: transform var(--transition);
}

.flow-step-content:hover { transform: translateX(4px); }

.flow-step-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flow-step-content p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* Comparison Table */
.comparison-table-container { overflow-x: auto; }

.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.comparison-table th {
  background: var(--bg-sidebar);
  color: white;
  padding: 14px 20px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comparison-table td {
  padding: 14px 20px;
  font-size: 13px;
  line-height: 1.5;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

.comparison-table tr:hover td { background: var(--primary-light); }

.comparison-table .dim-col { font-weight: 600; width: 180px; color: var(--primary); }
.comparison-table .current-col { color: var(--danger); }
.comparison-table .future-col { color: var(--success); }

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}

.search-input {
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  min-width: 300px;
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--transition);
}

.search-input:focus { outline: none; border-color: var(--primary); }

.filter-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.filter-tag {
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.filter-tag.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.filter-tag:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* Requirements Grid */
.requirements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
}

.br-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
  transition: all var(--transition);
  cursor: pointer;
}

.br-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.br-card.highlight {
  border-left-color: var(--warning);
  box-shadow: 0 0 0 2px var(--warning), var(--shadow-lg);
}

.br-card .br-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.br-card .br-id {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
}

.br-card .br-priority {
  font-size: 11px;
  font-weight: 700;
  color: var(--danger);
  background: var(--danger-light);
  padding: 2px 8px;
  border-radius: 4px;
}

.br-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.br-card p { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

.br-card .br-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.br-card .br-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--border-light);
  color: var(--text-secondary);
}

/* Scenarios Grid */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 20px;
}

.scenario-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.scenario-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.scenario-card.highlight {
  border-color: var(--warning);
  box-shadow: 0 0 0 2px var(--warning), var(--shadow-lg);
}

.scenario-card .sc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.scenario-card .sc-icon { font-size: 28px; }

.scenario-card .sc-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
}

.scenario-card .sc-region {
  font-size: 11px;
  color: var(--text-light);
  margin-left: auto;
  background: var(--border-light);
  padding: 2px 8px;
  border-radius: 4px;
}

.scenario-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.scenario-card .sc-hardware { font-size: 11px; color: var(--teal); margin-bottom: 8px; font-weight: 600; }
.scenario-card .sc-summary { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

.scenario-card .sc-disposition {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text);
  line-height: 1.6;
  display: none;
}

.scenario-card.expanded .sc-disposition { display: block; }

.scenario-card .sc-brs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.scenario-card .sc-br-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

/* Acceptance Criteria */
.ac-list { display: grid; gap: 10px; }

.ac-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--transition);
}

.ac-item:hover { transform: translateX(3px); }

.ac-item.highlight {
  border: 2px solid var(--warning);
  box-shadow: 0 0 0 2px var(--warning), var(--shadow);
}

.ac-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  background: var(--success-light);
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ac-text { font-size: 13px; line-height: 1.6; flex: 1; }

.ac-brs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  flex-shrink: 0;
}

.ac-br-link {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}

.ac-br-link:hover { background: var(--primary); color: white; }

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform var(--transition);
}

.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.kpi-card .kpi-icon { font-size: 36px; margin-bottom: 12px; }

.kpi-card .kpi-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.kpi-card .kpi-target {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.kpi-card .kpi-method {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Risk Matrix */
.risk-matrix-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.risk-heatmap {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.heatmap-grid {
  display: grid;
  grid-template-columns: auto repeat(3, 1fr);
  grid-template-rows: auto repeat(3, 1fr);
  gap: 4px;
}

.heatmap-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 8px;
}

.heatmap-label.y-label {
  writing-mode: vertical-lr;
  transform: rotate(180deg);
}

.heatmap-cell {
  border-radius: 6px;
  padding: 8px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: transform var(--transition);
}

.heatmap-cell:hover { transform: scale(1.05); }

.heatmap-cell.low-low { background: #dff6dd; }
.heatmap-cell.low-med { background: #fff4ce; }
.heatmap-cell.low-high { background: #fed9cc; }
.heatmap-cell.med-low { background: #fff4ce; }
.heatmap-cell.med-med { background: #ffe7a0; }
.heatmap-cell.med-high { background: #fde7e9; }
.heatmap-cell.high-low { background: #fed9cc; }
.heatmap-cell.high-med { background: #fde7e9; }
.heatmap-cell.high-high { background: #f1c1c3; }

.heatmap-risk-id {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,0.1);
}

.risk-details {
  display: grid;
  gap: 12px;
  max-height: 600px;
  overflow-y: auto;
}

.risk-detail-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--danger);
  transition: all var(--transition);
}

.risk-detail-card:hover { transform: translateX(3px); }

.risk-detail-card .rd-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.risk-detail-card .rd-id {
  font-size: 11px;
  font-weight: 700;
  color: var(--danger);
}

.risk-detail-card .rd-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.rd-badge.high { background: var(--danger-light); color: var(--danger); }
.rd-badge.medium { background: var(--warning-light); color: #8a6914; }
.rd-badge.low { background: var(--success-light); color: var(--success); }

.risk-detail-card p { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

.risk-detail-card .rd-mitigation {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--success);
}

/* Dependencies */
.dep-timeline { display: grid; gap: 16px; }

.dep-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: transform var(--transition);
}

.dep-card:hover { transform: translateX(4px); }

.dep-id {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.dep-info { flex: 1; }
.dep-info h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.dep-info .dep-owner { font-size: 12px; color: var(--text-secondary); }

.dep-status {
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.dep-status.in-discovery { background: var(--primary-light); color: var(--primary); }
.dep-status.not-started { background: var(--border-light); color: var(--text-secondary); }
.dep-status.pending { background: var(--warning-light); color: #8a6914; }

/* Status Codes Visual */
.status-codes-visual {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.status-code-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.status-code-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.status-code-card .sc-code-icon { font-size: 36px; margin-bottom: 12px; }
.status-code-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--primary); }
.status-code-card p { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* Stakeholder Grid */
.stakeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.stakeholder-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition);
}

.stakeholder-card:hover { transform: translateY(-2px); }

.sh-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.sh-avatar.signed { background: var(--success); }
.sh-avatar.unsigned { background: var(--text-light); }

.sh-info { flex: 1; }
.sh-info h4 { font-size: 14px; font-weight: 600; }
.sh-info .sh-role { font-size: 12px; color: var(--text-secondary); }
.sh-info .sh-org { font-size: 11px; color: var(--primary); font-weight: 600; }

.sh-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.sh-signed {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.sh-signed.yes { background: var(--success-light); color: var(--success); }
.sh-signed.no { background: var(--danger-light); color: var(--danger); }

.sh-date { font-size: 11px; color: var(--text-light); }

/* Traceability */
.trace-instructions {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 20px;
  font-size: 14px;
}

.traceability-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.trace-column {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.trace-column-header {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 600;
  color: white;
}

.trace-column-header.br-header { background: var(--primary); }
.trace-column-header.ac-header { background: var(--success); }
.trace-column-header.sc-header { background: var(--orange); }

.trace-items {
  padding: 8px;
  max-height: 600px;
  overflow-y: auto;
}

.trace-item {
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: background var(--transition);
  line-height: 1.4;
}

.trace-item:hover { background: var(--primary-light); }
.trace-item.active { background: var(--primary); color: white; }
.trace-item.related { background: var(--warning-light); border: 1px solid var(--warning); }

.trace-item .trace-id {
  font-weight: 700;
  margin-right: 6px;
}

/* Impact Callout */
.impact-callout { margin-bottom: 24px; }

/* Dep status chart */
.dep-status-list { display: grid; gap: 8px; }

.dep-status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.dep-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Risk dist chart */
.risk-dist-list { display: grid; gap: 10px; }

.risk-dist-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.risk-dist-label {
  font-size: 12px;
  width: 60px;
  font-weight: 600;
}

.risk-dist-bar-bg {
  flex: 1;
  height: 24px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.risk-dist-bar {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  transition: width 1s ease;
}

/* Hardware list */
.hardware-list-items { display: grid; gap: 6px; }

.hw-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
}

.hw-item:last-child { border-bottom: none; }

.hw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* Footer */
.page-footer {
  text-align: center;
  padding: 24px 32px;
  font-size: 12px;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
  margin-top: 40px;
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .risk-matrix-container { grid-template-columns: 1fr; }
  .traceability-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .requirements-grid { grid-template-columns: 1fr; }
  .scenarios-grid { grid-template-columns: 1fr; }
  .problem-cards { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 16px; }
  .section { padding: 20px; }
  .section-header h2 { font-size: 22px; }
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
