@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,500&family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  --bg0: #e8f3f1;
  --bg1: #f7fbfa;
  --card: #ffffff;
  --text: #10231f;
  --muted: #3d5a54;
  --line: #b7d0c9;
  --line-strong: #7aa89c;
  --accent: #0a7a62;
  --accent-hover: #086352;
  --accent-soft: #d8f0e9;
  --danger: #c62828;
  --warn: #c45c12;
  --shadow: 0 10px 28px rgba(16, 55, 48, 0.08);
  --radius: 12px;
  --topbar-h: 56px;
  --sidebar-w: 248px;
  --sidebar-collapsed-w: 64px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 520px at 8% -10%, #c9ebe3 0%, transparent 55%),
    radial-gradient(900px 480px at 100% 0%, #d7eaf5 0%, transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 42%, #eef6f4);
}

/* —— Shell —— */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  height: var(--topbar-h);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px 0 10px;
  background: #d7ebe6;
  border-bottom: 1px solid var(--line-strong);
  z-index: 20;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-center {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.topbar-info {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0a2f28;
}

.brand-tag {
  font-size: 16px;
  color: var(--muted);
  font-weight: 600;
}

.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.icon-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.icon-bars {
  width: 16px;
  height: 12px;
  display: block;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 5px / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 10px / 100% 2px no-repeat;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.app-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: rgba(15, 42, 37, 0.96);
  color: #d7efe8;
  border-right: 1px solid #1f4d43;
  transition: width 0.2s ease, flex-basis 0.2s ease;
  overflow: hidden;
}

.app-shell.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-w);
  flex-basis: var(--sidebar-collapsed-w);
}

.nav-tree {
  flex: 1;
  overflow: auto;
  padding: 14px 10px;
}

.nav-group {
  margin-bottom: 12px;
}

.nav-group-title {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #e7f6f1;
  padding: 10px 10px 8px;
  border-radius: 8px;
}

.nav-group-title::-webkit-details-marker { display: none; }

.nav-group-title::after {
  content: "";
  width: 0.45em;
  height: 0.45em;
  margin-left: auto;
  border-right: 2px solid #8fb8ae;
  border-bottom: 2px solid #8fb8ae;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  opacity: 0.85;
}

.nav-group:not([open]) > .nav-group-title::after {
  transform: rotate(-45deg);
  margin-top: 2px;
}

.nav-children {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 4px 14px;
  margin-left: 10px;
  border-left: 1px solid rgba(127, 212, 192, 0.22);
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  border: 0;
  background: transparent;
  color: #b7d5cd;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(127, 212, 192, 0.12);
  color: #fff;
}

.nav-item.active {
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}

.nav-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
}

.nav-group-title .nav-ico {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  color: #9fd4c6;
}

.nav-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-foot {
  padding: 10px 12px 14px;
  border-top: 1px solid #1f4d43;
  font-size: 11px;
  color: #7aa89c;
}

.app-shell.sidebar-collapsed .nav-group-title,
.app-shell.sidebar-collapsed .sidebar-foot-text {
  font-size: 0;
  padding: 0;
  gap: 0;
}

.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .nav-group-title::after,
.app-shell.sidebar-collapsed .sidebar-foot-text {
  display: none;
}

.app-shell.sidebar-collapsed .nav-children {
  padding: 0;
  margin: 0;
  border: 0;
  align-items: center;
}

.app-shell.sidebar-collapsed .nav-item {
  height: 40px;
  width: 40px;
  margin: 2px auto;
  padding: 0;
  border-radius: 10px;
  justify-content: center;
  gap: 0;
}

.app-shell.sidebar-collapsed .nav-group-title {
  display: none;
}

.app-shell.sidebar-collapsed .nav-group {
  margin-bottom: 4px;
}

.app-shell.sidebar-collapsed .nav-ico {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
  opacity: 1;
}

.workspace {
  flex: 1;
  min-width: 0;
  overflow: auto;
}

.workspace-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 20px 48px;
  transition: max-width 0.2s ease;
}

