/* ============================================================
   ARIA Dashboard — Dark Premium Industrial Design System
   ============================================================ */

/* Design tokens */
:root {
  --bg:           #0a0b0f;
  --surface-1:    #111218;
  --surface-2:    #16181f;
  --surface-3:    #1e2029;
  /* Solid border — visible against the dark surface */
  --border:       #334155;
  --border-hover: rgba(79,152,163,0.4);
  --accent:       #4f98a3;
  --accent-glow:  rgba(79,152,163,0.15);
  /* Brighter primary — clearly readable on dark bg */
  --text-primary: #e2e8f0;
  /* Raised from #6b6b6b — was near-invisible on dark bg */
  --text-muted:   #94a3b8;
  /* Raised from #3a3a3a — at least slightly visible */
  --text-faint:   #475569;
  --fail:         #e05c6a;
  --fail-glow:    rgba(224,92,106,0.12);
  --pass:         #5da84a;
  --pass-glow:    rgba(93,168,74,0.12);
  --warn:         #d4a017;
  --warn-glow:    rgba(212,160,23,0.12);
  --sidebar-w:    240px;
  --topbar-h:     56px;
  --radius:       12px;
  --font-sans:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

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

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
}

/* Global heading colors and sizes */
h1 { font-size: 32px; font-weight: 700; color: #f8fafc; }
h2 { font-size: 22px; font-weight: 600; color: #f8fafc; }
h3 { font-size: 22px; font-weight: 600; color: #f8fafc; }

/* Paragraph and list text — never unset */
p, li { font-size: 16px; line-height: 1.7; }

/* Paragraphs inside cards get a comfortable reading width */
.card p, .page-container p { max-width: 75ch; }

/* Global button base — overridden by .btn-primary below */
button { font-size: 16px; padding: 10px 22px; font-family: var(--font-sans); cursor: pointer; }

/* Link colors for dark mode */
a               { color: #60a5fa; }
a:hover         { color: #93c5fd; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #252525; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #333; }

/* ============================================================
   LAYOUT — Fixed sidebar + fixed topbar + scrollable content
   ============================================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  min-width: 200px;
  height: 100vh;
  overflow-y: auto;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 99;
  display: flex;
  align-items: center;
  padding: 0 32px;
  justify-content: space-between;
}

.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 40px 48px;
  box-sizing: border-box;
}

.page-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ── Sidebar internals ── */
.sidebar-logo {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo-mark {
  font-size: 20px;
  color: var(--accent);
  line-height: 1;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 8px;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  color: #cbd5e1;
  font-size: 16px;
  font-weight: 500;
  transition: background 150ms ease, color 150ms ease;
  margin-bottom: 3px;
}

.nav-link:hover {
  background: rgba(255,255,255,0.04);
  /* Full white on hover */
  color: #ffffff;
}

.nav-link.active {
  background: var(--accent-glow);
  /* White text + bold weight so active page is unmistakable */
  color: #ffffff;
  font-weight: 600;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

.nav-icon {
  font-size: 14px;
  opacity: 0.7;
  flex-shrink: 0;
}

.nav-link.active .nav-icon { opacity: 1; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.status-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pass);
  box-shadow: 0 0 6px var(--pass);
  flex-shrink: 0;
}

.status-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.status-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--pass);
}

.version-label {
  font-size: 11px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  text-align: center;
}

/* ── Topbar internals ── */
.topbar-title {
  font-size: 17px;
  font-weight: 600;
  /* Near-white — topbar title must stand out */
  color: #f1f5f9;
}

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

.topbar-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.topbar-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%   { background-position: -400% 0; }
  100% { background-position:  400% 0; }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  animation: fadeSlideUp 0.35s ease both;
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 1px var(--border-hover), 0 8px 32px rgba(0,0,0,0.35);
}

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

.card-title {
  font-size: 17px;
  font-weight: 600;
  /* Near-white so card title reads clearly on dark card */
  color: #f1f5f9;
  margin: 0;
}

/* ── KPI Cards ── */
.kpi-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 32px 28px;
  min-height: 150px;
  max-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  animation: fadeSlideUp 0.35s ease both;
}

.kpi-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 0 1px var(--border-hover), 0 4px 24px rgba(0,0,0,0.35);
}

.kpi-label {
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.kpi-value,
.kpi-number {
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 700;
  /* Pure white — KPI numbers must dominate the card */
  color: #ffffff;
  line-height: 1;
}

/* ============================================================
   GRIDS
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.charts-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  margin-bottom: 24px;
  align-items: start;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 1100px) {
  .kpi-grid, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SECTION TYPOGRAPHY
   ============================================================ */
.page-title {
  font-size: 32px;
  font-weight: 700;
  /* Brightest heading level */
  color: #f8fafc;
  margin-bottom: 4px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  /* Slightly softer than page-title but still clearly white */
  color: #f1f5f9;
  margin-bottom: 16px;
  margin-top: 32px;
}

.section-title:first-child { margin-top: 0; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-fail {
  background: var(--fail-glow);
  color: var(--fail);
  border: 1px solid rgba(224,92,106,0.3);
}

.badge-pass {
  background: var(--pass-glow);
  color: var(--pass);
  border: 1px solid rgba(93,168,74,0.3);
}

.badge-warn {
  background: var(--warn-glow);
  color: var(--warn);
  border: 1px solid rgba(212,160,23,0.3);
}

/* ============================================================
   INFO BOX
   ============================================================ */
.info-box {
  background: rgba(79,152,163,0.08);
  border: 1px solid rgba(79,152,163,0.25);
  border-radius: 10px;
  padding: 18px 24px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 24px;
}

.info-box strong { color: var(--text-primary); }

/* ============================================================
   TABLE
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  table-layout: fixed;
}

.data-table thead th {
  /* Darker surface so headers stand apart from body rows */
  background: #1e293b;
  padding: 14px 16px;
  text-align: left;
  /* 16px keeps headers readable at 100% zoom */
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  /* White header text — maximum contrast on dark header bg */
  color: #f8fafc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}

.data-table thead th:hover { color: var(--text-primary); cursor: pointer; }

.data-table tbody tr {
  height: 56px;
  border-bottom: 1px solid var(--border);
  transition: background 100ms ease;
}

.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(79,152,163,0.06); }
.data-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.01); }
.data-table tbody tr:nth-child(even):hover { background: rgba(79,152,163,0.06); }

