:root {
  --bg: #e8eaf0;
  --panel: rgba(255, 255, 255, .38);
  --panel-soft: rgba(255, 255, 255, .25);
  --line: rgba(255, 255, 255, .6);
  --line-strong: rgba(0, 0, 0, .1);
  --text: #1a1d24;
  --muted: #4b5563;
  --subtle: #8b95a3;
  --blue: #e85d2a;
  --cyan: #3ca0c8;
  --violet: #7c5ccc;
  --red: #ef4444;
  --orange: #f59e0b;
  --green: #10b981;
  --ink: #1a1d24;
  --shadow: 0 16px 44px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .82);
  --shadow-sm: 0 8px 32px rgba(0, 0, 0, .06), inset 0 1px 0 rgba(255, 255, 255, .78);
  --radius: 12px;
  --mono: "SFMono-Regular", "Cascadia Mono", "Menlo", "Consolas", monospace;
  --sans: "Aptos", "HarmonyOS Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background-image:
    linear-gradient(rgba(0, 0, 0, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, .025) 1px, transparent 1px);
  background-size: 48px 48px;
}
body::after {
  background:
    radial-gradient(900px 600px at 78% 22%, rgba(255, 107, 53, .18), transparent 60%),
    radial-gradient(700px 500px at 8% 88%, rgba(60, 160, 200, .15), transparent 65%),
    radial-gradient(600px 400px at 40% 60%, rgba(124, 92, 204, .10), transparent 70%);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  width: 70px;
  min-width: 70px;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 6px 14px;
  background: rgba(255, 255, 255, .35);
  border-right: 1px solid rgba(255, 255, 255, .6);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .55);
}

.brand { display: grid; justify-items: center; gap: 8px; margin-bottom: 2px; }
.brand-logo {
  width: 52px;
  height: 28px;
  object-fit: contain;
  display: block;
}
.brand-name { font-size: 11px; font-weight: 800; color: var(--text); white-space: nowrap; letter-spacing: .5px; }
.brand-sub { font-size: 10px; font-weight: 600; color: var(--muted); white-space: nowrap; margin-top: -4px; }
.nav { width: 100%; display: grid; gap: 7px; }
.nav-btn {
  position: relative;
  width: 100%;
  min-height: 62px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--subtle);
  background: transparent;
  text-decoration: none;
  transition: .18s ease;
}
.nav-btn:hover { background: rgba(0, 0, 0, .04); color: var(--text); }
.nav-btn.active {
  color: var(--blue);
  background: rgba(232, 93, 42, .08);
  border-color: rgba(255, 255, 255, .55);
  box-shadow: inset 3px 0 0 var(--blue);
}
.nav-btn svg { width: 22px; height: 22px; stroke-width: 1.9; }
.nav-btn small { font-size: 9px; font-weight: 700; line-height: 1; white-space: nowrap; letter-spacing: 0; }
.nav-group { width: 100%; margin-top: 5px; padding-top: 9px; border-top: 1px dashed rgba(0, 0, 0, .16); display: grid; justify-items: center; }
.nav-group small { font-size: 8px; font-weight: 800; color: var(--muted); letter-spacing: .3px; text-align: center; white-space: nowrap; }
.badge-dot {
  position: absolute;
  top: 6px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 99px;
  font: 800 10px/1 var(--mono);
  border: 2px solid rgba(255, 255, 255, .68);
}
.user-mini { margin-top: auto; display: grid; justify-items: center; gap: 7px; color: var(--muted); text-align: center; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
}
.user-mini span { font-size: 10px; line-height: 1.25; white-space: nowrap; }

main {
  flex: 1;
  min-width: 0;
  padding: 24px 28px 34px;
}
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.page-title { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 900; color: var(--ink); }
.page-subtitle { margin: 8px 0 0; color: var(--muted); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: minmax(0, 1.45fr) minmax(360px, .75fr); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background:
    radial-gradient(700px 420px at 100% 0%, rgba(255, 107, 53, .055), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .54), rgba(255, 255, 255, .35));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
}
.card.pad { padding: 16px; }
.section-title {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}
.section-title small { color: var(--muted); font-weight: 600; }

