:root {
  --primary: #1769ff;
  --primary-dark: #003b8f;
  --primary-soft: #e9f1ff;
  --sidebar-bg: #062b5f;
  --sidebar-bg-2: #021b3d;
  --bg: #f5f8fc;
  --bg-soft: #edf3fb;
  --card-bg: #ffffff;
  --card-soft: #f8fbff;
  --text-main: #10233f;
  --text-sub: #5f6f89;
  --text-faint: #90a0b9;
  --border: #dce6f2;
  --success: #18a058;
  --success-soft: #eaf8f0;
  --warning: #f59e0b;
  --warning-soft: #fff4dd;
  --danger: #ef4444;
  --danger-soft: #feeaea;
  --info: #2563eb;
  --info-soft: #ebf3ff;
  --violet: #8b5cf6;
  --violet-soft: #f0eaff;
  --shadow-lg: 0 22px 60px rgba(15, 33, 66, 0.12);
  --shadow-md: 0 12px 28px rgba(18, 39, 79, 0.08);
  --shadow-sm: 0 8px 18px rgba(18, 39, 79, 0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --sidebar-width: 280px;
  --sidebar-current-width: 280px;
  --sidebar-width-compact: 78px;
  --topbar-height: 68px;
  --page-gap: clamp(12px, 1vw, 18px);
  --card-padding: clamp(14px, 1.1vw, 22px);
  --page-max-width: 1680px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  margin: 0;
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  color: var(--text-main);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(23, 105, 255, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(24, 160, 88, 0.06), transparent 22%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  overflow: hidden;
}

body.sidebar-dragging,
body.sidebar-dragging * {
  cursor: col-resize !important;
  user-select: none !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  opacity: 0.25;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-main);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input::placeholder,
textarea::placeholder {
  color: #a0aec0;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(23, 105, 255, 0.48);
  box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.1);
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

.app-hidden {
  display: none !important;
}

.top-gap {
  margin-top: 16px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.helper-inline {
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.7;
}

.inline-alert {
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.7;
}

.inline-alert.warning {
  color: #9a6200;
  background: var(--warning-soft);
  border-color: rgba(245, 158, 11, 0.22);
}

.inline-alert.info {
  color: #1751b8;
  background: rgba(23, 105, 255, 0.08);
  border-color: rgba(23, 105, 255, 0.18);
}

.inline-alert.error,
.inline-alert.danger {
  color: #b33333;
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.2);
}

.auth-page {
  position: relative;
  min-height: 100vh;
  max-height: 100vh;
  padding: 34px;
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, var(--page-max-width));
  min-height: calc(100vh - 68px);
  grid-template-columns: minmax(0, 1.2fr) minmax(420px, 560px);
  gap: 28px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid rgba(220, 230, 242, 0.95);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(14px);
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 28px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 18%, rgba(23, 105, 255, 0.12), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 247, 255, 0.9));
  overflow: hidden;
}

.auth-brand {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #3ca9ff, #2457ff);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

.sidebar-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
}

.sidebar-logo-image {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.logo-mark.lg {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  font-size: 16px;
}

.auth-brand h1,
.surface-head h2,
.surface-head h3,
.patient-title h2,
.patient-title h3 {
  margin: 0;
}

.auth-brand h1 {
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.auth-brand h2 {
  margin: 18px 0 10px;
  color: var(--primary);
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.3;
  font-weight: 700;
}

.auth-brand p {
  margin: 0;
  color: var(--text-sub);
  font-size: 18px;
  line-height: 1.9;
}

.medical-illustration {
  position: relative;
  min-height: 420px;
  margin-top: 24px;
  overflow: hidden;
}

.hospital-card {
  position: absolute;
  left: 0;
  right: 70px;
  bottom: 20px;
  height: 320px;
  filter: drop-shadow(0 24px 40px rgba(20, 60, 130, 0.12));
}

.hospital-roof {
  position: absolute;
  left: 20%;
  top: 58px;
  width: 36%;
  height: 20px;
  border-radius: 10px;
  background: linear-gradient(90deg, #8fc0ff, #dcecff);
}

.hospital-body {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 30px;
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  align-items: end;
  gap: 16px;
  height: 245px;
}

.hospital-wing,
.hospital-core {
  position: relative;
  background:
    linear-gradient(180deg, rgba(36, 87, 255, 0.28), rgba(255, 255, 255, 0.95)),
    #ffffff;
  border: 1px solid rgba(145, 178, 255, 0.4);
  border-radius: 10px 10px 16px 16px;
  overflow: hidden;
}

.hospital-wing::before,
.hospital-core::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(147, 188, 255, 0.42) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 188, 255, 0.34) 1px, transparent 1px);
  background-size: 34px 28px;
  opacity: 0.75;
}

.hospital-wing.left {
  height: 220px;
}

.hospital-wing.right {
  height: 198px;
}

.hospital-core {
  height: 262px;
}

.hospital-cross {
  position: absolute;
  top: 34px;
  left: 50%;
  width: 74px;
  height: 74px;
  transform: translateX(-50%);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
}

.hospital-cross::before,
.hospital-cross::after {
  content: "";
  position: absolute;
  background: linear-gradient(180deg, #5ea5ff, #2c66ff);
  border-radius: 999px;
}

.hospital-cross::before {
  top: 16px;
  left: 29px;
  width: 16px;
  height: 42px;
}

.hospital-cross::after {
  top: 29px;
  left: 16px;
  width: 42px;
  height: 16px;
}

.hospital-door {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 80px;
  height: 92px;
  transform: translateX(-50%);
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(38, 102, 255, 0.18), rgba(255, 255, 255, 0.86));
  border: 1px solid rgba(147, 188, 255, 0.55);
}

.hospital-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(197, 219, 255, 0.42), transparent 70%);
}

.floating-node,
.floating-dash {
  position: absolute;
}

.floating-node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 72px;
  padding: 16px;
  border: 1px solid rgba(161, 189, 255, 0.32);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--primary);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.floating-node.a {
  top: 92px;
  right: 220px;
}

.floating-node.b {
  top: 172px;
  right: 72px;
}

.floating-node.c {
  top: 260px;
  right: 180px;
}

.floating-dash {
  top: 106px;
  right: 116px;
  width: 250px;
  height: 250px;
  border: 2px dashed rgba(150, 190, 255, 0.38);
  border-radius: 50%;
}

.auth-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  color: var(--text-sub);
  font-size: 15px;
  flex-wrap: wrap;
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(220, 230, 242, 0.9);
  box-shadow: var(--shadow-md);
}

.auth-card-head {
  text-align: center;
}

.auth-card-head h3 {
  margin: 0;
  font-size: 36px;
}

.auth-card-head p {
  margin: 12px 0 0;
  color: var(--text-sub);
  font-size: 20px;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.field {
  display: grid;
  gap: 10px;
}

.field > span:first-child {
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
}

.auth-form-meta,
.checkbox-inline,
.meta-inline,
.button-row,
.action-cluster,
.toolbar-actions,
.page-actions,
.topbar-right,
.topbar-actions,
.table-actions,
.patient-title,
.summary-head,
.timeline-step,
.action-card-top,
.history-item,
.detail-tabs,
.info-list > div,
.user-box,
.patient-profile,
.topbar-breadcrumbs,
.flow-step,
.sidebar-brand,
.sidebar-foot,
.review-actions {
  display: flex;
  align-items: center;
}

.auth-form-meta,
.button-row,
.page-actions,
.toolbar-actions,
.topbar-right,
.topbar-actions,
.table-actions,
.meta-inline,
.action-cluster,
.patient-title,
.summary-head,
.detail-tabs,
.review-actions {
  gap: 12px;
}

.auth-form-meta {
  justify-content: space-between;
  flex-wrap: wrap;
}

.checkbox-inline {
  gap: 8px;
  color: var(--text-sub);
  font-size: 14px;
}

.checkbox-inline input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.checkbox-inline.muted {
  color: var(--text-faint);
}

.text-link {
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #3987ff, var(--primary));
  box-shadow: 0 12px 24px rgba(23, 105, 255, 0.24);
}

.btn-primary.subtle {
  min-height: 38px;
  padding: 0 16px;
}

.btn-secondary {
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(23, 105, 255, 0.18);
}

.btn-ghost {
  color: var(--text-main);
  background: #fff;
  border: 1px solid var(--border);
}

.btn-block {
  width: 100%;
}

.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.hint-card,
.note-board {
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff, #f2f7ff);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.hint-card {
  margin-top: 28px;
}

.hint-card strong,
.note-board strong {
  display: block;
  margin-bottom: 6px;
  color: var(--primary);
}

.hint-card p,
.auth-support,
.note-board ul,
.summary-lines p,
.action-card p,
.history-item p,
.evidence-card p,
.timeline-entry p {
  margin: 0;
}

.auth-support {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(220, 230, 242, 0.9);
  color: var(--text-sub);
  text-align: center;
}

.app-shell {
  position: relative;
  display: flex;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.app-sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 var(--sidebar-current-width);
  width: var(--sidebar-current-width);
  min-width: var(--sidebar-current-width);
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 18px;
  background:
    linear-gradient(180deg, #0a3772 0%, var(--sidebar-bg) 38%, var(--sidebar-bg-2) 100%);
  color: rgba(255, 255, 255, 0.95);
  box-shadow: 18px 0 40px rgba(6, 43, 95, 0.16);
  z-index: 5;
  transition: width 0.22s ease, min-width 0.22s ease, flex-basis 0.22s ease, padding 0.22s ease, opacity 0.2s ease;
  overflow: hidden;
}

.app-shell.sidebar-hidden .app-sidebar {
  flex-basis: 0;
  width: 0;
  min-width: 0;
  padding-inline: 0;
  opacity: 0;
  box-shadow: none;
  pointer-events: none;
}

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

.sidebar-brand {
  gap: 14px;
  padding: 8px 8px 18px;
  min-width: 0;
  flex: 1 1 auto;
}

.sidebar-brand strong {
  display: block;
  font-size: 24px;
  line-height: 1.25;
}

.sidebar-brand span {
  display: block;
  margin-top: 5px;
  color: rgba(223, 235, 255, 0.72);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  color: rgba(231, 239, 255, 0.92);
  background: transparent;
  font-size: 16px;
  font-weight: 600;
}

.sidebar-link:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
  background: linear-gradient(90deg, rgba(36, 102, 255, 0.9), rgba(17, 80, 196, 0.92));
  color: #fff;
  box-shadow: 0 14px 26px rgba(11, 57, 147, 0.32);
}

.sidebar-link.disabled {
  opacity: 0.56;
  cursor: not-allowed;
}

.sidebar-link em {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-style: normal;
  font-size: 11px;
}

.sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.sidebar-foot {
  margin-top: auto;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 10px 4px;
  color: rgba(220, 232, 255, 0.72);
  font-size: 13px;
}

.sidebar-hide-button,
.sidebar-show-button {
  white-space: nowrap;
}

.sidebar-hide-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.94);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sidebar-hide-button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateX(-1px);
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
}

.app-shell.sidebar-hidden .sidebar-resizer {
  display: none;
}

.sidebar-resizer::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 2px;
  width: 4px;
  height: 56px;
  margin-top: -28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-resizer:hover::after {
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.online-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.dot.system {
  background: var(--info);
}

.dot.doctor {
  background: var(--success);
}

.dot.final {
  background: var(--warning);
}

.online-indicator .dot {
  background: #34d399;
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.16);
}

.app-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.app-topbar {
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  min-height: var(--topbar-height);
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(220, 230, 242, 0.92);
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 320px;
  min-width: 0;
}

.topbar-breadcrumbs {
  flex: 1 1 auto;
  min-width: 0;
  gap: 12px;
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 600;
  flex-wrap: wrap;
}

.topbar-breadcrumbs .current {
  color: var(--text-main);
  font-size: 17px;
  font-weight: 800;
}

.topbar-breadcrumbs i {
  color: #c1ccda;
  font-style: normal;
}

.topbar-right {
  flex: 1 1 420px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.sidebar-show-button {
  flex: none;
}

.user-box {
  gap: 12px;
  max-width: 100%;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(220, 230, 242, 0.95);
  box-shadow: var(--shadow-sm);
}

.user-avatar,
.patient-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #1f78ff, #34a1ff);
}

.user-meta {
  display: grid;
  gap: 3px;
}

.user-meta strong {
  font-size: 14px;
}

.user-meta span {
  color: var(--text-sub);
  font-size: 12px;
}

.app-content {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  padding: clamp(12px, 1.1vw, 18px);
  overflow-x: hidden;
  overflow-y: auto;
}

.page-stack {
  display: grid;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  gap: var(--page-gap);
}

.app-content > .page-stack {
  height: auto;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
}

.page-stack > *,
.content-layout > *,
.dashboard-body > *,
.dashboard-side-stack > *,
.patient-hero-grid > *,
.report-header-grid > *,
.report-summary-grid > *,
.report-insight-grid > *,
.report-analysis-grid > *,
.report-calc-grid > *,
.threshold-layout > *,
.threshold-main-column > *,
.threshold-side-column > *,
.review-workspace > *,
.review-main-stack > *,
.review-side-panel > *,
.admin-user-layout > * {
  min-width: 0;
}

.dashboard-toolbar-grid > *,
.admin-filter-bar > *,
.topbar-actions > *,
.topbar-right > *,
.tabs-row > * {
  min-width: 0;
}

.surface-card,
.stat-card,
.summary-card,
.action-card,
.evidence-card,
.side-panel,
.side-card,
.toast,
.modal-window,
.state-banner,
.review-table,
.threshold-table,
.mini-table,
.detail-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(220, 230, 242, 0.95);
  box-shadow: var(--shadow-md);
}

.surface-card,
.state-banner,
.modal-window,
.toast {
  border-radius: var(--radius-xl);
}

.stat-card,
.summary-card,
.action-card,
.evidence-card,
.side-card,
.side-panel,
.review-table,
.threshold-table,
.mini-table,
.detail-panel {
  border-radius: var(--radius-lg);
}

.surface-card {
  padding: var(--card-padding);
}

.surface-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.surface-head h2 {
  font-size: 28px;
}

.surface-head h3 {
  font-size: 20px;
}

.surface-head p,
.hero-copy p,
.hero-note span,
.patient-status-meta span,
.summary-lines p,
.action-card p,
.detail-panel p,
.detail-panel .field > span:first-child,
.history-item span,
.meta-badge strong,
.meta-badge span,
.mini-table span,
.review-row span,
.threshold-row span,
.timeline-step span,
.flow-step span,
.info-list span,
.evidence-card p,
.trend-label span,
.reminder-item span,
.quick-action span,
.empty-block span,
.empty-inline,
.loading-block span {
  color: var(--text-sub);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(235, 244, 255, 0.92)),
    #fff;
}

.hero-card.compact {
  align-items: stretch;
}

.hero-copy h2 {
  margin: 0 0 10px;
  font-size: 34px;
}

