:root {
  color-scheme: light;
  --bg: #f7fafb;
  --bg-2: #eef6f8;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-soft: #f8fbfc;
  --surface-tint: #eff7f8;
  --line: #e1eaee;
  --line-soft: #edf3f5;
  --line-strong: #ccdbe2;
  --text: #142333;
  --text-soft: #3f5366;
  --muted: #78899a;
  --muted-text: var(--muted);
  --muted-2: #a7b4bf;
  --primary: #2474a9;
  --primary-2: #17577f;
  --primary-soft: #eaf5f9;
  --aqua: #1a9c8a;
  --aqua-soft: #e8f7f4;
  --amber: #a96315;
  --amber-soft: #fff3df;
  --red: #b83c49;
  --red-soft: #fff0f2;
  --violet: #6871c8;
  --violet-soft: #f0f2ff;
  --shadow-xs: 0 1px 2px rgba(20, 45, 64, .025);
  --shadow-sm: 0 10px 28px rgba(35, 70, 92, .045);
  --shadow-md: 0 20px 56px rgba(24, 54, 74, .075);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 13px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  letter-spacing: -.004em;
  background:
    radial-gradient(circle at 76px 60px, rgba(36,116,169,.10), transparent 150px),
    radial-gradient(circle at 90% 4%, rgba(26,156,138,.09), transparent 420px),
    linear-gradient(180deg, #eef7fa 0, var(--bg) 310px, #fbfdfd 100%);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(36,116,169,.14); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.app-shell { display: grid; grid-template-columns: 188px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 12px;
  background: rgba(250,253,254,.72);
  border-right: 1px solid rgba(211,225,232,.72);
  backdrop-filter: blur(20px);
  overflow-y: auto;
}
.brand-block {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 6px 10px 22px;
}
.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 14px;
  background: #ffffff;
}
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 11px; font-weight: 520; letter-spacing: .04em; }
.brand-copy h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.brand-copy p {
  margin: 3px 0 0;
  color: var(--muted-text);
  font-size: 12px;
  line-height: 1.35;
}
.nav-list { display: grid; gap: 3px; }
.nav-item {
  position: relative;
  display: block;
  width: 100%;
  min-height: 37px;
  padding: 8px 10px 8px 14px;
  color: #4c6072;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-item::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: transparent; }
.nav-item span { font-weight: 560; }
.nav-item small { display: none; }
.nav-item:hover { color: var(--primary-2); background: rgba(234,245,249,.64); transform: translateX(1px); }
.nav-item.is-active { color: var(--primary-2); background: rgba(234,245,249,.78); }
.nav-item.is-active::before { background: var(--primary); }
.sidebar-panel {
  margin: 28px 8px 0;
  padding: 10px 12px;
  background: rgba(255,255,255,.44);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}
.compact-status { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.compact-status span { color: var(--primary-2); font-size: 20px; font-weight: 610; letter-spacing: -.03em; }
.compact-status small { color: var(--muted); font-size: 12px; }
.panel-label, .sidebar-panel p:last-child, .progress-ring { display: none; }

.workspace { min-width: 0; padding: 24px 34px 44px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 18px; }
.topbar h2 { margin: 0; font-size: 29px; line-height: 1.05; font-weight: 610; letter-spacing: -.05em; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.search-box input,
.filter-grid input,
.filter-grid select,
.table-toolbar select {
  min-height: 36px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  box-shadow: var(--shadow-xs);
}
.search-box input { width: 300px; }
.search-box input:focus,
.filter-grid input:focus,
.filter-grid select:focus,
.table-toolbar select:focus { border-color: rgba(36,116,169,.48); box-shadow: 0 0 0 4px rgba(36,116,169,.08); }
.button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 560;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: #2474a9; box-shadow: 0 10px 18px rgba(36,116,169,.13); }
.button-secondary { color: var(--primary-2); background: rgba(234,245,249,.76); border-color: #d9e8ee; }
.button-ghost { color: var(--primary-2); background: rgba(255,255,255,.74); border-color: var(--line); }
.text-button { padding: 0; color: var(--primary-2); background: none; border: 0; font-weight: 560; }
.full-width { width: 100%; }
.view { display: none; }
.view.is-visible { display: block; }

.control-strip, .command-card, .surface, .risk-card, .metric-card {
  background: var(--surface);
  border: 1px solid rgba(221,233,238,.82);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(18px);
}
.control-strip { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; padding: 10px 12px; }
.control-strip div:first-child { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); }
.control-strip strong { color: var(--text-soft); font-weight: 560; }
.control-actions, .action-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.metric-card { position: relative; min-height: 90px; padding: 14px 14px 12px; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 10px; height: 3px; border-radius: 999px; background: linear-gradient(90deg, rgba(36,116,169,.72), rgba(26,156,138,.52)); opacity: .32; }
.metric-card:nth-child(2)::after { right: 34px; }
.metric-card:nth-child(3)::after { right: 70px; background: linear-gradient(90deg, rgba(184,60,73,.50), rgba(169,99,21,.36)); }
.metric-card:nth-child(4)::after { right: 88px; background: linear-gradient(90deg, rgba(169,99,21,.50), rgba(36,116,169,.28)); }
.metric-card:nth-child(5)::after { right: 126px; background: rgba(184,60,73,.34); }
.metric-card span { color: var(--muted); font-weight: 540; }
.metric-card strong { display: block; margin: 6px 0 4px; font-size: 27px; line-height: 1; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.metric-card small { color: var(--muted); font-size: 12px; }
.dashboard-grid, .split-layout, .report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; }
.surface { padding: 16px; }
.large-surface { min-height: 306px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-heading.compact { margin-bottom: 10px; }
.section-heading h3 { margin: 0; font-size: 19px; line-height: 1.18; font-weight: 600; letter-spacing: -.032em; }

.case-queue, .rank-list, .mini-table { display: grid; gap: 8px; }
.case-queue, .quality-table, .department-table { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(255,255,255,.54); }
.compact-case-table, .quality-table table, .department-table table { width: 100%; border-collapse: collapse; background: transparent; }
.compact-case-table { min-width: 820px; }
.quality-table table { min-width: 960px; }
.compact-case-table th, .quality-table th, .department-table th {
  color: #718394;
  font-size: 12px;
  font-weight: 560;
  background: rgba(245,249,251,.72);
}
.compact-case-table th, .compact-case-table td,
.quality-table th, .quality-table td,
.department-table th, .department-table td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--line-soft); }
.compact-case-table tbody tr, .quality-table tbody tr { transition: background .14s ease; }
.compact-case-table tbody tr:hover, .quality-table tbody tr:hover { background: rgba(234,245,249,.58); }
.case-link { color: var(--primary-2); font-weight: 560; text-decoration: none; }

.queue-item, .task-item, .defect-card, .doc-item, .candidate-row, .rule-tile, .rectify-card, .empty-card {
  padding: 10px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line-soft);
  border-radius: 13px;
}
.queue-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.queue-item h4, .defect-card h4, .rule-tile h4 { margin: 0 0 5px; font-weight: 590; }
.queue-item p, .defect-card p, .rule-tile p { margin: 0; color: var(--muted); line-height: 1.55; }
.status-pill, .risk-pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 560; white-space: nowrap; }
.rectify-card .status-pill,
.rectify-card .risk-pill,
.rectify-card .tiny-button {
  white-space: normal;
}
.status-pill.calm, .risk-pill.low { color: #087059; background: var(--aqua-soft); }
.status-pill.warning, .risk-pill.mid { color: #8a5515; background: var(--amber-soft); }
.status-pill.danger, .risk-pill.high { color: #a73542; background: var(--red-soft); }
.rank-item { display: grid; grid-template-columns: 24px 1fr auto; gap: 9px; align-items: center; }
.rank-index { display: grid; place-items: center; width: 22px; height: 22px; color: var(--primary-2); background: var(--primary-soft); border-radius: 8px; font-weight: 610; }
.rank-bar, .progress-track { height: 7px; overflow: hidden; background: #dbe8ee; border-radius: 999px; }
.rank-bar span, .progress-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--aqua)); }
.task-strip { margin-top: 14px; }
.task-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.task-item p { margin: 0 0 8px; color: var(--muted); }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.filter-grid label, .table-toolbar label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 560; }
.filter-grid label.span-2 { grid-column: span 2; }
.date-range-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.date-range-field span { color: var(--muted); font-size: 12px; text-align: center; }
.batch-import-panel {
  margin-bottom: 18px;
  padding: 14px;
  background: rgba(248, 251, 252, .82);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
}
.import-log {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.import-log-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.import-log-item strong {
  font-weight: 560;
}
.import-log-item span {
  color: var(--muted);
  text-align: right;
}
.rule-picker { margin: 18px 0; }
.rule-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.rule-option { padding: 12px; text-align: left; background: rgba(255,255,255,.62); border: 1px solid var(--line-soft); border-radius: 13px; }
.rule-option.is-selected { border-color: rgba(36,116,169,.46); background: var(--primary-soft); box-shadow: inset 0 0 0 1px rgba(36,116,169,.08); }
.rule-option strong { display: block; margin-bottom: 4px; font-weight: 590; }
.rule-option span { color: var(--muted); font-size: 12px; }
.candidate-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.candidate-row input { accent-color: var(--primary); }
.candidate-row strong { display: block; font-weight: 590; }
.candidate-row span { color: var(--muted); font-size: 12px; }
.segmented { display: flex; flex-wrap: wrap; gap: 7px; }
.segment-button { min-height: 32px; padding: 0 11px; color: #546778; background: rgba(255,255,255,.58); border: 1px solid var(--line-soft); border-radius: 999px; font-weight: 540; }
.segment-button.is-active { color: var(--primary-2); background: var(--primary-soft); border-color: #c7e0eb; }
.table-toolbar { display: flex; gap: 10px; align-items: end; margin-bottom: 12px; }
.bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.bulk-count,
.selection-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}
.selection-summary {
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.selection-summary strong,
.bulk-count strong {
  color: var(--primary-2);
  font-weight: 600;
}

.case-detail-layout {
  --detail-nav-width: 276px;
  --detail-defect-width: 376px;
  --detail-content-height: calc(100vh - 286px);
  display: grid;
  grid-template-columns: var(--detail-nav-width) 10px minmax(520px, 1fr) 10px var(--detail-defect-width);
  grid-template-areas:
    "summary summary summary summary summary"
    "docs resizeLeft record resizeRight defects";
  gap: 14px;
  align-items: stretch;
}
.case-summary { grid-area: summary; }
.document-nav,
.record-panel,
.defect-panel {
  height: var(--detail-content-height);
  min-height: 520px;
  overflow: hidden;
}
.document-nav { grid-area: docs; align-self: stretch; display: flex; flex-direction: column; }
.record-panel { grid-area: record; display: flex; flex-direction: column; }
.defect-panel { grid-area: defects; align-self: stretch; display: flex; flex-direction: column; }
.detail-resizer {
  position: relative;
  align-self: stretch;
  width: 10px;
  cursor: col-resize;
}
.detail-resizer::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  border-radius: 999px;
  background: rgba(77, 111, 153, .12);
  transition: background .16s ease;
}
.detail-resizer:hover::before,
.detail-resizer.is-dragging::before {
  background: rgba(77, 111, 153, .38);
}
.detail-resizer-left { grid-area: resizeLeft; }
.detail-resizer-right { grid-area: resizeRight; }
.score-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 72px; height: 42px; color: var(--primary-2); background: var(--primary-soft); border-radius: 999px; font-size: 20px; font-weight: 600; }
.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.summary-stat { padding: 12px; background: rgba(248,251,252,.82); border: 1px solid var(--line-soft); border-radius: 13px; }
.summary-stat span { color: var(--muted); font-size: 12px; }
.summary-stat strong { display: block; margin-top: 5px; font-size: 19px; font-weight: 600; }
.document-nav #documentList,
.medical-record,
.defect-panel #defectCards {
  overflow-y: auto;
  padding-right: 4px;
}
.defect-panel #defectCards {
  flex: 1;
}
.doc-item { width: 100%; margin-bottom: 8px; text-align: left; color: var(--text-soft); }
.doc-item.is-active { color: var(--primary-2); background: var(--primary-soft); border-color: #cfe4ed; }
.doc-item strong { display: block; margin-bottom: 4px; font-weight: 590; }
.doc-item span { color: var(--muted); font-size: 12px; }
.medical-record { display: grid; gap: 10px; color: #243546; line-height: 1.75; flex: 1; }
.medical-record p { margin: 0; padding: 11px 12px; background: rgba(249,252,253,.72); border: 1px solid var(--line-soft); border-radius: 12px; }
.evidence { color: #9d3a30; background: #fff1ed; border-radius: 6px; padding: 1px 4px; }
.defect-card { margin-bottom: 10px; }
.defect-card header { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 7px; }
.defect-card p + p { margin-top: 8px; }
.defect-meta, .defect-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.tiny-button { min-height: 28px; padding: 0 9px; color: #5a7597; background: rgba(248,250,253,.96); border: 1px solid rgba(36, 56, 86, .10); border-radius: 12px; font-weight: 500; }
.tiny-button.danger { color: #a26b73; background: rgba(252, 243, 246, .94); border-color: rgba(174, 116, 127, .12); }
.report-shell {
  --report-content-height: calc(100vh - 214px);
  display: grid;
  gap: 12px;
}
.report-head {
  padding-bottom: 12px;
}
.report-workspace {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.report-nav,
.report-panel {
  height: var(--report-content-height);
  min-height: 520px;
  overflow: hidden;
}
.report-nav {
  display: flex;
  flex-direction: column;
}
.report-outline,
.report-panel-scroll {
  overflow-y: auto;
  min-height: 0;
}
.report-outline {
  display: grid;
  gap: 8px;
  padding-right: 4px;
}
.report-outline-item {
  width: 100%;
  padding: 10px 11px;
  color: var(--text-soft);
  text-align: left;
  background: rgba(255,255,255,.56);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.report-outline-item:hover {
  color: var(--primary-2);
  background: rgba(240,247,250,.84);
  border-color: #d6e4eb;
  transform: translateX(1px);
}
.report-outline-item.is-active {
  color: var(--primary-2);
  background: rgba(234,245,249,.88);
  border-color: #cfe0e8;
}
.report-outline-item strong,
.report-outline-item span {
  display: block;
}
.report-outline-item strong {
  font-weight: 540;
}
.report-outline-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.report-panel {
  display: flex;
  flex-direction: column;
  padding: 12px;
}
.report-panel-scroll {
  height: 100%;
  padding-right: 4px;
}
.report-paper {
  padding: 24px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(222,233,238,.94);
  border-radius: 15px;
  box-shadow: 0 18px 44px rgba(37, 69, 91, .045);
}
.report-paper > *:first-child {
  margin-top: 0;
}
.report-paper h4 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 520;
}
.report-patient-meta {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}
.report-paper h5,
.report-section-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 520;
}
.report-paper dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.report-paper dl div {
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.report-paper dt {
  color: var(--muted);
  font-size: 12px;
}
.report-paper dd {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 540;
}
.report-section {
  scroll-margin-top: 16px;
}
.report-section + .report-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.report-defect-list {
  margin: 0;
  padding-left: 20px;
}
.report-defect-list li {
  margin-bottom: 10px;
  line-height: 1.65;
}
.report-note {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}
.report-doc-list {
  display: grid;
  gap: 8px;
}
.report-doc-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  background: rgba(248,251,252,.76);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.report-doc-item strong {
  display: block;
  font-weight: 530;
}
.report-doc-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.export-panel { align-self: start; }
.check-row { display: flex; gap: 9px; align-items: center; margin: 13px 0; color: var(--muted); font-weight: 540; }
.check-row input { accent-color: var(--primary); }
.inline-actions { justify-content: flex-end; }
.rule-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rule-tile { min-height: 154px; }
.rules-dashboard-grid { display: grid; gap: 14px; }
.rules-dashboard-grid .rule-board { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rules-dashboard-grid {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}
.rules-dashboard-grid > .rule-board,
.rules-dashboard-grid > .analytics-grid {
  min-width: 0;
}
.rules-dashboard-grid > .analytics-grid {
  height: auto;
}
.rule-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.rule-meta span { padding: 5px 8px; color: var(--primary-2); background: var(--primary-soft); border-radius: 999px; font-size: 12px; font-weight: 540; }
.rectify-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rectify-lane { min-height: 500px; padding: 12px; background: rgba(247,250,251,.66); border: 1px solid var(--line-soft); border-radius: 16px; }
.rectify-lane header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.rectify-lane header strong { font-weight: 590; }
.rectify-lane header span { display: grid; place-items: center; min-width: 24px; height: 24px; color: var(--primary-2); background: var(--primary-soft); border-radius: 999px; font-weight: 600; }
.rectify-lane > p { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.rectify-card, .empty-card { margin-bottom: 9px; background: rgba(255,255,255,.72); }
.rectify-card {
  display: grid;
  gap: 10px;
}
.rectify-card-main strong,
.rectify-card-main span { display: block; }
.rectify-card-main strong { font-weight: 590; }
.rectify-card-main span { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.rectify-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.rectify-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rectify-card-actions .tiny-button {
  width: fit-content;
}
.empty-card { color: var(--muted); text-align: center; }
.analytics-grid {
  --rules-content-height: calc(100vh - 312px);
  display: grid;
  gap: 12px;
  min-height: 0;
}
.analytics-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.analytics-cards article { padding: 15px; background: rgba(248,251,252,.72); border: 1px solid var(--line-soft); border-radius: 13px; }
.analytics-cards span, .analytics-cards small { color: var(--muted); font-size: 12px; font-weight: 540; }
.analytics-cards strong { display: block; margin: 6px 0; font-size: 27px; font-weight: 600; letter-spacing: -.04em; }
.analytics-cards-compact article {
  min-height: 92px;
  padding: 12px 15px;
}
.analytics-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, .9fr);
  gap: 12px;
  min-height: var(--rules-content-height);
}
.analytics-workbench-fixed {
  grid-template-columns: 336px minmax(0, 1fr);
  align-items: stretch;
}
.analytics-stage {
  min-width: 0;
  min-height: 0;
}
.department-directory,
.analytics-stage .trend-panel-refined {
  height: var(--rules-content-height);
  min-height: 540px;
}
.department-directory {
  overflow: hidden;
}
.department-directory-list {
  overflow-y: auto;
  padding-right: 4px;
}
.analytics-stage .trend-panel-refined {
  overflow: hidden;
}
.department-compare,
.trend-panel {
  padding: 14px;
  background: rgba(248,251,252,.72);
  border: 1px solid var(--line-soft);
  border-radius: 13px;
}
.department-compare,
.trend-panel-refined {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.department-compare h4,
.trend-panel h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 520;
}
.department-compare .section-heading.compact,
.trend-panel-refined .section-heading.compact {
  align-items: flex-start;
  margin-bottom: 8px;
}
.department-compare .section-heading.compact p,
.trend-panel-refined .section-heading.compact p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.department-rows {
  display: grid;
  gap: 8px;
  flex: 1;
  min-height: 0;
}
.department-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.05fr) repeat(4, minmax(96px, .78fr));
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(36,56,86,.06);
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.department-row:hover {
  transform: translateX(1px);
  border-color: rgba(125, 162, 207, .24);
}
.department-row.is-active {
  background: rgba(236, 243, 251, .86);
  border-color: rgba(125, 162, 207, .34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 26px rgba(59, 89, 130, .07);
}
.department-row-main {
  min-width: 0;
}
.department-name-block {
  display: flex;
  align-items: center;
  gap: 8px;
}
.department-name-block strong {
  font-weight: 530;
}
.department-row-main small,
.department-row-metric span,
.department-row-metric small {
  color: var(--muted);
  font-size: 12px;
}
.department-row-main small {
  display: block;
  margin-top: 5px;
  line-height: 1.4;
}
.department-row-metric {
  display: grid;
  gap: 5px;
  align-content: center;
}
.department-row-metric strong {
  font-size: 19px;
  font-weight: 520;
  line-height: 1;
}
.department-row-metric small.up {
  color: #5f8a74;
}
.department-row-metric small.down {
  color: #9b6e76;
}
.metric-track {
  position: relative;
  height: 6px;
  overflow: hidden;
  background: rgba(190, 207, 225, .34);
  border-radius: 999px;
}
.metric-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, rgba(98, 135, 180, .92), rgba(140, 186, 214, .84));
  border-radius: inherit;
}
.metric-track.subtle span {
  background: linear-gradient(90deg, rgba(125,162,207,.74), rgba(183,204,228,.68));
}
.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trend-focus-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(243,248,253,.74));
  border: 1px solid rgba(36,56,86,.06);
  border-radius: 14px;
}
.trend-focus-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.trend-focus-card strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  font-weight: 520;
}
.trend-focus-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.trend-focus-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.trend-focus-metrics div {
  min-width: 72px;
  padding: 8px 10px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(36,56,86,.05);
  border-radius: 12px;
}
.trend-focus-metrics span,
.trend-focus-metrics strong {
  display: block;
}
.trend-focus-metrics span {
  color: var(--muted);
  font-size: 11px;
}
.trend-focus-metrics strong {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 520;
}
.trend-svg-frame {
  display: grid;
  gap: 8px;
  min-height: 0;
}
.trend-svg {
  width: 100%;
  height: 248px;
  display: block;
}
.trend-grid-line {
  stroke: rgba(36, 56, 86, .08);
  stroke-dasharray: 4 6;
}
.trend-area {
  fill: url(#trendAreaFill);
}
.trend-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.trend-line.total {
  stroke: rgba(101, 137, 183, .92);
}
.trend-line.closed {
  stroke: rgba(174, 199, 227, .98);
}
.trend-point {
  stroke: rgba(255,255,255,.88);
  stroke-width: 2.5;
}
.trend-point.total {
  fill: rgba(101, 137, 183, .98);
}
.trend-point.closed {
  fill: rgba(174, 199, 227, .98);
}
.trend-axis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.trend-axis-item {
  text-align: center;
}
.trend-axis-item strong {
  display: block;
  font-size: 14px;
  font-weight: 520;
}
.trend-axis-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.analytics-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 10px;
  margin-top: 10px;
}
.source-panel {
  padding: 12px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(36,56,86,.05);
  border-radius: 14px;
}
.mini-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
}
.mini-panel-head h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 520;
}
.mini-panel-head small {
  color: var(--muted);
  font-size: 12px;
}
.source-list {
  display: grid;
  gap: 10px;
}
.source-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: center;
}
.source-item span {
  color: var(--text-soft);
  font-size: 12px;
}
.source-item strong {
  font-size: 13px;
  font-weight: 520;
  text-align: right;
}
.source-bar {
  height: 6px;
  overflow: hidden;
  background: rgba(190, 207, 225, .3);
  border-radius: 999px;
}
.source-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(102, 138, 184, .94), rgba(165, 197, 226, .88));
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(125,162,207,.6);
}
.legend-dot.total {
  background: rgba(98, 135, 180, .88);
}
.legend-dot.closed {
  background: rgba(161, 195, 225, .9);
}
.trend-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
  align-items: end;
  min-height: 0;
  padding: 4px 2px 0;
}
.trend-column {
  display: grid;
  gap: 8px;
  align-items: end;
  min-height: 0;
}
.trend-bars {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 6px;
  min-height: 132px;
  padding: 8px 0 0;
  border-bottom: 1px solid rgba(36, 56, 86, .08);
}
.trend-bars .bar {
  width: clamp(12px, 1.15vw, 16px);
  min-height: 20px;
  border-radius: 999px 999px 4px 4px;
}
.trend-bars .bar.total {
  background: linear-gradient(180deg, rgba(94, 130, 178, .96), rgba(139, 166, 201, .82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24);
}
.trend-bars .bar.closed {
  background: linear-gradient(180deg, rgba(167, 196, 225, .95), rgba(202, 220, 239, .9));
}
.trend-meta {
  display: grid;
  justify-items: center;
  gap: 4px;
}
.trend-meta strong {
  font-size: 14px;
  font-weight: 520;
}
.trend-meta small {
  color: var(--muted);
  font-size: 11px;
}
.trend-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
}
.trend-summary div {
  padding: 10px 12px;
  background: rgba(255,255,255,.56);
  border: 1px solid rgba(36,56,86,.05);
  border-radius: 12px;
}
.trend-summary span,
.trend-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.trend-summary strong {
  display: block;
  margin: 4px 0;
  font-size: 15px;
  font-weight: 520;
}
.bars { display: none; }
.bars span { display: none; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: 360px; padding: 12px 14px; color: white; background: #17324d; border-radius: 13px; box-shadow: var(--shadow-md); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .nav-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sidebar-panel { display: none; }
  .dashboard-grid, .split-layout, .report-layout { grid-template-columns: 1fr; }
  .metric-grid, .task-list, .rule-board, .rectify-board, .analytics-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rules-dashboard-grid .rule-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-workbench,
  .analytics-workbench-fixed { grid-template-columns: 1fr; min-height: auto; }
  .department-directory,
  .analytics-stage .trend-panel-refined { height: auto; min-height: 0; }
  .department-row { grid-template-columns: 1fr 1fr; }
  .trend-focus-card,
  .analytics-bottom-grid { grid-template-columns: 1fr; }
  .trend-focus-card { flex-direction: column; align-items: flex-start; }
  .trend-summary { grid-template-columns: 1fr; }
  .case-detail-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "summary" "docs" "record" "defects";
  }
  .detail-resizer { display: none; }
  .report-workspace {
    grid-template-columns: 1fr;
  }
  .report-nav,
  .report-panel {
    height: auto;
    min-height: 0;
  }
  .report-panel-scroll {
    overflow: visible;
  }
  .document-nav,
  .record-panel,
  .defect-panel { height: auto; min-height: 0; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .workspace { padding: 16px; }
  .topbar, .section-heading, .table-toolbar, .control-strip { align-items: stretch; flex-direction: column; }
  .topbar-actions, .action-row, .control-actions { align-items: stretch; flex-direction: column; }
  .search-box input { width: 100%; }
  .nav-list, .metric-grid, .rule-options, .summary-grid, .report-paper dl, .task-list, .rule-board, .rectify-board, .analytics-cards { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-grid label.span-2 { grid-column: span 1; }
  .date-range-field { grid-template-columns: 1fr; }
  .rules-dashboard-grid .rule-board { grid-template-columns: 1fr; }
  .report-doc-item { grid-template-columns: 1fr; }
  .department-row { grid-template-columns: 1fr; }
  .trend-axis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .source-item { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@media print {
  .sidebar, .topbar, .export-panel, .toast { display: none !important; }
  .app-shell { display: block; }
  .workspace { padding: 0; }
  .view { display: none !important; }
  #reportView { display: block !important; }
  .surface, .report-paper { box-shadow: none; border: 0; }
}

/* Final clinical-minimal refinements */
.case-link {
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.case-link small,
.quality-table small { color: var(--muted); font-size: 12px; }
.complete-meter { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.mini-meter { display: inline-block; width: 54px; height: 6px; overflow: hidden; background: #dce9ee; border-radius: 999px; vertical-align: middle; }
.mini-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--aqua)); }
.surface > .section-heading:first-child .eyebrow { color: #8393a1; font-weight: 520; }
.quality-table .button { min-height: 30px; padding: 0 10px; border-radius: 999px; }
.rectify-lane:nth-child(1) { background: linear-gradient(180deg, rgba(255,255,255,.66), rgba(239,247,248,.50)); }
.rectify-lane:nth-child(2) { background: linear-gradient(180deg, rgba(255,251,244,.58), rgba(248,250,251,.54)); }
.rectify-lane:nth-child(3) { background: linear-gradient(180deg, rgba(238,247,244,.58), rgba(248,250,251,.54)); }
.rectify-lane:nth-child(4) { background: linear-gradient(180deg, rgba(239,247,248,.58), rgba(248,250,251,.54)); }

/* Lower visual weight pass */
.topbar h2 { font-size: 28px; font-weight: 500; }
.brand-block h1 { font-weight: 500; }
.nav-item span { font-weight: 540; }
.section-heading h3 { font-weight: 500; }
.metric-card strong, .summary-stat strong, .analytics-cards strong { font-weight: 520; }
.compact-case-table td strong,
.quality-table td strong,
.task-item strong,
.rank-item strong,
.defect-card h4,
.rule-tile h4,
.rectify-card strong,
.doc-item strong { font-weight: 560; }
.button, .text-button, .tiny-button, .status-pill, .risk-pill { font-weight: 500; }

/* Review fixes: active defect card, evidence mark, doc status pills, 3-col filters */
.defect-card.is-active { border-color: rgba(36,116,169,.42); box-shadow: 0 0 0 3px rgba(36,116,169,.06); }
.doc-item .status-pill { margin-right: 4px; }
mark.evidence { color: #9d3a30; background: #fff1ed; border-radius: 6px; padding: 1px 4px; scroll-margin-top: 80px; }
.quality-table .button { margin-right: 4px; }

/* 2026 refresh: cold minimal blue system */
:root {
  --bg: #f5f8fc;
  --bg-2: #eef4fb;
  --bg-3: #e7eef8;
  --surface: rgba(255, 255, 255, 0.66);
  --surface-strong: rgba(255, 255, 255, 0.8);
  --surface-solid: rgba(250, 252, 255, 0.96);
  --surface-soft: rgba(246, 249, 253, 0.9);
  --surface-tint: rgba(239, 245, 252, 0.84);
  --line: rgba(36, 56, 86, 0.12);
  --line-soft: rgba(36, 56, 86, 0.08);
  --line-strong: rgba(36, 56, 86, 0.18);
  --text: #162033;
  --text-soft: #33465f;
  --muted: #66788e;
  --muted-2: #8ea0b4;
  --primary: #7da2cf;
  --primary-2: #4d6f99;
  --primary-soft: rgba(223, 234, 248, 0.9);
  --aqua: #8db2d8;
  --aqua-soft: rgba(232, 241, 251, 0.96);
  --amber: #a98755;
  --amber-soft: rgba(251, 244, 230, 0.92);
  --red: #ae747f;
  --red-soft: rgba(252, 239, 243, 0.94);
  --shadow-xs: 0 1px 2px rgba(18, 34, 56, .03);
  --shadow-sm: 0 16px 36px rgba(25, 45, 76, .07);
  --shadow-md: 0 26px 72px rgba(19, 38, 66, .10);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.84);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font: "Instrument Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Instrument Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0;
  background:
    radial-gradient(circle at 7% 8%, rgba(152, 184, 226, .18), transparent 18%),
    radial-gradient(circle at 92% 6%, rgba(196, 217, 245, .16), transparent 22%),
    radial-gradient(circle at 48% 100%, rgba(221, 233, 248, .22), transparent 32%),
    linear-gradient(180deg, #f8fbff 0, var(--bg) 32%, #f4f8fc 100%);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(125, 162, 207, .18);
}

.sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,.48), rgba(247,250,254,.34));
  border-right: 1px solid rgba(36, 56, 86, .08);
  backdrop-filter: blur(24px);
}

.eyebrow {
  color: var(--muted);
  font-weight: 500;
  letter-spacing: .04em;
}

.brand-copy h1,
.topbar h2,
.section-heading h3,
.report-paper h4,
.trend-panel h4 {
  font-family: var(--font-display);
}

.topbar h2 {
  font-size: 27px;
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -.014em;
}

.section-heading h3 {
  font-size: 18px;
  line-height: 1.22;
  font-weight: 500;
  letter-spacing: -.008em;
}

.nav-item {
  color: #5d6f86;
  border-radius: 12px;
}

.nav-item span,
.button,
.text-button,
.tiny-button,
.status-pill,
.risk-pill,
.segment-button,
.case-link,
.filter-grid label,
.table-toolbar label,
.analytics-cards span,
.analytics-cards small,
.check-row,
.rule-meta span {
  font-weight: 500;
}

.nav-item:hover {
  color: var(--primary-2);
  background: rgba(236, 242, 249, .72);
}

.nav-item.is-active {
  color: var(--primary-2);
  background: rgba(232, 239, 247, .82);
}

.nav-item::before {
  width: 1px;
  border-radius: 999px;
}

.sidebar-panel {
  background: rgba(255,255,255,.4);
  border-color: rgba(36, 56, 86, .08);
  backdrop-filter: blur(18px);
}

.compact-status span {
  color: var(--primary-2);
  font-weight: 540;
  letter-spacing: -.008em;
}

.search-box input,
.filter-grid input,
.filter-grid select,
.table-toolbar select {
  background: rgba(255,255,255,.72);
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: var(--glass-shadow), var(--shadow-xs);
  backdrop-filter: blur(14px);
}

.search-box input::placeholder,
.filter-grid input::placeholder {
  color: #91a2b6;
}

.date-range-field input[type="date"] {
  min-width: 0;
}

.button {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 15px;
  font-weight: 490;
}

.button-primary {
  color: #4b678b;
  background: rgba(230, 239, 249, .98);
  border-color: rgba(87, 119, 157, .14);
  box-shadow: none;
}

.button-secondary {
  color: var(--primary-2);
  background: rgba(246, 249, 253, .92);
  border-color: rgba(36, 56, 86, .10);
  box-shadow: none;
}

.button-ghost {
  color: var(--primary-2);
  background: rgba(255,255,255,.54);
  border-color: rgba(36, 56, 86, .09);
  box-shadow: none;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: none;
  filter: brightness(.985);
}

.control-strip,
.surface,
.metric-card,
.candidate-row,
.doc-item,
.rule-option,
.rule-tile,
.defect-card,
.task-item,
.rectify-card,
.empty-card,
.summary-stat,
.report-paper div,
.analytics-cards article,
.trend-panel,
.rectify-lane,
.case-queue,
.quality-table,
.department-table,
.batch-import-panel {
  border-color: rgba(36, 56, 86, .08);
  box-shadow: var(--glass-shadow), var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.surface,
.metric-card,
.candidate-row,
.doc-item,
.rule-option,
.rule-tile,
.defect-card,
.task-item,
.rectify-card,
.empty-card,
.summary-stat,
.batch-import-panel {
  background: var(--surface-strong);
}

.case-queue,
.quality-table,
.department-table {
  background: rgba(255,255,255,.5);
}

.control-strip {
  background: rgba(255,255,255,.68);
}

.control-strip strong,
.import-log-item strong,
.rectify-lane header strong,
.compact-case-table td strong,
.quality-table td strong,
.task-item strong,
.rank-item strong,
.defect-card h4,
.rule-tile h4,
.rectify-card strong,
.doc-item strong,
.rule-option strong,
.candidate-row strong {
  color: var(--text);
  font-weight: 525;
}

.metric-card span,
.selection-summary,
.bulk-count,
.queue-item p,
.defect-card p,
.rule-tile p,
.import-log-item span,
.doc-item span,
.candidate-row span,
.task-item p {
  color: var(--muted);
}

.metric-card {
  min-height: 96px;
  padding: 16px 16px 14px;
}

.metric-card strong,
.summary-stat strong,
.analytics-cards strong,
.score-badge,
.report-paper dd {
  font-family: var(--font-display);
  font-weight: 520;
  letter-spacing: -.01em;
}

.metric-card strong {
  font-size: 24px;
  line-height: 1.02;
}

.summary-stat strong,
.report-paper dd {
  font-size: 18px;
}

.analytics-cards strong {
  font-size: 25px;
}

.metric-card::after {
  left: 16px;
  right: 16px;
  bottom: 12px;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(125,162,207,.54), rgba(173,197,227,.18));
  opacity: .7;
}

.metric-card:nth-child(2)::after { right: 42px; }
.metric-card:nth-child(3)::after { right: 80px; background: linear-gradient(90deg, rgba(174,116,127,.34), rgba(169,135,85,.18)); }
.metric-card:nth-child(4)::after { right: 92px; background: linear-gradient(90deg, rgba(169,135,85,.32), rgba(125,162,207,.16)); }
.metric-card:nth-child(5)::after { right: 136px; background: rgba(174,116,127,.22); }

.rank-index,
.score-badge,
.rule-meta span,
.segment-button.is-active,
.doc-item.is-active,
.nav-item.is-active,
.compact-status span {
  background-color: rgba(232, 239, 247, .92);
}

.rank-index,
.score-badge,
.rule-meta span,
.segment-button.is-active,
.doc-item.is-active,
.nav-item.is-active,
.case-link,
.text-button,
.button-secondary,
.button-ghost {
  color: var(--primary-2);
}

.segment-button {
  min-height: 30px;
  padding: 0 10px;
  background: rgba(247, 250, 253, .94);
  border-color: rgba(36, 56, 86, .08);
  border-radius: 11px;
}

.status-pill.calm,
.risk-pill.low {
  color: #5f7895;
  background: rgba(241, 247, 252, .94);
}

.status-pill.warning,
.risk-pill.mid {
  color: #92734d;
  background: rgba(251, 245, 234, .92);
}

.status-pill.danger,
.risk-pill.high {
  color: #9a6a74;
  background: rgba(252, 242, 245, .92);
}

.bars span,
.rank-bar span,
.progress-track span,
.mini-meter span {
  background: linear-gradient(90deg, #7ea4d1, #adc5e3);
}

.rank-bar,
.progress-track,
.mini-meter {
  background: rgba(189, 205, 225, .42);
}

.rectify-lane:nth-child(1),
.rectify-lane:nth-child(2),
.rectify-lane:nth-child(3),
.rectify-lane:nth-child(4) {
  background: linear-gradient(180deg, rgba(255,255,255,.66), rgba(240,246,252,.82));
}

.report-paper {
  background: rgba(255,255,255,.92);
  border-color: rgba(36, 56, 86, .08);
}

.report-paper h4 {
  font-weight: 500;
}

.compact-case-table th,
.quality-table th,
.department-table th {
  color: #6c7f95;
  background: rgba(243, 247, 252, .92);
}

.compact-case-table tbody tr:hover,
.quality-table tbody tr:hover {
  background: rgba(235, 242, 250, .64);
}

.import-log-item,
.medical-record p,
.analytics-cards article,
.trend-panel,
.summary-stat,
.rule-option,
.candidate-row,
.doc-item,
.rectify-card,
.empty-card,
.queue-item,
.defect-card,
.task-item {
  border-color: rgba(36, 56, 86, .07);
}

.toast {
  background: rgba(28, 43, 67, .88);
  backdrop-filter: blur(18px);
}

.review-workbench {
  display: grid;
  grid-template-columns: minmax(238px, .78fr) minmax(620px, 1.82fr) minmax(300px, 1fr);
  gap: 18px;
  min-height: calc(100vh - 132px);
}

.review-queue-panel,
.review-case-panel,
.evidence-panel {
  min-width: 0;
}

.queue-summary,
.defect-actions,
.review-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.queue-filter,
.review-queue-card {
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.58);
  border-radius: 14px;
  padding: 10px 12px;
  text-align: left;
}

.review-queue-card {
  display: grid;
  width: 100%;
  gap: 4px;
  margin-top: 10px;
  cursor: pointer;
}

.review-queue-card.is-active {
  border-color: rgba(77, 111, 153, .22);
  background: rgba(232, 239, 247, .86);
}

.full-width {
  width: 100%;
  margin-top: 12px;
}

.review-case-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.case-grade-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.case-grade-summary div {
  min-width: 0;
  border: 1px solid rgba(36, 56, 86, .08);
  border-radius: 14px;
  background: rgba(248, 250, 253, .9);
  padding: 10px 12px;
}

.case-grade-summary span,
.case-grade-summary small {
  display: block;
  color: var(--muted-text);
  font-size: 12px;
  line-height: 1.35;
}

.case-grade-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.grade-good { color: #15803d !important; }
.grade-warning { color: #b45309 !important; }
.grade-danger { color: #b91c1c !important; }

.review-defect-list {
  display: grid;
  gap: 12px;
}

.review-defect-card,
.evidence-box {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.62);
  padding: 14px;
}

.defect-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.standard-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.standard-chip-row span {
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #35617d;
  background: rgba(229, 245, 248, .88);
  font-size: 12px;
  font-weight: 500;
}

.defect-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.defect-evidence-grid dt {
  color: var(--muted-text);
  font-size: 12px;
}

.defect-evidence-grid dd {
  margin: 3px 0 0;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.evidence-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.evidence-box small {
  display: block;
  margin-top: 6px;
  color: var(--muted-text);
  line-height: 1.45;
}

.report-grade-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.report-grade-strip div {
  border: 1px solid rgba(36, 56, 86, .08);
  border-radius: 14px;
  background: rgba(248, 250, 253, .92);
  padding: 10px 12px;
}

.report-grade-strip span,
.report-grade-strip small {
  display: block;
  color: var(--muted-text);
  font-size: 12px;
}

.report-grade-strip strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.case-grade-summary-compact {
  grid-template-columns: .7fr .7fr .7fr minmax(0, 1.9fr);
}

.defect-quick-meta,
.doctor-fix-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.defect-quick-meta span,
.doctor-fix-meta span {
  color: var(--muted-text);
  background: rgba(248, 250, 253, .9);
  border: 1px solid rgba(36, 56, 86, .08);
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.2;
}

.tiny-button.quiet {
  color: var(--muted-text);
  background: rgba(248, 250, 253, .75);
}

.report-grade-strip.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-report-list li {
  display: grid;
  gap: 4px;
}

.compact-report-list li span {
  color: var(--muted-text);
  font-size: 13px;
  line-height: 1.45;
}

.report-action-grid,
.report-kpi-grid,
.report-rank-table {
  display: grid;
  gap: 10px;
}

.report-action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-action-grid div,
.report-kpi-grid div,
.report-rank-table div {
  border: 1px solid rgba(36, 56, 86, .08);
  border-radius: 14px;
  background: rgba(248, 250, 253, .92);
  padding: 12px;
}

.report-action-grid span,
.report-kpi-grid span,
.report-kpi-grid small,
.report-rank-table span,
.trace-list small {
  color: var(--muted-text);
  font-size: 12px;
}

.report-action-grid strong,
.report-kpi-grid strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.report-rank-table div {
  display: grid;
  grid-template-columns: 1fr repeat(3, auto);
  align-items: center;
  gap: 10px;
}

.trace-list p {
  margin: 0 0 10px;
  line-height: 1.5;
}

.standard-profile-section {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-muted);
  padding: 16px;
}

.standard-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.standard-profile-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(36, 56, 86, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  padding: 12px;
}

.standard-profile-card span,
.standard-profile-card small,
.standard-profile-card em {
  color: var(--muted-text);
  font-size: 12px;
  line-height: 1.45;
}

.standard-profile-card p {
  margin: 0;
  line-height: 1.5;
}

.rules-governance {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 280px;
  gap: 14px;
  min-height: min(620px, calc(100vh - 230px));
}

.rules-directory,
.rule-detail-panel,
.rule-effect-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-muted);
  padding: 14px;
}

.rules-directory {
  display: grid;
  align-content: start;
  gap: 10px;
}

.rule-directory-item {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(36, 56, 86, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  padding: 12px;
}

.rule-directory-item.is-active {
  border-color: rgba(36,116,169,.42);
  background: var(--primary-soft);
}

.rule-directory-item span,
.rule-directory-item em {
  color: var(--muted-text);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.rule-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.rule-detail-grid div,
.rule-effect-metrics div {
  border: 1px solid rgba(36, 56, 86, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  padding: 12px;
}

.rule-detail-grid dt,
.rule-effect-metrics span {
  color: var(--muted-text);
  font-size: 12px;
}

.rule-detail-grid dd,
.rule-effect-metrics strong {
  display: block;
  margin: 5px 0 0;
  font-weight: 590;
  overflow-wrap: anywhere;
}

.rule-effect-panel,
.rule-effect-metrics,
.rule-effect-actions {
  display: grid;
  align-content: start;
  gap: 10px;
}

@media (max-width: 1180px) {
  .rules-governance {
    grid-template-columns: 1fr;
  }

  .rule-detail-grid,
  .report-action-grid,
  .report-kpi-grid {
    grid-template-columns: 1fr;
  }

  .report-rank-table div {
    grid-template-columns: 1fr;
  }
}

.doctor-workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

.doctor-task-stats,
.doctor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doctor-task-card,
.doctor-defect-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-muted);
  padding: 14px;
}

.doctor-task-card {
  display: grid;
  width: 100%;
  gap: 4px;
  margin-top: 10px;
  text-align: left;
}

.doctor-task-card.is-active {
  border-color: #f59e0b;
  background: #fffbeb;
}

.doctor-defect-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.rectify-note {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.rectify-note textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  resize: vertical;
}

.recovery-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.recovery-lane {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-muted);
  padding: 14px;
}

.recovery-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  margin-top: 10px;
}

.report-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.report-template-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-muted);
  padding: 14px;
  display: grid;
  gap: 6px;
  text-align: left;
}