.workspace-inner:has(#tab-tasks.active) {
  max-width: 1480px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.tasks-table {
  width: 100%;
  table-layout: auto;
}

.tasks-table th,
.tasks-table td {
  white-space: nowrap;
}

.tasks-table th:nth-child(3),
.tasks-table td:nth-child(3) {
  white-space: normal;
  word-break: break-word;
  min-width: 12em;
  width: 40%;
}

.tasks-table th:nth-child(5),
.tasks-table td:nth-child(5) {
  white-space: nowrap;
  width: 5.5em;
  max-width: 6.5em;
  vertical-align: middle;
}

.tasks-table th.col-check,
.tasks-table td.col-check {
  width: 2.2em;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.verdict-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 6em;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.verdict-trigger:hover,
.verdict-trigger.is-open {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.verdict-popover {
  position: fixed;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 24px));
  max-height: min(78vh, 640px);
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 50, 40, 0.18);
}

.verdict-popover[hidden] {
  display: none !important;
}

.verdict-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.verdict-popover-head strong {
  font-size: 14px;
}

.verdict-popover-head .icon-btn {
  width: 28px;
  height: 28px;
  font-size: 18px;
  line-height: 1;
}

.verdict-popover-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.verdict-popover-overall {
  font-size: 13px;
  margin-bottom: 2px;
  word-break: break-word;
}

.verdict-popover-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
}

.verdict-popover-row.is-pass {
  opacity: 0.72;
}

.verdict-popover-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.verdict-popover-row .dim-label {
  color: var(--muted);
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
}

.verdict-popover-row .dim-verdict {
  flex: 0 0 auto;
  white-space: nowrap;
}

.verdict-popover-row .dim-reason {
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
}

.verdict-popover-empty {
  font-size: 13px;
  color: var(--muted);
}

.tasks-table th:last-child,
.tasks-table td:last-child {
  width: 1%;
  white-space: nowrap;
}

.inline-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.inline-filter select {
  min-width: 120px;
}

.check-row-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

.page-heading {
  margin-bottom: 16px;
}

.page-heading h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0a2f28;
}

h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 650;
  color: #12352e;
}

.sub, .hint {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(8px);
}

.login-card h1 {
  margin: 0;
  font-size: 26px;
  color: var(--accent);
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.login-card input { width: 100%; }

.panel { display: none; }
.panel.active { display: block; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

input, select, button, .button-link, textarea {
  font: inherit;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(10, 122, 98, 0.28);
  border-color: var(--accent);
}

button, .button-link {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.1s ease;
}

button:hover, .button-link:hover { background: var(--accent-hover); }
button:active, .button-link:active { transform: translateY(1px); }
button:disabled { opacity: 0.65; cursor: not-allowed; }

button.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--line-strong);
  font-weight: 550;
}

button.secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

button.btn-report-export {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 18px;
  box-shadow: 0 3px 10px rgba(15, 118, 110, 0.28);
  letter-spacing: 0.02em;
}

button.btn-report-export:hover {
  background: #0d9488;
  border-color: #0d9488;
}

button.btn-report-export:disabled {
  box-shadow: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 650;
  font-size: 13px;
}

.msg {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.code {
  background: #12352e;
  color: #e8f7f2;
  border-radius: 8px;
  padding: 14px;
  overflow: auto;
  font-size: 12px;
  max-height: 420px;
  border: 1px solid #1f4d43;
}

.badge-pass { color: var(--accent); font-weight: 700; }
.badge-review { color: var(--warn); font-weight: 700; }
.badge-block { color: var(--danger); font-weight: 700; }

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.check-row input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

#llm-form label:not(.check-row) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.file-pick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pick-shared {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pick-display {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--accent-soft);
}

.pick-display.is-ready {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: #fff;
}

.pick-display-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.5;
}

.pick-display-text {
  flex: 1 1 auto;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-all;
}

.pick-display.is-ready .pick-display-text {
  color: var(--text);
  font-weight: 600;
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  overflow: hidden;
  margin: 8px 0 10px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0a7a62, #12a88a);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.progress-pct {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.verdict-detail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 520px;
  font-size: 13px;
  line-height: 1.45;
}

.verdict-dim .dim-label {
  color: var(--muted);
  font-weight: 500;
}

.verdict-dim .dim-reason {
  color: var(--text);
  font-weight: 500;
  opacity: 0.9;
}

#kb-content {
  width: 100%;
  min-height: 120px;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  resize: vertical;
}

.intel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.intel-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ready-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  border: 1px solid transparent;
}

.ready-mark.is-ok {
  color: #067647;
  background: #e8f8ef;
  border-color: #abefc6;
}

