/* Hacker Sidekick Enterprise - stylesheet
   Palette, fonts and logo copied directly from the real product
   (IHE-Backend/apps/web: tailwind.config.ts + globals.css) rather than
   reused from the earlier mockup - this is the actual brand, not a
   lookalike. --primary/--secondary etc. keep their original names so every
   template below is unaffected; only the values changed. */

:root {
  --primary: #38bdf8;         /* brand.cyan */
  --primary-dark: #0ea5e9;    /* derived hover/pressed shade, not an explicit token upstream */
  --primary-light: #7dd3fc;   /* --cyan-bright */
  --secondary: #7c3aed;       /* brand.violet / --purple-deep */
  --secondary-light: #a78bfa; /* brand.violet-light / --violet */

  --bg-darkest: #0a0e1a;   /* --background */
  --bg-darker: #080c14;    /* --portal-main */
  --bg-dark: #12182a;      /* --background-elevated */
  --bg-card: #0f172a;      /* solid approximation of --card: rgba(15,23,42,0.65) - see .card backdrop-filter */
  --bg-card-hover: #1a2236;
  --border: rgba(56, 189, 248, 0.12);   /* --border, exact */
  --border-light: rgba(56, 189, 248, 0.3);

  --text-brightest: #FFFFFF;
  --text-bright: #f1f5f9;   /* --foreground, exact */
  --text-medium: #cbd5e1;
  --text-muted: #94a3b8;    /* --muted, exact */
  --text-dim: #64748b;

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #f43f5e;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Ubuntu Mono', monospace;

  --sidebar-w: 268px;
  --radius: 10px;
}

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

html { color-scheme: dark; }

body {
  font-family: var(--font-sans);
  background: var(--bg-darkest);
  color: var(--text-bright);
  font-size: 14px;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }

