:root {
  color-scheme: light;
  --nav: #111f2b;
  --nav-text: #ddeaf0;
  --nav-muted: #a3b6c2;
  --bg: #f2f6f7;
  --paper: #fff;
  --ink: #122732;
  --muted: #516973;
  --line: #dce7e9;
  --teal: #087761;
  --teal-dark: #075b4c;
  --tint: #e8f5f1;
  --amber: #8b510d;
  --amber-bg: #fff2dc;
  --red: #952f30;
  --red-bg: #fff0ee;
  font: 14px/1.55 Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--teal-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #2c9c88; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: clamp(27px, 3vw, 38px); line-height: 1.2; letter-spacing: -.035em; font-weight: 740; }
h2 { font-size: 17px; line-height: 1.4; }
h3 { font-size: 14px; }
small { display: block; color: var(--muted); font-size: 12px; }
.skip { position: absolute; left: 8px; top: -4rem; z-index: 10; padding: 8px; background: var(--paper); }
.skip:focus { top: 8px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 204px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; align-self: start; min-height: 100vh; padding: 26px 14px 18px;
  background: radial-gradient(ellipse at 0 0, #1b3a46 0, var(--nav) 46%); color: var(--nav-text);
  display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 10px; margin: 0 8px 34px; text-decoration: none; color: #fff; }
.brand strong { font-size: 22px; line-height: 1.15; letter-spacing: .08em; }
.brand small, .sidebar-footer small { color: var(--nav-muted); margin-top: 3px; }
.brand-mark {
  flex: 0 0 36px; height: 36px; display: grid; place-items: center; border-radius: 11px;
  background: #b9eedf; color: #164c45;
}
.brand-mark span { width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; }
.brand-mark span::before { content: ""; position: absolute; inset: 3px; border: 1px solid currentColor; border-radius: 50%; }
.brand-mark span::after { content: ""; position: absolute; width: 11px; height: 1.5px; top: 7px; left: 7px; background: currentColor; transform-origin: left center; transform: rotate(-39deg); }
.navigation { display: grid; gap: 5px; }
.navigation a { text-decoration: none; color: var(--nav-text); display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; }
.navigation a:hover { background: #1c3542; }
.navigation a[aria-current] { background: #23454b; border-color: #365a5e; color: #c7f5e7; font-weight: 650; }
.nav-icon { position: relative; width: 14px; height: 14px; color: currentColor; flex: none; }
.icon-radar { border: 1px solid; border-radius: 50%; }
.icon-radar::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; border: 1px solid; }
.icon-channel { border: 1px solid; border-radius: 2px; background: linear-gradient(90deg, transparent 45%, currentColor 45% 54%, transparent 54%); }
.icon-price { border-left: 1px solid; border-bottom: 1px solid; background: linear-gradient(143deg, transparent 44%, currentColor 46% 52%, transparent 54%); }
.icon-follow { border: 1px solid; border-radius: 2px; height: 15px; width: 12px; margin-inline: 1px; }
.icon-data { border: 1px solid; border-radius: 5px / 3px; background: linear-gradient(transparent 28%, currentColor 29% 36%, transparent 37% 63%, currentColor 64% 71%, transparent 72%); }
.nav-count { margin-left: auto; color: #b9eedf; font-size: 12px; }
.sidebar-footer { display: flex; align-items: flex-start; gap: 8px; padding: 18px 8px 0; margin-top: auto; font-size: 12px; }
.dot { width: 7px; height: 7px; margin-top: 6px; background: #86dcc8; border-radius: 50%; flex: none; }
.main { min-width: 0; }
.topbar { min-height: 57px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); background: var(--paper); padding: 10px clamp(14px, 3vw, 34px); color: var(--muted); }
.topbar strong { color: var(--ink); }
.account-menu { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
#account-name { overflow-wrap: anywhere; font-size: 12px; color: var(--ink); }
.slash { padding: 0 6px; }
.workspace { max-width: 1520px; padding: clamp(16px, 3vw, 34px); margin: auto; }
.page-head { margin-bottom: 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head p { color: var(--muted); margin-top: 6px; }
.scope { color: var(--teal-dark); background: var(--tint); border: 1px solid #cce6df; border-radius: 20px; font-size: 12px; padding: 4px 10px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.metric, .panel { border: 1px solid var(--line); background: var(--paper); border-radius: 12px; min-width: 0; }
.metric { display: grid; align-content: start; gap: 4px; text-align: left; padding: 12px 15px; color: var(--ink); }
.metric[aria-pressed="true"] { border-color: #83bfae; background: var(--tint); }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { font-size: 26px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.metric strong.amount { font-size: clamp(17px, 2vw, 24px); overflow-wrap: anywhere; }
.metric.warn strong { color: var(--amber); }
.panel { box-shadow: 0 2px 5px #24404d06; padding: 15px; }
.panel + .panel { margin-top: 12px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 11px; }
.panel-head p, .subtle { color: var(--muted); font-size: 12px; }
.panel-head p { margin-top: 3px; }
.layout { display: grid; gap: 12px; grid-template-columns: minmax(0, 1.65fr) minmax(270px, 1fr); align-items: start; }
.layout .panel + .panel { margin-top: 0; }
.switches, .actions, .filters { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.switches { margin-bottom: 10px; }
.actions { margin-top: 12px; }
.filters { margin-bottom: 10px; }
.filters label { color: var(--muted); display: grid; gap: 3px; font-size: 12px; }
.filters .search { flex: 1 1 190px; }
.price-search { display: flex; align-items: flex-end; gap: 6px; }
.price-search label { flex: 1; min-width: 0; }
:is(input, select, textarea) { color: var(--ink); background: var(--paper); border: 1px solid #cbdadc; border-radius: 7px; padding: 7px 8px; min-width: 0; max-width: 100%; }
textarea { width: 100%; resize: vertical; }
.secondary, .primary, .switches button {
  border: 1px solid #ccdbde; color: var(--ink); background: var(--paper); border-radius: 7px; padding: 6px 10px; text-decoration: none;
}
.primary { color: #fff; border-color: var(--teal-dark); background: var(--teal-dark); }
.primary:hover { background: var(--teal); }
.secondary:hover, .switches button:hover { background: #f0f7f6; }
.switches button[aria-pressed="true"] { background: var(--tint); border-color: #92c3b8; color: var(--teal-dark); font-weight: 650; }
.small { font-size: 12px; }
.tag { display: inline-block; color: #486272; background: #edf4f6; padding: 2px 7px; border-radius: 5px; font-size: 11px; line-height: 1.45; }
.tag.teal { background: var(--tint); color: var(--teal-dark); }
.tag.amber { background: var(--amber-bg); color: var(--amber); }
.tag.red { background: var(--red-bg); color: var(--red); }
.list { display: grid; margin: 0 -15px -15px; border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(75px, auto); align-items: start; gap: 6px 12px;
  text-align: left; padding: 12px 15px; width: 100%; border: 0; border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent; background: transparent; color: var(--ink);
}
.row:last-child { border-bottom: 0; border-radius: 0 0 11px 11px; }
.row:hover { background: #f6faf9; }
.row[aria-pressed="true"] { border-left-color: var(--teal); background: #edf8f4; }
.row strong, .row small { overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 5px; color: var(--muted); font-size: 12px; }
.numeric, .row .time { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row .time { font-size: 12px; color: var(--muted); }
.row .time.due { color: var(--amber); font-weight: 650; }
.detail-title { font-size: 18px; margin: 8px 0 3px; overflow-wrap: anywhere; }
.detail .switches { margin: 11px 0 8px; }
.detail .switches button { font-size: 12px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-block: 10px; }
.facts > div { padding: 8px 9px; background: #f4f8f8; border-radius: 7px; min-width: 0; }
.facts dt { color: var(--muted); font-size: 11px; }
.facts dd { font-size: 13px; font-weight: 650; margin-top: 2px; overflow-wrap: anywhere; }
.evidence { background: #f2f8f7; border-left: 3px solid #88bcad; padding: 9px 10px; margin-top: 9px; border-radius: 0 7px 7px 0; overflow-wrap: anywhere; }
.evidence small, .evidence a { font-size: 12px; }
.timeline { padding-left: 18px; margin-block: 10px; }
.timeline li { padding-bottom: 6px; }
.timeline strong, .timeline a { font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead { background: #f4f8f8; color: var(--muted); font-size: 12px; }
tbody tr:last-child :is(th, td) { border-bottom: 0; }
tbody th { font-weight: 600; }
.text-button { border: 0; color: var(--teal-dark); background: none; text-align: left; padding: 0; font-weight: 650; }
.text-button:hover, .text-button[aria-pressed="true"] { text-decoration: underline; text-underline-offset: 2px; }
.empty { padding: 19px; color: var(--muted); }
.notice { background: var(--amber-bg); color: #754509; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 13px; }
.feedback { margin: 12px clamp(14px, 3vw, 34px) 0; padding: 9px 11px; background: var(--tint); color: var(--teal-dark); border-radius: 7px; }
.feedback.error { background: var(--red-bg); color: var(--red); }
.spacer { margin-top: 12px; }
.stack { display: grid; gap: 8px; }
.import label, .note-form label { display: grid; gap: 4px; }
dialog { border: 1px solid var(--line); border-radius: 12px; width: min(650px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 18px; color: var(--ink); }
dialog::backdrop { background: #0d2128a0; }
.account-page { display: grid; place-items: center; min-height: 100dvh; padding: 20px; background: radial-gradient(ellipse at 30% 0, #d5ebe6, var(--bg) 55%); }
.account-card { width: min(100%, 420px); padding: clamp(20px, 5vw, 32px); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 10px 36px #24404d13; }
.account-brand { display: flex; align-items: center; gap: 10px; color: var(--teal-dark); margin-bottom: 20px; }
.account-card h1 { font-size: 27px; }
.account-card > p { margin-block: 7px 13px; color: var(--muted); }
.account-card .account-error { background: var(--red-bg); color: var(--red); padding: 8px; border-radius: 7px; }
.account-form { display: grid; gap: 12px; }
.account-form label, .staff-form label { display: grid; gap: 4px; }
.account-form input { width: 100%; }
.staff-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.staff-password { font-size: 17px; overflow-wrap: anywhere; }
@media (max-width: 1130px) { .shell { grid-template-columns: 165px minmax(0, 1fr); } .sidebar { padding-inline: 10px; } }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 670px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; min-height: 0; padding: 10px 12px; }
  .brand { margin: 0 0 8px; }
  .brand strong { font-size: 18px; }
  .brand-mark { flex-basis: 29px; height: 29px; }
  .brand small, .sidebar-footer { display: none; }
  .navigation { display: flex; flex-wrap: wrap; }
  .navigation a { padding: 5px 7px; gap: 5px; font-size: 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .metric { padding: 9px 10px; }
  .metric strong { font-size: 22px; }
  .panel { padding: 12px; }
  .list { margin: 0 -12px -12px; }
  .row { padding-inline: 12px; }
}
@media (pointer: coarse) {
  :is(.navigation a, .switches button, .secondary, .primary, input, select, .text-button) { min-height: 40px; }
  :is(input, textarea, select) { font-size: 16px; }
}