.hero-copy p {
  margin: 0;
  line-height: 1.85;
  font-size: 15px;
}

.hero-aside {
  display: grid;
  gap: 14px;
}

.hero-note {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 105, 255, 0.1);
}

.hero-note strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

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

.stats-grid.admin {
  margin-top: 0;
}

.stat-card {
  position: relative;
  display: grid;
  min-height: 152px;
  grid-template-columns: 68px minmax(0, 1fr) 120px;
  gap: 16px;
  padding: 22px 20px;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -30px auto;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(23, 105, 255, 0.06);
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}

.stat-body {
  display: grid;
  align-content: start;
  gap: 8px;
}

.stat-body span {
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 700;
}

.stat-body strong {
  font-size: 40px;
  line-height: 1;
}

.stat-body small {
  color: var(--text-sub);
  font-size: 13px;
}

.stat-sparkline {
  display: flex;
  align-items: flex-end;
}

.sparkline {
  width: 100%;
  height: 56px;
}

.sparkline polyline {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tone-primary .stat-icon,
.sparkline.primary polyline {
  background: linear-gradient(135deg, #3c8cff, var(--primary));
  stroke: var(--primary);
}

.tone-success .stat-icon,
.sparkline.success polyline {
  background: linear-gradient(135deg, #33c67a, var(--success));
  stroke: var(--success);
}

.tone-warning .stat-icon,
.sparkline.warning polyline {
  background: linear-gradient(135deg, #ffbf47, var(--warning));
  stroke: var(--warning);
}

.tone-danger .stat-icon,
.sparkline.danger polyline {
  background: linear-gradient(135deg, #ff8787, var(--danger));
  stroke: var(--danger);
}

.tone-violet .stat-icon,
.sparkline.violet polyline {
  background: linear-gradient(135deg, #ae84ff, var(--violet));
  stroke: var(--violet);
}

.tone-info .stat-icon,
.sparkline.info polyline {
  background: linear-gradient(135deg, #7db7ff, var(--info));
  stroke: var(--info);
}

.filter-card {
  padding-bottom: 20px;
}

.toolbar-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 2.2fr 1fr 1fr 1fr auto;
}

.toolbar-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.toolbar-actions.split,
.button-row,
.page-actions {
  justify-content: space-between;
  flex-wrap: wrap;
}

.field-search input {
  padding-left: 16px;
}

.content-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-width: 0;
}

.content-layout.wide {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
}

.content-layout.admin-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
}

.admin-users-page {
  min-height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

.admin-stats-grid {
  gap: 14px;
}

.admin-stats-grid .stat-card {
  min-height: 104px;
  grid-template-columns: 54px minmax(0, 1fr) 92px;
  gap: 14px;
  padding: 16px 18px;
}

.admin-stats-grid .stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 19px;
}

.admin-stats-grid .stat-body {
  gap: 6px;
}

.admin-stats-grid .stat-body span {
  font-size: 12px;
}

.admin-stats-grid .stat-body strong {
  font-size: clamp(22px, 1.6vw, 30px);
  line-height: 1.12;
  word-break: break-word;
}

.admin-stats-grid .stat-body small {
  font-size: 11px;
  line-height: 1.45;
}

.admin-stats-grid .sparkline {
  height: 44px;
}

.admin-stats-grid .tone-violet .stat-body strong {
  font-size: clamp(18px, 1.25vw, 22px);
}

.admin-user-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 28%);
  gap: 16px;
  align-items: start;
  min-height: 0;
}

.admin-user-list-card,
.admin-detail-card {
  min-height: 0;
  padding: 18px;
}

.admin-detail-card {
  display: flex;
  height: calc(100vh - var(--topbar-height) - 132px);
  max-height: calc(100vh - var(--topbar-height) - 132px);
  overflow: hidden;
}

.admin-user-list-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-user-surface-head {
  align-items: center;
  margin-bottom: 0;
}

.admin-user-surface-head h2 {
  margin-bottom: 6px;
  font-size: 23px;
}

.admin-user-surface-head p {
  max-width: 760px;
  line-height: 1.6;
  font-size: 13px;
}

.admin-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 140px 140px auto auto;
  gap: 10px;
  align-items: end;
}

.admin-filter-bar .field {
  gap: 6px;
}

.admin-filter-bar .field > span:first-child {
  font-size: 12px;
}

.admin-filter-bar input,
.admin-filter-bar select {
  height: 38px;
  padding: 0 12px;
}

.admin-filter-bar .btn-primary,
.admin-filter-bar .btn-ghost {
  min-height: 38px;
}

.admin-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.table-meta.compact {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-items: start;
}

.table-meta.compact strong {
  font-size: 22px;
}

.admin-list-note {
  color: var(--text-sub);
  font-size: 12px;
}

.admin-user-table-shell {
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - var(--topbar-height) - 300px);
}

.admin-user-table {
  min-width: 760px;
}

.admin-user-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-user-table th,
.admin-user-table td {
  padding: 11px 12px;
  font-size: 13px;
  vertical-align: middle;
}

.admin-user-table .table-actions .btn-ghost.small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.admin-user-table .role-tag,
.admin-user-table .status-pill {
  min-height: 26px;
  padding: 4px 10px;
  font-size: 11px;
}

.admin-empty-block,
.admin-detail-empty {
  min-height: 140px;
}

.side-stack {
  display: grid;
  gap: 18px;
}

.main-table-card {
  min-width: 0;
}

.table-shell {
  width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid rgba(220, 230, 242, 0.85);
  border-radius: 18px;
  background: var(--card-soft);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

.data-table th,
.data-table td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(220, 230, 242, 0.86);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.data-table th {
  color: var(--text-sub);
  background: #f9fbfe;
  font-size: 13px;
  font-weight: 800;
}

.data-table th.table-select-col,
.data-table td.table-select-col {
  width: 52px;
  min-width: 52px;
  padding-inline: 10px;
  text-align: center;
}

.table-checkbox {
  justify-content: center;
  width: 100%;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  white-space: nowrap;
}

.table-sort-button.active {
  color: var(--text-main);
}

.table-sort-arrow {
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1;
}

.table-sort-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(23, 105, 255, 0.1);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.table-sort-arrow.asc,
.table-sort-arrow.desc,
.table-sort-button.active .table-sort-arrow {
  color: var(--primary);
}

.dashboard-sort-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.dashboard-sort-menu {
  position: fixed;
  inline-size: min(196px, calc(100vw - 24px));
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(23, 105, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(16, 35, 63, 0.16);
  backdrop-filter: blur(16px);
}

.dashboard-sort-option {
  display: grid;
  gap: 2px;
  justify-items: start;
  inline-size: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.dashboard-sort-option span {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-sort-option small {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-sort-option:hover,
.dashboard-sort-option:focus-visible {
  background: rgba(23, 105, 255, 0.08);
  color: var(--primary);
  outline: none;
}

.dashboard-sort-option.active {
  background: linear-gradient(135deg, rgba(23, 105, 255, 0.12), rgba(23, 105, 255, 0.06));
  color: var(--primary);
}

.dashboard-sort-option.active small,
.dashboard-sort-option:hover small,
.dashboard-sort-option:focus-visible small {
  color: rgba(23, 105, 255, 0.8);
}

.data-table tbody tr:hover {
  background: rgba(23, 105, 255, 0.03);
}

.data-table tbody tr.selected-row {
  background: rgba(23, 105, 255, 0.06);
}

.report-table-scroll,
.admin-user-table-shell,
.threshold-log-table,
.threshold-console-page .threshold-table {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
}

.table-primary {
  display: grid;
  gap: 4px;
}

.table-primary strong {
  font-size: 14px;
}

.table-primary span,
.table-meta span {
  color: var(--text-sub);
  font-size: 12px;
}

.table-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.table-meta strong {
  font-size: 28px;
  line-height: 1;
}

.dashboard-date-text {
  color: var(--text-main);
}

.dashboard-date-text.is-legacy {
  color: var(--danger);
  font-weight: 800;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.dashboard-page {
  min-width: 0;
}

.table-head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-selection-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-bulk-delete {
  border-color: rgba(239, 68, 68, 0.2);
  color: #c2410c;
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.98));
}

.dashboard-bulk-delete:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dashboard-header-card {
  padding: 16px 18px;
}

.dashboard-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-header-copy h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  line-height: 1.2;
}

.dashboard-header-copy p {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
}

.dashboard-inline-breadcrumb {
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dashboard-header-side {
  display: grid;
  justify-items: end;
  gap: 8px;
  color: var(--text-sub);
  font-size: 12px;
  text-align: right;
}

.dashboard-header-side-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.dashboard-header-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.dashboard-help-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 244, 255, 0.92));
}

.dashboard-help-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 18px;
  block-size: 18px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.dashboard-stats-grid {
  gap: 14px;
}

.dashboard-stats-grid .stat-card {
  min-height: 104px;
  grid-template-columns: 52px minmax(0, 1fr) 94px;
  gap: 14px;
  padding: 16px 16px 14px;
  border-radius: 16px;
}

.dashboard-stats-grid .stat-card::after {
  width: 96px;
  height: 96px;
  inset: auto -24px -26px auto;
}

.dashboard-stats-grid .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 16px;
}

.dashboard-stats-grid .stat-body {
  gap: 4px;
}

.dashboard-stats-grid .stat-body span {
  font-size: 13px;
}

.dashboard-stats-grid .stat-body strong {
  font-size: 30px;
}

.dashboard-stats-grid .stat-body small {
  font-size: 12px;
  line-height: 1.5;
}

.dashboard-stats-grid .stat-sparkline {
  align-items: center;
}

.dashboard-stats-grid .sparkline {
  height: 46px;
}

.dashboard-filter-card {
  position: relative;
  z-index: 1;
  padding: 16px 18px 14px;
  overflow: visible;
}

.dashboard-surface-head {
  align-items: center;
  margin-bottom: 12px;
}

.dashboard-surface-head .eyebrow {
  margin-bottom: 6px;
}

.dashboard-surface-head h3 {
  font-size: 18px;
}

.dashboard-surface-tip {
  margin: 0;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.dashboard-toolbar-grid {
  grid-template-columns:
    minmax(180px, 1.05fr)
    minmax(180px, 1.05fr)
    minmax(180px, 1.05fr)
    repeat(3, minmax(120px, 0.82fr))
    auto;
  gap: 12px;
}

.dashboard-filter-grid {
  min-width: 0;
  align-items: end;
}

.dashboard-toolbar-grid .field {
  gap: 6px;
  min-width: 0;
}

.dashboard-toolbar-grid .field > span:first-child {
  font-size: 11px;
}

.dashboard-toolbar-grid input,
.dashboard-toolbar-grid select {
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
}

.dashboard-toolbar-grid .btn-primary,
.dashboard-toolbar-grid .btn-ghost {
  min-height: 38px;
}

.dashboard-query-actions {
  width: 100%;
  justify-content: flex-start;
}

.dashboard-filter-actions {
  align-items: center;
  gap: 12px;
}

.dashboard-filter-actions-row {
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  flex-wrap: wrap;
}

.dashboard-filter-actions .btn-secondary,
.dashboard-filter-actions .btn-ghost {
  min-height: 38px;
}

.dashboard-body {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: stretch;
  min-width: 0;
}

.dashboard-body > .report-table-card {
  height: clamp(760px, 80vh, 920px);
  min-height: 760px;
}

.dashboard-side-stack {
  display: grid;
  height: clamp(760px, 80vh, 920px);
  min-width: 0;
  gap: 12px;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.dashboard-meaning-card {
  padding: 16px 18px;
}

.dashboard-meaning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.dashboard-meaning-section {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(218, 229, 245, 0.96);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(249, 252, 255, 0.98), rgba(243, 247, 253, 0.94)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(37, 99, 235, 0));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.dashboard-meaning-title {
  margin-bottom: 12px;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.dashboard-meaning-list {
  display: grid;
  gap: 12px;
}

.dashboard-meaning-item {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(226, 234, 246, 0.94);
  background: rgba(255, 255, 255, 0.9);
}

.dashboard-meaning-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-meaning-item p {
  margin: 0;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.65;
}

.dashboard-meaning-note {
  margin-top: 8px;
  color: #40607f;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-meaning-example {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px dashed rgba(37, 99, 235, 0.18);
  border-radius: 12px;
  background: rgba(244, 248, 255, 0.9);
}

.dashboard-meaning-example span {
  color: #244160;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.report-table-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 16px 16px 12px;
}

.table-head-compact {
  margin-bottom: 12px;
}

.table-head-compact h3 {
  margin-bottom: 4px;
}

.table-head-compact p {
  font-size: 12px;
}

.table-meta.compact strong {
  font-size: 24px;
}

.table-meta.compact span {
  font-size: 11px;
}

.dashboard-result-warning {
  margin: 0 0 12px;
}

.threshold-log-inline-alert {
  margin: 0 0 12px;
}

.dashboard-loading-alert {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}

.dashboard-pagination-status {
  display: grid;
  gap: 6px;
}

.dashboard-pagination-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
}

.dashboard-inline-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  flex: 0 0 auto;
}

.report-table-scroll {
  flex: 1 1 auto;
  min-height: 572px;
  overflow-y: auto;
  overflow-x: auto;
  max-height: none;
  border-radius: 16px;
}

.report-table-scroll .data-table {
  min-width: 940px;
}

.report-table-scroll .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 12px;
  background: #f7faff;
  box-shadow: inset 0 -1px 0 rgba(220, 230, 242, 0.88);
}

.report-table-scroll .data-table td {
  padding: 12px;
  font-size: 13px;
  vertical-align: middle;
}

.report-table-scroll .data-table tbody tr {
  height: 52px;
}

.report-table-scroll .data-table tbody tr:hover {
  background: rgba(23, 105, 255, 0.04);
}

.report-table-scroll .table-primary {
  gap: 2px;
}

.report-table-scroll .table-primary strong {
  font-size: 13px;
}

.report-table-scroll .table-primary span {
  font-size: 11px;
}

.report-table-scroll .table-actions {
  gap: 8px;
  flex-wrap: nowrap;
}

.report-table-scroll .table-actions .btn-ghost,
.report-table-scroll .table-actions .btn-primary {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
}

.report-table-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(220, 230, 242, 0.85);
}

.report-table-empty {
  flex: 1;
  min-height: 0;
}

.dashboard-side-card {
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  padding: 12px 14px;
  overflow: hidden;
}

.dashboard-side-card .surface-head {
  margin-bottom: 6px;
}

.dashboard-reminder-list,
.dashboard-quick-actions {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
}

.dashboard-reminder-list {
  gap: 0;
}

.dashboard-reminder-list .reminder-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(220, 230, 242, 0.82);
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
}

.dashboard-reminder-list .reminder-item:last-child {
  border-bottom: 0;
}

.reminder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-reminder-list .tone-warning .reminder-icon {
  color: #aa6a00;
  background: var(--warning-soft);
}