/* ---------- prototype chrome (not part of the real product) ---------- */
.proto-bar {
  background: #000;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 16px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.proto-bar a { color: var(--primary-light); }
.proto-bar strong { color: var(--text-muted); font-weight: 600; letter-spacing: .04em; }

/* ---------- centered auth-style pages ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.15), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(167, 139, 250, 0.2), transparent 40%),
    var(--bg-darkest);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 32px;
}
.auth-card.wide { max-width: 440px; }
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff;
  flex-shrink: 0;
}
.brand-name { font-weight: 700; font-size: 15px; color: var(--text-brightest); }
.brand-sub { font-size: 11px; color: var(--text-dim); margin-top: 1px; }

.tenant-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.tenant-mark {
  width: 40px; height: 40px; border-radius: 9px;
  background: var(--bg-dark); border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: var(--text-bright);
  flex-shrink: 0;
}
.tenant-name { font-weight: 700; font-size: 16px; color: var(--text-brightest); }
.tenant-powered { font-size: 11px; color: var(--text-dim); }

h1.page-title { font-size: 19px; color: var(--text-brightest); margin-bottom: 4px; }
p.page-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-muted); margin-bottom: 7px; letter-spacing: .01em;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13.5px;
  color: var(--text-bright);
  font-family: var(--font-sans);
}
.field textarea { font-family: var(--font-mono); font-size: 12.5px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
}
.field .hint { font-size: 11.5px; color: var(--text-dim); margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px; border: 1px solid transparent;
  padding: 10px 18px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: var(--font-sans);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-block { width: 100%; }
.btn-outline { background: transparent; border-color: var(--border-light); color: var(--text-bright); }
.btn-outline:hover { border-color: var(--primary-light); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-danger-outline { background: transparent; border-color: rgba(255,61,113,0.4); color: var(--danger); }

.divider-row { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-dim); font-size: 11.5px; }
.divider-row::before, .divider-row::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.foot-link { text-align: center; font-size: 12.5px; color: var(--text-dim); margin-top: 18px; }
.foot-link a { color: var(--primary-light); font-weight: 600; }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--border-light); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.notice-box {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(56,189,248,0.08); border: 1px solid rgba(56,189,248,0.25);
  border-radius: 8px; padding: 12px 14px; font-size: 12.5px; color: var(--text-medium);
  margin-bottom: 18px;
}
.notice-box.warn { background: rgba(255,214,0,0.08); border-color: rgba(255,214,0,0.3); }
.notice-box b { color: var(--text-bright); }

/* ---------- admin shell (sidebar layout) ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-darker);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  flex-shrink: 0;
}
.sidebar .brand-row { padding: 0 6px; margin-bottom: 28px; }
.sidebar .tenant-chip {
  display: flex; align-items: center; gap: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 13px;
  margin-bottom: 22px;
}
.sidebar .tenant-chip .tenant-mark { width: 34px; height: 34px; font-size: 12px; }
.sidebar .tenant-chip .t-name { font-size: 13px; font-weight: 700; color: var(--text-bright); }
.sidebar .tenant-chip .t-label { font-size: 11px; color: var(--text-dim); margin-top: 1px; }

.nav-group { margin-bottom: 4px; }
.nav-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  color: var(--text-dim); text-transform: uppercase;
  padding: 12px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 7px;
  font-size: 13.5px; color: var(--text-medium); font-weight: 500;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-card); color: var(--text-bright); }
.nav-item.active { background: var(--bg-card-hover); color: var(--text-brightest); }
.nav-item .dot {
  width: 6px; height: 6px; border-radius: 2px; background: var(--text-dim); flex-shrink: 0;
}
.nav-item.active .dot { background: var(--primary-light); }

.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 36px; border-bottom: 1px solid var(--border);
  background: var(--bg-dark);
}
.topbar .crumb { font-size: 11px; color: var(--text-dim); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.topbar h1 { font-size: 20px; font-weight: 700; color: var(--text-brightest); }
.content { padding: 32px 36px 64px; max-width: 1120px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  letter-spacing: .02em;
}
.pill .pdot { width: 6px; height: 6px; border-radius: 50%; }
.pill-ok { background: rgba(34,197,94,0.14); color: var(--success); }
.pill-ok .pdot { background: var(--success); }
.pill-warn { background: rgba(245,158,11,0.14); color: var(--warning); }
.pill-warn .pdot { background: var(--warning); }
.pill-off { background: rgba(148,163,184,0.14); color: var(--text-muted); }
.pill-off .pdot { background: var(--text-dim); }
.pill-danger { background: rgba(244,63,94,0.14); color: var(--danger); }
.pill-danger .pdot { background: var(--danger); }
.pill-info { background: rgba(56,189,248,0.12); color: var(--primary-light); }
.pill-info .pdot { background: var(--primary-light); }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: rgba(15, 23, 42, 0.65); /* real --card token */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-head h2 { font-size: 14.5px; font-weight: 700; color: var(--text-brightest); }
.card-head .sub { font-size: 12px; color: var(--text-dim); margin-top: 3px; }

.stat-label { font-size: 11px; color: var(--text-dim); margin-bottom: 9px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat-value { font-size: 25px; font-weight: 700; color: var(--text-brightest); letter-spacing: -.01em; }
.stat-foot { font-size: 11.5px; color: var(--text-dim); margin-top: 6px; }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
td { padding: 13px 12px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-medium); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td.mono, code, .mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-bright); }
td strong { color: var(--text-bright); }

.toggle {
  width: 34px; height: 19px; border-radius: 999px;
  background: var(--border-light); position: relative; flex-shrink: 0; display: inline-block;
}
.toggle.on { background: var(--primary); }
.toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 15px; height: 15px; border-radius: 50%; background: #fff;
}
.toggle.on::after { left: 17px; }

.tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  background: var(--bg-dark); border: 1px solid var(--border-light);
  color: var(--text-medium); padding: 3px 8px; border-radius: 6px; margin: 2px 4px 2px 0;
}
.tag.locked { border-color: rgba(124,58,237,0.4); color: var(--secondary-light); }

.section-title { font-size: 11px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .07em; margin: 32px 0 12px; }
.section-title:first-child { margin-top: 0; }
.muted { color: var(--text-dim); }
.small { font-size: 12px; }

.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-dark); border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-medium);
}

.empty-actions { display: flex; gap: 10px; margin-top: 14px; }

.badge-row { display: flex; gap: 8px; flex-wrap: wrap; }

::placeholder { color: var(--text-dim); }

