:root {
    color-scheme: light;
    --navy: #0b1f4d;
    --blue: #2563ff;
    --cyan: #22d3ee;
    --ink: #142346;
    --muted: #496580;
    --border: #d7e5f2;
    --sky: #edf6ff;
    --paper: #fff;
    font-family: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--sky); }
.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(ellipse at 12% 0%, #d5eaff 0%, transparent 63%), var(--sky);
}
.auth main { width: min(100%, 420px); }
.sign-in {
    border: 1px solid var(--border);
    border-top: 5px solid var(--blue);
    border-radius: 8px;
    padding: 32px;
    background: var(--paper);
    box-shadow: 0 20px 75px #244b8014;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--blue); font-weight: 750; font-size: 20px; }
.brand-mark { display: block; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.brand-mark img { display: block; width: 44.16px; height: 44.83px; max-width: none; transform: translate(-2.08px, -2.72px); }
h1 { margin: 12px 0 25px; font-size: 28px; letter-spacing: 0; line-height: 1.25; }
.brand small { color: inherit; opacity: .75; font-size: 14px; font-weight: 550; }
.auth form { display: grid; gap: 10px; }
label { font-size: 14px; font-weight: 650; }
input, button { font: inherit; }
input[type=password] {
    min-width: 0;
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    color: var(--ink);
    border: 1px solid #a6c0da;
    background: #f8fbff;
    border-radius: 7px;
}
:focus-visible { outline: 3px solid #5294f5; outline-offset: 3px; }
button {
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid var(--blue);
    border-radius: 7px;
    color: white;
    background: var(--blue);
    font-weight: 680;
    cursor: pointer;
}
.auth button { margin-top: 4px; }
button:hover { background: #144b9f; }
.error { margin: 0; color: #a23030; font-size: 14px; }
.bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px clamp(20px, 5vw, 55px);
    color: white;
    background: #fff;
    border-bottom: 3px solid var(--cyan);
}
.bar .brand { color: var(--navy); }
.bar .secondary { color: var(--blue); }
.bar .secondary:hover { background: #eef5ff; }
.bar a, .admin-nav a, .tool { text-decoration: none; }
.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px clamp(20px, 5vw, 55px);
    background: var(--paper);
    border-bottom: 1px solid var(--border);
}
.admin-nav a { padding: 8px 12px; border-radius: 6px; color: var(--muted); font-size: 14px; font-weight: 650; }
.admin-nav a:hover, .admin-nav a[aria-current] { background: var(--sky); color: #1748ae; }
.admin-content { width: min(920px, calc(100% - 40px)); margin: clamp(28px, 5vw, 56px) auto; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tool {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px 16px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--paper);
    color: var(--navy);
    transition: border-color .16s ease, box-shadow .16s ease;
}
.tool:hover { border-color: #86b4fc; box-shadow: 0 8px 28px #244b8014; }
.tool h2, .release h2 { margin: 0; font-size: 20px; line-height: 1.4; }
.tool p { grid-row: 2; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.tool span { grid-column: 2; grid-row: 1 / span 2; color: var(--blue); font-size: 22px; }
.release-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.release { border: 1px solid var(--border); border-left: 3px solid #8ab8fa; border-radius: 8px; padding: 22px 24px; background: var(--paper); }
.release-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 9px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.release-meta span { color: #1748ae; font-weight: 700; }
.release ul { margin: 10px 0 0; padding-left: 1.3em; color: var(--muted); line-height: 1.7; }
.release li + li { margin-top: 4px; }
.usage-overview { width: min(1520px, calc(100% - 40px)); margin: 24px auto 0; color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.usage-overview strong { color: var(--ink); margin-left: 8px; }
.secondary { border-color: #8face0; background: transparent; }
.secondary:hover { background: #244678; }
.directory { width: min(1520px, calc(100% - 40px)); margin: 32px auto; }
.section-title { display: flex; gap: 14px; align-items: baseline; }
.section-title h1 { margin: 0 0 22px; }
.section-title p { color: var(--muted); font-size: 14px; margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px; text-align: left; vertical-align: top; white-space: nowrap; font-variant-numeric: tabular-nums; }
th { color: var(--muted); background: #f2f8ff; font-size: 14px; }
td { border-top: 1px solid var(--border); }
.empty { margin: 24px 20px; color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.7; margin-top: 7px; }
.metrics { width: min(1520px, calc(100% - 40px)); margin: 22px auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metrics div { display: grid; gap: 10px; min-width: 0; background: white; border: 1px solid var(--border); border-top: 3px solid var(--blue); border-radius: 8px; padding: 22px; }
.metrics span { font-size: 13px; color: var(--muted); }
.metrics strong { font-size: 24px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.member-form { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 300px; }
.member-form input, .member-form select { padding: 8px; border: 1px solid var(--border); border-radius: 7px; font: inherit; color: var(--ink); background: white; }
.member-form .secondary { color: var(--blue); min-height: 36px; padding: 6px 12px; }
.member-form .secondary:hover { background: #edf4ff; }
@media (max-width: 720px) { .metrics { grid-template-columns: repeat(2, 1fr); } .section-title { align-items: flex-start; flex-direction: column; gap: 0; } }
@media (max-width: 480px) { .metrics div { padding: 14px; min-height: 145px; } .metrics strong { font-size: 20px; } }
@media (max-width: 560px) { .tool-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .tool { transition: none; } }
