:root {
  color-scheme: light;
  --paper:#f7f8f5; --surface:#fff; --ink:#192c28; --muted:#576b64; --line:#d9e1da;
  --brand:#135b49; --brand-dark:#133e35; --tint:#e9f2ec; --danger:#9c392e;
  --shell-width:1360px; --shell-inset:40px;
  font: 15px/1.55 system-ui,"Segoe UI","Microsoft YaHei",sans-serif;
}
*,*::before,*::after { box-sizing:border-box; }
html { overflow-y:scroll; }
@supports (scrollbar-gutter:stable) {
  html { overflow-y:auto; scrollbar-gutter:stable; }
}
body { min-height:100dvh; display:flex; flex-direction:column; margin:0; color:var(--ink); background:var(--paper); }
#content { flex:1; min-width:0; }
.bar-inner,.workspace,.app-footer { width:min(100%,var(--shell-width)); margin-inline:auto; padding-inline:var(--shell-inset); }
.app-footer { padding-block:12px 18px; text-align:right; color:var(--muted); font-variant-numeric:tabular-nums; }
a { color:var(--brand); text-underline-offset:3px; }
a:hover { color:#073f31; }
button,input,select,textarea { font:inherit; }
button,.primary,.secondary,.button-link { touch-action:manipulation; }
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
  outline:3px solid #4b9dcd; outline-offset:3px;
}
[hidden] { display:none!important; }
.skip { position:fixed; left:8px; top:-80px; padding:8px; z-index:20; background:white; }
.skip:focus { top:8px; }
.topbar { background:var(--brand-dark); color:white; }
.bar-inner { min-height:64px; display:flex; align-items:center; gap:40px; }
.brand { display:inline-flex; align-items:center; gap:6px; color:white; font-size:20px; font-weight:720; letter-spacing:-.03em; text-decoration:none; white-space:nowrap; }
.brand:hover,.admin-nav a:hover { color:#fff; }
.brand-core { color:#c5dbcd; font-weight:460; }
.brand-mark { display:block; flex:none; }
.admin-nav { display:flex; align-self:stretch; gap:6px; }
.admin-nav a { display:flex; align-items:center; padding:0 16px; text-decoration:none; color:#cbe0d6; position:relative; font-weight:550; }
.admin-nav [aria-current="page"] { color:#fff; }
.admin-nav [aria-current="page"]::after { content:""; position:absolute; bottom:0; height:3px; border-radius:2px 2px 0 0; left:16px; right:16px; background:#b1d4a7; }
.account { margin-left:auto; display:flex; align-items:center; gap:8px; min-width:0; }
.account-name { color:#dfeae3; font-size:14px; max-width:12em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.quiet-button { border:1px solid #71998d; color:white; background:transparent; padding:5px 12px; border-radius:6px; cursor:pointer; white-space:nowrap; }
.quiet-button:hover { background:#2c5148; }
.account a.quiet-button { color:white; text-decoration:none; }
.language-picker { position:relative; }
.language-picker summary { list-style:none; }
.language-picker summary::-webkit-details-marker { display:none; }
.language-picker summary::after { content:""; display:inline-block; width:6px; height:6px; margin:0 1px 3px 9px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
.language-picker form { position:absolute; right:0; top:calc(100% + 6px); z-index:5; min-width:136px; padding:4px; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:0 6px 18px #133e3524; }
.language-picker button { display:flex; width:100%; justify-content:space-between; align-items:center; border:0; background:transparent; color:var(--ink); padding:6px 10px; border-radius:4px; text-align:left; cursor:pointer; }
.language-picker button:hover,.language-picker button[aria-pressed="true"] { background:var(--tint); color:var(--brand); }
.language-picker button[aria-pressed="true"]::after { content:"✓"; }
@media(max-width:800px) {
  .admin .bar-inner { flex-wrap:wrap; padding-block:6px; row-gap:5px; }
  .admin .account { flex-basis:100%; justify-content:flex-end; gap:6px; }
  .admin .language-picker form { left:0; right:auto; }
}
.workspace { padding-block:34px 32px; }
h1,h2,h3,p { margin:0; }
h1 { font-size:clamp(26px,2.7vw,36px); line-height:1.2; font-weight:650; letter-spacing:-.04em; overflow-wrap:anywhere; }
h2 { font-size:18px; line-height:1.4; letter-spacing:-.02em; }
h3 { font-size:15px; }
.page-head,.panel-head,.panel-foot,.dialog-head,.detail-row,.dialog-actions,.meta,.detail-links,.pager { display:flex; align-items:center; gap:12px; }
.page-head { justify-content:space-between; gap:20px; margin:0 0 24px; }
.page-head>div { min-width:0; }
.crumb { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:13px; text-decoration:none; margin-bottom:14px; }
.crumb a { color:inherit; text-decoration:none; }
.crumb a:hover,.table-scroll a:hover,.button-link:hover { text-decoration:underline; }
.meta { flex-wrap:wrap; font-size:13px; margin-top:10px; color:var(--muted); }
.panel { background:var(--surface); border:1px solid var(--line); border-radius:12px; margin-bottom:20px; }
.panel-head,.panel-foot { justify-content:space-between; flex-wrap:wrap; padding:16px 22px; }
.panel-head { border-bottom:1px solid var(--line); min-height:68px; }
.panel-head h2 small { font-weight:500; }
.panel-foot { border-top:1px solid var(--line); color:var(--muted); font-size:13px; }
.panel-foot small { margin-right:auto; }
.table-scroll { overflow:auto; border-radius:0 0 12px 12px; }
table { border-collapse:collapse; width:100%; text-align:left; }
td,th { padding:13px 16px; border-bottom:1px solid #e7ece7; vertical-align:middle; }
td:first-child,th:first-child { padding-left:22px; } td:last-child,th:last-child { padding-right:22px; }
th { color:var(--muted); font-size:12px; font-weight:600; background:#f8faf7; white-space:nowrap; }
tbody tr:last-child td { border-bottom:none; }
tbody tr:hover>td { background:#fafcf8; }
td { font-size:14px; }
td a { text-decoration:none; }
.num,.actions { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.num a { display:inline-block; min-width:24px; }
.actions .button-link { margin-left:8px; }
.entity-name { font-weight:650; overflow-wrap:anywhere; }
.change-title { display:block; max-width:36ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
small,.muted,.count,.text-count { color:var(--muted); }
small { font-size:12px; }
td small,.panel-head small,.callout small,.detail-row small { display:block; margin-top:3px; }
code { font: .91em/1.45 ui-monospace,"Cascadia Code",Consolas,monospace; overflow-wrap:anywhere; }
time { font-size:13px; font-variant-numeric:tabular-nums; }
.status { display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:600; line-height:1.4; padding:3px 9px; border-radius:12px; }
.good { background:#e4f2e8; color:#285d3f; }
.quiet { background:#edf0ed; color:#52625a; }
.bad { background:#fae8e4; color:#923d31; }
.pending-state { color:#946214; }
.empty { padding:32px 22px; color:var(--muted); }
.empty h3 { color:var(--ink); } .empty p { margin:6px 0 14px; }
.primary,.secondary,.button-link,.text-button,.solid,.close { display:inline-flex; align-items:center; justify-content:center; gap:6px; font-weight:560; text-decoration:none; cursor:pointer; }
.primary,.secondary,.solid { border:1px solid transparent; border-radius:7px; padding:7px 14px; min-height:36px; white-space:nowrap; }
.primary { background:var(--brand); color:white; }
.primary:hover { background:#104936; color:white; }
.secondary { background:white; color:var(--ink); border-color:#b8c9bd; }
.secondary:hover { background:#f0f5ef; color:var(--ink); }
button:disabled { opacity:.55; cursor:wait; }
.button-link,.text-button { font-size:14px; color:var(--brand); }
.text-button { padding:4px 3px; border:0; background:transparent; }
.danger { color:var(--danger); }
.solid.danger { background:var(--danger); color:white; }
input,select,textarea { min-width:0; color:var(--ink); background:white; border:1px solid #b9c7bd; border-radius:6px; padding:7px 10px; line-height:1.4; }
input::placeholder { color:#738477; }
.search,.field,.stack { display:flex; gap:8px; }
.search { align-items:center; } .search input { width:200px; max-width:100%; }
.field,.stack,.filter-bar label { flex-direction:column; }
.stack { gap:16px; }.field { gap:6px; font-weight:580; }
.tabs { display:flex; flex-wrap:wrap; gap:22px; margin-bottom:20px; border-bottom:1px solid #cad6cd; }
.tabs a { position:relative; text-decoration:none; color:var(--muted); font-weight:560; padding:6px 2px 11px; }
.tabs a[aria-current] { color:var(--brand); }
.tabs a[aria-current]::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:3px; border-radius:2px; background:var(--brand); }
.tabs a span,.text-count { margin-left:4px; font-size:12px; font-weight:500; font-variant-numeric:tabular-nums; }
.pager { justify-content:flex-end; padding:12px 20px; font-size:13px; border-top:1px solid var(--line); }
.detail-row,.grant-row { padding:13px 22px; border-bottom:1px solid var(--line); }
.detail-row:last-child,.grant-row:last-child { border:0; }
.grow { flex:1; min-width:0; }
.strip { margin-bottom:20px; background:#edf2ed; border-radius:7px; flex-wrap:wrap; }
.grant-row { display:grid; grid-template-columns:minmax(100px,1fr) minmax(90px,130px) max-content; align-items:center; gap:8px 12px; }
.row-result:not(:empty) { grid-column:1/-1; color:var(--brand); }
.row-result:empty { display:none; }
.grant-name { overflow-wrap:anywhere; }
.grant-name a { text-decoration:none; }
.facts { display:grid; grid-template-columns:minmax(100px,130px) minmax(0,1fr); gap:8px 14px; margin:12px 0; }
.facts dt { color:var(--muted); } .facts dd { margin:0; overflow-wrap:anywhere; }
.resource-detail { padding:20px 22px; } .resource-detail h3 { margin-top:18px; }
.prose { white-space:pre-wrap; overflow-wrap:anywhere; margin-top:8px; line-height:1.7; }
.filter-bar { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(136px,100%),1fr)); align-items:end; gap:10px 12px; padding:14px 22px; border-bottom:1px solid var(--line); }
.filter-bar>label,.filter-field { display:flex; flex-direction:column; min-width:0; gap:4px; font-size:12px; color:var(--muted); }
.filter-bar select,.filter-bar input[type=date],.filter-menu summary { width:100%; height:36px; font-size:13px; }
.filter-menu { position:relative; }
.filter-menu summary { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 10px; cursor:pointer; list-style:none; color:var(--ink); border:1px solid #b9c7bd; border-radius:6px; background:var(--surface); }
.filter-menu summary::-webkit-details-marker { display:none; }
.filter-menu summary::after { content:""; width:6px; height:6px; margin-right:2px; border:solid var(--muted); border-width:0 1.5px 1.5px 0; transform:translateY(-2px) rotate(45deg); flex:none; }
.filter-menu[open] summary::after { transform:translateY(1px) rotate(225deg); }
.filter-menu summary span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.filter-options { position:absolute; inset:calc(100% + 4px) 0 auto; z-index:3; max-height:240px; overflow:auto; padding:4px; border:1px solid var(--line); border-radius:7px; background:var(--surface); box-shadow:0 5px 18px #192c281a; }
.filter-options label { display:flex; flex-direction:row; align-items:center; gap:7px; padding:6px; overflow-wrap:anywhere; cursor:pointer; color:var(--ink); font-size:13px; border-radius:4px; }
.filter-options label:hover,.filter-options label:focus-within { background:var(--tint); }
.filter-options input { width:15px; height:15px; accent-color:var(--brand); margin:0; flex:none; }
.filter-options small { display:block; padding:6px; }
.filter-buttons { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.filter-buttons .text-button { font-size:12px; }
.recovery summary { cursor:pointer; color:var(--brand); }
.activity-table td { vertical-align:top; }
.activity-table td strong { font-size:14px; }
.activity-table .text-button { padding-top:0; }
.activity-table tr.activity-detail td { padding:14px 22px; background:#f2f6f2; }
.activity-table .detail-links { margin-top:12px; flex-wrap:wrap; }
.activity-table .mobile-only { display:none; }
.flash,.notice,.callout,.form-error:not(:empty),.copy-status { padding:10px 14px; border-radius:7px; }
.flash,.success,.callout { background:#e9f4eb; color:#23553d; }
.flash { width:fit-content; max-width:90%; margin:15px auto 0; }
.notice { margin:12px 0; }
.error,.form-error:not(:empty),.failed { color:var(--danger)!important; background:#fbede8; }
.form-error:empty { display:none; }
.copy-status { color:var(--muted); font-size:13px; }
dialog { max-width:min(94vw,550px); width:490px; max-height:85dvh; overflow:auto; margin:auto; padding:24px;
    border:1px solid #b9c8bc; border-radius:14px; color:var(--ink); background:white; box-shadow:0 16px 64px #08251930; }
dialog::backdrop { background:rgb(15 36 30 / .40); }
.dialog-head { justify-content:space-between; margin-bottom:16px; }
.dialog-head h2 { font-size:21px; }
.close { background:#f0f4ef; color:#394e41; border:0; border-radius:6px; width:32px; height:32px; font-size:23px; line-height:1; }
dialog p,.dialog-head+.field { margin:10px 0; }
.dialog-actions { justify-content:flex-end; margin-top:18px; }
.pairing-secret { font:13px/1.5 ui-monospace,Consolas,monospace; width:100%; padding:12px; }
.grant-options { min-width:0; padding:0; margin:0; border:0; }
.grant-options legend { font-weight:600; margin-bottom:6px; }
.grant-options>input { width:100%; }
.grant-picker { max-height:26vh; overflow:auto; }
.grant-picker label { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 0; }
.grant-picker select { width:108px; }
dialog .grant-row { padding-left:0; padding-right:0; }
.auth-card { background:white; width:min(440px,calc(100% - 36px)); margin:clamp(36px,10vh,120px) auto; border:1px solid var(--line); border-radius:14px; padding:28px; }
.auth-card h1 { font-size:26px; margin-bottom:16px; }
.auth-card .intro,.auth-card .recovery { margin:15px 0; }
.auth-card .field label { font-weight:600; }.auth-card .stack { margin:18px 0; }
.captcha-tools { display:flex; align-items:center; gap:12px; }
.captcha-image { color:#204e40; background:#eef5f1; border:1px solid var(--line); border-radius:6px; }
.copy-buffer { position:fixed; left:-10000px; }
@media(max-width:800px) {
  :root { --shell-inset:20px; }
  .bar-inner { gap:20px; min-height:56px; } .workspace { padding-block:24px; }
  .panel-head,.panel-foot,.filter-bar { padding:12px 14px; } th,td { padding:10px 12px; }
  td:first-child,th:first-child { padding-left:14px; } td:last-child,th:last-child { padding-right:14px; }
  .projects th:last-child,.projects td:last-child { display:none; } .tabs { gap:14px; }
}
@media(max-width:560px) {
  :root { --shell-inset:12px; }
  .bar-inner { gap:10px; } .brand { font-size:17px; }
  .admin-nav { gap:2px; } .admin-nav a { padding:0 8px; }
  .account { gap:0; } .account-name { display:none; } .quiet-button { font-size:12px; }
  .workspace { padding-block:20px; } .page-head { margin-bottom:18px; }
  .panel-head { gap:8px; } .search { width:100%; } .search input { flex:1; }
  .project-count,.panel-head>small { font-size:11px; } .num { padding:10px 6px; }
  .device-table th:nth-child(4),.device-table td:nth-child(4) { display:none; }
  .activity-table thead th:nth-child(-n+3),.activity-table tr[data-activity-id]>td:nth-child(-n+3) { display:none; }
  .activity-table .mobile-only { display:block; }
  .activity-table .mobile-only time { font-size:11px; }
  .activity-table th:nth-child(4),.activity-table td:nth-child(4) { padding-left:14px; }
  .activity-detail .facts { max-width:85vw; }
  .detail-row,.grant-row { padding:10px 14px; } .grant-row { grid-template-columns:minmax(72px,1fr) 88px auto; gap:6px; }
  .grant-row button { padding:6px; }.facts { grid-template-columns:82px minmax(0,1fr); }
  dialog { padding:18px; } .actions .button-link { margin-left:3px; } .text-count { font-size:11px; }
}