/* ---------- desktop app mockup ---------- */
.desktop-frame {
  max-width: 1120px;
  margin: 28px auto 60px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.titlebar {
  background: var(--bg-darker);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.traffic { display: flex; gap: 7px; }
.traffic span { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.traffic span:nth-child(1) { background: #FF5F57; }
.traffic span:nth-child(2) { background: #FEBC2E; }
.traffic span:nth-child(3) { background: #28C840; }
.titlebar .title { font-size: 12.5px; color: var(--text-muted); flex: 1; text-align: center; }
.ent-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(124,58,237,0.15); border: 1px solid rgba(124,58,237,0.4);
  color: var(--secondary-light); font-size: 11px; font-weight: 700;
  padding: 4px 9px; border-radius: 999px;
}
.ent-badge .pdot { width: 6px; height: 6px; border-radius: 50%; background: var(--secondary-light); }

.desktop-body { display: flex; height: 560px; background: var(--bg-dark); }
.activity-rail {
  width: 48px; background: var(--bg-darker); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px;
}
.rail-icon {
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-dim);
}
.rail-icon.active { background: var(--bg-card-hover); color: var(--primary-light); }

.chat-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-banner {
  background: rgba(124,58,237,0.10); border-bottom: 1px solid rgba(124,58,237,0.3);
  padding: 10px 18px; font-size: 12px; color: var(--secondary-light);
  display: flex; align-items: center; gap: 8px;
}
.chat-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; border-bottom: 1px solid var(--border);
}
.mode-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  padding: 5px 10px; border-radius: 999px; font-size: 12px; color: var(--text-bright); font-weight: 600;
}
.chat-scroll { flex: 1; padding: 20px 22px; overflow-y: auto; }
.msg { max-width: 78%; margin-bottom: 16px; }
.msg .who { font-size: 10.5px; color: var(--text-dim); margin-bottom: 4px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.msg .bubble { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; font-size: 13px; color: var(--text-medium); }
.msg.me { margin-left: auto; }
.msg.me .bubble { background: rgba(56,189,248,0.12); border-color: rgba(56,189,248,0.3); color: var(--text-bright); }
.msg .bubble code { font-family: var(--font-mono); font-size: 12px; color: var(--primary-light); }

.side-panel { width: 260px; background: var(--bg-darker); border-left: 1px solid var(--border); padding: 16px 14px; overflow-y: auto; }
.side-panel h3 { font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.side-panel h3:not(:first-child) { margin-top: 20px; }
.skill-row, .role-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 8px; border-radius: 7px; font-size: 12.5px; color: var(--text-medium); margin-bottom: 2px;
}
.skill-row:hover, .role-row:hover { background: var(--bg-card); }
.lock-ico { color: var(--secondary-light); font-size: 11px; flex-shrink: 0; }

/* ---------- topbar controls: role switch + corp config (prototype-only) ---------- */
.topbar-controls { display: flex; align-items: center; gap: 10px; }
.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 10px; padding: 6px; min-width: 180px; z-index: 40;
  box-shadow: 0 14px 34px rgba(0,0,0,0.45);
}
.dropdown-menu.wide { min-width: 280px; padding: 12px 14px; }
.dropdown-menu.open { display: block; }
.dropdown-item { padding: 8px 10px; border-radius: 7px; font-size: 12.5px; color: var(--text-medium); cursor: pointer; }
.dropdown-item:hover { background: var(--bg-card-hover); color: var(--text-bright); }
.dm-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 12.5px; color: var(--text-medium); }
.dm-row strong { color: var(--text-bright); }
.dm-hint { font-size: 11px; color: var(--text-dim); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
[data-role="standard"] .admin-only { display: none !important; }

/* ---------- interactive states: toggles, disabled/standard-role, dimming ---------- */
.toggle { cursor: pointer; }
button.toggle { appearance: none; -webkit-appearance: none; outline: none; border: none; padding: 0; }
.toggle.toggle-disabled { cursor: not-allowed; opacity: .4; pointer-events: none; }
.content a[href="#"] { cursor: pointer; }
.content a.link-disabled { pointer-events: none; opacity: .35; cursor: not-allowed; }
.content input:disabled, .content select:disabled, .content textarea:disabled {
  opacity: .55; cursor: not-allowed; background: var(--bg-darker);
}
.content button.btn:disabled { opacity: .4; cursor: not-allowed; }
.radio-card.card-disabled { cursor: not-allowed; opacity: .6; }
.radio-card:not(.card-disabled) { cursor: pointer; }
.card.card-dim { opacity: .5; }
tr.row-dim td { opacity: .45; }
.muted-off { opacity: .4; }
[data-role="standard"] .content::before {
  content: "Viewing as a standard member - configuration is read-only.";
  display: block; font-size: 11.5px; color: var(--text-dim); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; margin-bottom: 16px;
}

/* ---------- accordion (skills categories) ---------- */
.accordion-item { border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; overflow: hidden; }
.accordion-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; cursor: pointer; background: var(--bg-card);
}
.accordion-head .t { font-size: 12.5px; font-weight: 700; color: var(--text-bright); }
.accordion-head .n { font-size: 11px; color: var(--text-dim); margin-left: 8px; font-weight: 500; }
.accordion-head .car { color: var(--text-dim); transition: transform .15s; }
.accordion-item.open .accordion-head .car { transform: rotate(90deg); }
.accordion-body { display: none; padding: 4px 14px 12px; }
.accordion-item.open .accordion-body { display: block; }

/* ---------- inline edit blocks (system prompt / RoE) ---------- */
.edit-block { border: 1px solid var(--border); border-radius: 9px; padding: 14px; background: var(--bg-dark); }
.edit-block .view-text { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-medium); white-space: pre-wrap; line-height: 1.6; }
.edit-block textarea { display: none; }
.edit-block.editing .view-text { display: none; }
.edit-block.editing textarea { display: block; }
.edit-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- radio card (auth method) ---------- */
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; }
.radio-card.selected { border-color: var(--primary); background: rgba(56,189,248,0.06); }
.radio-card input { margin-top: 3px; }
.radio-card .rt { font-size: 13px; font-weight: 700; color: var(--text-bright); }
.radio-card .rs { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-medium); }
.checkbox-row input { width: 14px; height: 14px; }