.kpi {
  padding: 16px;
  display: grid;
  gap: 10px;
  min-height: 112px;
}
.kpi .label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-weight: 700; }
.kpi .value { font: 900 30px/1.1 var(--mono); color: var(--ink); letter-spacing: 0; }
.kpi .hint { color: var(--subtle); font-size: 12px; }
.kpi.hot .value { color: var(--red); }
.dim-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.dim-tag { font-size: 11px; padding: 2px 7px; border-radius: 99px; background: rgba(255,255,255,.38); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.dash-table-card { overflow: hidden; }
.dealer-table-wrap { overflow-x: auto; }
.dash-dealer-table td { padding: 8px 12px; font-size: 13px; }
.dash-dealer-table th { padding: 7px 12px; }
.dash-dealer-table tr.has-risk { background: rgba(251,146,60,.06); }
.dash-dealer-table tr.has-risk:hover { background: rgba(251,146,60,.12); }
.alert-list.compact { gap: 6px; font-size: 13px; }
.icon-box {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .38);
  color: var(--blue);
  border: 1px solid rgba(255, 255, 255, .55);
}
.icon-box svg { width: 19px; height: 19px; }

.judgement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.judgement-card {
  display: grid;
  gap: 9px;
  min-height: 126px;
}
.judgement-card b {
  font-size: 20px;
  line-height: 1.3;
}
.judgement-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-weight: 900;
}
.judgement-kicker svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 12px; background: rgba(255, 255, 255, .24); font-weight: 800; }
tbody tr { transition: .16s ease; }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, .18); }
tbody tr:hover { background: rgba(255, 255, 255, .36); }
.clickable { cursor: pointer; }
.row-clickable { cursor: pointer; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid transparent;
  white-space: nowrap;
}
.risk-high { color: #b42318; background: rgba(254, 226, 226, .58); border-color: rgba(248, 113, 113, .36); }
.risk-mid { color: #9a4b00; background: rgba(255, 237, 213, .6); border-color: rgba(251, 146, 60, .34); }
.risk-low { color: #067647; background: rgba(220, 252, 231, .58); border-color: rgba(74, 222, 128, .34); }
.risk-normal { color: #155e75; background: rgba(207, 250, 254, .58); border-color: rgba(34, 211, 238, .32); }
.status { color: var(--muted); background: rgba(255, 255, 255, .32); border-color: rgba(255, 255, 255, .52); }
.progress { position: relative; height: 8px; background: rgba(0, 0, 0, .08); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.progress.orange i { background: var(--orange); }
.progress.red i { background: var(--red); }
.progress.green i { background: var(--green); }
.progress-wrap { display: grid; grid-template-columns: 1fr 54px; align-items: center; gap: 9px; }
.action-cell { width: 96px; white-space: nowrap; }

.btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .62);
  padding: 8px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, .38);
  font-weight: 800;
  transition: .16s ease;
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}
.btn:hover { border-color: rgba(255, 255, 255, .88); background: rgba(255, 255, 255, .52); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn.primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.btn.primary:hover { background: var(--blue); filter: brightness(.96); }
.btn.danger { color: #b42318; border-color: rgba(248, 113, 113, .42); background: rgba(255, 245, 245, .52); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.compact { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.btn svg { width: 17px; height: 17px; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .38);
  display: inline-grid;
  place-items: center;
}
.icon-btn svg { width: 18px; height: 18px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { color: var(--text); font-size: 12px; font-weight: 900; }
.req::after { content: " *"; color: var(--red); }
input, select, textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .64);
  border-radius: 8px;
  background: rgba(255, 255, 255, .42);
  color: var(--text);
  min-height: 38px;
  padding: 8px 10px;
  outline: none;
  transition: .14s ease;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: rgba(232, 93, 42, .62); box-shadow: 0 0 0 3px rgba(232, 93, 42, .12); background: rgba(255, 255, 255, .58); }
input[readonly] { color: var(--muted); background: rgba(255, 255, 255, .28); }
.error { color: var(--red); font-size: 12px; min-height: 16px; }
.inline-control { display: flex; align-items: center; gap: 8px; }
.switch {
  width: 42px;
  height: 24px;
  border: 0;
  border-radius: 99px;
  padding: 2px;
  background: rgba(0, 0, 0, .16);
  display: inline-flex;
  align-items: center;
  transition: .16s ease;
}
.switch i { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); transition: .16s ease; }
.switch.on { background: var(--blue); }
.switch.on i { transform: translateX(18px); }
.radio-row { display: flex; gap: 9px; flex-wrap: wrap; }
.radio-chip {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 8px;
  background: rgba(255, 255, 255, .36);
  color: var(--text);
  font-weight: 800;
}
.radio-chip.active { border-color: rgba(232, 93, 42, .55); color: var(--blue); background: rgba(232, 93, 42, .08); }
.notice {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(251, 146, 60, .32);
  background: rgba(255, 247, 237, .56);
  color: #9a4b00;
  font-weight: 700;
}
.upload-zone {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 13px;
  border: 1px dashed rgba(255, 255, 255, .7);
  border-radius: 8px;
  background: rgba(255, 255, 255, .26);
  color: var(--muted);
}

body[data-current-page="apply"] main {
  padding: 16px 20px 22px;
}
body[data-current-page="apply"] .topbar {
  align-items: center;
  margin-bottom: 10px;
}
body[data-current-page="apply"] .page-title {
  font-size: 22px;
}
.apply-card {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
}
.form-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .52);
}
.form-section:last-child {
  border-bottom: 0;
}
.form-section-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.form-section .section-title {
  align-items: baseline;
  justify-content: flex-start;
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}
.form-section-desc { margin: 0; color: var(--muted); line-height: 1.4; }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.plan-cell { display: grid; gap: 3px; min-width: 0; }
.plan-cell span { font-size: 11px; color: var(--muted); }
.apply-card .form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
}
.apply-card .field {
  gap: 3px;
  min-width: 0;
}
.apply-card .field.full {
  grid-column: span 2;
}
.apply-card label {
  font-size: 11px;
}
.apply-card input,
.apply-card select,
.apply-card textarea {
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 7px;
}
.apply-card textarea {
  min-height: 52px;
}
.apply-card .btn {
  min-height: 32px;
  padding: 5px 9px;
}
.apply-card .switch {
  width: 38px;
  height: 22px;
}
.apply-card .switch i {
  width: 18px;
  height: 18px;
}
.apply-card .switch.on i {
  transform: translateX(16px);
}
.apply-card .radio-row {
  gap: 6px;
}
.apply-card .radio-chip {
  min-height: 30px;
  padding: 5px 9px;
}
.apply-card .error {
  min-height: 13px;
  font-size: 11px;
}
.apply-card .tiny {
  font-size: 11px;
}
.apply-card .notice {
  padding: 8px 10px;
}
.apply-card .upload-zone {
  min-height: 50px;
  gap: 3px;
  padding: 8px 10px;
}
.apply-card .inline-control { flex-wrap: nowrap; }
.apply-card .inline-control input { min-width: 0; }
.apply-card .inline-control .btn { flex: none; white-space: nowrap; }