.data-table tbody td {
  padding: 14px 16px;
  font-size: 16px;
  /* Slightly brighter than default to ensure readability in rows */
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Fail/warn row accent */
.data-table tbody tr.row-fail { border-left: 3px solid var(--fail); }
.data-table tbody tr.row-warn { border-left: 3px solid var(--warn); }

/* QC table column widths */
.qc-table th:nth-child(1), .qc-table td:nth-child(1) { width: 160px; }
.qc-table th:nth-child(2), .qc-table td:nth-child(2) { width: 110px; }
.qc-table th:nth-child(3), .qc-table td:nth-child(3) { width: 65px;  }
.qc-table th:nth-child(4), .qc-table td:nth-child(4) { width: 90px;  }
.qc-table th:nth-child(5), .qc-table td:nth-child(5) { width: 85px;  }
.qc-table th:nth-child(6), .qc-table td:nth-child(6) { width: 85px;  }
.qc-table th:nth-child(7), .qc-table td:nth-child(7) { width: 80px;  }
.qc-table th:nth-child(8), .qc-table td:nth-child(8) { width: 100px; }
.qc-table th:nth-child(9), .qc-table td:nth-child(9) { width: 140px; }

/* Table search bar */
.table-search-wrap {
  flex: 1;
  max-width: 360px;
}

.table-search, .search-bar {
  width: 100%;
  /* Slightly lighter surface so the field is clearly distinct */
  background: #1e293b;
  /* Visible border against dark bg */
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 14px 8px 36px;
  /* Bright input text */
  color: #f1f5f9;
  /* 16px keeps search fields usable at 100% zoom */
  font-size: 16px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
}

/* Placeholder just dim enough to be secondary — never invisible */
.table-search::placeholder, .search-bar::placeholder { color: #64748b; }

.table-search:focus, .search-bar:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,152,163,0.15);
}

/* ============================================================
   DETAIL TABLE (Explainer page)
   ============================================================ */
.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table tr { border-bottom: 1px solid var(--border); }
.detail-table tr:last-child { border-bottom: none; }

.detail-table td:first-child {
  /* 14px min — never let labels disappear at 100% zoom */
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 16px 10px 0;
  width: 160px;
}

.detail-table td:last-child {
  font-family: var(--font-mono);
  /* 15px — values should be slightly larger than their labels */
  font-size: 15px;
  color: var(--text-primary);
  padding: 10px 0;
}

.detail-table tr.highlight-fail td {
  color: var(--fail);
}

/* ============================================================
   SLIDERS
   ============================================================ */
.slider-group {
  margin-bottom: 20px;
}

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

.slider-header label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.slider-value {
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 15px;
  font-family: var(--font-mono);
  font-weight: 500;
  min-width: 58px;
  text-align: center;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,152,163,0.25);
  cursor: pointer;
  transition: box-shadow 150ms ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(79,152,163,0.2);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease, transform 80ms ease;
}

.btn-primary:hover {
  background: #3a7d87;
  box-shadow: 0 0 20px rgba(79,152,163,0.35);
}

.btn-primary:active { transform: scale(0.98); }

.btn-sm {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(79,152,163,0.3);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 150ms ease;
}

.btn-sm:hover { background: var(--accent-glow); }