.dashboard-reminder-list .tone-danger .reminder-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.dashboard-reminder-list .tone-info .reminder-icon {
  color: var(--info);
  background: var(--info-soft);
}

.dashboard-reminder-list .tone-violet .reminder-icon {
  color: var(--violet);
  background: var(--violet-soft);
}

.reminder-copy {
  min-width: 0;
}

.reminder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.reminder-head strong {
  font-size: 14px;
}

.reminder-head em {
  color: var(--text-main);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-reminder-list .reminder-copy span {
  display: block;
  font-size: 11px;
  line-height: 1.5;
}

.dashboard-quick-actions {
  gap: 8px;
}

.quick-action-compact {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 230, 242, 0.9);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: var(--text-main);
  text-align: left;
}

.quick-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.quick-action-compact.tone-primary .quick-action-icon {
  background: linear-gradient(135deg, #4291ff, var(--primary));
}

.quick-action-compact.tone-success .quick-action-icon {
  background: linear-gradient(135deg, #42ca81, var(--success));
}

.quick-action-compact.tone-violet .quick-action-icon {
  background: linear-gradient(135deg, #b28cff, var(--violet));
}

.quick-action-compact.tone-warning .quick-action-icon {
  background: linear-gradient(135deg, #ffbf47, var(--warning));
}

.quick-action-copy {
  display: grid;
  gap: 2px;
}

.quick-action-copy strong {
  font-size: 13px;
}

.quick-action-copy span {
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.45;
}

.status-pill,
.grade-pill-inline,
.role-tag,
.mini-tag,
.threshold-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.grade-pill-inline.muted {
  color: var(--text-sub);
  background: #eef3f9;
}

.role-tag.admin {
  color: var(--primary);
  background: rgba(23, 105, 255, 0.1);
}

.role-tag.doctor {
  color: var(--success);
  background: rgba(24, 160, 88, 0.1);
}

.threshold-chip.success,
.tone-success,
.mini-tag.tone-success,
.status-pill.tone-success,
.grade-pill-inline.tone-success {
  color: var(--success);
  background: var(--success-soft);
}

.threshold-chip.warning,
.tone-warning,
.mini-tag.tone-warning,
.status-pill.tone-warning,
.grade-pill-inline.tone-warning {
  color: #aa6a00;
  background: var(--warning-soft);
}

.threshold-chip.danger,
.tone-danger,
.mini-tag.tone-danger,
.status-pill.tone-danger,
.grade-pill-inline.tone-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.mini-tag.tone-primary,
.status-pill.tone-primary,
.grade-pill-inline.tone-primary,
.tone-primary {
  color: var(--primary);
  background: var(--primary-soft);
}

.mini-tag.tone-info,
.status-pill.tone-info,
.grade-pill-inline.tone-info,
.tone-info {
  color: var(--info);
  background: var(--info-soft);
}

.mini-tag.tone-violet,
.status-pill.tone-violet,
.grade-pill-inline.tone-violet,
.tone-violet {
  color: var(--violet);
  background: var(--violet-soft);
}

.mini-tag.tone-muted,
.tone-muted {
  color: var(--text-sub);
  background: #eef3f9;
}

.tone-warning {
  font-size: 12px;
  font-weight: 700;
}

.stat-card[class*="tone-"],
.summary-card[class*="tone-"],
.action-card[class*="tone-"],
.reminder-item[class*="tone-"],
.timeline-step[class*="tone-"],
.toast[class*="tone-"] {
  color: var(--text-main);
}

.stat-card.tone-primary,
.summary-card.tone-primary,
.action-card.tone-primary,
.reminder-item.tone-primary,
.timeline-step.tone-primary,
.toast.tone-primary {
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
  border-color: rgba(23, 105, 255, 0.16);
}

.stat-card.tone-success,
.summary-card.tone-success,
.action-card.tone-success,
.reminder-item.tone-success,
.timeline-step.tone-success,
.toast.tone-success {
  background: linear-gradient(180deg, #ffffff, #f3fbf7);
  border-color: rgba(24, 160, 88, 0.16);
}

.stat-card.tone-warning,
.summary-card.tone-warning,
.action-card.tone-warning,
.reminder-item.tone-warning,
.timeline-step.tone-warning,
.toast.tone-warning {
  background: linear-gradient(180deg, #ffffff, #fff9ef);
  border-color: rgba(245, 158, 11, 0.18);
}

.stat-card.tone-danger,
.summary-card.tone-danger,
.action-card.tone-danger,
.reminder-item.tone-danger,
.timeline-step.tone-danger,
.toast.tone-danger {
  background: linear-gradient(180deg, #ffffff, #fff5f5);
  border-color: rgba(239, 68, 68, 0.16);
}

.stat-card.tone-info,
.summary-card.tone-info,
.action-card.tone-info,
.reminder-item.tone-info,
.timeline-step.tone-info,
.toast.tone-info {
  background: linear-gradient(180deg, #ffffff, #f2f8ff);
  border-color: rgba(37, 99, 235, 0.16);
}

.stat-card.tone-violet,
.summary-card.tone-violet,
.action-card.tone-violet,
.reminder-item.tone-violet,
.timeline-step.tone-violet {
  background: linear-gradient(180deg, #ffffff, #f7f3ff);
  border-color: rgba(139, 92, 246, 0.16);
}

.reminder-list,
.quick-actions,
.history-list,
.timeline-rail,
.flow-steps,
.threshold-stack,
.debug-grid {
  display: grid;
  gap: 12px;
}

.reminder-item,
.quick-action,
.history-item {
  display: grid;
  gap: 6px;
  padding: 16px 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(220, 230, 242, 0.86);
  background: linear-gradient(180deg, #fff, #f9fbff);
}

.reminder-item strong,
.quick-action strong,
.history-item strong {
  font-size: 15px;
}

.quick-action {
  text-align: left;
}

.quick-action.muted {
  background: linear-gradient(180deg, #f8fafc, #f2f6fb);
}

.patient-hero {
  padding: 22px 24px;
}

.patient-hero-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.6fr) minmax(260px, 0.7fr);
  align-items: stretch;
}

.patient-profile {
  gap: 18px;
}

.patient-profile.compact {
  align-items: flex-start;
}

.patient-avatar {
  width: 78px;
  height: 78px;
  background: linear-gradient(135deg, #6aa5ff, #2e69ff);
  font-size: 28px;
  box-shadow: var(--shadow-sm);
}

.patient-main {
  min-width: 0;
}

.patient-title {
  gap: 12px;
  flex-wrap: wrap;
}

.patient-title h2,
.patient-title h3 {
  font-size: 32px;
}

.patient-title span {
  color: var(--text-sub);
  font-size: 16px;
  font-weight: 700;
}

.patient-meta {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.meta-badge {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f7fbff);
  border: 1px solid rgba(220, 230, 242, 0.8);
}

.meta-badge strong {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.patient-status-card,
.patient-summary-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  border: 1px solid rgba(220, 230, 242, 0.85);
}

.patient-status-meta {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.patient-summary-card strong {
  font-size: 28px;
  line-height: 1.2;
}

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

.summary-card {
  padding: 18px 18px 20px;
}

.summary-card strong {
  display: block;
  font-size: 30px;
  line-height: 1.15;
}

.summary-lines {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.summary-lines p,
.action-card p,
.evidence-card p {
  font-size: 13px;
  line-height: 1.75;
}

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

.action-card,
.evidence-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.action-card-top {
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.action-card-top strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.action-card-meta {
  gap: 8px;
  flex-wrap: wrap;
}

.action-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f2f7fc;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
}

.media-placeholder {
  display: grid;
  gap: 6px;
  min-width: 150px;
  min-height: 158px;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(152, 178, 214, 0.85);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #f1f6fd);
  text-align: center;
}

.media-placeholder.compact {
  min-width: 126px;
  min-height: 126px;
  padding: 14px;
}

.media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(23, 105, 255, 0.18), rgba(37, 99, 235, 0.06));
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
}

.media-placeholder span,
.media-placeholder small {
  color: var(--text-sub);
}

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

.bullet-list {
  display: grid;
  gap: 10px;
}

.bullet-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.bullet-item i {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.bullet-list.warning .bullet-item i {
  background: var(--warning);
}

.bullet-list.danger .bullet-item i {
  background: var(--danger);
}

.timeline-steps {
  display: grid;
  gap: 12px;
}

.timeline-step {
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
}

.timeline-step i,
.flow-step i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  font-style: normal;
  font-weight: 800;
}

.timeline-step strong,
.flow-step strong {
  display: block;
  margin-bottom: 4px;
}

.trend-chart {
  display: grid;
  gap: 18px;
}

.trend-chart svg {
  width: 100%;
  height: 260px;
  overflow: visible;
}

.trend-chart line {
  stroke: rgba(191, 204, 224, 0.72);
  stroke-width: 1;
}

.trend-main {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-chart circle {
  fill: #fff;
  stroke: var(--primary);
  stroke-width: 3;
}

.trend-labels {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.trend-label {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-soft);
}

.trend-label strong {
  color: var(--primary-dark);
}

.debug-panel {
  border: 1px solid rgba(220, 230, 242, 0.95);
  border-radius: 18px;
  background: #f8fbff;
  overflow: hidden;
}

.debug-panel summary {
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.debug-panel summary::-webkit-details-marker {
  display: none;
}

.debug-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 18px 18px;
}

.debug-grid pre {
  margin: 0;
  min-height: 220px;
  padding: 16px;
  overflow: auto;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(220, 230, 242, 0.85);
  color: #17406c;
  font-size: 12px;
  line-height: 1.7;
}

.report-detail-page {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  overflow: visible;
  padding-right: 0;
  padding-bottom: 18px;
  min-width: 0;
  margin: 0;
}

.app-content > .report-detail-page {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
  padding-bottom: 18px;
}

.report-detail-page > * + * {
  margin-top: 16px;
}

.report-header-card,
.report-actions-shell,
.report-evidence-shell,
.report-trend-shell,
.report-debug-shell,
.report-calculation-shell {
  position: relative;
  padding: 18px 20px;
  overflow: visible;
}

.report-header-card {
  min-height: 0;
  padding-bottom: 18px;
  overflow: visible;
}

.report-header-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr);
  align-items: start;
}

.report-header-main,
.report-overview-card,
.report-result-card,
.report-action-card,
.report-evidence-card,
.report-assist-card {
  border: 1px solid rgba(220, 230, 242, 0.92);
  box-shadow: var(--shadow-md);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 400;
}

.report-header-main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(170px, 0.46fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 104px;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.report-header-primary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.report-avatar {
  width: 64px;
  height: 64px;
  flex: none;
  font-size: 22px;
}

.report-patient-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.report-patient-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.report-patient-heading h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.05;
}

.report-patient-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 700;
}

.report-patient-inline span + span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 50%;
  background: rgba(113, 136, 170, 0.55);
}

.report-patient-secondary {
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
}

.report-meta-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 0;
  margin-top: 0;
}

.report-meta-item {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
  padding: 1px 12px;
  border-left: 1px solid rgba(220, 230, 242, 0.92);
}

.report-meta-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.report-meta-item strong {
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.report-meta-item span {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}

.report-header-status-block,
.report-overview-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 104px;
  padding: 14px 16px;
  border-radius: 20px;
}

.report-header-status-block {
  min-width: 0;
  min-height: auto;
  padding: 2px 0 2px 14px;
  border: 0;
  border-left: 1px solid rgba(220, 230, 242, 0.92);
  box-shadow: none;
  background: transparent;
  gap: 8px;
}

.report-overview-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 241, 255, 0.94));
}

.report-header-status-block .status-pill {
  justify-self: start;
}

.report-status-metrics,
.report-overview-grades {
  display: grid;
  gap: 7px;
}

.report-overview-grades {
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}

.report-status-metrics div,
.report-overview-grades div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.report-overview-grades div {
  display: grid;
  align-items: start;
  justify-content: start;
  gap: 3px;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(220, 230, 242, 0.72);
}

.report-status-metrics span,
.report-overview-grades span {
  color: var(--text-sub);
  font-size: 12px;
}

.report-status-metrics strong,
.report-overview-grades strong {
  font-size: 14px;
}

.report-overview-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-overview-flow strong {
  color: var(--primary-dark);
  font-size: 25px;
  line-height: 1.15;
}

.report-overview-card p {
  margin: 0;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.55;
}

.report-summary-stack {
  display: grid;
  gap: 16px;
  margin-top: 0;
}

.report-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  position: relative;
}

.report-insight-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  position: relative;
}

.report-result-card {
  display: grid;
  gap: 12px;
  min-height: 118px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  overflow: hidden;
}

.report-grade-card,
.report-wide-card {
  grid-column: auto;
}

.report-grade-card {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 18px;
}

.report-result-card.is-tall {
  min-height: 188px;
}

.report-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
}

.report-card-head span {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 800;
}

.report-card-head em {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-sub);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.report-grade-main {
  display: grid;
  gap: 4px;
  grid-column: 1;
}

.report-grade-main strong {
  font-size: 34px;
  line-height: 1.05;
}

.report-grade-card.tone-success .report-grade-main strong {
  color: var(--success);
}

.report-grade-card.tone-primary .report-grade-main strong {
  color: var(--primary);
}

.report-grade-card.tone-danger .report-grade-main strong {
  color: var(--danger);
}

.report-grade-card.tone-muted .report-grade-main strong {
  color: var(--text-sub);
}

.report-grade-main span {
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
}

.report-card-lines {
  display: grid;
  gap: 6px;
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  max-width: min(30ch, 100%);
  text-align: right;
}

.report-card-lines p,
.report-card-foot {
  margin: 0;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.65;
}

.report-abnormal-list,
.report-path-list {
  display: grid;
  gap: 10px;
  max-height: 132px;
  overflow: auto;
  padding-right: 4px;
}

.report-abnormal-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.report-abnormal-item i {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--warning);
}

.report-abnormal-item.tone-danger i {
  background: var(--danger);
}

.report-abnormal-item.tone-success i {
  background: var(--success);
}

.report-abnormal-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.report-abnormal-copy strong {
  display: block;
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.45;
}

.report-abnormal-copy span {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.55;
}

.report-path-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.report-path-item i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.report-path-item .tone-primary {
  color: var(--primary);
  background: var(--primary-soft);
}

.report-path-item .tone-success {
  color: var(--success);
  background: var(--success-soft);
}

.report-path-item .tone-warning {
  color: #aa6a00;
  background: var(--warning-soft);
}

.report-path-item .tone-info {
  color: var(--info);
  background: var(--info-soft);
}

.report-path-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.report-path-item span {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.55;
}