.report-template-card.is-active {
  border-color: #2563eb;
  background: #eff6ff;
}

/* Report center: output workspace, not another case detail page. */
.report-head {
  display: grid;
  gap: 12px;
}

.report-head .section-heading {
  margin-bottom: 0;
}

.report-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-type-tabs .segment-button {
  min-width: 104px;
  border-radius: 12px;
}

.report-workspace {
  grid-template-columns: 220px minmax(0, 1fr);
}

.report-nav {
  padding: 14px;
}

.report-outline {
  gap: 7px;
}

.report-outline-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.56);
  border-color: rgba(36, 56, 86, .08);
}

.report-outline-item.is-active {
  background: rgba(232, 239, 247, .86);
  border-color: rgba(77, 111, 153, .18);
  box-shadow: inset 2px 0 0 rgba(77, 111, 153, .46);
}

.report-outline-item strong {
  font-weight: 520;
}

.report-outline-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.report-panel {
  padding: 14px;
}

.report-panel-scroll {
  padding-right: 4px;
}

.report-paper,
.report-paper.report-paper-structured {
  display: grid;
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.report-paper h4,
.report-paper h5,
.report-section-title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 520;
  letter-spacing: -.006em;
}

.report-paper h5,
.report-section-title {
  font-size: 16px;
}

