:root {
    color-scheme: light;
    --ink: #182638;
    --muted: #4d6076;
    --line: #dce5ee;
    --accent: #12646b;
    --surface: #fff;
    font: 16px/1.55 system-ui, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f3f6fa; color: var(--ink); }
a { color: var(--accent); }
h1, h2, p { margin: 0 0 .8rem; }
h1 { font-size: clamp(1.65rem, 4vw, 2.15rem); }
h2 { font-size: 1.12rem; }
button, input { font: inherit; }
button { cursor: pointer; border: 1px solid transparent; border-radius: .5rem; padding: .48rem .85rem; background: var(--accent); color: white; }
button.secondary { color: var(--accent); background: white; border-color: var(--line); }
input { width: 100%; min-width: 0; border: 1px solid #aebccc; border-radius: .45rem; background: white; padding: .45rem .6rem; }
label { display: grid; gap: .25rem; font-weight: 600; }
:focus-visible { outline: 3px solid #168493; outline-offset: 2px; }
.panel { padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: .85rem; min-width: 0; }
.stack { display: grid; gap: 1rem; }
.notice { margin: 0 0 1rem; padding: .75rem 1rem; border-radius: .5rem; background: #e4f3f0; overflow-wrap: anywhere; }
.notice.error { background: #fbe8e8; padding-left: 2rem; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-card { width: min(100%, 27rem); padding: 2rem; }
.brand { font-weight: 800; letter-spacing: .02em; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem clamp(1rem, 3vw, 2rem); background: #132638; color: white; }
.topbar .brand { color: white; text-decoration: none; }
.topbar .brand span { margin-inline-start: .6rem; color: #bdd8e4; font-weight: 500; }
.account { display: flex; align-items: center; gap: .65rem; overflow-wrap: anywhere; }
.workspace { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: clamp(1rem, 3vw, 2rem); max-width: 105rem; margin: auto; padding: 1.15rem clamp(1rem, 3vw, 2rem) 2rem; }
nav { display: flex; flex-direction: column; gap: .25rem; }
nav a { display: block; border-radius: .5rem; padding: .55rem .7rem; text-decoration: none; white-space: nowrap; color: var(--muted); }
nav a:hover, nav a[aria-current] { background: #dceceb; color: #174f56; }
nav a[aria-current] { font-weight: 700; }
.metrics { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); margin: 0; }
.metrics dt, .muted { color: var(--muted); }
.metrics dd { margin: .2rem 0 0; font-size: 1.25rem; font-weight: 700; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: start; font-size: .92rem; }
thead { background: #eaf0f6; color: #334c63; }
th, td { padding: .65rem .7rem; text-align: start; border-bottom: 1px solid var(--line); }
th, td form { white-space: nowrap; }
td { overflow-wrap: anywhere; min-width: 4rem; }
tr:hover td { background: #f5f9fc; }
.number { font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.pagination { display: flex; gap: 1rem; margin-top: .8rem; font-size: .92rem; }
.form-row { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; }
.form-row label { flex: 1 1 10rem; }
.skip { position: absolute; left: .75rem; top: .75rem; padding: .5rem; background: white; transform: translateY(-200%); }
.skip:focus { transform: none; }
code { overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .workspace { grid-template-columns: minmax(0, 1fr); }
    nav { overflow-x: auto; flex-direction: row; padding: .2rem .2rem .5rem; }
    .topbar .brand span { display: block; margin-inline-start: 0; }
    .panel { padding: .85rem; }
}
.options { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.options label { display: flex; align-items: center; gap: .4rem; }
.options input { width: auto; }
.status { display: inline-block; padding: .08rem .45rem; background: #eaf0f6; border-radius: .35rem; white-space: nowrap; }