.report-grade-card.tone-success {
  background: linear-gradient(180deg, #ffffff, #f3fbf7);
  border-color: rgba(24, 160, 88, 0.18);
}

.report-grade-card.tone-primary {
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
  border-color: rgba(23, 105, 255, 0.18);
}

.report-grade-card.tone-danger {
  background: linear-gradient(180deg, #ffffff, #fff5f5);
  border-color: rgba(239, 68, 68, 0.18);
}

.report-grade-card.tone-muted {
  background: linear-gradient(180deg, #ffffff, #f6f9fc);
  border-color: rgba(220, 230, 242, 0.96);
}

.report-abnormal-card {
  background: linear-gradient(180deg, #ffffff, #fff9f0);
  border-color: rgba(245, 158, 11, 0.18);
}

.report-path-card {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.report-section-head {
  margin-bottom: 14px;
}

.report-section-head.tight {
  margin-bottom: 12px;
}

.report-head-note {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.action-score-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(160px, 17vw, 198px), 1fr));
  gap: 14px;
  overflow: visible;
  padding: 2px 2px 6px;
}

.report-action-card {
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: clamp(300px, 30vw, 360px);
  min-width: 0;
  width: 100%;
  max-width: none;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.report-action-card.tone-success {
  background: linear-gradient(180deg, #ffffff, #f4fbf7);
  border-color: rgba(24, 160, 88, 0.16);
}

.report-action-card.tone-warning {
  background: linear-gradient(180deg, #ffffff, #fff8ef);
  border-color: rgba(245, 158, 11, 0.18);
}

.report-action-card.tone-danger {
  background: linear-gradient(180deg, #ffffff, #fff5f5);
  border-color: rgba(239, 68, 68, 0.16);
}

.report-action-card.tone-muted,
.report-action-card.tone-primary {
  background: linear-gradient(180deg, #ffffff, #f6f9fd);
  border-color: rgba(220, 230, 242, 0.92);
}

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

.report-action-head span:first-child {
  display: block;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
}

.report-action-head strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.15;
}

.report-action-card.tone-success .report-action-head strong {
  color: var(--success);
}

.report-action-card.tone-warning .report-action-head strong {
  color: #aa6a00;
}

.report-action-card.tone-danger .report-action-head strong {
  color: var(--danger);
}

.report-action-card.tone-muted .report-action-head strong,
.report-action-card.tone-primary .report-action-head strong {
  color: var(--primary-dark);
}

.report-action-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.report-action-visual .report-media-placeholder,
.report-evidence-card .report-media-placeholder {
  min-width: 0;
  min-height: 140px;
  height: 100%;
  padding: 10px;
  border-radius: 14px;
}

.report-action-visual {
  min-width: 0;
  aspect-ratio: 4 / 3;
}

.report-image-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

.report-action-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 140px;
  border-radius: 14px;
  border: 1px solid rgba(220, 230, 242, 0.92);
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
  object-fit: contain;
}

.report-media-placeholder.error {
  background: linear-gradient(180deg, #fff8f8, #fff1f1);
}

.report-action-card p,
.report-evidence-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
}

.report-action-scroll {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.report-action-note {
  color: var(--text-sub);
}

.report-action-meta-scroll {
  min-height: 0;
  max-height: clamp(88px, 10vw, 118px);
  overflow-y: auto;
  display: grid;
  gap: 6px;
  align-content: start;
  padding-right: 4px;
}

.report-action-detail-item,
.report-action-empty {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(240, 245, 252, 0.95);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.report-action-detail-item.tone-success {
  background: rgba(24, 160, 88, 0.1);
  color: var(--success);
}

.report-action-detail-item.tone-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #aa6a00;
}

.report-action-detail-item.tone-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

.report-action-detail-item.tone-muted,
.report-action-empty {
  background: rgba(240, 245, 252, 0.95);
  color: var(--text-sub);
}

.report-analysis-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.95fr);
}

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

.report-evidence-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.report-evidence-card strong {
  font-size: 14px;
}

.report-calculation-shell {
  display: grid;
  gap: 14px;
}

.report-calc-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-calc-pill {
  display: grid;
  gap: 4px;
  min-width: 136px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(220, 230, 242, 0.92);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.report-calc-pill span {
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
}

.report-calc-pill strong {
  color: var(--primary-dark);
  font-size: 15px;
}

.report-calc-grid {
  display: grid;
  gap: clamp(12px, 1vw, 14px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.report-calc-card {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(220, 230, 242, 0.92);
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  box-shadow: var(--shadow-md);
}

.report-calc-card.tone-success {
  background: linear-gradient(180deg, #ffffff, #f4fbf7);
  border-color: rgba(24, 160, 88, 0.16);
}

.report-calc-card.tone-warning {
  background: linear-gradient(180deg, #ffffff, #fff9f0);
  border-color: rgba(245, 158, 11, 0.18);
}

.report-calc-card.tone-danger {
  background: linear-gradient(180deg, #ffffff, #fff5f5);
  border-color: rgba(239, 68, 68, 0.16);
}

.report-calc-card.tone-primary,
.report-calc-card.tone-muted {
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  border-color: rgba(23, 105, 255, 0.12);
}

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

.report-calc-head span {
  display: block;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
}

.report-calc-head strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.15;
}

.report-calc-card.tone-success .report-calc-head strong {
  color: var(--success);
}

.report-calc-card.tone-warning .report-calc-head strong {
  color: #aa6a00;
}

.report-calc-card.tone-danger .report-calc-head strong {
  color: var(--danger);
}

.report-calc-card.tone-primary .report-calc-head strong,
.report-calc-card.tone-muted .report-calc-head strong {
  color: var(--primary-dark);
}

.report-calc-formula {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.65;
}

.report-calc-rows {
  display: grid;
  gap: 8px;
}

.report-calc-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(231, 238, 248, 0.92);
}

.report-calc-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.report-calc-copy span {
  color: var(--text-main);
  font-size: 12px;
  font-weight: 800;
}

.report-calc-copy small {
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.55;
}

.report-calc-row strong {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.report-calc-row em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef4fd;
  color: var(--text-sub);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.report-calc-foot {
  margin-top: auto;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.65;
}

.report-media-placeholder {
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
}

.report-media-placeholder .media-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 16px;
}

.image-preview-overlay {
  z-index: 80;
}

.image-preview-window {
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(5, 24, 52, 0.28);
}

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

.image-preview-head strong {
  color: var(--text-main);
  font-size: 18px;
}

.image-preview-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: calc(100vh - 160px);
  overflow: auto;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
  border: 1px solid rgba(220, 230, 242, 0.92);
}

.image-preview-body img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: contain;
}

@media (max-width: 960px) {
  .bundle-summary-head,
  .bundle-summary-meta {
    justify-items: start;
    text-align: left;
  }

  .bundle-summary-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .bundle-detect-grid {
    grid-template-columns: 1fr;
  }
}

.report-trend-shell .trend-chart {
  gap: 14px;
}

.report-trend-shell .trend-chart svg {
  height: 196px;
}

.report-trend-shell .trend-labels {
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
}

.report-trend-shell .trend-label {
  padding: 10px 12px;
}

.report-debug-shell .surface-head {
  margin-bottom: 10px;
}

.report-debug-panel {
  background: linear-gradient(180deg, #f7fbff, #f2f7fd);
  border-radius: 16px;
}

.report-debug-panel summary {
  position: relative;
  padding: 14px 18px;
  padding-right: 48px;
}

.report-debug-panel summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 24px;
  height: 24px;
  margin-top: -12px;
  border-radius: 50%;
  background: rgba(23, 105, 255, 0.1);
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
}

.report-debug-panel[open] summary::after {
  content: "−";
}

.report-debug-panel .debug-grid {
  max-height: 300px;
  overflow: auto;
}

.report-debug-panel .debug-grid pre {
  min-height: 0;
  max-height: 250px;
}

.report-page-actions {
  justify-content: center;
  gap: 14px;
  padding-top: 2px;
}

.review-detail-page {
  align-content: start;
}

.review-patient-header,
.review-gray-card,
.review-assist-card,
.review-hb-card,
.review-path-panel,
.review-doctor-panel {
  border-radius: 18px;
}

.review-card {
  border: 1px solid #e4ecf7;
  box-shadow: 0 8px 24px rgba(15, 35, 70, 0.06);
}

.review-patient-header {
  padding: 18px 22px;
}

.review-patient-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.35fr) minmax(280px, 0.95fr);
  gap: 18px;
  align-items: center;
  min-height: 118px;
}

.review-patient-core {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.review-patient-avatar {
  width: 62px;
  height: 62px;
  flex: none;
  font-size: 22px;
}

.review-patient-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.review-patient-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.review-patient-title-row h2,
.review-patient-title-row strong,
.review-patient-title-row span,
.review-fact strong,
.review-fact span,
.review-patient-summary strong,
.review-patient-summary span {
  min-width: 0;
}

.review-patient-title-row h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.review-patient-title-row strong {
  color: var(--text-main);
  font-size: 16px;
  font-weight: 800;
}

.review-patient-title-row span,
.review-patient-subtitle {
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 600;
}

.review-patient-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.review-fact {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid rgba(220, 230, 242, 0.82);
}

.review-fact span {
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
}

.review-fact strong {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-patient-summary {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 246, 255, 0.92));
  border: 1px solid rgba(220, 230, 242, 0.9);
}

.review-patient-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.review-patient-grade-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-patient-grade-grid div {
  display: grid;
  gap: 4px;
}

.review-patient-grade-grid span {
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
}

.review-patient-grade-grid strong {
  color: var(--primary-dark);
  font-size: 16px;
  line-height: 1.2;
}

.review-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid #e4ecf7;
}

.review-alert-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.review-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  flex: none;
  font-size: 16px;
  font-weight: 800;
}

.review-alert strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.review-alert span {
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.55;
}

.review-alert.tone-warning {
  background: linear-gradient(90deg, #fff7ed, #fffbeb);
  border-color: #fed7aa;
}

.review-alert.tone-warning .review-alert-icon {
  color: #b45309;
  background: #fef3c7;
}

.review-alert.tone-success {
  background: linear-gradient(90deg, #f0fdf4, #f7fff9);
  border-color: #bbf7d0;
}

.review-alert.tone-success .review-alert-icon {
  color: #047857;
  background: #d1fae5;
}

.review-alert.tone-info {
  background: linear-gradient(90deg, #eff6ff, #f8fbff);
  border-color: #bfdbfe;
}

.review-alert.tone-info .review-alert-icon {
  color: #1d4ed8;
  background: #dbeafe;
}

.review-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 42%);
  gap: 16px;
  align-items: start;
}

.review-main-stack,
.review-side-panel {
  display: grid;
  gap: 14px;
  align-items: start;
}

.review-surface-head {
  margin-bottom: 14px;
}

.review-surface-head.compact {
  margin-bottom: 12px;
}

.review-card-count {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.review-card-count strong {
  color: var(--primary-dark);
  font-size: 24px;
  line-height: 1;
}

.review-card-count span {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
}

.review-table-shell {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(220, 230, 242, 0.88);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
}

.review-table-scroll {
  max-height: 336px;
  overflow: auto;
}

.review-row {
  grid-template-columns: 1.15fr 0.72fr 1.2fr 1fr 1.05fr 1.2fr auto;
  padding: 14px 16px;
  gap: 12px;
}

.review-row.head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbff;
}

.review-row.body > div {
  min-width: 0;
}

.review-row.body strong {
  margin-bottom: 4px;
  font-size: 13px;
}

.review-row.body span {
  display: block;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.55;
}

.review-metric-cell .mini-tag {
  margin-top: 4px;
}

.review-value-cell strong {
  color: var(--primary-dark);
}

.review-system-cell strong {
  color: #1d4ed8;
}

.review-judgement-group {
  gap: 8px;
  flex-wrap: nowrap;
}

.review-judgement-group .choice-pill {
  min-height: 36px;
  padding: 0 12px;
  flex: 1;
}

.review-note-input {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
}

.review-gray-actions {
  display: grid;
  gap: 8px;
  align-content: start;
}

.review-gray-actions .btn-primary,
.review-gray-actions .btn-ghost {
  min-height: 36px;
  width: 100%;
}

.review-empty-state {
  min-height: 116px;
}

.review-history-panels {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.review-fold {
  overflow: hidden;
  border: 1px solid rgba(220, 230, 242, 0.88);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.review-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.review-fold summary::-webkit-details-marker {
  display: none;
}

.review-fold summary div {
  display: grid;
  gap: 4px;
}

.review-fold summary strong {
  font-size: 15px;
}

.review-fold summary span,
.review-fold summary em {
  color: var(--text-sub);
  font-size: 12px;
  font-style: normal;
}

.review-fold-body {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.review-history-list {
  display: grid;
  gap: 10px;
}

.review-history-item {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(220, 230, 242, 0.82);
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.review-history-item.muted {
  opacity: 0.78;
  background: linear-gradient(180deg, #fbfcfe, #f4f7fb);
}

.review-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.review-history-head strong {
  font-size: 14px;
}

.review-history-meta {
  display: grid;
  gap: 4px;
}

.review-history-meta span {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.55;
}

.review-assist-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-assist-card {
  padding: 18px 18px 16px;
}

.review-note-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.65;
}

.review-hb-card .hb-scale {
  gap: 12px;
}

.review-scale-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.review-scale-top span {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
}

.review-scale-top strong {
  display: block;
  margin-top: 4px;
  color: var(--primary-dark);
  font-size: 24px;
}

.review-hb-card .hb-axis {
  gap: 10px;
}

.review-hb-card .hb-step {
  gap: 6px;
}

.review-hb-card .hb-step strong {
  font-size: 12px;
}

.review-hb-card .hb-step small {
  color: var(--text-sub);
  font-size: 11px;
  text-align: center;
}

.review-path-scroll .timeline-steps {
  max-height: 236px;
  overflow: auto;
  padding-right: 4px;
}

.review-doctor-panel {
  padding: 20px;
  background: linear-gradient(180deg, #ffffff, #f6faff);
  border-color: rgba(23, 105, 255, 0.18);
}

.review-final-overview {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.review-final-overview span {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
}

.review-final-overview strong {
  display: block;
  margin-top: 4px;
  color: var(--primary-dark);
  font-size: 28px;
  line-height: 1.15;
}

.review-final-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.review-mode-group .choice-pill {
  flex: 1;
}

.review-grade-picker {
  gap: 8px;
  margin-top: 14px;
}

.review-grade-picker .grade-pill {
  min-height: 58px;
  padding: 12px 14px;
}

.review-field {
  gap: 8px;
}

.review-field select,
.review-final-note {
  margin-top: 2px;
}

.review-final-note {
  min-height: 88px;
}

.review-final-actions {
  gap: 10px;
  margin-top: 14px;
}

.review-final-actions .btn-primary,
.review-final-actions .btn-ghost {
  flex: 1;
}

.review-page-actions {
  justify-content: flex-start;
  gap: 12px;
}

.state-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.state-banner.warning {
  background: linear-gradient(180deg, #fffdf8, #fff6e8);
  border-color: rgba(245, 158, 11, 0.22);
}

.state-banner.success {
  background: linear-gradient(180deg, #fbfffd, #eefaf4);
  border-color: rgba(24, 160, 88, 0.2);
}

.state-banner.info {
  background: linear-gradient(180deg, #fbfdff, #eef4ff);
  border-color: rgba(37, 99, 235, 0.18);
}

.state-banner strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
}

.review-table,
.threshold-table {
  overflow: hidden;
}

.review-row,
.threshold-row,
.mini-table-head,
.mini-table-row {
  display: grid;
  gap: 14px;
  align-items: start;
}

.review-row {
  grid-template-columns: 1.2fr 0.7fr 1.2fr 1fr 1fr 1.4fr 0.8fr;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(220, 230, 242, 0.84);
}

.review-row.head,
.threshold-row.head,
.mini-table-head {
  background: #f8fbff;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 800;
}

.review-row:last-child,
.threshold-row:last-child,
.mini-table-row:last-child {
  border-bottom: 0;
}

.review-row strong,
.threshold-row strong {
  display: block;
  margin-bottom: 4px;
}

.review-row textarea {
  min-height: 72px;
}

.choice-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.choice-group.tight {
  gap: 8px;
}

.choice-pill,
.grade-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(195, 210, 229, 0.95);
  border-radius: 12px;
  background: #fff;
  color: var(--text-main);
  font-weight: 700;
}

.choice-pill.warning {
  color: #aa6a00;
  background: #fff8e8;
}

.choice-pill.active {
  color: var(--primary);
  border-color: rgba(23, 105, 255, 0.36);
  background: var(--primary-soft);
}

.choice-pill.active.warning {
  color: #aa6a00;
  border-color: rgba(245, 158, 11, 0.35);
  background: var(--warning-soft);
}

.grade-picker {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grade-pill {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 68px;
  padding: 14px 16px;
  text-align: left;
}

.grade-pill strong {
  font-size: 16px;
}

.grade-pill span {
  color: var(--text-sub);
  font-size: 12px;
}

.grade-pill.active {
  border-color: rgba(23, 105, 255, 0.4);
  background: linear-gradient(180deg, #f6faff, #eaf2ff);
}

.hb-scale {
  display: grid;
  gap: 18px;
}

.hb-axis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hb-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.hb-step::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgba(188, 203, 224, 0.9);
  z-index: 0;
}

.hb-step:last-child::after {
  display: none;
}

.hb-marker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eef3f9;
  color: var(--text-sub);
  font-weight: 800;
}

.hb-marker.system {
  background: rgba(37, 99, 235, 0.14);
  color: var(--info);
}

.hb-marker.doctor {
  background: rgba(24, 160, 88, 0.14);
  color: var(--success);
}

.hb-marker.final {
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12);
}

.hb-legend {
  display: grid;
  gap: 8px;
}

.hb-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
  font-size: 13px;
}

.subsection {
  margin-top: 24px;
}

.subsection h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

.history-item.muted {
  opacity: 0.72;
  background: linear-gradient(180deg, #fbfcfe, #f4f7fb);
}

.empty-block,
.loading-block {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 180px;
  padding: 28px;
  border: 1px dashed rgba(188, 203, 224, 0.95);
  border-radius: 18px;
  background: linear-gradient(180deg, #fafcff, #f5f9fe);
  text-align: center;
}

.empty-block strong,
.loading-block strong {
  font-size: 20px;
}

.empty-inline {
  color: var(--text-sub);
  font-size: 13px;
}

.loading-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(23, 105, 255, 0.16);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.tabs-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.config-tab,
.detail-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  color: var(--text-sub);
  background: #f4f8fd;
  border: 1px solid rgba(220, 230, 242, 0.95);
  font-weight: 700;
}

.config-tab.active,
.detail-tab.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: rgba(23, 105, 255, 0.22);
}

.threshold-row {
  grid-template-columns: 0.8fr 1fr 1fr 1fr 1fr 1.2fr 1.1fr;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(220, 230, 242, 0.84);
}

.threshold-stack {
  gap: 10px;
}

.threshold-inline-spec {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid rgba(220, 230, 242, 0.9);
}

.threshold-inline-spec strong {
  margin: 0;
  font-size: 12px;
}

.threshold-inline-spec input,
.threshold-row input {
  padding: 10px 12px;
}

.flow-step {
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f7fbff);
  border: 1px solid rgba(220, 230, 242, 0.9);
}

.info-list {
  gap: 14px;
  flex-direction: column;
}

.info-list > div {
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(220, 230, 242, 0.78);
}

.info-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.timeline-rail {
  position: relative;
  padding-left: 14px;
}

.timeline-rail::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: rgba(188, 203, 224, 0.95);
}

.timeline-entry {
  position: relative;
  margin-left: 12px;
  padding: 0 0 16px 18px;
}

.timeline-entry i {
  position: absolute;
  left: -12px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd6e7;
}

.timeline-entry.current i {
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(24, 160, 88, 0.12);
}

.timeline-entry strong {
  display: block;
  margin-bottom: 4px;
}

.timeline-entry span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-sub);
  font-size: 12px;
}

.mini-table {
  overflow: hidden;
}

.mini-table-head,
.mini-table-row {
  grid-template-columns: 1fr 0.8fr 0.8fr 1fr 1.4fr;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(220, 230, 242, 0.84);
}

.mini-table-row span {
  font-size: 13px;
  line-height: 1.6;
}

.threshold-console-page {
  gap: 16px;
}

.threshold-console-page .threshold-header-card {
  display: grid;
  gap: 8px;
  padding-bottom: 8px;
}

.threshold-header-breadcrumb {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
}

.threshold-console-page .threshold-header-head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.threshold-console-page .threshold-header-head h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

.threshold-console-page .threshold-header-head p {
  max-width: 760px;
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.65;
}

.threshold-console-page .threshold-head-note {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #eff6ff, #e7f0ff);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.threshold-console-page .threshold-tabs-row {
  gap: 24px;
  padding-top: 0;
  border-bottom: 1px solid rgba(220, 230, 242, 0.95);
}

.threshold-console-page .config-tab {
  position: relative;
  min-height: 50px;
  padding: 0 4px;
  border: 0;
  border-radius: 0;
  color: var(--text-main);
  background: transparent;
}

.threshold-console-page .config-tab.active {
  color: var(--primary);
  background: transparent;
  border: 0;
}

.threshold-console-page .config-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}

.threshold-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 24%);
  gap: 18px;
  align-items: start;
}

.threshold-main-column,
.threshold-side-column {
  display: grid;
  gap: 14px;
  align-items: start;
}

.threshold-side-column {
  grid-auto-rows: min-content;
}

.threshold-matrix-head,
.threshold-subhead {
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.threshold-version-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.threshold-console-page .threshold-table {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(220, 230, 242, 0.92);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.threshold-console-page .threshold-row {
  grid-template-columns: 0.72fr 1fr 1.12fr 1.12fr 1.12fr 1.06fr 1.14fr;
  gap: 0;
  min-width: 1080px;
  padding: 0;
  align-items: stretch;
}

.threshold-console-page .threshold-row > div {
  min-width: 0;
  padding: 16px 14px;
  border-right: 1px solid rgba(220, 230, 242, 0.84);
}

.threshold-console-page .threshold-row > div:last-child {
  border-right: 0;
}

.threshold-console-page .threshold-row.head {
  background: #f8fbff;
}

.threshold-console-page .threshold-row.head div {
  display: flex;
  align-items: center;
  min-height: 58px;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 800;
}

.threshold-console-page .threshold-row.head .zone-head.success {
  color: #15803d;
}

.threshold-console-page .threshold-row.head .zone-head.warning {
  color: #b45309;
}

.threshold-console-page .threshold-row.head .zone-head.danger {
  color: #b91c1c;
}

.threshold-console-page .threshold-row.body {
  border-bottom: 1px solid rgba(220, 230, 242, 0.84);
}

.threshold-console-page .threshold-row.body:last-child {
  border-bottom: 0;
}

.threshold-action-cell,
.threshold-metric-cell,
.threshold-description-cell {
  display: grid;
  gap: 6px;
  align-content: start;
}

.threshold-action-cell strong,
.threshold-metric-cell strong,
.threshold-description-cell strong {
  font-size: 14px;
  line-height: 1.45;
}

.threshold-action-cell span,
.threshold-metric-cell span,
.threshold-description-cell span {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.65;
}

.threshold-zone-card {
  display: grid;
  gap: 10px;
  height: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(220, 230, 242, 0.9);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.threshold-zone-card.tone-success {
  background: linear-gradient(180deg, #ffffff, #f2fbf5);
  border-color: rgba(24, 160, 88, 0.16);
}

.threshold-zone-card.tone-warning {
  background: linear-gradient(180deg, #ffffff, #fff9ef);
  border-color: rgba(245, 158, 11, 0.18);
}

.threshold-zone-card.tone-danger {
  background: linear-gradient(180deg, #ffffff, #fff5f5);
  border-color: rgba(239, 68, 68, 0.16);
}

.threshold-zone-card strong {
  font-size: 13px;
  line-height: 1.5;
}

.threshold-zone-card span {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.6;
}

.threshold-zone-fields {
  display: grid;
  gap: 8px;
}

.threshold-zone-field {
  display: grid;
  gap: 6px;
}

.threshold-zone-field span {
  font-size: 11px;
  font-weight: 700;
}

.threshold-zone-field input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(195, 210, 229, 0.95);
  background: rgba(255, 255, 255, 0.92);
}

.threshold-timeline-rail {
  padding-left: 18px;
  max-height: 300px;
  overflow: auto;
}

.threshold-timeline-entry {
  padding-bottom: 18px;
}

.threshold-timeline-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.threshold-log-filter-bar {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr)) auto auto;
  align-items: end;
  margin: 6px 0 16px;
}

.threshold-log-filter-bar .field {
  min-width: 0;
}

.threshold-log-filter-bar input,
.threshold-log-filter-bar select {
  width: 100%;
}

.threshold-log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.threshold-log-toolbar-note {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.6;
}

.threshold-log-table {
  min-height: 520px;
  max-height: 620px;
  overflow: auto;
  position: relative;
}

.threshold-mini-table {
  min-width: 1120px;
}

.threshold-log-head,
.threshold-log-row {
  min-width: 1140px;
  grid-template-columns: 1fr 0.8fr 1.35fr 0.72fr 1fr 0.78fr 0.9fr 0.92fr 1.4fr;
}

.threshold-log-head span {
  font-size: 12px;
  font-weight: 800;
}

.threshold-log-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fbff;
  box-shadow: 0 1px 0 rgba(220, 230, 242, 0.92);
}

.threshold-log-row span {
  font-size: 12px;
  line-height: 1.65;
}

.threshold-log-record-cell {
  display: flex;
  align-items: center;
}

.threshold-log-record-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #2457ff;
  text-decoration: none;
}

.threshold-log-record-link strong {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.threshold-log-record-link small {
  color: #6f7c96;
  font-size: 11px;
  line-height: 1.4;
}

.threshold-log-record-link:hover {
  text-decoration: underline;
}

.threshold-log-record-link.disabled {
  color: #6f7c96;
  cursor: default;
  text-decoration: none;
}

.threshold-log-pagination {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

@media (max-width: 1680px) {
  .threshold-log-filter-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .threshold-log-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .threshold-log-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }
}

.threshold-footer-actions {
  justify-content: flex-start;
  gap: 12px;
}

.threshold-action-bar {
  padding: 12px 18px;
}

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

.threshold-workflow-step {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 12px 11px 11px;
  border-radius: 18px;
  border: 1px solid rgba(220, 230, 242, 0.9);
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  text-align: left;
}

.threshold-workflow-index {
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
}

.threshold-workflow-step i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0;
  border-radius: 50%;
  font-style: normal;
  font-size: 16px;
  font-weight: 800;
}

.threshold-workflow-step.tone-warning i {
  color: #b45309;
  background: #fef3c7;
}

.threshold-workflow-step.tone-primary i,
.threshold-workflow-step.tone-info i {
  color: var(--primary);
  background: #e8f0ff;
}

.threshold-workflow-step.tone-success i {
  color: #047857;
  background: #d1fae5;
}

.threshold-workflow-step strong {
  font-size: 13px;
  line-height: 1.35;
}

.threshold-workflow-step span {
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.55;
}

.threshold-info-list {
  gap: 12px;
}

.threshold-info-list .mini-tag {
  margin-left: auto;
}

.threshold-side-actions {
  justify-content: flex-start;
  gap: 10px;
}

.threshold-version-tip {
  margin: 0;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.65;
}

.threshold-section-card {
  display: grid;
  gap: 12px;
}

.threshold-section-head {
  align-items: flex-start;
}

.threshold-section-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.threshold-section-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.threshold-section-intro p {
  margin: 0;
  max-width: 760px;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.65;
}

.threshold-inline-note {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff7ed;
  color: #b45309;
  font-size: 12px;
  font-weight: 700;
}

.threshold-rest-scroll,
.threshold-score-scroll {
  overflow-x: auto;
}

.threshold-rest-table {
  min-width: 1460px;
  overflow: hidden;
  border: 1px solid rgba(220, 230, 242, 0.92);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.threshold-rest-head,
.threshold-rest-row {
  display: grid;
  grid-template-columns: 190px 230px minmax(220px, 1fr) minmax(240px, 1.08fr) minmax(220px, 1fr) 230px 250px;
  gap: 0;
  align-items: stretch;
}

.threshold-rest-head {
  background: #f8fbff;
}

.threshold-rest-head span {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 14px;
  border-right: 1px solid rgba(220, 230, 242, 0.84);
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 800;
}

.threshold-rest-head span:last-child {
  border-right: 0;
}

.threshold-rest-head .zone-head.success {
  color: #15803d;
}

.threshold-rest-head .zone-head.warning {
  color: #b45309;
}

.threshold-rest-head .zone-head.danger {
  color: #b91c1c;
}

.threshold-rest-row {
  border-top: 1px solid rgba(220, 230, 242, 0.84);
}

.threshold-rest-cell {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 14px 12px;
  border-right: 1px solid rgba(220, 230, 242, 0.84);
}

.threshold-rest-cell:last-child {
  border-right: 0;
}

.threshold-rest-cell strong {
  font-size: 12px;
  line-height: 1.45;
}

.threshold-rest-cell span {
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.55;
}

.threshold-rest-cell.metric strong {
  font-size: 13px;
}

.threshold-zone-block {
  display: grid;
  align-content: center;
  gap: 0;
  height: 100%;
  min-height: 54px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(220, 230, 242, 0.82);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  text-align: center;
}

.threshold-zone-block.tone-success {
  background: linear-gradient(180deg, #ffffff, #f7fdf9);
  border-color: rgba(24, 160, 88, 0.2);
}

.threshold-zone-block.tone-warning {
  background: linear-gradient(180deg, #ffffff, #fffaf2);
  border-color: rgba(245, 158, 11, 0.22);
}

.threshold-zone-block.tone-danger {
  background: linear-gradient(180deg, #ffffff, #fff7f7);
  border-color: rgba(239, 68, 68, 0.22);
}

.threshold-zone-block strong {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 800;
}

.threshold-zone-block.tone-success strong {
  color: #16a34a;
}

.threshold-zone-block.tone-warning strong {
  color: #f97316;
}

.threshold-zone-block.tone-danger strong {
  color: #ef4444;
}

.threshold-range-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 5px;
  min-height: 22px;
}

.threshold-range-line span {
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.threshold-inline-editor-wrap {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 1px;
  max-width: 100%;
}

.threshold-inline-editor-wrap em {
  color: inherit;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.threshold-inline-editor {
  width: calc(var(--threshold-inline-editor-ch, 7.8) * 1ch);
  min-width: 7.8ch;
  height: 22px;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid rgba(110, 135, 171, 0.42);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  flex: 0 0 auto;
  appearance: textfield;
  -moz-appearance: textfield;
}

.threshold-inline-editor::-webkit-outer-spin-button,
.threshold-inline-editor::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.threshold-inline-editor:focus {
  outline: none;
  border-bottom-color: var(--primary);
  box-shadow: inset 0 -1px 0 var(--primary);
}

.threshold-boundary-helper,
.threshold-zone-hint {
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.55;
}

.threshold-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.threshold-score-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(220, 230, 242, 0.92);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  align-content: start;
}

.threshold-score-card.is-wide {
  grid-column: 1 / -1;
}

.threshold-score-card-head {
  align-items: flex-start;
}

.threshold-score-card-head h3 {
  margin-bottom: 2px;
  font-size: 18px;
}

.threshold-score-intro {
  margin: 0;
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.55;
  min-height: 34px;
}

.threshold-score-table {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(220, 230, 242, 0.84);
  border-radius: 16px;
}

.threshold-score-table-head,
.threshold-score-table-row {
  display: grid;
  grid-template-columns: 92px minmax(260px, 1.56fr) minmax(150px, 1fr) minmax(138px, 0.96fr);
  gap: 0;
  align-items: stretch;
  min-width: 660px;
}

.threshold-score-table-head {
  background: #f8fbff;
}

.threshold-score-table-head span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-right: 1px solid rgba(220, 230, 242, 0.84);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
}

.threshold-score-table-head span:last-child,
.threshold-score-table-row > div:last-child {
  border-right: 0;
}

.threshold-score-table-row {
  border-top: 1px solid rgba(220, 230, 242, 0.84);
}

.threshold-score-table-row > div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid rgba(220, 230, 242, 0.84);
}

.threshold-score-grade,
.threshold-score-copy {
  display: flex;
  align-items: center;
}

.threshold-score-grade {
  justify-content: flex-start;
}

.threshold-score-copy {
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.55;
}

.threshold-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.threshold-score-badge.tone-score-1 {
  color: #15803d;
  background: #dcfce7;
}

.threshold-score-badge.tone-score-2 {
  color: #1d4ed8;
  background: #dbeafe;
}

.threshold-score-badge.tone-score-3 {
  color: #2563eb;
  background: #e0ecff;
}

.threshold-score-badge.tone-score-4 {
  color: #c2410c;
  background: #ffedd5;
}

.threshold-score-badge.tone-score-5 {
  color: #b91c1c;
  background: #fee2e2;
}

.threshold-score-range {
  display: grid;
  gap: 0;
  min-width: 0;
}

.threshold-score-range strong {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-main);
}

.threshold-score-range .threshold-range-line {
  justify-content: flex-start;
  gap: 4px;
}

.threshold-score-footnote {
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.55;
}

.threshold-side-note-card {
  gap: 12px;
}

.threshold-action-note-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-sub);
  font-size: 11px;
  line-height: 1.55;
}

.threshold-action-note-list li::marker {
  color: var(--primary);
}

.threshold-side-note-card,
.threshold-workflow-card {
  padding-bottom: 16px;
}

.threshold-log-card--full {
  min-width: 0;
}

@media (min-width: 1600px) {
  .threshold-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

@media (max-width: 1480px) {
  .threshold-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .admin-user-layout {
    grid-template-columns: minmax(0, 1fr) 390px;
  }

  .admin-filter-bar {
    grid-template-columns: minmax(220px, 1fr) 132px 132px auto auto;
  }

  .threshold-score-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .threshold-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-user-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-user-table-shell,
  .admin-detail-card {
    height: auto;
    max-height: none;
  }

  .admin-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-detail-grid,
  .admin-user-summary-meta {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-password-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .threshold-side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .threshold-console-page .threshold-header-head {
    flex-direction: column;
  }

  .threshold-section-intro {
    flex-direction: column;
  }

  .threshold-score-grid,
  .threshold-workflow-track {
    grid-template-columns: minmax(0, 1fr);
  }
}

.side-panel,
.detail-panel {
  padding: 0;
  overflow: hidden;
}

.detail-panel {
  display: grid;
}

.admin-detail-card {
  max-height: calc(100vh - var(--topbar-height) - 132px);
}

.admin-detail-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

.admin-detail-panel .detail-head.admin-detail-head {
  display: grid;
  gap: 14px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(220, 230, 242, 0.9);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.admin-user-profile {
  gap: 14px;
}

.admin-user-avatar {
  width: 58px;
  height: 58px;
  font-size: 22px;
}

.admin-user-title-row {
  gap: 10px;
}

.admin-user-title-row h3 {
  font-size: 24px;
}

.admin-user-title-row span {
  font-size: 13px;
}

.admin-user-meta-inline {
  gap: 8px;
}

.admin-user-summary-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-user-summary-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f7fbff;
  border: 1px solid rgba(220, 230, 242, 0.8);
}

.admin-user-summary-item span {
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 700;
}

.admin-user-summary-item strong {
  font-size: 13px;
}

.admin-detail-scroll {
  display: grid;
  flex: 1 1 auto;
  gap: 12px;
  padding: 14px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  padding-bottom: 18px;
}

.admin-detail-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(220, 230, 242, 0.88);
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.admin-detail-section-muted {
  background: linear-gradient(180deg, #fbfdff, #f5f8fd);
}

.admin-detail-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin-detail-section-head strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.admin-detail-section-head span {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.5;
}

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

.admin-detail-grid .field,
.admin-password-row .field {
  gap: 6px;
}

.admin-detail-grid .field > span:first-child,
.admin-password-row .field > span:first-child {
  font-size: 12px;
}

.admin-detail-grid input,
.admin-detail-grid select,
.admin-password-row input {
  height: 38px;
  padding: 0 12px;
}

.admin-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-password-row .btn-ghost {
  min-height: 38px;
}

.admin-permission-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-permission-tags .mini-tag {
  min-height: 28px;
  padding: 4px 10px;
  font-size: 11px;
}

.admin-detail-note-list {
  display: grid;
  gap: 6px;
}

.admin-detail-note-list span {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.5;
}

.admin-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(220, 230, 242, 0.9);
  background: rgba(249, 252, 255, 0.94);
}

.admin-detail-footer-note {
  color: var(--text-sub);
  font-size: 12px;
}

.detail-head {
  padding: 22px;
  border-bottom: 1px solid rgba(220, 230, 242, 0.9);
  background: linear-gradient(180deg, #fff, #f9fbff);
}

.detail-tabs {
  padding: 18px 22px 0;
  flex-wrap: wrap;
}

.detail-form {
  display: grid;
  gap: 16px;
  padding: 18px 22px 22px;
}

.permissions-placeholder {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid rgba(220, 230, 242, 0.9);
}

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

.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(3, 20, 46, 0.42);
  backdrop-filter: blur(6px);
  z-index: 50;
}

.overlay.show {
  display: flex;
}

.modal-window {
  width: min(620px, 100%);
  max-height: calc(100vh - 56px);
  padding: 24px;
  overflow: auto;
}

.modal-window.modal-wide {
  width: min(920px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-head h3 {
  margin: 0;
  font-size: 28px;
}

.modal-head p {
  margin: 10px 0 0;
  color: var(--text-sub);
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f4f8fd;
  color: var(--text-sub);
  font-size: 22px;
  line-height: 1;
}

.modal-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.file-pill {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  background: #f4f8fd;
  color: var(--text-main);
  font-weight: 700;
  word-break: break-all;
}

.upload-file-box {
  align-content: start;
}

.bundle-summary-card {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(220, 230, 242, 0.92);
  background: linear-gradient(180deg, #fbfdff, #f4f8fd);
}

.bundle-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bundle-summary-head strong {
  display: block;
  color: var(--text-main);
  font-size: 16px;
}

.bundle-summary-head span,
.bundle-summary-meta span {
  color: var(--text-sub);
  font-size: 12px;
}

.bundle-summary-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.bundle-detect-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bundle-detect-block {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(220, 230, 242, 0.92);
  background: rgba(255, 255, 255, 0.86);
}

.bundle-detect-label {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bundle-detect-block strong {
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.4;
  word-break: break-all;
}

.bundle-detect-block small {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.6;
}

.bundle-detect-list {
  display: grid;
  gap: 8px;
}

.dashboard-help-modal-backdrop {
  align-items: flex-start;
  overflow-y: auto;
  padding: clamp(14px, 2.4vw, 32px);
}

.dashboard-help-modal {
  inline-size: min(1080px, calc(100vw - clamp(28px, 7vw, 88px)));
  max-inline-size: 100%;
  max-block-size: min(calc(100vh - clamp(28px, 6vw, 72px)), 880px);
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 1.8vw, 26px);
  overflow: hidden;
  margin-block: auto;
}

.dashboard-help-modal-header {
  margin-bottom: 16px;
}

.dashboard-help-modal-header p {
  max-inline-size: 62ch;
}

.dashboard-help-modal-body {
  display: grid;
  flex: 1 1 auto;
  gap: clamp(12px, 1.2vw, 18px);
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-inline-end: 4px;
  padding-block-start: 2px;
  scrollbar-gutter: stable;
}

.dashboard-help-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(12px, 1.2vw, 16px);
  min-width: 0;
}

.help-explain-card {
  min-width: 0;
  padding: clamp(14px, 1.3vw, 18px);
  border: 1px solid rgba(218, 229, 245, 0.96);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.help-explain-card-primary {
  background:
    linear-gradient(180deg, rgba(249, 252, 255, 0.98), rgba(239, 246, 255, 0.95)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(37, 99, 235, 0));
}

.help-explain-card-secondary {
  background:
    linear-gradient(180deg, rgba(250, 255, 252, 0.98), rgba(240, 252, 246, 0.95)),
    linear-gradient(135deg, rgba(24, 160, 88, 0.05), rgba(24, 160, 88, 0));
}

.help-explain-card-tertiary {
  background:
    linear-gradient(180deg, rgba(252, 251, 255, 0.98), rgba(245, 242, 255, 0.95)),
    linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(139, 92, 246, 0));
}

.dashboard-delete-modal-backdrop {
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 2.4vw, 32px);
}

.dashboard-delete-modal {
  inline-size: min(720px, calc(100vw - clamp(28px, 7vw, 88px)));
  max-inline-size: 100%;
  max-block-size: min(calc(100vh - clamp(28px, 6vw, 72px)), 780px);
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 1.8vw, 26px);
  overflow: hidden;
}

.dashboard-delete-modal-body {
  display: grid;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.dashboard-delete-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.dashboard-delete-item {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid rgba(220, 230, 242, 0.9);
}

.dashboard-delete-item strong,
.dashboard-delete-item span,
.dashboard-delete-item em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-delete-item strong {
  color: var(--text-main);
}

.dashboard-delete-item span,
.dashboard-delete-item em {
  color: var(--text-sub);
  font-size: 13px;
  font-style: normal;
}

.dashboard-delete-actions {
  justify-content: flex-end;
}

.bundle-detect-item {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7faff;
  border: 1px solid rgba(220, 230, 242, 0.92);
}

.bundle-detect-item.missing {
  background: #fff8ef;
  border-color: rgba(245, 158, 11, 0.2);
}

.bundle-detect-item strong {
  color: var(--text-main);
  font-size: 13px;
}

.bundle-detect-item span {
  color: var(--text-sub);
  font-size: 12px;
  word-break: break-all;
}

.upload-duplicate-modal {
  inline-size: min(900px, calc(100vw - clamp(28px, 6vw, 80px)));
  max-inline-size: 100%;
  max-block-size: min(calc(100vh - clamp(28px, 5vw, 72px)), 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.upload-duplicate-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 12px;
  margin-block-end: 16px;
}

.upload-duplicate-stat {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(220, 230, 242, 0.95);
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(244, 248, 253, 0.95));
}

.upload-duplicate-stat span {
  color: var(--text-sub);
  font-size: 12px;
}

.upload-duplicate-stat strong {
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
}

.upload-duplicate-records {
  display: grid;
  gap: 0;
  min-height: 0;
  max-height: 320px;
  overflow: auto;
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid rgba(220, 230, 242, 0.95);
  background: rgba(255, 255, 255, 0.98);
}

.upload-duplicate-head,
.upload-duplicate-row {
  grid-template-columns: 1.1fr 1fr 1fr 1fr 0.9fr;
  min-width: 760px;
  padding: 14px 16px;
}

.upload-duplicate-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fbff;
  box-shadow: 0 1px 0 rgba(220, 230, 242, 0.92);
}

.upload-duplicate-row {
  border-bottom: 1px solid rgba(220, 230, 242, 0.84);
}

.upload-duplicate-row span {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
}

.batch-upload-modal {
  inline-size: min(880px, calc(100vw - clamp(28px, 6vw, 80px)));
  max-inline-size: 100%;
  max-block-size: min(calc(100vh - clamp(28px, 5vw, 72px)), 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.batch-upload-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 12px;
  margin-block-end: 16px;
}

.batch-upload-stat {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(220, 230, 242, 0.95);
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(244, 248, 253, 0.95));
}

.batch-upload-stat.warning {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 247, 237, 0.95));
  border-color: rgba(245, 158, 11, 0.18);
}

.batch-upload-stat span {
  color: var(--text-sub);
  font-size: 12px;
}

.batch-upload-stat strong {
  color: var(--text-main);
  font-size: clamp(20px, 1.5vw, 28px);
  line-height: 1.1;
}

.batch-upload-progress-card {
  display: grid;
  gap: 12px;
  margin-block-end: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(220, 230, 242, 0.95);
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(241, 246, 255, 0.95));
}

.batch-upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.batch-upload-progress-head strong {
  color: var(--text-main);
  font-size: 15px;
}

.batch-upload-progress-head span,
.batch-upload-progress-note {
  color: var(--text-sub);
  font-size: 13px;
}

.batch-upload-progress-bar {
  inline-size: 100%;
  block-size: 10px;
  border-radius: 999px;
  background: rgba(220, 230, 242, 0.92);
  overflow: hidden;
}

.batch-upload-progress-bar span {
  display: block;
  block-size: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f79ff, #67a9ff);
}

.batch-upload-results {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-inline-end: 4px;
}

.batch-upload-result {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(220, 230, 242, 0.95);
  background: rgba(255, 255, 255, 0.98);
}

.batch-upload-result.warning {
  background: linear-gradient(180deg, rgba(255, 250, 235, 0.98), rgba(255, 246, 230, 0.95));
  border-color: rgba(245, 158, 11, 0.18);
}

.batch-upload-result.error {
  background: linear-gradient(180deg, rgba(255, 246, 246, 0.98), rgba(255, 239, 239, 0.95));
  border-color: rgba(239, 68, 68, 0.18);
}

.batch-upload-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.batch-upload-result-head strong {
  color: var(--text-main);
  font-size: 14px;
}

.batch-upload-result-head span {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 700;
}

.batch-upload-result p {
  margin: 0;
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
}

.toast-stack {
  position: fixed;
  top: 26px;
  right: 26px;
  z-index: 70;
}

.toast {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 320px;
  max-width: min(460px, calc(100vw - 40px));
  padding: 16px 18px;
}

.toast-body {
  display: grid;
  gap: 4px;
}

.toast-body strong {
  font-size: 15px;
}

.toast-body span {
  color: var(--text-sub);
  font-size: 13px;
  line-height: 1.7;
}

.toast-close {
  min-width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  color: inherit;
  font-size: 20px;
}

.toast.tone-success {
  border-color: rgba(24, 160, 88, 0.22);
}

.toast.tone-warning {
  border-color: rgba(245, 158, 11, 0.22);
}

.toast.tone-danger {
  border-color: rgba(239, 68, 68, 0.2);
}

.toast.tone-info,
.toast.tone-primary {
  border-color: rgba(37, 99, 235, 0.18);
}

.review-actions {
  align-items: stretch;
  flex-direction: column;
}

.review-actions .btn-primary,
.review-actions .btn-ghost {
  width: 100%;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1460px) {
  .dashboard-body {
    grid-template-columns: minmax(0, 1fr) 272px;
  }

  .dashboard-meaning-grid {
    grid-template-columns: 1fr;
  }

  .report-header-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  }

  .report-meta-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 10px;
  }

  .report-meta-item:nth-child(4) {
    padding-left: 0;
    border-left: 0;
  }

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

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

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

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

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

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

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

  .patient-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 2100px) and (max-height: 960px) {
  .dashboard-page {
    gap: 14px;
  }

  .dashboard-header-card {
    padding: 14px 16px;
  }

  .dashboard-header-row {
    gap: 14px;
  }

  .dashboard-header-copy h2 {
    margin: 2px 0 4px;
    font-size: 22px;
  }

  .dashboard-header-copy p,
  .dashboard-inline-breadcrumb,
  .dashboard-header-side,
  .dashboard-surface-tip {
    font-size: 12px;
  }

  .dashboard-stats-grid {
    gap: 12px;
  }

  .dashboard-stats-grid .stat-card {
    min-height: 94px;
    grid-template-columns: 48px minmax(0, 1fr) 84px;
    gap: 12px;
    padding: 14px 14px 12px;
  }

  .dashboard-stats-grid .stat-card::after {
    width: 86px;
    height: 86px;
    inset: auto -22px -24px auto;
  }

  .dashboard-stats-grid .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 15px;
  }

  .dashboard-stats-grid .stat-body strong {
    font-size: 28px;
  }

  .dashboard-stats-grid .stat-body span {
    font-size: 12px;
  }

  .dashboard-stats-grid .stat-body small {
    font-size: 11px;
    line-height: 1.45;
  }

  .dashboard-stats-grid .sparkline {
    height: 40px;
  }

  .dashboard-filter-card {
    padding: 14px 16px 12px;
  }

  .dashboard-surface-head {
    margin-bottom: 10px;
  }

  .dashboard-surface-head h3 {
    font-size: 17px;
  }

  .dashboard-toolbar-grid {
    gap: 10px;
  }

  .dashboard-toolbar-grid input,
  .dashboard-toolbar-grid select {
    height: 36px;
    padding: 0 11px;
  }

  .dashboard-toolbar-grid .btn-primary,
  .dashboard-toolbar-grid .btn-ghost,
  .dashboard-filter-actions .btn-secondary,
  .dashboard-filter-actions .btn-ghost {
    min-height: 36px;
  }

  .dashboard-filter-actions {
    gap: 10px;
  }

  .dashboard-body {
    grid-template-columns: minmax(0, 1fr) 292px;
    gap: 14px;
  }

  .dashboard-meaning-card {
    padding: 14px 16px;
  }

  .dashboard-meaning-section {
    padding: 13px 14px;
    border-radius: 16px;
  }

  .dashboard-meaning-list {
    gap: 10px;
  }

  .dashboard-meaning-item {
    padding: 10px 12px;
  }

  .dashboard-body > .report-table-card {
    height: clamp(700px, 74vh, 820px);
    min-height: 700px;
  }

  .dashboard-side-stack {
    height: clamp(700px, 74vh, 820px);
    gap: 10px;
  }

  .report-table-card {
    padding: 14px 14px 10px;
  }

  .table-head-compact {
    margin-bottom: 10px;
  }

  .table-head-compact p {
    font-size: 11px;
  }

  .table-meta.compact strong {
    font-size: 22px;
  }

  .report-table-scroll .data-table {
    min-width: 900px;
  }

  .report-table-scroll .data-table thead th {
    padding: 10px;
    font-size: 12px;
  }

  .report-table-scroll .data-table td {
    padding: 10px;
    font-size: 12px;
  }

  .report-table-scroll .data-table tbody tr {
    height: 48px;
  }

  .report-table-scroll .table-primary strong {
    font-size: 12px;
  }

  .report-table-scroll .table-primary span,
  .table-meta.compact span {
    font-size: 10px;
  }

  .report-table-scroll .table-actions {
    gap: 6px;
  }

  .report-table-scroll .table-actions .btn-ghost,
  .report-table-scroll .table-actions .btn-primary {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
  }

  .report-table-footer {
    margin-top: 8px;
    padding-top: 8px;
  }

  .dashboard-side-card {
    padding: 10px 12px;
  }

  .dashboard-side-card .surface-head {
    margin-bottom: 4px;
  }

  .dashboard-reminder-list .reminder-item {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
  }

  .reminder-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 12px;
  }

  .reminder-head strong {
    font-size: 13px;
  }

  .reminder-head em,
  .dashboard-reminder-list .reminder-copy span {
    font-size: 11px;
  }

  .dashboard-quick-actions {
    gap: 7px;
  }

  .quick-action-compact {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
    min-height: 56px;
    padding: 9px 10px;
  }

  .quick-action-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 13px;
  }

  .quick-action-copy strong {
    font-size: 12px;
  }

  .quick-action-copy span {
    font-size: 11px;
    line-height: 1.4;
  }
}