.report-section {
  display: grid;
  gap: 10px;
  scroll-margin-top: 12px;
}

.report-section + .report-section {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.report-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.report-metric-grid,
.report-stage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.report-metric-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-metric-grid > div,
.report-stage-grid > div {
  min-width: 0;
  padding: 12px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(36, 56, 86, .08);
  border-radius: 13px;
  box-shadow: var(--glass-shadow), var(--shadow-xs);
}

.report-metric-grid span,
.report-stage-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.report-metric-grid strong,
.report-stage-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.12;
  font-weight: 520;
  overflow-wrap: anywhere;
}

.report-metric-grid small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-table {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255,255,255,.54);
}

.report-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.report-table th {
  color: #6c7f95;
  background: rgba(243, 247, 252, .92);
  font-size: 12px;
  font-weight: 520;
}

.report-table td {
  color: var(--text-soft);
  line-height: 1.45;
}

.report-table tr:last-child td {
  border-bottom: 0;
}

.report-table strong {
  color: var(--text);
  font-weight: 540;
}

.report-top-list {
  display: grid;
  gap: 8px;
}

.report-top-row {
  display: grid;
  grid-template-columns: 30px minmax(180px, 1fr) 82px minmax(220px, 1.4fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line-soft);
  border-radius: 13px;
}