.ready-mark.is-bad {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

.intel-ready-hint {
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #fecdca;
  background: #fef3f2;
  color: #b42318;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  white-space: pre-line;
}

.intel-ready-hint.is-ok {
  border-color: #abefc6;
  background: #e8f8ef;
  color: #067647;
}

.audit-opts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 14px;
  margin: 8px 0 10px;
}

.audit-opts-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.audit-opts-switches {
  margin-top: 4px;
}

.intel-history-limit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.intel-history-limit input {
  width: 88px;
}

/* Hover tip for config params */
.has-tip {
  position: relative;
  cursor: help;
}

.has-tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 40;
  width: max-content;
  max-width: min(320px, 70vw);
  padding: 8px 10px;
  border-radius: 8px;
  background: #18212f;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  white-space: normal;
  text-align: left;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  pointer-events: none;
}

.has-tip:hover::after,
.has-tip:focus-within::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.intel-actions .has-tip::after {
  left: 50%;
  transform: translate(-50%, 4px);
}

.intel-actions .has-tip:hover::after,
.intel-actions .has-tip:focus-within::after {
  transform: translate(-50%, 0);
}

.dim-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
}

.dim-check {
  margin: 0;
  font-weight: 500;
}

.card-subblock {
  padding: 12px 0 4px;
  border-top: 1px dashed var(--line);
}

.card-subblock .subhead {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.lex-dim-create {
  margin-top: 10px;
  align-items: center;
}

.lex-dim-create input {
  min-width: 160px;
  flex: 1 1 140px;
}

.warmup-box {
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(216, 240, 233, 0.35);
}

.warmup-box .progress-track {
  margin: 8px 0 6px;
}

.topbar-center:empty {
  display: none;
}

.muted { color: var(--muted); }

.task-log {
  margin-top: 10px;
  background: #0f2a25;
  color: #d7efe8;
  border: 1px solid #1f4d43;
  border-radius: 10px;
  padding: 12px 14px;
  max-height: 420px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.55;
}

.log-line { margin: 0 0 4px; word-break: break-word; }
.log-line:last-child { margin-bottom: 0; }
.log-info { color: #cfe8e1; }
.log-run { color: #7fd4c0; }
.log-wait { color: #9bb7b0; }
.log-ok { color: #6fd39a; font-weight: 600; }
.log-warn { color: #f0b35a; font-weight: 600; }
.log-error { color: #ff8f8f; font-weight: 650; }

.lex-example {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: rgba(216, 240, 233, 0.45);
}

.lex-example-title {
  margin: 0 0 6px;
  font-size: 14px;
  color: #12352e;
}

.lex-example-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.lex-example-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  color: #0a5c4b;
}

.health-overall {
  font-size: 20px;
  font-weight: 700;
  color: #0a2f28;
}

.health-overall.is-ok { color: var(--accent); }
.health-overall.is-degraded { color: var(--warn); }
.health-overall.is-error { color: var(--danger); }

.health-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  border: 1px solid var(--line);
  background: #fff;
}

.health-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}

.health-pill.is-ok .dot { background: var(--accent); }
.health-pill.is-warn .dot { background: var(--warn); }
.health-pill.is-error .dot { background: var(--danger); }
.health-pill.is-off .dot { background: #8aa09a; }

.health-modules {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.health-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 110px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.health-row-name {
  font-weight: 650;
  color: #12352e;
}

.health-row-status {
  font-size: 13px;
  font-weight: 700;
}

.health-row-status.is-ok { color: var(--accent); }
.health-row-status.is-warn { color: var(--warn); }
.health-row-status.is-error { color: var(--danger); }
.health-row-status.is-off { color: #6a807a; }

.health-row-detail {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  word-break: break-word;
}

@media (max-width: 720px) {
  .health-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 900px) {
  .topbar-center { display: none; }
  .brand-tag { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .workspace-inner { padding: 16px 12px 40px; }
}

@media (max-width: 720px) {
  .app-shell.sidebar-collapsed .sidebar,
  .sidebar {
    position: absolute;
    left: 0;
    top: var(--topbar-h);
    bottom: 0;
    z-index: 15;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.18);
  }
  .app-shell.sidebar-collapsed .sidebar {
    width: 0;
    flex-basis: 0;
    border: 0;
    padding: 0;
  }
  .app-body { position: relative; }
}