@media (max-width: 1280px) {
  .app-sidebar {
    flex-basis: 88px;
    width: 88px;
    min-width: 88px;
    padding-inline: 12px;
  }

  .sidebar-hide-button,
  .sidebar-resizer {
    display: none;
  }

  .sidebar-brand strong,
  .sidebar-brand span,
  .sidebar-link span:not(.sidebar-icon),
  .sidebar-link em,
  .sidebar-foot span,
  .sidebar-foot small {
    display: none;
  }

  .sidebar-brand,
  .sidebar-link,
  .sidebar-foot {
    justify-content: center;
  }

  .toolbar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-toolbar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-meaning-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-body > .report-table-card {
    height: auto;
    min-height: 540px;
  }

  .report-table-scroll {
    min-height: 0;
  }

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

  .report-header-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-header-status-block {
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(220, 230, 242, 0.92);
  }

  .report-meta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-meta-item {
    padding-left: 0;
    border-left: 0;
  }

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

  .report-summary-grid .report-grade-card:last-child {
    grid-column: 1 / -1;
  }

  .report-grade-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-grade-card .report-card-lines {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    text-align: left;
    max-width: none;
  }

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

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

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

  .dashboard-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    height: auto;
  }

  .admin-users-page {
    grid-template-rows: auto auto;
  }

  .content-layout,
  .content-layout.wide,
  .content-layout.admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .threshold-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .app-main {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .auth-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-card {
    order: -1;
  }

  .stats-grid,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .report-insight-grid,
  .report-analysis-grid,
  .report-calc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .topbar-right,
  .topbar-actions,
  .page-actions,
  .toolbar-actions.split,
  .button-row {
    width: 100%;
  }

  .app-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-right {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-header-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-header-side {
    width: 100%;
    justify-items: flex-start;
    text-align: left;
  }

  .dashboard-header-side-top {
    justify-content: flex-start;
  }

  .dashboard-meaning-card {
    padding: 14px;
  }

  .dashboard-meaning-section {
    padding: 12px;
  }

  .dashboard-meaning-item {
    padding: 10px 11px;
  }
}

@media (max-width: 768px) {
  .auth-page {
    padding: 16px;
  }

  .auth-panel {
    min-height: auto;
    padding: 16px;
  }

  .auth-visual,
  .auth-card,
  .surface-card,
  .modal-window {
    padding: 18px;
  }

  .medical-illustration {
    min-height: 280px;
  }

  .floating-node,
  .floating-dash {
    display: none;
  }

  .app-sidebar {
    position: relative;
    flex-basis: var(--sidebar-current-width);
    width: var(--sidebar-current-width);
    min-width: var(--sidebar-current-width);
    height: auto;
    border-bottom-left-radius: 22px;
    border-bottom-right-radius: 22px;
  }

  .sidebar-brand strong,
  .sidebar-brand span,
  .sidebar-link span:not(.sidebar-icon),
  .sidebar-link em,
  .sidebar-foot span,
  .sidebar-foot small {
    display: block;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-foot {
    justify-content: space-between;
  }

  .app-content {
    padding: 16px;
  }

  .toolbar-grid,
  .dashboard-toolbar-grid,
  .admin-filter-bar,
  .form-grid.two,
  .stats-grid,
  .summary-grid,
  .action-grid,
  .evidence-grid,
  .report-evidence-grid,
  .grade-picker,
  .permission-grid,
  .patient-meta,
  .trend-labels {
    grid-template-columns: minmax(0, 1fr);
  }

  .report-header-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-patient-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .action-score-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .report-action-card {
    max-width: none;
  }

  .stat-card,
  .hero-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-side-stack {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .dashboard-help-modal {
    inline-size: min(100%, calc(100vw - 24px));
    padding: 16px;
  }

  .dashboard-help-modal-body {
    padding-inline-end: 2px;
  }

  .dashboard-help-modal-grid {
    grid-template-columns: 1fr;
  }

  .review-row,
  .threshold-row,
  .mini-table-head,
  .mini-table-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-row.head,
  .threshold-row.head,
  .mini-table-head {
    display: none;
  }

  .patient-title h2,
  .patient-title h3,
  .auth-card-head h3,
  .hero-copy h2 {
    font-size: 28px;
  }

  .toast-stack {
    left: 16px;
    right: 16px;
    top: 16px;
  }

  .toast {
    min-width: 0;
    width: 100%;
  }
}

.review-detail-page {
  gap: 16px;
}

.review-detail-page .review-card,
.review-detail-page .review-alert {
  position: relative;
  overflow: visible;
}

.review-detail-page .review-workspace {
  grid-template-columns: minmax(0, 1.18fr) minmax(420px, 0.76fr);
  align-items: start;
}

.review-detail-page .review-main-stack,
.review-detail-page .review-side-panel {
  align-items: start;
}

.review-detail-page .review-patient-header {
  padding: 18px 22px;
  overflow: visible;
}

.review-detail-page .review-patient-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(420px, 1.02fr) minmax(300px, 0.92fr);
  gap: 18px;
  align-items: stretch;
  min-height: 124px;
}

.review-detail-page .review-patient-profile {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.review-detail-page .review-patient-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-detail-page .review-patient-compare,
.review-detail-page .review-patient-stage {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(220, 230, 242, 0.9);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 255, 0.94));
}

.review-detail-page .review-compare-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.review-detail-page .review-compare-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.review-detail-page .review-compare-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.review-detail-page .review-grade-node {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(220, 230, 242, 0.9);
  background: #fff;
}

.review-detail-page .review-grade-node span,
.review-detail-page .review-compare-foot span,
.review-detail-page .review-stage-item span {
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
}

.review-detail-page .review-grade-node strong {
  color: var(--primary-dark);
  font-size: 26px;
  line-height: 1.1;
}

.review-detail-page .review-grade-node small {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.5;
}

.review-detail-page .review-grade-node.tone-primary {
  background: linear-gradient(180deg, #ffffff, #f3f8ff);
  border-color: rgba(23, 105, 255, 0.18);
}

.review-detail-page .review-grade-node.tone-success {
  background: linear-gradient(180deg, #ffffff, #f3fbf7);
  border-color: rgba(24, 160, 88, 0.18);
}

.review-detail-page .review-grade-node.tone-muted {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.review-detail-page .review-grade-arrow {
  color: #97abc7;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.review-detail-page .review-compare-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.review-detail-page .review-compare-foot strong {
  display: block;
  margin-top: 4px;
  color: var(--primary-dark);
  font-size: 18px;
}

.review-detail-page .review-compare-tags,
.review-detail-page .review-stage-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.review-detail-page .review-patient-stage {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.95));
}

.review-detail-page .review-patient-summary-head strong {
  font-size: 16px;
}

.review-detail-page .review-stage-list {
  display: grid;
  gap: 10px;
}

.review-detail-page .review-stage-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.review-detail-page .review-stage-item strong {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.55;
}

.review-detail-page .review-gray-card,
.review-detail-page .review-assist-card,
.review-detail-page .review-hb-card,
.review-detail-page .review-path-panel,
.review-detail-page .review-doctor-panel {
  min-height: 0;
}

.review-detail-page .review-gray-card {
  min-height: 360px;
}

.review-detail-page .review-card-count {
  flex: none;
}

.review-detail-page .review-rest-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.review-detail-page .review-table-scroll {
  max-height: none;
  overflow: visible;
}

.review-detail-page .review-table-shell {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.review-detail-page .review-row {
  display: grid;
  min-width: 1240px;
  grid-template-columns: 1fr 0.56fr 0.72fr 1.26fr 1.26fr 164px 1.18fr 164px;
  gap: 10px;
  padding: 13px 14px;
  align-items: center;
}

.review-detail-page .review-row.head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fbff;
}

.review-detail-page .review-row.head div {
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 800;
}

.review-detail-page .review-row.body {
  border-bottom: 1px solid rgba(220, 230, 242, 0.84);
  min-height: 68px;
}

.review-detail-page .review-row.body:last-child {
  border-bottom: 0;
}

.review-detail-page .review-row.body > div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.review-detail-page .review-row.body.is-editable {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(255, 255, 255, 0.98));
}

.review-detail-page .review-row.body.is-static {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.9));
}

