:root {
  --ink: #17212b;
  --forest: #126fa8;
  --moss: #64788b;
  --sand: #f3f6f8;
  --paper: #ffffff;
  --clay: #1677b8;
  --mist: #eaf4fa;
  --line: #dce3e9;
  --muted: #697684;
  --danger: #b7423c;
  --warning: #b87412;
  --shadow: 0 12px 32px rgba(31, 46, 61, 0.07);
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { min-height: 100%; background: var(--sand); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f3f6f8;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.72;
  background-image:
    radial-gradient(circle at 96% 0%, rgba(22, 119, 184, 0.1), transparent 26rem),
    radial-gradient(circle at 0% 48%, rgba(22, 133, 122, 0.06), transparent 22rem);
}

a { color: var(--forest); text-underline-offset: 3px; }

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

.site-header {
  width: min(1480px, calc(100% - 48px));
  min-height: 78px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1677b8, #16857a);
  box-shadow: 0 8px 18px rgba(22, 119, 184, 0.22);
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: 0.04em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.site-nav { display: flex; gap: 5px; font-size: 13px; }
.site-nav a { padding: 9px 12px; border-radius: 7px; color: #586674; text-decoration: none; font-weight: 650; }
.site-nav a:hover { color: #0d5d91; background: #eaf4fa; }

.user-menu {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.user-menu form { margin: 0; }
.link-button, .quiet-button {
  border: 0;
  padding: 0;
  color: var(--forest);
  cursor: pointer;
  background: transparent;
}

.page-shell { width: min(1280px, calc(100% - 40px)); margin: 26px auto 72px; }

.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin: 42px 0 22px; }
.hero-row.compact { align-items: center; margin-top: 28px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--clay);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif; }
h1 { margin-bottom: 8px; font-size: clamp(32px, 5vw, 52px); line-height: 1.07; letter-spacing: -0.045em; }
h1 em { color: var(--forest); font-style: normal; }
h2 { margin-bottom: 4px; font-size: 24px; }
.lead { max-width: 690px; margin-bottom: 0; color: var(--muted); line-height: 1.75; font-size: 15px; }
.muted { color: var(--muted); line-height: 1.6; }

.primary-button, .secondary-button, .quiet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 19px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.primary-button { color: #fffdf8; border: 1px solid var(--forest); background: var(--forest); box-shadow: 0 7px 17px rgba(31, 78, 60, 0.2); }
.primary-button:hover { background: #154332; }
.secondary-button { color: var(--forest); border: 1px solid var(--forest); background: transparent; }
.quiet-link { color: var(--forest); border: 1px solid var(--line); background: rgba(255, 253, 248, 0.54); }
.quiet-button { padding: 8px 0; font-weight: 700; }

.guardrail, .notice, .template-note, .form-error {
  display: flex;
  gap: 11px;
  align-items: baseline;
  margin-bottom: 22px;
  padding: 14px 16px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.55;
}

.guardrail, .template-note, .notice.info { border: 1px solid #c9dbc9; color: #315544; background: rgba(237, 246, 235, 0.82); }
.notice.warning { border: 1px solid #e4ca97; color: #765016; background: #fff8e9; }
.notice.danger, .form-error { border: 1px solid #e3b3aa; color: #8f3528; background: #fff2ef; }

.panel, .form-panel {
  margin-top: 20px;
  padding: 23px;
  border: 1px solid rgba(215, 223, 212, 0.9);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.87);
  box-shadow: var(--shadow);
}

.panel-header { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.panel-header h2 { margin: 0; font-size: 22px; }
.panel-header > span, .panel-header > a { color: var(--muted); font-size: 12px; }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td { padding: 13px 11px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--moss); font-weight: 700; font-size: 12px; letter-spacing: 0.03em; }
td small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
tbody tr:last-child td { border-bottom: 0; }
.legacy-order-warning td { background: #fff3b8; }
.legacy-order-warning td:first-child { box-shadow: inset 4px 0 0 #d89b16; }
.table-link { display: block; font-weight: 700; }
.empty-cell { padding: 30px; color: var(--muted); text-align: center; }

.badge, .severity { display: inline-flex; padding: 4px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-success { color: #24613f; background: #def0e0; }
.badge-danger, .severity-error { color: #963b2c; background: #fee2dc; }
.badge-warning, .severity-warning { color: #855810; background: #fff0cc; }
.severity-hint { color: #365f73; background: #dfeff5; }
.badge-neutral, .severity-info { color: #46665a; background: #e3eee6; }

.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 20px 0; }
.metric { padding: 17px; border-radius: 13px; background: rgba(255, 253, 248, 0.68); border: 1px solid var(--line); }
.metric span, .metric strong { display: block; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { margin-top: 6px; font-family: "Songti SC", STSong, serif; font-size: 25px; letter-spacing: -0.03em; }

.two-panel-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; }
.version-list { display: grid; gap: 8px; }
.version-card { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.version-card:last-child { border-bottom: 0; }
.version-card.current { color: var(--forest); }
.version-card strong { margin-right: 8px; }
.version-card small { color: var(--muted); }
.version-card a { grid-column: 1 / -1; font-size: 12px; }

.stack-form { display: grid; gap: 15px; }
.stack-form label { display: grid; gap: 7px; color: #3d554a; font-size: 13px; font-weight: 700; }
.stack-form input, .stack-form select, .stack-form textarea { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--ink); border: 1px solid #bdcdbf; border-radius: 8px; outline: none; background: #fffefa; font-weight: 400; }
.stack-form textarea { min-height: 88px; resize: vertical; }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(45, 107, 79, 0.12); }
.stack-form input[type=file] { padding: 8px; font-size: 12px; }
.checkbox-row { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.checkbox-row input[type=checkbox] { width: 18px; min-height: 18px; margin: 0; }
[data-store-bulk-form] table { min-width: 1500px; }
[data-store-bulk-form] input[type=checkbox] { width: 18px; min-height: 18px; margin: 0; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 18px; }
.compact-form { margin-top: 10px; }
.reopen-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.inline-form { display: inline-flex; margin-right: 10px; }
.meta-table { min-width: 0; }
.meta-table th { width: 150px; }
.meta-table th, .meta-table td { border-bottom: 1px solid var(--line); }
.receipt-box { display: grid; gap: 11px; margin-top: 18px; }
.receipt-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.receipt-box textarea { width: 100%; min-height: 150px; padding: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: #fffefa; line-height: 1.7; resize: vertical; }
.receipt-box > a { justify-self: start; font-size: 13px; }
.evidence-upload-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.upload-guidance { padding: 11px 13px; color: #765016; border: 1px solid #e4ca97; border-radius: 9px; background: #fff8e9; font-size: 12px; line-height: 1.6; }
#evidence-upload-status:empty { display: none; }

.explanation-workflow-panel { display: grid; gap: 18px; }
.explanation-workflow-panel > .panel-header { margin-bottom: 0; }
.workflow-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.explanation-import-form { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; }
.request-status-table { margin-top: 2px; }
.unassociated-attachments { padding-top: 18px; border-top: 1px solid var(--line); }
.unassociated-attachments .panel-header { margin-bottom: 10px; }
.unassociated-attachments h3 { margin: 0; }
.attachment-link-form { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: center; gap: 9px; min-width: 470px; }
.attachment-link-form select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #bdcdbf; border-radius: 8px; background: #fffefa; }
#explanation-workbook-status:empty, #explanation-import-status:empty { display: none; }

.owner-evidence-detail { min-width: 260px; line-height: 1.55; }
.owner-evidence-detail p { margin: 6px 0; }
.compact-link-list { display: grid; gap: 5px; margin: 9px 0 0; padding-left: 18px; }
.compact-link-list small { display: inline; margin-left: 7px; }
.single-approval-form { min-width: 280px; }

.explanation-list { display: grid; gap: 16px; margin-top: 18px; }
.explanation-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; }
.explanation-card h3 { margin-bottom: 4px; }
.explanation-card .panel-header { align-items: flex-start; }
.explanation-history { margin: 12px 0; padding: 12px; border-left: 3px solid var(--moss); background: var(--mist); }
.explanation-history p { margin: 7px 0; line-height: 1.6; }
.explanation-history small { color: var(--muted); }
.evidence-choice { display: grid; gap: 9px; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 9px; }
.evidence-choice legend { padding: 0 6px; color: #3d554a; font-size: 13px; font-weight: 700; }

.audit-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.audit-list li { display: flex; gap: 15px; color: var(--muted); font-size: 12px; }
.audit-list time { min-width: 152px; color: var(--moss); }

.login-layout { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; min-height: calc(100vh - 170px); gap: 70px; }
.login-copy h1 { font-size: clamp(44px, 6vw, 70px); }
.login-copy > p:not(.eyebrow) { max-width: 520px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.rule-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.rule-list span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--forest); background: rgba(255, 253, 248, 0.68); font-size: 12px; }
.login-card { padding: 36px; border-radius: 18px 18px 34px 18px; background: var(--paper); box-shadow: var(--shadow); border: 1px solid var(--line); }

.empty-state { max-width: 640px; margin: 130px auto; text-align: center; }
.empty-state p { color: var(--muted); line-height: 1.7; }

code { color: #365f4d; font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.88em; }
footer { padding: 26px 20px 36px; color: #78867d; text-align: center; font-size: 11px; }
footer .public-security-filing { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; }

/* Read-only redemption dashboard */
.dashboard-page {
  color: #17212b;
  background: #f3f6f8;
  font-variant-numeric: tabular-nums;
}

.dashboard-page .page-shell { width: min(1480px, calc(100% - 48px)); margin-top: 22px; }
.dashboard-page h1,
.dashboard-page h2 { font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; }
.dashboard-page h1 { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.04em; }
.dashboard-page h2 { font-size: 17px; letter-spacing: -0.015em; }
.dashboard-page .eyebrow { margin-bottom: 6px; color: #1677b8; font-weight: 800; letter-spacing: 0.15em; }
.dashboard-page .panel {
  margin-top: 14px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dce3e9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(31, 46, 61, 0.035);
}
.dashboard-page .panel-header { min-height: 62px; margin: 0; padding: 14px 18px; align-items: center; border-bottom: 1px solid #dce3e9; }
.dashboard-page .panel-header h2 { margin: 0 0 3px; }
.dashboard-page .panel-header p { margin: 0; color: #697684; font-size: 11px; }
.dashboard-page .panel > .muted { margin: 12px 18px; }
.dashboard-page .panel > .table-scroll + .muted { padding-bottom: 6px; }
.dashboard-page table { min-width: 780px; }
.dashboard-page th { padding: 11px 13px; color: #76828e; background: #f7f9fa; font-size: 11px; white-space: nowrap; }
.dashboard-page td { padding: 13px; border-color: #edf0f2; font-size: 12px; }
.dashboard-page tbody tr:hover { background: #f8fbfd; }
.dashboard-page .table-link { color: #17212b; text-decoration: none; }
.dashboard-page .table-link:hover { color: #1677b8; }

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 0 19px;
}
.dashboard-hero h1 { margin-bottom: 7px; }
.dashboard-hero .lead { max-width: 760px; color: #697684; font-size: 13px; line-height: 1.65; }
.dashboard-meta { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.dashboard-meta span { padding: 7px 10px; color: #5b6874; border: 1px solid #dce3e9; border-radius: 999px; background: rgba(255, 255, 255, 0.78); font-size: 11px; }
.dashboard-meta strong { color: #17212b; }

.dashboard-kpi-grid { display: grid; gap: 12px; }
.dashboard-kpi-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dashboard-kpi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 2px 0 14px; }
.dashboard-kpi {
  position: relative;
  min-height: 114px;
  padding: 18px 17px 15px;
  overflow: hidden;
  border: 1px solid #dce3e9;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(31, 46, 61, 0.035);
}
.dashboard-kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--kpi-accent, #1677b8); }
.dashboard-kpi-blue { --kpi-accent: #1677b8; }
.dashboard-kpi-teal { --kpi-accent: #16857a; }
.dashboard-kpi-amber { --kpi-accent: #d98a1b; }
.dashboard-kpi-slate { --kpi-accent: #64788b; }
.dashboard-kpi-red { --kpi-accent: #cc4c46; }
.dashboard-kpi-violet { --kpi-accent: #8a6bad; }
.dashboard-kpi > span { display: block; color: #697684; font-size: 12px; font-weight: 650; }
.dashboard-kpi > strong { display: block; margin-top: 12px; color: #17212b; font-size: 23px; line-height: 1.15; letter-spacing: -0.035em; }
.dashboard-kpi > small { display: block; margin-top: 8px; color: #8a96a1; font-size: 10px; line-height: 1.45; }
.dashboard-kpi > small a { color: #1677b8; }

.redemption-progress {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(420px, 2fr);
  gap: 30px;
  margin-top: 14px;
  padding: 21px 23px;
  color: #fff;
  border-radius: 8px;
  background: #202a33;
  box-shadow: 0 12px 32px rgba(31, 46, 61, 0.11);
}
.redemption-progress-copy { padding-right: 27px; border-right: 1px solid rgba(255, 255, 255, 0.12); }
.redemption-progress-copy .eyebrow { color: #8ebbd5; }
.redemption-progress-copy h2 { margin: 0 0 8px; color: #fff; font-size: 21px; }
.redemption-progress-copy p:last-child { margin: 0; color: #aeb9c3; font-size: 12px; line-height: 1.7; }
.redemption-progress-list { display: grid; align-content: center; gap: 14px; }
.redemption-progress-row { display: grid; grid-template-columns: 112px 1fr minmax(66px, auto); gap: 13px; align-items: center; }
.redemption-progress-row > span { color: #d5dde3; font-size: 12px; }
.redemption-progress-row > strong { color: #fff; text-align: right; font-size: 16px; }
.progress-track {
  width: 100%; height: 8px; overflow: hidden; appearance: none; border: 0; border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
}
.progress-track::-webkit-progress-bar { border-radius: 9px; background: rgba(255, 255, 255, 0.1); }
.progress-track::-webkit-progress-value { border-radius: 9px; background: linear-gradient(90deg, #1677b8, #4bb6d8); }
.progress-track::-moz-progress-bar { border-radius: 9px; background: linear-gradient(90deg, #1677b8, #4bb6d8); }
.progress-track.progress-teal::-webkit-progress-value { background: linear-gradient(90deg, #16857a, #45bea9); }
.progress-track.progress-teal::-moz-progress-bar { background: linear-gradient(90deg, #16857a, #45bea9); }
.progress-track.progress-amber::-webkit-progress-value { background: linear-gradient(90deg, #d98a1b, #f0b74b); }
.progress-track.progress-amber::-moz-progress-bar { background: linear-gradient(90deg, #d98a1b, #f0b74b); }

.dashboard-content-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.55fr); gap: 14px; align-items: start; }
.dashboard-centers-panel table { min-width: 980px; }
.dashboard-side-stack { display: grid; gap: 10px; margin-top: 14px; }
.dashboard-side-stack .panel { margin-top: 0; }
.dashboard-structure { padding-bottom: 8px !important; }
.debt-structure-item { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin: 0 17px; padding: 13px 0; border-bottom: 1px solid #edf0f2; }
.debt-structure-item:last-child { border-bottom: 0; }
.debt-structure-item span { color: #697684; font-size: 11px; }
.debt-structure-item strong { font-size: 15px; }
.owner-private-card,
.dashboard-review-link { display: grid; gap: 6px; padding: 15px; color: #17212b; border: 1px solid #dce3e9; border-radius: 7px; background: #fff; text-decoration: none; }
.owner-private-card { border-color: #ead8c2; background: #fffaf3; }
.owner-private-card > span { color: #865a27; font-size: 12px; font-weight: 750; }
.owner-private-card > strong,
.dashboard-review-link > strong { font-size: 19px; }
.owner-private-card > small,
.dashboard-review-link > small { color: #7f8993; line-height: 1.5; }
.dashboard-review-link > span { color: #8a6bad; font-size: 12px; font-weight: 750; }

.dashboard-status { display: inline-block; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.dashboard-status-live { color: #126f66; background: #e2f4f0; }
.dashboard-status-warn { color: #946013; background: #fff1d5; }
.dashboard-status-done { color: #296a48; background: #e8f4eb; }
.table-progress { display: flex; align-items: center; gap: 8px; }
.table-progress progress { width: 66px; height: 5px; overflow: hidden; appearance: none; border: 0; border-radius: 6px; background: #e8edf1; }
.table-progress progress::-webkit-progress-bar { border-radius: 6px; background: #e8edf1; }
.table-progress progress::-webkit-progress-value { border-radius: 6px; background: #16857a; }
.table-progress progress::-moz-progress-bar { border-radius: 6px; background: #16857a; }
.table-progress strong { font-size: 11px; }

.dashboard-page .metric-row { gap: 12px; }
.dashboard-page .metric { border-radius: 7px; background: #fff; }
.dashboard-page .metric strong { font-family: Inter, "PingFang SC", sans-serif; }
.dashboard-page .hero-row.compact { margin-top: 24px; }

@media (max-width: 1180px) {
  .dashboard-kpi-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-content-grid { grid-template-columns: 1fr; }
  .dashboard-side-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-side-stack .panel { grid-column: span 3; }
}

@media (max-width: 820px) {
  .dashboard-page .page-shell { width: min(100% - 28px, 1480px); }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .dashboard-meta { justify-content: flex-start; }
  .dashboard-kpi-grid-3 { grid-template-columns: 1fr; }
  .redemption-progress { grid-template-columns: 1fr; gap: 18px; }
  .redemption-progress-copy { padding: 0 0 16px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
  .dashboard-side-stack { grid-template-columns: 1fr; }
  .dashboard-side-stack .panel { grid-column: auto; }
}

@media (max-width: 560px) {
  .dashboard-kpi-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-kpi { min-height: 106px; padding: 16px 14px 13px; }
  .dashboard-kpi > strong { font-size: 19px; }
  .redemption-progress { padding: 18px 16px; }
  .redemption-progress-row { grid-template-columns: 94px 1fr 58px; gap: 9px; }
  .redemption-progress-row > strong { font-size: 13px; }
}

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto; width: min(100% - 28px, 1280px); min-height: 73px; gap: 12px; }
  .site-nav { display: none; }
  .user-menu { font-size: 11px; }
  .page-shell { width: min(100% - 28px, 1120px); margin-top: 12px; }
  .hero-row, .hero-row.compact { align-items: flex-start; flex-direction: column; gap: 15px; }
  .hero-row { margin-top: 26px; }
  h1 { font-size: 36px; }
  .login-layout, .two-panel-grid { grid-template-columns: 1fr; gap: 26px; }
  .login-layout { min-height: auto; padding-top: 35px; }
  .login-card { padding: 25px; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .two-columns { grid-template-columns: 1fr; }
  .guardrail, .template-note, .notice, .form-error { align-items: flex-start; flex-direction: column; }
  .attachment-link-form { grid-template-columns: 1fr; min-width: 320px; }
  .audit-list li { flex-direction: column; gap: 2px; }
}

/* POP dashboard: two financial indicators at every level. */
.dashboard-kpi-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 680px) { .dashboard-kpi-grid-2 { grid-template-columns: 1fr; } }
