* { box-sizing: border-box; }
:root { color-scheme: light; --ink: #172635; --muted: #566778; --line: #dbe2e8; --blue: #155ead; --paper: #fff; --sidebar: #182734; }
body { margin: 0; font: 15px/1.55 Inter,"Segoe UI","Microsoft YaHei",system-ui,sans-serif; background: #f3f5f7; color: var(--ink); }
a { color: var(--blue); text-decoration: none; }
a:hover, .text-button:hover { text-decoration: underline; }
button,input,textarea,select { font: inherit; }
button,select,summary { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #548cdd; outline-offset: 3px; }
[hidden] { display: none !important; }
h1,h2,h3,p { margin: 0 0 12px; }
h1 { font-size: clamp(26px,3vw,34px); line-height: 1.3; margin-bottom: 24px; }
h2 { font-size: 20px; } h3 { font-size: 16px; }
small,.muted { color: var(--muted); }
small { display: block; font-size: 13px; }
.console { min-height: 100vh; display: grid; grid-template-columns: 216px minmax(0,1fr); }
.sidebar { color: #edf2f6; background: var(--sidebar); padding: 20px 12px; }
.side-top { padding: 0 12px 18px; border-bottom: 1px solid #344452; margin-bottom: 12px; }
.wordmark { font-size: 21px; font-weight: 800; letter-spacing: -.04em; overflow-wrap: anywhere; }
.wordmark img { display: block; max-height: 38px; max-width: min(170px, 100%); object-fit: contain; }
.settings-tabs, .settings-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.settings-tabs a { padding: 7px 15px; border-radius: 6px; font-weight: 600; }
.settings-tabs a[aria-current] { background: var(--blue); color: white; }
.settings-group { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }
.settings-group legend, .settings-group summary { font-weight: 650; }
.brand-preview { display: block; max-width: min(240px,100%); max-height: 70px; object-fit: contain; }
.settings-links { margin-top: 16px; }
textarea[name=stats_code] { font: 14px/1.55 ui-monospace,Consolas,monospace; }
.sidebar .wordmark { color: white; }
.sidebar nav { display: grid; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; color: #e3eaf2; padding: 9px 13px; border-radius: 5px; }
.sidebar nav a:hover { background: #283c4e; text-decoration: none; }
.sidebar nav a[aria-current] { background: #18579a; color: white; font-weight: 650; }
.nav-toggle { display: none; color: white; background: none; border: 1px solid #7890a2; padding: 4px 9px; border-radius: 4px; }
.console-main { min-width: 0; }
.toolbar { background: white; border-bottom: 1px solid var(--line); min-height: 58px; padding: 9px clamp(16px,4vw,48px); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toolbar>div,.login-links,.pager,.panel-head,.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.toolbar details { position: relative; }
.toolbar .lang-list { position: absolute; z-index: 2; top: 100%; right: 0; min-width: 120px; padding: 8px; background: white; border: 1px solid var(--line); border-radius: 5px; }
.lang-list a { display: block; padding: 6px; }
.toolbar form { margin: 0; }
.text-button { padding: 0; color: var(--blue); border: 0; background: none; }
.desk { max-width: 1140px; margin: auto; padding: clamp(22px,4vw,44px); }
.panel,.stats>a,.login-box { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; }
.panel { padding: clamp(16px,2.6vw,26px); margin: 0 0 18px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(122px,1fr)); gap: 12px; margin-bottom: 20px; }
.stats>a { display: grid; color: var(--muted); padding: 16px; }
.stats b { font-size: 30px; line-height: 1.35; color: var(--ink); font-variant-numeric: tabular-nums; }
.quick-links,.packs { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 10px; }
.quick-links a,.packs div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; }
.quick-links a { display: flex; justify-content: space-between; }
.packs code { display: block; color: var(--muted); }
.packs+p { margin: 14px 0 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
label { display: grid; gap: 5px; font-size: 14px; font-weight: 600; margin: 13px 0; }
input:not([type=checkbox]):not([type=radio]),select,textarea { width: 100%; padding: 8px 10px; border: 1px solid #b7c3ce; border-radius: 5px; color: var(--ink); background: white; }
input[type=checkbox],input[type=radio] { width: 17px; height: 17px; accent-color: var(--blue); flex-shrink: 0; }
textarea { resize: vertical; min-height: 70px; }
.inline,.check,.radio { display: flex; gap: 9px; align-items: center; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.primary,.secondary,.button { display: inline-block; padding: 8px 14px; border: 1px solid #aebdca; border-radius: 5px; background: white; color: #284762; font-weight: 650; }
.primary { color: white; border-color: var(--blue); background: var(--blue); }
.panel .primary { margin-top: 12px; }
fieldset { margin: 0; min-width: 0; padding: 0; border: 0; }
fieldset.panel { border: 1px solid var(--line); }
legend { font-weight: 700; padding: 0 5px; }
legend small { display: inline; font-weight: 400; }
.tool-row,.user-row,.job-row,.checks li { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); }
.tool-row>div,.job-row>div { flex: 1; min-width: 0; }
.rank { width: 73px; }
.tool-row label { margin: 0; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filters label { margin: 0; min-width: 140px; }
.panel-head,.row { justify-content: space-between; }
.badge,.pill { display: inline-block; white-space: nowrap; font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 12px; background: #eaf0f7; color: #365776; }
.pill.ok { color: #155c41; background: #e8f4ec; }
.pill.wait { color: #70510f; background: #fff1cf; }
.pill.bad { color: #872724; background: #fce9e7; }
.notice { border-left: 4px solid #2b8c65; background: #eaf6ef; color: #214c38; padding: 12px 14px; margin-bottom: 16px; border-radius: 4px; }
.notice.error { background: #fff1e8; color: #83320b; border-color: #d07a38; }
code,pre { font-family: "IBM Plex Mono",Consolas,monospace; overflow-wrap: anywhere; }
.command { background: #162639; color: #f3f7fc; border-radius: 6px; padding: 13px 15px; margin: 12px 0; }
.command pre { white-space: pre-wrap; font-size: 13px; margin: 0; }
.command button { font-size: 12px; margin-top: 10px; padding: 4px 9px; }
.checks { padding: 0; list-style: none; }
.checks li { align-items: flex-start; }
.system details { margin: 12px 0; }
.system .intro,.system .row { margin-bottom: 14px; }
.login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 18px; }
.login-box { width: min(420px,100%); padding: 30px; }
.login-box h1 { margin: 10px 0 18px; font-size: 24px; }
.login-links,.pager { margin-top: 18px; font-size: 13px; }
@media (max-width: 780px) {
    .console { display: block; }
    .sidebar { padding: 10px 16px; }
    .side-top { display: flex; align-items: center; justify-content: space-between; padding: 0; margin: 0; border: 0; }
    .nav-toggle { display: block; }
    .sidebar:has(.nav-toggle:not([hidden])):not(.expanded) nav { display: none; }
    .sidebar nav { grid-template-columns: 1fr 1fr; margin-top: 10px; }
    .toolbar { flex-wrap: wrap; padding: 10px 16px; min-height: 48px; }
    .desk { padding: 22px 14px; }
    .two-cols { grid-template-columns: 1fr; gap: 0; }
    .tool-row { flex-wrap: wrap; gap: 10px; }
    .tool-row>div { flex-basis: 100%; }
    .rank { width: 84px; }
    .job-row { align-items: flex-start; flex-wrap: wrap; }
}