.review-detail-page .review-note-input {
  width: 100%;
}

.review-detail-page .review-status-cell .mini-tag,
.review-detail-page .review-metric-cell .mini-tag {
  white-space: nowrap;
}

.review-detail-page .review-interval-cell strong,
.review-detail-page .review-system-cell strong {
  font-size: 12px;
  line-height: 1.5;
}

.review-detail-page .review-fixed-text,
.review-detail-page .review-action-text {
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.6;
}

.review-detail-page .review-judgement-group-readonly {
  opacity: 0.9;
}

.review-detail-page .review-judgement-group-readonly .choice-pill {
  cursor: default;
}

.review-detail-page .review-choice-cell .choice-group,
.review-detail-page .review-judgement-group-readonly {
  width: 100%;
}

.review-detail-page .review-gray-actions {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}

.review-detail-page .review-gray-actions .btn-primary,
.review-detail-page .review-gray-actions .btn-ghost {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding-inline: 10px;
  white-space: nowrap;
}

.review-detail-page .review-gray-actions.single-action .btn-primary {
  grid-column: 1 / -1;
}

.review-detail-page .review-history-empty {
  margin-top: 14px;
}

.review-detail-page .review-side-panel {
  gap: 14px;
  grid-auto-rows: min-content;
  min-width: 0;
  justify-self: stretch;
  width: 100%;
}