.report-top-row > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: var(--primary-2);
  background: rgba(232, 239, 247, .92);
  border-radius: 8px;
  font-weight: 520;
}

.report-top-row strong {
  font-weight: 540;
}

.report-top-row em,
.report-top-row small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.report-template-grid,
.report-template-card {
  display: none;
}

/* Fixed-frame viewport polish: outer app stays locked; each active page scrolls inside its workspace. */
html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  overflow: hidden;
}

.app-shell {
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.sidebar {
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 24px 34px;
}

.topbar {
  min-height: 0;
}

.view {
  min-height: 0;
  overflow: hidden;
}

.view.is-visible {
  height: 100%;
  overflow-y: auto;
  padding-bottom: 20px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.brand-block.brand-block-logo-only {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px 26px;
}

.brand-logo-full {
  display: block;
  width: 154px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.review-workbench {
  height: 100%;
  min-height: 0;
}

@media (max-width: 1180px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell,
  .workspace {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    height: auto;
  }

  .view.is-visible {
    height: auto;
    overflow: visible;
  }
}

/* Inner-scroll refinement: views are fixed panels; only their working blocks scroll. */
.view.is-visible {
  overflow: hidden;
  padding-bottom: 0;
}

#overviewView.is-visible {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) minmax(118px, .46fr);
  gap: 14px;
}

#overviewView .control-strip,
#overviewView .metric-grid,
#overviewView .dashboard-grid,
#overviewView .task-strip {
  min-height: 0;
}

#overviewView .dashboard-grid {
  height: 100%;
}