/* ===== 字段角色：四种视觉，与规则联动派生 ===== */
/* 通用：所有非留痕字段都加内边距底框 */
.apply-card .field.is-ai-verify,
.apply-card .field.is-rule-input,
.apply-card .field.is-baseline {
  position: relative;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
}
/* ① AI 外部核验：蓝（最强，要拿去外部数据源核真伪） */
.apply-card .field.is-ai-verify {
  border-color: rgba(37, 99, 235, .42);
  background: rgba(37, 99, 235, .07);
}
.apply-card .field.is-ai-verify label { color: #2563eb; }
.apply-card .field.is-ai-verify input:not([readonly]),
.apply-card .field.is-ai-verify select,
.apply-card .field.is-ai-verify textarea { border-color: rgba(37, 99, 235, .4); background: rgba(255, 255, 255, .82); }
/* ② 规则输入：橙（内部事前规则） */
.apply-card .field.is-rule-input {
  border-color: rgba(232, 93, 42, .42);
  background: rgba(232, 93, 42, .07);
}
.apply-card .field.is-rule-input label { color: var(--blue); }
.apply-card .field.is-rule-input input:not([readonly]),
.apply-card .field.is-rule-input select,
.apply-card .field.is-rule-input textarea { border-color: rgba(232, 93, 42, .4); background: rgba(255, 255, 255, .82); }
/* ③ 事中回验基线：青（申请时填，事中比对，不参与提交打分） */
.apply-card .field.is-baseline {
  border-color: rgba(8, 145, 178, .4);
  background: rgba(8, 145, 178, .06);
  border-style: dashed;
}
.apply-card .field.is-baseline label { color: #0891b2; }
/* ④ 留痕参考：灰底弱化 */
.apply-card .field:not(.is-ai-verify):not(.is-rule-input):not(.is-baseline):not(:has(.upload-zone)):not(:has(.notice)) {
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .035);
}
.apply-card .field:not(.is-ai-verify):not(.is-rule-input):not(.is-baseline) label { color: var(--muted); }

/* 角色标签 */
.watch-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #fff;
  background: var(--blue);
  vertical-align: middle;
}
.watch-tag.ai { background: #2563eb; }
.watch-tag.base { background: #0891b2; }
.watch-tag.external { background: #2563eb; }
.watch-tag.rule { background: var(--orange); }
.watch-tag.baseline { background: #0891b2; }
.watch-tag svg { width: 11px; height: 11px; vertical-align: -1px; margin-right: 2px; }

/* 申请字段角色高亮：watch 字段凸显，trace 字段灰底弱化 */
.apply-card .field-watch {
  background: rgba(232, 93, 42, .06);
  border: 1px solid rgba(232, 93, 42, .28);
  border-radius: 10px;
  padding: 8px 10px;
}
.apply-card .field-external {
  background: rgba(37, 99, 235, .06);
  border-color: rgba(37, 99, 235, .28);
}
.apply-card .field-baseline {
  background: rgba(8, 145, 178, .06);
  border-color: rgba(8, 145, 178, .26);
}
.apply-card .field-trace {
  background: rgba(120, 130, 150, .07);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 10px;
}
.apply-card .field-trace label { color: var(--muted); }

/* 审批中心三态分段切换 */
.seg-tabs { display: inline-flex; gap: 4px; padding: 4px; background: rgba(255,255,255,.4); border: 1px solid var(--line); border-radius: 12px; }
.seg-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px; border: 0; background: transparent; border-radius: 9px;
  font-weight: 800; color: var(--muted); cursor: pointer; transition: .14s ease;
}
.seg-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-count { font: 800 11px/1 var(--mono); padding: 2px 6px; border-radius: 99px; background: rgba(0,0,0,.08); color: var(--muted); }
.seg-tab.active .seg-count { background: rgba(232,93,42,.16); color: var(--orange); }
.approval-table .reject-reason { max-width: 360px; color: #9a4b00; }
.alert-mini-table td { padding: 7px 12px; font-size: 13px; }
.alert-mini-table th { padding: 7px 12px; }
.alert-mini-table .row-clickable { cursor: pointer; }

/* 字段下方联动说明 */
.apply-card .field-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.35;
  color: #2563eb;
}
.apply-card .field.is-rule-input .field-note { color: var(--blue); }
.apply-card .field-note.baseline { color: #0891b2; }
.apply-card .field-note svg { width: 13px; height: 13px; flex: none; }

/* AI 核验按钮凸显 */
.apply-card .btn.ai-verify {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(37, 99, 235, .28);
}
.apply-card .btn.ai-verify:hover {
  background: #2563eb;
  filter: brightness(.96);
  box-shadow: 0 3px 12px rgba(37, 99, 235, .34);
}
.apply-card .btn.ai-verify svg { width: 16px; height: 16px; }
.submit-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.submit-risk-summary .score-ring {
  width: 78px;
  height: 78px;
}

.chart {
  width: 100%;
  min-height: 284px;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.bars { height: 236px; display: flex; align-items: end; gap: 10px; padding: 16px 6px 0; }
.bars > div { flex: 1; min-width: 0; height: 100%; display: grid; grid-template-rows: 1fr auto auto; }
.bar-group { flex: 1; min-width: 0; display: grid; align-items: end; grid-template-columns: 1fr 1fr; gap: 3px; height: 100%; position: relative; }
.bar { border-radius: 5px 5px 0 0; min-height: 4px; background: #93c5fd; }
.bar.delivery { background: #22c55e; }
.bar.alert { background: var(--red); }
.bar-label { margin-top: 8px; text-align: center; color: var(--muted); font-size: 11px; }
.monthly-stacked-chart {
  min-height: 284px;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  overflow: hidden;
}
.monthly-bars {
  height: 238px;
  min-width: 0;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 14px 4px 0;
  overflow-x: auto;
}
.month-stack {
  flex: 1;
  min-width: 48px;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
}
.month-bar-pair {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  align-items: end;
}
.month-stacked-column {
  min-height: 5px;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  border-radius: 5px 5px 0 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32);
}
.month-stacked-column.delivered {
  opacity: .74;
}
.month-segment {
  display: block;
  min-height: 2px;
  border-top: 1px solid rgba(255, 255, 255, .28);
}
.month-segment:hover {
  filter: brightness(.92) saturate(1.15);
}
.chart-note {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 2px 4px 0;
}
.stacked-chart {
  min-height: 284px;
  display: grid;
  grid-template-columns: minmax(240px, .82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: stretch;
}
.stacked-plot {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 24px;
  align-items: end;
  padding: 12px 8px 0;
}
.stacked-bar-wrap {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
}
.stacked-column-track {
  height: 224px;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 0 10px;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}
.stacked-column {
  width: min(76px, 100%);
  min-height: 12px;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  border-radius: 8px 8px 3px 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .42), 0 10px 22px rgba(15, 23, 42, .08);
}
.stacked-column.delivered {
  opacity: .86;
}
.stack-segment {
  display: block;
  min-height: 3px;
  border-top: 1px solid rgba(255, 255, 255, .36);
}
.customer-legend {
  max-height: 266px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  align-content: start;
  overflow: auto;
  padding: 8px 4px 8px 0;
}
.customer-legend-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: 8px;
  background: rgba(255, 255, 255, .24);
}
.customer-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.customer-legend-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}
.customer-legend-item b {
  color: var(--muted);
  font-size: 10px;
}
.donut-wrap { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 18px; min-height: 284px; }
.donut { width: 176px; height: 176px; border-radius: 50%; background: conic-gradient(var(--red) 0 13.3%, var(--orange) 13.3% 46.6%, var(--green) 46.6% 100%); position: relative; }
.donut::after { content: ""; position: absolute; inset: 32px; border-radius: 50%; background: rgba(255, 255, 255, .72); box-shadow: inset 0 0 0 1px var(--line); }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; z-index: 1; font-weight: 900; }
.donut-center span { display: block; font: 900 28px/1 var(--mono); }
.legend { display: grid; gap: 12px; }
.legend-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.legend-item i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; }

.split { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; }
.todo-list { display: grid; gap: 10px; }
.todo {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .32);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.todo.active { border-color: rgba(232, 93, 42, .55); background: rgba(232, 93, 42, .08); box-shadow: 0 0 0 3px rgba(232, 93, 42, .08); }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fact { background: rgba(255, 255, 255, .28); border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-height: 66px; }
.fact b { display: block; margin-top: 6px; color: var(--ink); }
.timeline { display: grid; gap: 12px; margin-top: 14px; }
.time-node { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.time-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; background: var(--blue); box-shadow: 0 0 0 4px rgba(232, 93, 42, .14); }
.time-node.pending .time-dot { background: #94a3b8; box-shadow: 0 0 0 4px rgba(148, 163, 184, .18); }

.metric-card { padding: 16px; display: grid; gap: 12px; min-height: 138px; }
.metric-card .big { font: 900 28px/1 var(--mono); color: var(--ink); }
.tooltip { position: relative; border-bottom: 1px dotted #94a3b8; cursor: help; }
.tooltip:hover::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: 24px;
  width: 260px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #fff;
  background: #1f2937;
  font-size: 12px;
  line-height: 1.5;
  z-index: 5;
}
.rule-hit { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255, 255, 255, .28); }
.spark { width: 88px; height: 28px; display: flex; align-items: end; gap: 3px; }
.spark i { flex: 1; min-height: 3px; border-radius: 3px 3px 0 0; background: #93c5fd; }
.spark i.hot { background: var(--red); }
.records-table th,
.records-table td { padding: 11px 12px; }
.records-table .record-note { min-width: 180px; color: var(--muted); }
.delivery-detail { display: grid; gap: 16px; }
.report-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 16px; }
.report-tabs .radio-chip { min-width: 128px; }

.archive-hero {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  gap: 16px;
  margin-bottom: 16px;
}
.archive-hero h2 {
  margin: 12px 0 8px;
  font-size: 24px;
}
.archive-hero-main {
  min-width: 0;
}
.archive-hero-facts.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.archive-timeline {
  display: grid;
  gap: 14px;
}
.archive-node {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
}
.archive-node-rail {
  position: relative;
  display: grid;
  justify-items: center;
}
.archive-node-rail::after {
  content: "";
  position: absolute;
  top: 28px;
  bottom: -28px;
  width: 2px;
  background: rgba(255, 255, 255, .72);
}
.archive-node:last-child .archive-node-rail::after {
  display: none;
}
.archive-node-rail i {
  width: 14px;
  height: 14px;
  margin-top: 18px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, .16);
  z-index: 1;
}
.archive-node.warn .archive-node-rail i {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(239, 68, 68, .14);
}
.archive-node.active .archive-node-rail i {
  background: var(--cyan);
  box-shadow: 0 0 0 5px rgba(60, 160, 200, .14);
}
.archive-node.pending .archive-node-rail i {
  background: #94a3b8;
  box-shadow: 0 0 0 5px rgba(148, 163, 184, .16);
}
.archive-node-card {
  min-width: 0;
}
.archive-mini-timeline {
  margin-top: 0;
}
.archive-delivery .grid-2 {
  grid-template-columns: 1fr 1fr;
}
.rhythm-chart {
  height: 138px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  padding: 8px 4px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .24);
}
.rhythm-bar {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 4px;
  text-align: center;
}
.rhythm-track {
  min-height: 68px;
  display: flex;
  align-items: end;
  justify-content: center;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}
