:root {
    color-scheme: light;
    --ink: #17272b;
    --muted: #647579;
    --line: #dce4e2;
    --paper: #ffffff;
    --soft: #f2f5f3;
    --accent: #08756d;
    --accent-dark: #075c56;
    --danger: #ad382d;
    --success: #26734d;
    --shadow: 0 18px 46px rgba(25, 49, 48, .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--soft); color: var(--ink); font: 15px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(8, 117, 109, .28); outline-offset: 2px; }
.wrap { width: min(1100px, 100%); margin: 0 auto; padding: 30px 22px 56px; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 28px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 720; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: var(--accent); color: white; font-size: 12px; letter-spacing: 0; }
nav { display: flex; gap: 14px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 32px; letter-spacing: 0; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
.lead { color: var(--muted); max-width: 680px; margin: 0 0 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; align-items: start; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; padding: 21px; box-shadow: 0 3px 12px rgba(27, 45, 43, .035); }
.panel + .panel { margin-top: 16px; }
form { display: grid; gap: 13px; }
label { display: grid; gap: 6px; font-weight: 620; }
input, textarea, select { width: 100%; min-width: 0; border: 1px solid #c7d3d0; border-radius: 5px; padding: 10px 12px; color: var(--ink); background: #fff; font: inherit; }
input::placeholder { color: #98a6a4; }
textarea { min-height: 145px; resize: vertical; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; border: 0; border-radius: 5px; background: var(--accent); color: #fff; padding: 10px 15px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: var(--accent-dark); color: #fff; }
.button.secondary, button.secondary { background: #e9efed; color: var(--ink); }
.button.secondary:hover, button.secondary:hover { background: #dfe8e5; }
button.danger { background: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.actions form { display: flex; }
.notice { border-left: 4px solid var(--accent); border-radius: 3px; background: #eaf5f3; padding: 10px 13px; margin: 0 0 16px; }
.notice.error { border-color: var(--danger); background: #fff0ee; color: var(--danger); }
.notice.success { border-color: var(--success); background: #edf7f0; color: var(--success); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.cards { display: grid; gap: 12px; }
.string-row { display: flex; gap: 8px; align-items: flex-start; margin: 7px 0; }
.string-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: #f1f5f3; padding: 6px 8px; border-radius: 4px; }
.copy { min-height: 32px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 4px 9px; font-size: 12px; }
.copy:hover { color: var(--ink); background: #eef3f1; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 9px 8px; vertical-align: top; }
th { color: var(--muted); font-size: 13px; font-weight: 650; }
.badge { display: inline-block; border-radius: 4px; padding: 2px 7px; font-size: 12px; background: #e9efed; }
.badge.active { color: var(--success); background: #e8f4eb; }
.badge.grace { color: #855c12; background: #fbf2de; }
.badge.purge { color: var(--danger); background: #fff0ee; }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.checks label { display: flex; min-width: 0; align-items: center; gap: 8px; font-weight: 500; }
.checks input { flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--accent); }
fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 5px; padding: 12px; }
legend { padding: 0 5px; font-weight: 620; }
pre.output { overflow: auto; border-radius: 5px; background: #17272b; color: #edf5f2; padding: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
footer { color: var(--muted); margin-top: 28px; font-size: 13px; }

.login-page {
    --ink: #252b32;
    --muted: #717780;
    --accent: #08756d;
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 100vh;
    min-height: 100svh;
    padding: 56px 24px 28px;
    background-color: #f7f8fa;
    background-image: linear-gradient(rgba(44, 54, 67, .022) 1px, transparent 1px), linear-gradient(90deg, rgba(44, 54, 67, .022) 1px, transparent 1px);
    background-size: 72px 72px;
    background-position: center center;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    letter-spacing: 0;
}
.login-shell { align-self: center; width: min(100%, 380px); margin: 0 auto; padding: 36px 0 72px; }
.login-panel { min-width: 0; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 16px; color: var(--muted); font-size: 13px; font-weight: 550; }
.login-emblem { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid #d7e8e3; border-radius: 8px; color: var(--accent); background: #edf5f1; box-shadow: inset 0 1px 0 #fff, 0 5px 12px rgba(32, 50, 46, .04); }
.login-icon { display: block; flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-emblem .login-icon { width: 28px; height: 28px; }
.login-panel h1 { margin-bottom: 36px; text-align: center; font-size: 30px; font-weight: 650; line-height: 1.4; }
.login-panel .lead { margin: -20px 0 28px; text-align: center; font-size: 14px; }
.login-panel .notice { padding: 12px 14px; border-left-width: 3px; border-radius: 6px; font-size: 14px; overflow-wrap: anywhere; }
.login-form { gap: 12px; }
.login-form > label { font-size: 13px; font-weight: 550; }
.login-form > label:not(:first-of-type) { margin-top: 8px; }
.login-form input:not([type="hidden"]) { height: 56px; border: 1px solid #d8dde3; border-radius: 6px; padding: 14px 16px; color: var(--ink); background: #fff; font-size: 16px; box-shadow: 0 2px 3px rgba(28, 39, 49, .025); transition: border-color .18s ease, box-shadow .18s ease; }
.login-form input::placeholder { color: #9298a1; }
.login-form input:not([type="hidden"]):hover { border-color: #a9b6b6; }
.login-form input:not([type="hidden"]):focus { border-color: #4c958a; outline: none; box-shadow: 0 0 0 3px rgba(8, 117, 109, .08), 0 2px 3px rgba(28, 39, 49, .025); }
.login-form input[aria-invalid="true"] { border-color: #c66b60; }
.login-form input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(173, 56, 45, .09); }
.login-input { position: relative; }
.login-input > .login-icon { position: absolute; top: 18px; left: 17px; color: #8b939b; pointer-events: none; transition: color .18s ease; }
.login-input:focus-within > .login-icon { color: var(--accent); }
.login-form .login-input > input { padding-left: 49px; }
.login-form > .login-submit { position: relative; width: 100%; min-height: 54px; margin-top: 2px; padding: 14px 48px; border: 1px solid #252b32; border-radius: 6px; color: #fff; background: #252b32; font-size: 15px; font-weight: 600; box-shadow: 0 4px 8px rgba(30, 38, 46, .09); transition: background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.login-submit > .login-icon { position: absolute; right: 18px; top: calc(50% - 10px); color: #b4ddd2; transition: transform .18s ease; }
.login-form > .login-submit:hover { border-color: #36424a; background: #36424a; box-shadow: 0 6px 12px rgba(30, 38, 46, .12); }
.login-submit:hover > .login-icon { transform: translateX(3px); }
.login-form > .login-submit:active { border-color: #181e24; background: #181e24; box-shadow: 0 2px 4px rgba(30, 38, 46, .08); }
.login-form > .login-submit:focus-visible { outline: 3px solid rgba(8, 117, 109, .35); outline-offset: 3px; }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.7; }
.back-link { justify-self: center; margin-top: 10px; color: var(--muted); font-size: 13px; text-underline-offset: 4px; }
.back-link:hover { color: var(--accent); }
.login-footer { margin: 0; text-align: center; color: #7d858e; font-size: 12px; }
.login-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
    .login-page *, .login-page *::before, .login-page *::after { transition: none !important; }
}

@media (max-width: 620px) {
    .wrap { padding: 20px 14px 40px; }
    .topbar { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
    .panel { padding: 16px; }
    h1 { font-size: 27px; }
    .login-page { padding: 28px 24px 22px; }
    .login-shell { padding: 28px 0 52px; }
    .login-panel h1 { font-size: 28px; }
    .table-wrap { margin-right: -4px; }
    th, td { padding: 8px 6px; }
}