#overviewView .surface,
#overviewView .task-strip {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

#overviewView .case-queue,
#overviewView .rank-list,
#overviewView .task-list {
  min-height: 0;
  flex: 1;
}

#overviewView .case-queue {
  overflow: auto;
}

#overviewView .rank-list,
#overviewView .task-list {
  overflow: hidden;
}

#overviewView .task-strip {
  margin-top: 0;
}

.overview-action-card {
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.metric-card.overview-action-card,
.rank-item.overview-action-card,
.task-item.overview-action-card {
  border-style: solid;
}

.overview-action-card:hover {
  border-color: rgba(36, 116, 169, .22);
  filter: brightness(.995);
  transform: translateY(-1px);
}

.metric-card {
  text-align: left;
}

.metric-card em,
.task-item small,
.rank-item small {
  display: block;
  margin-top: 6px;
  color: var(--primary-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 560;
  opacity: .82;
}

.overview-click-row {
  cursor: pointer;
}

.rank-list {
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.rank-item {
  grid-template-columns: 38px minmax(0, 1fr) 32px;
  min-height: 0;
  padding: 12px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255,255,255,.48);
}

.rank-index {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  font-size: 16px;
}

.rank-item > div {
  min-width: 0;
}

.rank-item strong {
  line-height: 1.18;
}

.rank-bar {
  width: 100%;
  margin-top: 8px;
}

.task-list {
  align-items: stretch;
}

.task-item {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: space-between;
}

#batchView.is-visible .split-layout,
#reviewView.is-visible #reviewWorkbench,
#doctorView.is-visible .doctor-workspace,
#recoveryView.is-visible .recovery-workspace,
#reportView.is-visible .report-head,
#rulesView.is-visible > .surface {
  height: 100%;
  min-height: 0;
}

#batchView.is-visible .split-layout,
#doctorView.is-visible .doctor-workspace,
#recoveryView.is-visible .recovery-workspace,
#rulesView.is-visible > .surface {
  overflow: hidden;
}

