:root {
  color-scheme: light;
  --ink: #18342f; --muted: #52675f; --accent: #146050; --bg: #f4f7f3;
  --line: #dce6de; --white: #fff; --pale: #e8f3eb;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #368d78; outline-offset: 3px; }
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1280px; margin: auto; min-height: 70px; padding: 10px 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 750; color: var(--ink); }
.brand small { font-weight: 500; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--accent); color: white; }
nav, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
nav a, .plain { color: var(--ink); padding: 5px 4px; }
.plain { background: none; border: 0; font: inherit; cursor: pointer; }
.wrap { max-width: 1280px; margin: auto; padding: 30px 28px 70px; }
.wrap.narrow { max-width: 520px; }
.heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.eyebrow { font-size: 13px; color: var(--accent); font-weight: 700; margin: 0 0 8px; letter-spacing: .06em; }
h1 { font-size: clamp(26px, 4vw, 39px); line-height: 1.18; letter-spacing: -.025em; margin: 0 0 8px; }
h2 { font-size: 19px; margin: 0 0 12px; }
.muted, small, .pagination { color: var(--muted); }
.heading p:last-child { margin-bottom: 0; }
small { display: block; font-size: 12px; }
.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 22px; }
.metric, .panel { background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.metric { padding: 15px; color: var(--muted); white-space: nowrap; }
.metric strong { color: var(--ink); font-size: 28px; display: block; margin-top: 3px; }
.dot { display: inline-block; border-radius: 99px; width: 8px; height: 8px; margin-right: 7px; background: #6c9386; }
.dot.unassigned, .dot.attention { background: #ad6819; }
.dot.confirmed { background: #2f8c4c; }
.padded { padding: 20px; }
.columns { display: grid; grid-template-columns: 1fr 1.15fr; gap: 14px; }
.button { background: var(--accent); border: 1px solid var(--accent); color: white; padding: 8px 13px; border-radius: 8px; display: inline-block; font: inherit; font-weight: 650; text-align: center; cursor: pointer; white-space: nowrap; }
.button:hover { filter: brightness(.91); text-decoration: none; }
.button.secondary { background: var(--white); border-color: #b7cfc3; color: var(--accent); }
.button.full { width: 100%; }
.filters, .inline-form, .upload { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 11px; }
.filters { padding: 14px; }
.filters > a { padding: 8px 0; }
label { display: grid; gap: 4px; font-size: 13px; font-weight: 650; }
input, select { border: 1px solid #a9bdb2; border-radius: 8px; background: white; padding: 8px; min-height: 39px; color: var(--ink); font: inherit; }
.stack { display: grid; gap: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
td, th { padding: 12px 15px; border-top: 1px solid var(--line); }
th { font-size: 12px; color: var(--muted); background: #f6f8f5; white-space: nowrap; }
td { min-width: 86px; }
td:first-child { min-width: 140px; }
.badge { display: inline-block; border-radius: 20px; background: #e6f1ed; color: #235b4d; padding: 3px 9px; white-space: nowrap; font-size: 12px; }
.badge.unassigned, .badge.attention { background: #fff1da; color: #845312; }
.badge.confirmed { background: #e0f1e3; color: #205d36; }
.flash { background: var(--pale); border-radius: 8px; padding: 9px 12px; margin: 0 0 14px; overflow-wrap: anywhere; }
.flash.error { background: #fce9e5; color: #982c23; }
.flash.warning { background: #fff1da; color: #845312; }
.spaced, .import-results { margin-top: 16px; }
.inline-form + .flash, form + .flash { margin-top: 12px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.pagination { border-top: 1px solid var(--line); padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 15px; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.snapshot { white-space: pre-line; background: var(--bg); border-radius: 8px; padding: 12px; overflow-wrap: anywhere; }
.timeline { padding-left: 20px; }
.timeline li { margin-bottom: 8px; }
@media (max-width: 720px) {
  .top-inner, .wrap { padding-left: 14px; padding-right: 14px; }
  .top-inner, .heading { align-items: flex-start; flex-direction: column; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); }
  .columns { grid-template-columns: 1fr; }
  .filters label { max-width: 100%; }
}