.subtle-btn { background: none; border: none; color: var(--primary-light); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 0; }

/* htmx expects the page to define this convention itself - not injected by htmx.org */
.htmx-indicator { opacity: 0; transition: opacity 150ms ease-in; }
.htmx-request.htmx-indicator, .htmx-request .htmx-indicator { opacity: 1; }

.role-select {
  background: var(--bg-dark); border: 1px solid var(--border-light); border-radius: 6px;
  padding: 4px 8px; font-size: 12px; font-weight: 600; color: var(--text-bright);
  font-family: var(--font-sans); cursor: pointer;
}
.role-select:focus { outline: none; border-color: var(--primary); }

.scope-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.scope-tab { padding: 7px 13px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); border: 1px solid var(--border); cursor: pointer; }
.scope-tab.active { background: var(--bg-card-hover); color: var(--text-brightest); border-color: var(--border-light); }

/* ---------- audit: controls, chart, heatmaps ---------- */
.controls-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.controls-row select {
  background: var(--bg-dark); border: 1px solid var(--border-light); border-radius: 7px;
  padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--text-bright);
  font-family: var(--font-sans); cursor: pointer;
}
.controls-row select:focus { outline: none; border-color: var(--primary); }
.controls-spacer { flex: 1; }

.chart-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 11.5px; color: var(--text-muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .sw { width: 9px; height: 9px; border-radius: 2px; }

.tier-bar { display: flex; height: 9px; border-radius: 5px; overflow: hidden; background: var(--bg-dark); }
.tier-bar-row { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); margin-top: 7px; }

.heatmap-wrap { display: flex; gap: 8px; align-items: flex-start; overflow-x: auto; padding-bottom: 4px; }
.heatmap-daylabels { display: grid; grid-auto-flow: row; font-size: 9px; color: var(--text-dim); flex-shrink: 0; width: 26px; text-align: right; }
.heatmap-grid { display: grid; grid-auto-flow: column; flex-shrink: 0; }
.heatmap-cell { border-radius: 2px; }
.heatmap-legend { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--text-dim); margin-top: 10px; }
.heatmap-legend .sw { width: 10px; height: 10px; border-radius: 2px; }
.hour-axis { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-dim); margin-left: 34px; margin-top: 4px; }
.diagram-svg { width: 100%; height: auto; display: block; }

/* ---------- requirements table ---------- */
.req-table td, .req-table th { padding: 8px 10px; }
.req-table td.rid { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.req-table td.rcomp { white-space: nowrap; font-size: 12px; color: var(--text-muted); }
.req-table tr.group-start td { border-top: 2px solid var(--border-light); }
.req-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; font-size: 11.5px; color: var(--text-muted); }
.req-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Model Provider: outcome banners, health detail line, per-row actions */
.notice-box.error { background: rgba(244,63,94,0.10); border-color: rgba(244,63,94,0.35); color: var(--text-bright); }
.notice-box.ok { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.3); color: var(--text-bright); }
.health { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 320px; }
.health-detail { line-height: 1.35; }
.health-detail-error { color: var(--danger); }
.row-actions { display: flex; gap: 12px; margin-top: 8px; }
.row-actions form { margin: 0; }
.subtle-btn.danger { color: var(--danger); }
tr.row-disabled td { opacity: 0.6; }