#batchView.is-visible .split-layout > .surface,
#doctorView.is-visible .doctor-workspace > .surface,
#recoveryView.is-visible .recovery-workspace,
#reportView.is-visible .report-head,
#rulesView.is-visible > .surface {
  min-height: 0;
}

#batchView.is-visible .split-layout > .surface,
#doctorView.is-visible .doctor-workspace > .surface,
#recoveryView.is-visible .recovery-workspace,
#reportView.is-visible .report-panel-scroll {
  overflow: auto;
  overscroll-behavior: contain;
}

#rulesView.is-visible > .surface {
  display: flex;
  flex-direction: column;
}

#rulesView .rules-dashboard-grid {
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

#rulesView .rule-board,
#rulesView .analytics-grid {
  min-height: 0;
}

#rulesView .analytics-grid {
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

/* Batch review: separate clinical judgment from action controls. */
.review-defect-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 18px;
  align-items: start;
}

.review-defect-card .defect-card-main {
  min-width: 0;
  padding-right: 4px;
}

.review-defect-card .defect-card-topline strong {
  line-height: 1.36;
}

.review-defect-card p {
  margin: 8px 0 12px;
  color: var(--text-soft);
  line-height: 1.58;
}

.defect-action-rail {
  display: grid;
  justify-items: stretch;
  gap: 9px;
  padding-left: 14px;
  border-left: 1px solid rgba(36, 56, 86, .08);
}

.defect-action-rail .status-pill {
  justify-content: center;
  width: 100%;
  min-height: 24px;
}

.review-defect-card .defect-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin-top: 0;
}

.review-defect-card .defect-actions .tiny-button {
  justify-content: center;
  min-width: 0;
  width: 100%;
  min-height: 30px;
  padding-inline: 0;
  border-radius: 10px;
  color: var(--primary-2);
  background: rgba(247, 250, 253, .82);
  border-color: rgba(36, 56, 86, .09);
}

.review-defect-card .defect-actions .tiny-button:hover {
  background: rgba(232, 239, 247, .78);
}

.review-defect-card .defect-actions .tiny-button[data-review-action="accept"] {
  color: #54718e;
  background: rgba(241, 247, 252, .92);
}

.review-defect-card .defect-actions .tiny-button[data-review-action="reject"],
.review-defect-card .defect-actions .tiny-button[data-review-action="false-positive"] {
  color: #8b6670;
  background: rgba(252, 242, 245, .72);
}

.review-defect-card .defect-actions .tiny-button[data-review-action="false-positive"] {
  grid-column: 1 / -1;
  min-height: 28px;
  color: var(--muted);
  background: rgba(255,255,255,.58);
}

.report-outline-item {
  padding: 14px 16px;
  border-radius: 14px;
}

.report-outline-item.is-active {
  box-shadow: inset 3px 0 0 rgba(36,116,169,.54);
}

.report-template-card {
  background: rgba(255,255,255,.62);
}

.report-template-card strong {
  font-size: 16px;
}

.report-template-card span,
.report-template-card em {
  color: var(--muted-text);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.rule-tile-button {
  display: grid;
  gap: 8px;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.rule-tile-button.is-active {
  border-color: rgba(36,116,169,.46);
  background: var(--primary-soft);
}

#rulesView .rule-board {
  align-content: start;
}

@media (max-width: 1180px) {
  .view.is-visible {
    overflow: visible;
  }

  #overviewView.is-visible {
    display: block;
  }

  #overviewView .task-strip {
    margin-top: 14px;
  }

  #overviewView .rank-list,
  #overviewView .task-list,
  #rulesView .analytics-grid {
    overflow: visible;
  }
}

/* Report page corrected to keep the header compact and the report body as the inner scroll area. */
#reportView.is-visible .report-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#reportView.is-visible .report-head {
  height: auto;
}

#reportView.is-visible .report-workspace {
  min-height: 0;
  height: 100%;
}

#reportView.is-visible .report-nav,
#reportView.is-visible .report-panel {
  height: 100%;
  min-height: 0;
}

/* Report page corrected to keep the header compact and the report body as the inner scroll area. */
#reportView.is-visible .report-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#reportView.is-visible .report-head {
  height: auto;
}