.rhythm-track i {
  width: 60%;
  min-height: 3px;
  border-radius: 5px 5px 0 0;
  background: var(--cyan);
}
.rhythm-track i.hot {
  background: var(--red);
}
.rhythm-bar span {
  color: var(--muted);
  font-size: 11px;
}
.rhythm-bar b {
  color: var(--ink);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.baseline-card {
  display: grid;
  gap: 8px;
}
.baseline-grid.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.compact-empty {
  padding: 18px;
  text-align: left;
}
.archive-stage {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.archive-stage-head .section-title {
  margin: 0;
}
.node-title {
  display: inline-flex;
  align-items: center;
}
.archive-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--line);
  font-size: 12px;
}
.node-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.prog-done { color: #0f766e; background: rgba(204, 251, 241, .5); border-color: rgba(45, 212, 191, .42); }
.prog-active { color: #155e75; background: rgba(207, 250, 254, .62); border-color: rgba(34, 211, 238, .42); }
.prog-pending { color: #475569; background: rgba(241, 245, 249, .72); border-color: rgba(148, 163, 184, .46); }
.event-stream-table .evt-signal {
  margin: 3px 0;
}
.event-stream-table tr.evt-warn td {
  background: rgba(255, 247, 237, .5);
}

.alert-list { display: grid; gap: 12px; }
.alert-card { padding: 14px; display: grid; gap: 10px; border-left: 4px solid var(--orange); }
.alert-card.high { border-left-color: var(--red); }
.alert-card.low { border-left-color: var(--green); }
.alert-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.alert-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dashboard-alerts .alert-list { gap: 8px; }
.dashboard-alerts .alert-card {
  padding: 9px 11px;
  gap: 6px;
}
.dashboard-alerts .alert-card.compact {
  grid-template-columns: minmax(260px, 1.35fr) minmax(180px, 1fr) minmax(110px, .62fr) 126px auto;
  align-items: center;
  gap: 10px;
}
.dashboard-alerts .alert-head {
  align-items: center;
}
.dashboard-alerts .alert-head .tiny {
  margin-top: 3px;
}
.dashboard-alerts .alert-field {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.dashboard-alerts .alert-field b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-alerts .toolbar {
  gap: 6px;
}
.dashboard-alerts .pill {
  min-height: 21px;
  padding: 2px 7px;
}
.dashboard-alerts .grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.dashboard-alerts .alert-actions {
  gap: 6px;
  justify-content: flex-end;
}
.dashboard-alerts .alert-actions .btn {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}
.alert-detail {
  display: grid;
  gap: 10px;
}
.alert-detail .detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.alert-detail .grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 规则配置：阶段 tab */
.rule-tabs { display: flex; gap: 8px; margin: 8px 0 16px; }
.rule-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 8px; font-weight: 800; font-size: 14px;
  color: var(--muted); background: rgba(255, 255, 255, .4); border: 1px solid var(--line);
  transition: .15s;
}
.rule-tab:hover { background: rgba(255, 255, 255, .6); }
.rule-tab.active { color: #fff; background: var(--blue); border-color: var(--blue); }
.rule-tab .tab-count {
  min-width: 20px; padding: 0 6px; height: 18px; line-height: 18px; text-align: center;
  font-size: 11px; border-radius: 99px; background: rgba(0, 0, 0, .12);
}
.rule-tab.active .tab-count { background: rgba(255, 255, 255, .28); }

/* 规则配置：表格 */
.rule-table-card { overflow-x: auto; }
.rule-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.rule-table th {
  text-align: left; font-size: 12px; font-weight: 800; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.rule-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rule-table tr:last-child td { border-bottom: none; }
.rule-table tr.off td { opacity: .5; }
.rule-table .col-switch { width: 56px; }
.rule-table .col-level { width: 96px; }
.rule-table .col-ops { width: 92px; }
.rule-table .col-ops { white-space: nowrap; }
td.col-ops { display: flex; align-items: center; gap: 6px; }
.rule-name-cell b { font-size: 14px; }
.rule-logic { color: var(--muted); margin-top: 3px; }
.dim-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.dim-dot::before { content: ""; width: 9px; height: 9px; border-radius: 99px; background: var(--dim); }
.verify-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.verify-tag svg { width: 13px; height: 13px; }
.verify-tag.external { color: #1d4ed8; background: rgba(219, 234, 254, .7); }
.verify-tag.internal { color: var(--muted); background: rgba(0, 0, 0, .05); }
.src-cell { color: var(--muted); max-width: 180px; }
.field-chips { display: flex; gap: 5px; flex-wrap: wrap; max-width: 240px; }
.field-chip {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  color: var(--text); background: rgba(255, 255, 255, .6); border: 1px solid var(--line);
}
.field-chip.none { color: var(--subtle); font-style: italic; }
.reject-reason { max-width: 360px; color: #b42318; line-height: 1.45; white-space: normal; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 7px; color: var(--muted);
  background: rgba(255, 255, 255, .5); border: 1px solid var(--line);
}
.icon-btn:hover { background: rgba(255, 255, 255, .8); color: var(--text); }
.icon-btn.danger:hover { color: var(--red); border-color: rgba(239, 68, 68, .4); background: rgba(254, 226, 226, .5); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn + .icon-btn { margin-left: 6px; }
.btn.danger { color: #fff; background: var(--red); border-color: var(--red); }

/* 规则编辑抽屉表单 */
.drawer-form { display: grid; gap: 14px; }
.drawer-form .field { display: grid; gap: 6px; }
.drawer-form label { font-size: 13px; font-weight: 700; color: var(--muted); }
.drawer-form input, .drawer-form select {
  min-height: 38px; padding: 8px 11px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .7);
}
.drawer-form input[readonly] { background: rgba(0, 0, 0, .04); color: var(--muted); }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: rgba(26, 29, 36, .9);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateY(0); }

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.pager .btn[disabled] {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
  box-shadow: none;
}
.project-library-card {
  min-height: calc(100vh - 124px);
  margin-top: 50px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.project-table-wrap {
  overflow-x: auto;
}
.project-library-table {
  min-width: 1120px;
}
.project-library-table td {
  line-height: 1.45;
}
.project-pager {
  margin-top: auto;
  justify-content: flex-end;
}

.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.template {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, .32);
  min-height: 116px;
  display: grid;
  gap: 10px;
  text-align: left;
}
.template.active { border-color: rgba(232, 93, 42, .55); background: rgba(232, 93, 42, .08); box-shadow: 0 0 0 3px rgba(232, 93, 42, .09); }
.report-paper {
  background:
    radial-gradient(700px 420px at 100% 0%, rgba(255, 107, 53, .045), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .38));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
}
.report-paper h2 { margin: 0 0 8px; font-size: 21px; }
.report-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.drawer-mask,
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 29, 36, .18);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  z-index: 30;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 500px;
  max-width: calc(100vw - 24px);
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .42));
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 60px rgba(15,23,42,.18);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  transform: translateX(104%);
  transition: .26s ease;
  z-index: 31;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.drawer.wide { width: 980px; }
.drawer.archive-drawer {
  width: min(1040px, calc(100vw - 24px));
  background:
    radial-gradient(900px 540px at 100% 0%, rgba(255, 107, 53, .075), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, .66), rgba(255, 255, 255, .44));
}
.drawer.archive-drawer .drawer-body { padding: 18px 22px 24px; gap: 16px; }
.drawer.archive-drawer .archive-hero { margin-bottom: 0; }
.drawer.archive-drawer .archive-stage { margin-bottom: 0; }
.drawer.archive-drawer .archive-timeline { padding-bottom: 6px; }
.drawer.open, .drawer-mask.open, .drawer-overlay.open { transform: translateX(0); opacity: 1; pointer-events: auto; }
.drawer-head { padding: 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.drawer-body { overflow: auto; padding: 16px 18px; display: grid; gap: 12px; align-content: start; }
.drawer-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.drawer-tabs {
  position: sticky;
  top: -16px;
  z-index: 2;
  display: flex;
  gap: 4px;
  padding: 5px;
  margin: -2px 0 2px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .34));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72), 0 8px 22px rgba(15, 23, 42, .05);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}