.review-detail-page .review-hb-card,
.review-detail-page .review-path-panel,
.review-detail-page .review-doctor-panel {
  padding: 18px;
}

.review-detail-page .review-scale-top {
  margin-bottom: 10px;
}

.review-detail-page .review-scale-top strong {
  font-size: 22px;
}

.review-detail-page .review-hb-card .hb-scale {
  gap: 10px;
}

.review-detail-page .review-hb-card .hb-axis {
  gap: 10px;
}

.review-detail-page .review-hb-card .hb-step {
  gap: 6px;
}

.review-detail-page .review-hb-card .hb-step::after {
  top: 18px;
  height: 3px;
  background: rgba(191, 219, 254, 0.96);
}

.review-detail-page .review-hb-card .hb-marker {
  width: 38px;
  height: 38px;
  font-size: 15px;
  font-weight: 900;
  color: #64748b;
  background: #eef4ff;
  border: 2px solid rgba(191, 219, 254, 0.95);
  box-shadow: 0 4px 10px rgba(148, 163, 184, 0.16);
}

.review-detail-page .review-hb-card .hb-marker.system {
  color: #1d4ed8;
  background: #dbeafe;
  border-color: rgba(59, 130, 246, 0.42);
  box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.12);
}

.review-detail-page .review-hb-card .hb-marker.doctor {
  color: #047857;
  background: #d1fae5;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.12);
}