#reportView.is-visible .report-workspace {
  min-height: 0;
  height: 100%;
}

#reportView.is-visible .report-nav,
#reportView.is-visible .report-panel {
  height: 100%;
  min-height: 0;
}

/* Overview task strip and review workbench inner scrolling. */
#overviewView.is-visible {
  grid-template-rows: auto auto minmax(0, 1fr) minmax(142px, .56fr);
}

#overviewView .task-list {
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 2px;
}

.doctor-task-card small,
.recovery-card small {
  color: var(--muted-text);
  line-height: 1.4;
}

.doctor-defect-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.doctor-defect-meta dt {
  color: var(--muted-text);
  font-size: 12px;
}

.doctor-defect-meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

#overviewView .task-item {
  min-height: 112px;
}

#reviewView.is-visible #reviewWorkbench,
#reviewView.is-visible .review-workbench {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#reviewView.is-visible .review-queue-panel,
#reviewView.is-visible .review-case-panel,
#reviewView.is-visible .evidence-panel {
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

@media (max-width: 1520px) {
  .review-workbench {
    grid-template-columns: minmax(220px, .76fr) minmax(500px, 1.65fr) minmax(280px, .95fr);
    gap: 14px;
  }

  .review-defect-card {
    grid-template-columns: minmax(0, 1fr) 116px;
    gap: 14px;
  }

  .defect-action-rail {
    padding-left: 12px;
  }

  .review-defect-card .defect-actions {
    gap: 5px;
  }
}

@media (max-width: 1260px) {
  #reviewView.is-visible #reviewWorkbench,
  #reviewView.is-visible .review-workbench {
    height: auto;
    overflow: visible;
  }

  .review-workbench {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .evidence-panel {
    grid-column: 2;
  }

  #reviewView.is-visible .review-queue-panel,
  #reviewView.is-visible .review-case-panel,
  #reviewView.is-visible .evidence-panel {
    height: auto;
    overflow: visible;
  }
}

/* Rules board cleanup: one page scroll, compact mapping, balanced analysis. */
#rulesView.is-visible {
  overflow-y: auto;
}

#rulesView.is-visible > .surface {
  height: auto;
  min-height: 100%;
  overflow: visible;
  display: block;
}

#rulesView .rules-dashboard-grid {
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow: visible;
}

#rulesView .rule-board,
#rulesView .analytics-grid {
  min-height: 0;
  overflow: visible;
}

#rulesView .rule-board {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 14px;
  align-content: start;
}

#rulesView .standard-profile-section {
  grid-column: 1 / -1;
}

.rule-package-section,
.rule-current-section,
.standard-profile-section {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255,255,255,.58);
  padding: 14px;
  box-shadow: var(--glass-shadow), var(--shadow-xs);
}

.rule-package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#rulesView .rule-tile,
#rulesView .rule-tile-button {
  min-height: 118px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line-soft);
  box-shadow: none;
}

#rulesView .rule-tile-button.is-active {
  border-color: rgba(77, 111, 153, .28);
  background: rgba(232, 239, 247, .86);
}

.rule-tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.rule-tile-head h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 540;
}

#rulesView .rule-meta {
  margin: 14px 0 0;
  gap: 6px;
}

#rulesView .rule-meta span {
  padding: 5px 8px;
  color: var(--primary-2);
  background: rgba(241, 247, 252, .94);
  border-radius: 999px;
  font-size: 12px;
}

.rule-current-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rule-current-grid > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 13px;
  background: rgba(255,255,255,.62);
}

.rule-current-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.rule-current-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-weight: 520;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.rule-standard-table {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255,255,255,.54);
}

.rule-standard-table table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.rule-standard-table th,
.rule-standard-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.rule-standard-table th {
  color: #6c7f95;
  background: rgba(243, 247, 252, .92);
  font-size: 12px;
  font-weight: 520;
}

.rule-standard-table tr:last-child td {
  border-bottom: 0;
}

.analytics-grid {
  --rules-content-height: auto;
}

#rulesView .analytics-grid {
  display: grid;
  gap: 12px;
  overflow: visible;
  padding-right: 0;
}

#rulesView .analytics-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#rulesView .analytics-cards article {
  min-height: 78px;
  padding: 12px;
}

#rulesView .analytics-cards strong {
  margin: 4px 0 2px;
  font-size: 22px;
}

#rulesView .analytics-workbench,
#rulesView .analytics-workbench-fixed {
  display: grid;
  grid-template-columns: minmax(420px, .95fr) minmax(0, 1.35fr);
  gap: 14px;
  min-height: 0;
  align-items: stretch;
}

#rulesView .department-directory,
#rulesView .analytics-stage .trend-panel-refined {
  height: auto;
  min-height: 0;
  overflow: visible;
}

#rulesView .department-directory {
  padding: 14px;
}

#rulesView .department-directory-list {
  display: grid;
  gap: 8px;
  overflow: visible;
  padding-right: 0;
}

#rulesView .department-row {
  grid-template-columns: minmax(118px, 1fr) minmax(88px, .72fr) minmax(80px, .6fr) minmax(76px, .52fr) minmax(92px, .72fr);
  min-height: 56px;
  padding: 10px;
  gap: 10px;
}

#rulesView .department-row-metric strong {
  font-size: 17px;
}

#rulesView .trend-panel-refined {
  padding: 14px;
}

#rulesView .trend-panel-refined .section-heading.compact span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

#rulesView .trend-focus-card {
  padding: 12px;
}

#rulesView .trend-svg-frame {
  margin-top: 10px;
}

#rulesView .trend-svg {
  height: 210px;
}

#rulesView .analytics-bottom-grid {
  grid-template-columns: minmax(0, 1fr) minmax(260px, .78fr);
}

#rulesView .trend-summary {
  grid-template-columns: 1fr;
}

@media (max-width: 1500px) {
  #rulesView .rule-board {
    grid-template-columns: 1fr;
  }

  .rule-package-grid,
  .rule-current-grid,
  #rulesView .analytics-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #rulesView .analytics-workbench,
  #rulesView .analytics-workbench-fixed {
    grid-template-columns: 1fr;
  }
}

/* Batch review density pass: horizontal decisions and draggable columns. */
#reviewView.is-visible #reviewWorkbench,
#reviewView.is-visible .review-workbench {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.review-workbench {
  --review-queue-width: 320px;
  --review-evidence-width: 380px;
  display: grid;
  grid-template-columns:
    minmax(250px, var(--review-queue-width))
    10px
    minmax(560px, 1fr)
    10px
    minmax(300px, var(--review-evidence-width));
  gap: 10px;
}

.review-resizer {
  position: relative;
  align-self: stretch;
  min-width: 10px;
  cursor: col-resize;
  border-radius: 999px;
}

.review-resizer::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  border-radius: 999px;
  background: rgba(77, 111, 153, .12);
  transition: background .16s ease, transform .16s ease;
}

.review-resizer:hover::before,
.review-resizer.is-dragging::before {
  background: rgba(77, 111, 153, .42);
  transform: scaleX(1.35);
}

.review-queue-panel,
.review-case-panel,
.evidence-panel {
  padding: 14px;
}

.review-queue-panel .section-heading h3,
.evidence-panel .section-heading h3 {
  font-size: 17px;
}

.queue-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.queue-filter {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  white-space: nowrap;
  border-radius: 13px;
  font-size: 13px;
}

.review-queue-card {
  gap: 3px;
  margin-top: 8px;
  padding: 10px 12px;
}

.review-queue-card strong {
  font-size: 14px;
}

.review-queue-card span,
.review-queue-card small,
.review-queue-card em {
  font-size: 12px;
  line-height: 1.35;
}

.review-case-header {
  margin-bottom: 12px;
  align-items: center;
}

.review-case-header .eyebrow {
  display: none;
}

.review-case-header h3 {
  font-size: 16px;
  line-height: 1.3;
}

.review-case-header span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.review-case-header > strong {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 520;
  white-space: nowrap;
}

.case-grade-summary {
  gap: 8px;
  margin-bottom: 12px;
}

.case-grade-summary-compact {
  grid-template-columns: .62fr .72fr .72fr minmax(0, 1.55fr);
}

.case-grade-summary div {
  padding: 9px 11px;
  border-radius: 13px;
}

.case-grade-summary strong {
  font-size: 15px;
  line-height: 1.32;
}

.case-grade-summary div:last-child strong {
  font-size: 14px;
}

.review-defect-list {
  gap: 10px;
}

.review-defect-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 15px;
}

.review-defect-card .defect-card-main {
  padding-right: 0;
}

.review-defect-card .defect-card-topline strong {
  font-size: 14px;
  line-height: 1.35;
}

.review-defect-card p {
  margin: 6px 0 9px;
  font-size: 13px;
  line-height: 1.45;
}

.defect-quick-meta {
  gap: 6px;
}

.defect-quick-meta span {
  padding: 4px 8px;
  font-size: 12px;
}

.defect-action-rail {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 0 0;
  border-top: 1px solid rgba(36, 56, 86, .08);
  border-left: 0;
}

.defect-action-rail .status-pill {
  width: auto;
  min-width: 84px;
  min-height: 28px;
  justify-content: center;
}