/* ============================================================
   RESULT BOX (after simulation)
   ============================================================ */
.result-box {
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-top: 24px;
  animation: fadeSlideUp 0.3s ease;
}

.result-pass {
  background: rgba(34,197,94,0.15);
  border: 1px solid #22c55e;
}

.result-warn {
  background: rgba(245,158,11,0.15);
  border: 1px solid #f59e0b;
}

.result-fail {
  background: rgba(239,68,68,0.15);
  border: 1px solid #ef4444;
}

.result-icon { font-size: 40px; margin-bottom: 8px; }

.result-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.result-pass .result-title { color: #22c55e; }
.result-warn .result-title { color: #f59e0b; }
.result-fail .result-title { color: #ef4444; }

.result-detail {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.mono { font-family: var(--font-mono); color: var(--text-primary); }

/* ============================================================
   SKELETON / LOADING
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.03) 25%,
    rgba(255,255,255,0.07) 50%,
    rgba(255,255,255,0.03) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.8s infinite;
}

.shimmer {
  width: 100%;
  height: 100%;
  min-height: 120px;
  border-radius: 6px;
}

/* ============================================================
   TABS (Architecture page)
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 150ms ease;
  font-family: var(--font-sans);
  position: relative;
  bottom: -1px;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   ACCORDION (details/summary pattern)
   ============================================================ */
details.accordion {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 12px;
  overflow: hidden;
}

details.accordion summary.accordion-header {
  padding: 18px 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

details.accordion summary.accordion-header::-webkit-details-marker { display: none; }

details.accordion summary.accordion-header::after {
  content: '›';
  margin-left: auto;
  font-size: 18px;
  color: var(--text-muted);
  transform: rotate(0deg);
  transition: transform 200ms ease;
  display: inline-block;
}

details.accordion[open] summary.accordion-header::after {
  transform: rotate(90deg);
}

details.accordion summary.accordion-header:hover { background: var(--surface-3); }

details.accordion[open] summary.accordion-header {
  border-bottom: 1px solid var(--border);
  color: var(--accent);
}

.accordion-body {
  padding: 20px 24px;
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
}

.accordion-body ul { padding-left: 16px; }
.accordion-body li { margin-bottom: 8px; }
.accordion-body strong { color: var(--text-primary); }

/* ============================================================
   FILE TREE (Architecture page)
   ============================================================ */
.file-tree {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre;
  margin-bottom: 20px;
}

.tree-comment { color: var(--text-muted); }

/* ============================================================
   WESTGARD RULES GRID (Alerts page)
   ============================================================ */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.rule-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: border-color 200ms ease;
}

.rule-card:hover { border-color: var(--border-hover); }

.rule-name {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.rule-type {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.rule-type.warning {
  background: var(--warn-glow);
  color: var(--warn);
  border: 1px solid rgba(212,160,23,0.3);
}

.rule-type.rejection {
  background: var(--fail-glow);
  color: var(--fail);
  border: 1px solid rgba(224,92,106,0.3);
}

.rule-desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.rule-threshold {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
}

/* ============================================================
   REFERENCE TABLE (Architecture tool stack)
   ============================================================ */
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-top: 24px;
}

.ref-table thead th {
  background: #1e293b;
  padding: 14px 16px;
  text-align: left;
  /* 15px — matches data-table roughly but slightly smaller since ref-table is denser */
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  /* White header text for max contrast */
  color: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.ref-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 100ms ease;
}

.ref-table tbody tr:last-child { border-bottom: none; }
.ref-table tbody tr:hover { background: rgba(79,152,163,0.05); }

.ref-table tbody td {
  padding: 14px 16px;
  color: var(--text-primary);
}

.ref-table tbody td:first-child {
  font-family: var(--font-mono);
  /* 15px matches table base size — tool names are primary info */
  font-size: 15px;
  color: var(--accent);
}

.ref-table tbody td:nth-child(2) {
  /* --text-muted is now #94a3b8 — visible but secondary */
  color: var(--text-muted);
  /* 14px min — category labels must be readable */
  font-size: 14px;
}

/* ============================================================
   DARK MODE UTILITIES — semantic colors and badge variants
   ============================================================ */

/* Semantic text colors */
.text-success { color: #4ade80; }
.text-danger  { color: #f87171; }
.text-warning { color: #fbbf24; }
.text-info    { color: #38bdf8; }

/* Semantic badge variants — high contrast on dark bg */
.badge-success { background: #166534; color: #dcfce7; border: none; }
.badge-danger  { background: #7f1d1d; color: #fee2e2; border: none; }
.badge-warning { background: #78350f; color: #fef3c7; border: none; }
.badge-info    { background: #0c4a6e; color: #e0f2fe; border: none; }

/* Cards with colored backgrounds always get white text */
[class*="bg-"] { color: #ffffff !important; }
