:root {
  color-scheme: light;
  font: 15px/1.55 system-ui, "Microsoft YaHei", sans-serif;
  color: #192c32;
  background: #f1f5f4;
  --muted: #51646b;
  --line: #dbe5e3;
  --primary: #146856;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, .primary { border: 1px solid #b8cbc6; border-radius: 7px; }
button, .primary { min-height: 42px; padding: 8px 15px; cursor: pointer; }
button { background: #fff; color: inherit; }
button:disabled { opacity: .56; cursor: default; }
button:not(:disabled):hover { border-color: var(--primary); }
:focus-visible { outline: 3px solid #21846d; outline-offset: 3px; }
.primary { display: inline-flex; align-items: center; background: var(--primary); border-color: var(--primary); color: #fff; text-decoration: none; }
.primary:hover { background: #095444; }
input, select, textarea { background: #fff; color: #192c32; padding: 9px 10px; min-width: 0; }
textarea { width: 100%; margin: 4px 0 10px; resize: vertical; }
label { display: grid; gap: 5px; color: var(--muted); font-weight: 550; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(25px, 4vw, 33px); line-height: 1.25; }
h2 { font-size: 17px; margin-bottom: 12px; }
output { display: block; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { padding: 27px 18px; background: #102c30; color: #e7f0ef; display: flex; flex-direction: column; gap: 28px; }
.brand { display: grid; width: fit-content; margin-left: 8px; color: inherit; text-decoration: none; }
.brand span { font-weight: 750; font-size: 23px; letter-spacing: .03em; }
.brand small { color: #a8c5c5; font-size: 13px; }
nav { display: grid; gap: 7px; }
nav button { text-align: left; color: inherit; background: transparent; border-color: transparent; }
nav button[aria-current], nav button:hover { background: #20484a; }
.site-link { margin-top: auto; padding: 8px; color: #b6d7d0; font-size: 13px; }
main { padding: 35px clamp(16px, 4vw, 55px); min-width: 0; width: 100%; max-width: 1300px; }
.page-header, dialog header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.page-header p { margin: 0; font-size: 13px; color: var(--muted); }
#status { color: var(--muted); margin: 14px 0; }
#status:empty, #card-status:empty, #user-status:empty { display: none; }
.page-header + #status:empty + section[hidden] ~ section:not([hidden]), #signin { margin-top: 23px; }
.panel, .metric, dialog { border: 1px solid var(--line); background: #fff; border-radius: 12px; }
.panel { padding: 20px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 20px; }
.metric { padding: 17px 19px; }
.metric h2 { color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.metric output { font-size: 35px; font-weight: 700; font-variant-numeric: tabular-nums; }
.filters, .actions { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.filters { margin-bottom: 17px; }
.filters input[type=number] { width: 84px; }
.filters input:not([type=number]) { width: min(100%, 245px); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
td, th { padding: 12px 13px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: #f3f8f7; color: #3f585d; font-size: 13px; font-weight: 650; }
td button { min-height: 34px; padding: 4px 11px; }
td[colspan] { color: var(--muted); }
.more { margin-top: 14px; }
dialog { width: min(540px, calc(100vw - 32px)); padding: 21px; color: inherit; }
dialog::backdrop { background: #0d2627a0; }
dialog header h2 { margin: 0; }
dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 15px; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.danger { color: #982d28; border-color: #cd9b98; }
[data-error="true"] { color: #982d28 !important; }
@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { padding: 14px; gap: 10px; }
  .brand { display: flex; align-items: baseline; gap: 8px; margin: 0; }
  .brand span { font-size: 19px; }
  nav { display: flex; gap: 3px; flex-wrap: wrap; }
  nav button { padding: 6px 9px; min-height: 39px; }
  .site-link { display: none; }
  main { padding-top: 22px; }
  .metrics { gap: 7px; }
  .metric { padding: 10px; }
  .metric h2 { font-size: 12px; }
  .metric output { font-size: 24px; }
  .panel { padding: 13px; }
  td, th { padding: 8px 10px; }
}