.review-defect-card .defect-actions {
  display: flex;
  flex: 1;
  flex-wrap: nowrap;
  gap: 6px;
  width: auto;
  min-width: 0;
}

.review-defect-card .defect-actions .tiny-button,
.review-defect-card .defect-actions .tiny-button[data-review-action="false-positive"] {
  flex: 1 1 0;
  min-width: 46px;
  width: auto;
  min-height: 28px;
  grid-column: auto;
  padding-inline: 8px;
  white-space: nowrap;
  font-size: 13px;
}

.evidence-box {
  padding: 13px;
}

.evidence-box p {
  margin: 8px 0;
  line-height: 1.5;
}

@media (max-width: 1520px) {
  .review-workbench {
    grid-template-columns:
      minmax(250px, var(--review-queue-width))
      8px
      minmax(470px, 1fr)
      8px
      minmax(300px, var(--review-evidence-width));
    gap: 8px;
  }

  .review-queue-panel,
  .review-case-panel,
  .evidence-panel {
    padding: 12px;
  }

  .review-defect-card .defect-actions .tiny-button,
  .review-defect-card .defect-actions .tiny-button[data-review-action="false-positive"] {
    min-width: 42px;
    padding-inline: 6px;
  }
}

@media (max-width: 1260px) {
  .review-workbench {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .review-resizer {
    display: none;
  }

  .evidence-panel {
    grid-column: 2;
  }

  .defect-action-rail,
  .review-defect-card .defect-actions {
    flex-wrap: wrap;
  }
}

/* Report center polish: source flow, compact chapters, clickable output blocks. */
#reportView.is-visible .report-shell {
  gap: 12px;
}

#reportView .report-head {
  gap: 10px;
  padding: 14px 16px;
}

#reportView .report-head .section-heading {
  align-items: flex-start;
}

#reportView .report-head .section-heading h3 {
  font-size: 18px;
}

.report-type-tabs {
  gap: 7px;
}

.report-type-tabs .segment-button {
  min-width: 98px;
  min-height: 31px;
  border-radius: 12px;
}

.report-flow-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.report-flow-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  padding: 8px 10px;
  color: var(--text-soft);
  text-align: left;
  background: rgba(255,255,255,.58);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.report-flow-item:hover {
  color: var(--primary-2);
  background: rgba(232, 239, 247, .72);
  border-color: rgba(77, 111, 153, .18);
  transform: translateY(-1px);
}

.report-flow-item strong {
  min-width: 0;
  font-size: 13px;
  font-weight: 520;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-flow-item span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

#reportView .report-workspace {
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 12px;
}

#reportView .report-nav {
  padding: 12px;
}

#reportView .report-outline {
  gap: 6px;
}

#reportView .report-outline-item {
  min-height: 52px;
  padding: 9px 10px;
  border-radius: 12px;
  box-shadow: none;
}

#reportView .report-outline-item.is-active {
  background: rgba(232, 239, 247, .82);
  border-color: rgba(77, 111, 153, .18);
  box-shadow: inset 2px 0 0 rgba(77, 111, 153, .42);
}

#reportView .report-outline-item strong {
  font-size: 13px;
}

#reportView .report-outline-item span {
  margin-top: 2px;
  font-size: 12px;
}

#reportView .report-panel {
  padding: 12px;
}

#reportView .report-panel-scroll {
  padding: 2px 4px 10px 0;
  scroll-behavior: smooth;
}

#reportView .report-paper.report-paper-structured {
  gap: 14px;
}

#reportView .report-section {
  gap: 9px;
  padding: 0;
}

#reportView .report-section-head {
  min-height: 26px;
  align-items: baseline;
}

#reportView .report-section-head .status-pill {
  display: none;
}

#reportView .report-paper h4,
#reportView .report-paper h5,
#reportView .report-section-title {
  font-size: 16px;
  font-weight: 540;
}

#reportView .report-table {
  border-radius: 13px;
}

#reportView .report-table table {
  min-width: 700px;
}

#reportView .report-table th,
#reportView .report-table td {
  padding: 10px 12px;
}

.report-link-row {
  cursor: pointer;
  transition: background .14s ease;
}

.report-link-row:hover {
  background: rgba(232, 239, 247, .54);
}

.report-link-row:focus-visible {
  outline: 3px solid rgba(125, 162, 207, .18);
  outline-offset: -3px;
}

#reportView .report-metric-grid,
#reportView .report-stage-grid {
  gap: 9px;
}

#reportView .report-metric-grid > div,
#reportView .report-stage-grid > div,
#reportView .report-metric-card {
  min-width: 0;
  padding: 11px 12px;
  color: var(--text);
  text-align: left;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(36, 56, 86, .08);
  border-radius: 13px;
  box-shadow: var(--glass-shadow), var(--shadow-xs);
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

#reportView .report-metric-card:hover {
  background: rgba(232, 239, 247, .62);
  border-color: rgba(77, 111, 153, .18);
  transform: translateY(-1px);
}

#reportView .report-metric-card span,
#reportView .report-metric-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

#reportView .report-metric-card strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 520;
  overflow-wrap: anywhere;
}

#reportView .report-metric-card small {
  margin-top: 5px;
}

#reportView .report-top-row {
  width: 100%;
  color: var(--text-soft);
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

#reportView .report-top-row:hover {
  background: rgba(232, 239, 247, .62);
  border-color: rgba(77, 111, 153, .18);
  transform: translateY(-1px);
}

@media (max-width: 1500px) {
  .report-flow-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #reportView .report-workspace {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

/* Rules top compact pass: dense rule intake, clickable lineage, no filler. */
#rulesView .rules-dashboard-grid {
  gap: 12px;
}

#rulesView .rule-board {
  grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
  gap: 12px;
}

#rulesView .rule-package-section,
#rulesView .rule-current-section,
#rulesView .standard-profile-section {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.62);
}

#rulesView .rule-package-section .section-heading,
#rulesView .rule-current-section .section-heading,
#rulesView .standard-profile-section .section-heading {
  min-height: 28px;
  margin-bottom: 9px;
}

#rulesView .rule-package-section .section-heading h3,
#rulesView .rule-current-section .section-heading h3,
#rulesView .standard-profile-section .section-heading h3 {
  font-size: 16px;
  line-height: 1.22;
  font-weight: 560;
}

#rulesView .standard-profile-section .section-heading > .status-pill {
  display: none;
}

#rulesView .rule-package-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#rulesView .rule-compact-card {
  display: grid;
  align-content: space-between;
  min-height: 76px;
  padding: 10px 11px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

#rulesView .rule-compact-card:hover {
  background: rgba(232, 239, 247, .66);
  border-color: rgba(77, 111, 153, .18);
  transform: translateY(-1px);
}

#rulesView .rule-compact-card:focus-visible,
#rulesView .rule-current-link:focus-visible,
#rulesView .rule-standard-row:focus-visible {
  outline: 3px solid rgba(125, 162, 207, .18);
  outline-offset: -3px;
}

#rulesView .rule-compact-card.is-active {
  border-color: rgba(77, 111, 153, .32);
  background: rgba(232, 239, 247, .88);
  box-shadow: inset 2px 0 0 rgba(77, 111, 153, .42);
}

#rulesView .rule-tile-head {
  align-items: center;
}

#rulesView .rule-tile-head h4 {
  min-width: 0;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rulesView .rule-tile-head .status-pill {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 4px 7px;
  font-size: 11px;
}

#rulesView .rule-compact-card .rule-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin: 8px 0 0;
  min-width: 0;
}

#rulesView .rule-compact-card .rule-meta span {
  min-width: 0;
  padding: 4px 7px;
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rulesView .rule-current-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#rulesView .rule-current-link {
  display: grid;
  min-width: 0;
  min-height: 58px;
  padding: 9px 10px;
  color: var(--text);
  text-align: left;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: none;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

#rulesView .rule-current-link:hover {
  background: rgba(232, 239, 247, .64);
  border-color: rgba(77, 111, 153, .18);
  transform: translateY(-1px);
}

#rulesView .rule-current-link span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

#rulesView .rule-current-link strong {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.32;
  font-weight: 540;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rulesView .standard-profile-section {
  grid-column: 1 / -1;
}

#rulesView .rule-standard-table {
  border-radius: 13px;
  overflow: auto;
}

#rulesView .rule-standard-table table {
  min-width: 760px;
}

#rulesView .rule-standard-table th,
#rulesView .rule-standard-table td {
  padding: 8px 10px;
  line-height: 1.35;
}

#rulesView .rule-standard-table td strong {
  font-weight: 540;
}

#rulesView .rule-standard-row {
  cursor: pointer;
}

#rulesView .rule-standard-row:hover {
  background: rgba(232, 239, 247, .54);
}

#rulesView .analytics-grid {
  margin-top: 0;
}

@media (max-width: 1500px) {
  #rulesView .rule-board {
    grid-template-columns: 1fr;
  }

  #rulesView .rule-package-grid,
  #rulesView .rule-current-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #rulesView .rule-package-grid,
  #rulesView .rule-current-grid {
    grid-template-columns: 1fr;
  }

  #rulesView .rule-compact-card .rule-meta {
    flex-wrap: wrap;
  }
}

@media (min-width: 1180px) and (max-width: 1500px) {
  #rulesView .rule-board {
    grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr);
  }
}