.drawer-tab {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  transition: .16s ease;
}
.drawer-tab svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}
.drawer-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .34);
}
.drawer-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #d24b1d);
  box-shadow: 0 8px 18px rgba(232, 93, 42, .22), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.drawer-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.submit-tab-panel {
  display: grid;
  gap: 12px;
}
.drawer-delivery .grid-2 { grid-template-columns: 1fr; }
.drawer-delivery .metric-card { min-height: 126px; }
.drawer-delivery .metric-card .big { font-size: 22px; }
.dealer-report h2 { margin: 0 0 8px; font-size: 20px; }
.dealer-report .report-columns { grid-template-columns: 1fr 1fr; }
.score-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--orange) 0 72%, rgba(255, 255, 255, .38) 72% 100%);
  position: relative;
  flex: none;
}
.score-ring::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: rgba(255, 255, 255, .72); }
.score-ring b { position: relative; z-index: 1; font: 900 22px/1 var(--mono); color: var(--ink); }
.drawer-summary { display: flex; gap: 14px; align-items: center; }
.skeleton {
  height: 12px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,.58), rgba(255,255,255,.22));
  background-size: 200% 100%;
  animation: shimmer 1s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.modal-mask {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(26, 29, 36, .2);
  z-index: 45;
}
.modal-mask.open { display: grid; }
.modal { width: 520px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .42)); border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(32px) saturate(1.4); -webkit-backdrop-filter: blur(32px) saturate(1.4); }
.modal-head, .modal-body, .modal-foot { padding: 16px; }
.modal-head { border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.modal-body { overflow: auto; }
.modal-foot { border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.empty { color: var(--muted); text-align: center; padding: 36px; border: 1px dashed rgba(255, 255, 255, .68); border-radius: 8px; background: rgba(255, 255, 255, .28); }
.hidden { display: none !important; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.danger-text { color: var(--red); }
.orange-text { color: var(--orange); }
.green-text { color: var(--green); }

@media (max-width: 1180px) {
  .grid-4, .grid-3, .grid-2, .split, .report-columns { grid-template-columns: 1fr; }
  .judgement-grid, .archive-hero, .archive-delivery .grid-2 { grid-template-columns: 1fr; }
  .stacked-chart { grid-template-columns: 1fr; }
  .customer-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
  .dashboard-alerts .alert-card.compact { grid-template-columns: 1fr; align-items: stretch; }
  .dashboard-alerts .alert-field b { white-space: normal; }
  .dashboard-alerts .alert-actions { justify-content: flex-start; }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { padding: 20px; }
  .form-section { grid-template-columns: 1fr; }
  .apply-card .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