.review-detail-page .review-hb-card .hb-marker.final {
  box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.16);
}

.review-detail-page .review-hb-card .hb-step strong {
  font-size: 13px;
}

.review-detail-page .review-path-scroll {
  display: grid;
  gap: 12px;
  overflow: visible;
}

.review-detail-page .review-path-summary-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(191, 219, 254, 0.92);
  background: linear-gradient(180deg, #f8fbff, #eef5ff);
}

.review-detail-page .review-path-summary-card span {
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
}

.review-detail-page .review-path-summary-card strong {
  color: var(--primary-dark);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.review-detail-page .review-path-summary-card em {
  color: var(--text-sub);
  font-size: 12px;
  font-style: normal;
  line-height: 1.55;
}

.review-detail-page .review-path-timeline {
  display: grid;
  gap: 12px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.review-detail-page .review-path-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.review-detail-page .review-path-track {
  display: grid;
  justify-items: center;
  grid-template-rows: auto 1fr;
  min-height: 100%;
}

.review-detail-page .review-path-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--primary);
  background: #e8f0ff;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.review-detail-page .review-path-line {
  width: 2px;
  min-height: 28px;
  margin-top: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.28), rgba(59, 130, 246, 0.08));
}

.review-detail-page .review-path-content {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(220, 230, 242, 0.88);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.review-detail-page .review-path-step-label {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.review-detail-page .review-path-content strong {
  font-size: 14px;
  line-height: 1.35;
}

.review-detail-page .review-path-content p {
  margin: 0;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.6;
}

.review-detail-page .review-path-panel .review-surface-head {
  margin-bottom: 10px;
}

.review-detail-page .review-doctor-panel {
  box-shadow: 0 14px 32px rgba(23, 105, 255, 0.08);
}

.review-detail-page .review-final-overview {
  margin-bottom: 12px;
}

.review-detail-page .review-final-overview strong {
  font-size: 24px;
}

.review-detail-page .review-grade-picker {
  gap: 7px;
}

.review-detail-page .review-grade-picker .grade-pill {
  min-height: 48px;
  padding: 9px 10px;
}

.review-detail-page .review-final-note {
  min-height: 72px;
}

.review-detail-page .review-judgement-group .choice-pill {
  min-height: 38px;
  padding-inline: 10px;
  white-space: nowrap;
}

.review-detail-page .review-judgement-group .choice-pill.active {
  color: #15803d;
  border-color: rgba(21, 128, 61, 0.28);
  background: #dcfce7;
}

.review-detail-page .review-judgement-group .choice-pill.warning {
  color: #b91c1c;
  border-color: rgba(248, 113, 113, 0.28);
  background: #fff5f5;
}

.review-detail-page .review-judgement-group .choice-pill.active.warning {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.22);
  background: #fee2e2;
}

.review-detail-page .review-mode-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-detail-page .review-grade-picker {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-detail-page .review-grade-picker .grade-pill {
  min-height: 52px;
  padding: 10px 12px;
}

.review-detail-page .review-final-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-detail-page .review-assist-warning {
  background: linear-gradient(180deg, #ffffff, #fff9ef);
  border-color: rgba(245, 158, 11, 0.18);
}

.review-detail-page .review-assist-info {
  background: linear-gradient(180deg, #ffffff, #f2f8ff);
  border-color: rgba(37, 99, 235, 0.16);
}

.review-detail-page .review-info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-detail-page .review-info-card {
  min-height: 120px;
}

.review-detail-page .review-page-actions {
  justify-content: flex-start;
}

@media (min-width: 1600px) {
  .review-detail-page .review-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(500px, 0.8fr);
  }
}

@media (max-width: 1540px) {
  .review-detail-page .review-patient-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .review-detail-page .review-patient-profile {
    grid-column: 1 / -1;
  }

  .review-detail-page .review-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.74fr);
  }
}

@media (max-width: 1380px) {
  .review-detail-page .review-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-detail-page .review-side-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-detail-page .review-doctor-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1024px) {
  .review-detail-page .review-patient-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-detail-page .review-patient-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-detail-page .review-assist-grid,
  .review-detail-page .review-side-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-detail-page .review-patient-summary-head,
  .review-detail-page .review-final-overview {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-detail-page .review-compare-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-detail-page .review-grade-arrow {
    display: none;
  }
}

@media (max-width: 768px) {
  .review-detail-page .review-patient-header {
    padding: 16px;
  }

  .review-detail-page .review-patient-core {
    align-items: flex-start;
  }

  .review-detail-page .review-patient-title-row {
    align-items: flex-start;
  }

  .review-detail-page .review-patient-facts,
  .review-detail-page .review-assist-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-detail-page .review-alert {
    align-items: stretch;
    flex-direction: column;
  }

  .review-detail-page .review-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .review-detail-page .review-row.head {
    display: none;
  }

  .review-detail-page .review-gray-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-detail-page .review-mode-group,
  .review-detail-page .review-grade-picker,
  .review-detail-page .review-final-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .review-detail-page .review-page-actions {
    flex-direction: column;
  }
}

.auth-page.auth-neuro-page {
  min-height: 100vh;
  padding: 28px 34px;
  background: #dde1e7;
}

.auth-page.auth-neuro-page::before {
  display: none;
}

.auth-neuro-page .toast-stack {
  top: 26px;
  right: 26px;
}

.auth-corner-note,
.auth-copyright {
  position: absolute;
  z-index: 2;
  color: #9aa4b2;
  font-size: 12px;
}

.auth-corner-note {
  top: 32px;
  left: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.auth-corner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a82c4;
}

.auth-copyright {
  right: 40px;
  bottom: 28px;
  font-size: 10px;
}

.auth-panel.auth-neuro-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 56px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-neuro-shell {
  position: relative;
  width: min(860px, calc(100vw - 140px));
  min-height: 420px;
}

.auth-neuro-shell::before,
.auth-neuro-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
}

.auth-neuro-shell::before {
  background: #dde1e7;
  box-shadow: -12px -12px 26px rgba(255, 255, 255, 0.92);
}

.auth-neuro-shell::after {
  background: #dde1e7;
  box-shadow: 12px 12px 28px rgba(184, 190, 199, 0.75);
}

.auth-neuro-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  min-height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 28px;
  background: #dde1e7;
  overflow: hidden;
}

.auth-neuro-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 40px;
}

.auth-wordmark-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.auth-wordmark {
  width: min(440px, 100%);
  max-height: 42px;
  object-fit: contain;
}

.auth-system-subtitle {
  margin: 0 0 24px;
  color: #9aa4b2;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-align: center;
}

.auth-form-surface {
  width: 320px;
  max-width: 100%;
  padding: 1px;
  border-radius: 20px;
  background: transparent;
  box-shadow:
    -8px -8px 18px rgba(255, 255, 255, 0.9),
    8px 8px 18px rgba(184, 190, 199, 0.65);
}

.auth-form-card {
  padding: 22px 28px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 20px;
  background: #dde1e7;
}

.auth-card-head.auth-card-head-neuro {
  text-align: center;
}

.auth-card-head.auth-card-head-neuro h3 {
  margin: 0;
  color: #3e4a5a;
  font-size: 24px;
  font-weight: 700;
}

.auth-card-head.auth-card-head-neuro p {
  margin: 8px 0 0;
  color: #9aa4b2;
  font-size: 12px;
}

.auth-form.auth-form-neuro {
  gap: 14px;
  margin-top: 22px;
}

.auth-neuro-field {
  gap: 6px;
}

.auth-neuro-field > span:first-child {
  color: #9aa4b2;
  font-size: 11px;
  font-weight: 600;
}

.auth-neuro-field input {
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 10px;
  color: #3e4a5a;
  background: #dde1e7;
  box-shadow:
    inset -7px -7px 12px rgba(255, 255, 255, 0.85),
    inset 7px 7px 12px rgba(184, 190, 199, 0.58);
}

.auth-neuro-field input:focus {
  border-color: rgba(58, 130, 196, 0.45);
  box-shadow:
    inset -7px -7px 12px rgba(255, 255, 255, 0.88),
    inset 7px 7px 12px rgba(184, 190, 199, 0.52),
    0 0 0 3px rgba(58, 130, 196, 0.12);
}

.auth-neuro-field input::placeholder {
  color: #9aa4b2;
}

.auth-form-meta.auth-form-meta-neuro {
  margin-top: 2px;
}

.auth-form-meta.auth-form-meta-neuro .checkbox-inline,
.auth-form-meta.auth-form-meta-neuro .text-link {
  color: #8090a3;
  font-size: 12px;
}

.auth-form-meta.auth-form-meta-neuro .checkbox-inline input {
  background: #dde1e7;
}

.auth-neuro-submit {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  color: #3a82c4;
  background: #dde1e7;
  font-size: 15px;
  font-weight: 700;
  box-shadow:
    -8px -8px 16px rgba(255, 255, 255, 0.88),
    8px 8px 16px rgba(184, 190, 199, 0.7);
}

.auth-neuro-submit:hover:not(:disabled) {
  background: #d5dae2;
}

.auth-neuro-submit:active:not(:disabled) {
  transform: translateY(0);
  box-shadow:
    inset -6px -6px 12px rgba(255, 255, 255, 0.72),
    inset 6px 6px 12px rgba(184, 190, 199, 0.65);
}

.auth-neuro-submit:disabled {
  color: #6b7e95;
}

.auth-neuro-tip {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(154, 164, 178, 0.24);
}

.auth-neuro-tip strong {
  display: block;
  margin-bottom: 6px;
  color: #3a82c4;
  font-size: 12px;
}

.auth-neuro-tip p {
  margin: 0;
  color: #7e8c9c;
  font-size: 12px;
  line-height: 1.7;
}

.auth-neuro-right {
  position: relative;
  background: #c8d0dc;
}

.auth-neuro-right::before {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 1px solid rgba(160, 168, 180, 0.18);
  border-radius: 0 28px 28px 0;
}

.auth-neuro-right-panel {
  position: relative;
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
}

.auth-neuro-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.68) 55%, rgba(255, 255, 255, 0.18) 75%, transparent 76%);
  box-shadow:
    inset -8px -8px 20px rgba(255, 255, 255, 0.48),
    inset 8px 8px 22px rgba(151, 160, 173, 0.32);
}

.auth-neuro-symbol {
  width: 116px;
  height: 104px;
  object-fit: contain;
}

.auth-neuro-right-copy {
  position: relative;
  z-index: 1;
  color: #3a82c4;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.auth-neuro-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.auth-neuro-ring-lg {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 72%);
}

.auth-neuro-ring-md {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 72%);
}

.auth-neuro-ring-sm {
  width: 128px;
  height: 128px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 72%);
}

@media (max-width: 1100px) {
  .auth-page.auth-neuro-page {
    padding: 24px;
  }

  .auth-neuro-shell {
    width: min(860px, calc(100vw - 84px));
  }
}

@media (max-width: 920px) {
  .auth-corner-note,
  .auth-copyright {
    position: static;
  }

  .auth-corner-note {
    margin-bottom: 18px;
  }

  .auth-copyright {
    margin-top: 18px;
    text-align: center;
  }

  .auth-panel.auth-neuro-panel {
    min-height: auto;
    padding: 8px 0;
  }

  .auth-neuro-shell {
    width: 100%;
    min-height: 0;
  }

  .auth-neuro-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-neuro-right {
    min-height: 220px;
    border-radius: 0 0 28px 28px;
  }

  .auth-neuro-right::before {
    border-left: 0;
    border-top: 1px solid rgba(160, 168, 180, 0.18);
    border-radius: 0 0 28px 28px;
  }
}

@media (max-width: 640px) {
  .dashboard-delete-item {
    grid-template-columns: 1fr;
  }

  .auth-page.auth-neuro-page {
    padding: 18px 16px;
  }

  .auth-neuro-left {
    padding: 28px 18px 20px;
  }

  .auth-wordmark {
    width: min(320px, 100%);
  }

  .auth-form-surface {
    width: 100%;
  }

  .auth-form-card {
    padding: 20px 18px;
  }

  .auth-card-head.auth-card-head-neuro h3 {
    font-size: 22px;
  }

  .auth-form-meta.auth-form-meta-neuro {
    align-items: flex-start;
    flex-direction: column;
  }

  .auth-neuro-right {
    min-height: 180px;
  }

  .auth-neuro-badge {
    width: 118px;
    height: 118px;
  }

  .auth-neuro-symbol {
    width: 86px;
    height: 78px;
  }
}
