:root {
    color-scheme: light;
    --ink: #151d32;
    --muted: #53617a;
    --line: #dce3ef;
    --page: #f3f6fb;
    --brand: #264dc3;
    --brand-hover: #1b3897;
    --nav: #101a33;
    --radius: 16px;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); }
a { color: var(--brand); }
a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
    outline: 3px solid #5686f1;
    outline-offset: 3px;
}
h1, h2, h3, p { margin: 0 0 .65rem; }
h1 { font-size: clamp(1.65rem, 4vw, 2.15rem); letter-spacing: -.035em; line-height: 1.15; }
h2 { font-size: 1.17rem; letter-spacing: -.015em; }
h3 { margin-top: .9rem; font-size: .95rem; }
small, .muted { color: var(--muted); }
small { display: block; }
button, input, textarea, select { font: inherit; }
button {
    background: var(--brand); color: white; border: 1px solid transparent; border-radius: 9px;
    padding: .64rem 1rem; min-height: 44px; cursor: pointer; font-weight: 680;
}
button:hover { background: var(--brand-hover); }
button.secondary { background: #edf2fc; color: #173572; border-color: #d8e1f5; }
button.secondary:hover { background: #dce7fb; }
button.danger { background: #9c2337; }
button.danger:hover { background: #781827; }
label { display: grid; gap: .28rem; color: #303d55; font-size: .89rem; font-weight: 680; min-width: 0; }
input, textarea, select {
    min-height: 44px; min-width: 0; width: 100%; border: 1px solid #b9c5da; border-radius: 8px;
    padding: .62rem .72rem; background: white; color: var(--ink); font-size: 1rem; font-weight: 450;
}
input[readonly] { background: #f4f7fc; }
textarea { resize: vertical; }
form { display: grid; gap: .85rem; margin: .75rem 0 0; }
form > button { justify-self: start; }
.skip { position: absolute; top: 0; left: 1rem; transform: translateY(-150%); z-index: 10; background: white; padding: .6rem; }
.skip:focus { transform: translateY(0); }
.shell { display: grid; grid-template-columns: 228px minmax(0,1fr); min-height: 100vh; }
.side {
    background: var(--nav); color: white; position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; padding: 1.15rem; gap: 1.45rem; overflow: auto;
}
.brand { display: flex; align-items: center; gap: .65rem; color: inherit; text-decoration: none; font-size: 1.08rem; font-weight: 780; letter-spacing: -.025em; }
.brand i {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    font-style: normal; background: #4268df; color: white; flex: 0 0 auto;
}
.brand span { display: block; font-size: .76rem; font-weight: 550; letter-spacing: 0; opacity: .78; }
.side nav { display: grid; gap: .25rem; }
.side nav a {
    color: #d8e2f8; text-decoration: none; padding: .63rem .75rem; border-radius: 8px;
    font-size: .92rem; white-space: nowrap; min-height: 44px;
}
.side nav a:hover { background: #202e50; }
.side nav [aria-current] { background: #253c72; color: white; font-weight: 700; }
.account { margin-top: auto; border-top: 1px solid #33415f; padding: .8rem .2rem 0; overflow-wrap: anywhere; }
.account small { color: #b9caea; }
.main { width: 100%; max-width: 1380px; margin: 0 auto; padding: clamp(1rem,3.5vw,2.6rem); min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: 1.3rem; }
.top .muted { font-size: .84rem; }
.top h1 { margin: .2rem 0 0; }
.top-actions, .button-row { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.top-actions form { margin: 0; }
.top-actions > a { display: inline-flex; align-items: center; min-height: 44px; padding: .2rem .25rem; font-size: .87rem; font-weight: 650; }
.hero {
    background: linear-gradient(112deg, #13274e, #294eb0); color: white;
    border-radius: var(--radius); padding: clamp(1.25rem,4vw,2.2rem); margin-bottom: 1rem; overflow-wrap: anywhere;
}
.hero span { color: #d1ddff; font-size: .84rem; }
.hero h2 { font-size: clamp(1.75rem,4vw,3rem); margin: .25rem 0; line-height: 1.12; }
.hero p { color: #e2eaff; margin-bottom: 0; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,175px),1fr)); gap: .8rem; margin-bottom: 1rem; }
.metric, .panel {
    min-width: 0; border: 1px solid var(--line); background: white; border-radius: var(--radius);
    box-shadow: 0 2px 5px #233d7410; overflow-wrap: anywhere;
}
.metric { position: relative; padding: .88rem; color: var(--ink); text-decoration: none; display: grid; gap: .25rem; }
.metric:hover { border-color: #8ca3dc; }
.metric span { color: var(--muted); font-size: .84rem; padding-right: 1rem; }
.metric strong { font-size: 1.38rem; line-height: 1.25; }
.metric .metric-arrow { position: absolute; right: .7rem; top: .65rem; padding: 0; color: var(--brand); }
.panel { margin: 0 0 .9rem; padding: 1rem; }
.split { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: .85rem; align-items: start; }
.list-item { border-top: 1px solid var(--line); padding: .7rem 0; }
.list-item:first-of-type { margin-top: .5rem; }
.list-item:last-child { padding-bottom: 0; }
.list-item p { margin: .2rem 0; }
.row-link {
    display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .6rem 0;
    color: inherit; border-top: 1px solid var(--line); text-decoration: none;
}
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }
.text-block { white-space: pre-wrap; margin: .6rem 0; }
.notice { background: #e3f5ee; border: 1px solid #a5d5c0; color: #123f32; border-radius: 10px; padding: .7rem .8rem; margin-bottom: 1rem; }
.notice.error { background: #fff0ee; border-color: #efbbb6; color: #6e1b24; }
.badge {
    display: inline-block; border-radius: 999px; padding: .15rem .55rem; font-size: .76rem;
    font-weight: 720; color: #294161; background: #e9eff8; text-align: center;
}
.badge.good { color: #135640; background: #e0f4e9; }
.badge.warn { color: #704100; background: #fff0d6; }
.badge.bad { color: #812639; background: #fce6ed; }
details.panel { padding: 0; }
details.panel > summary {
    list-style: none; display: flex; align-items: center; gap: .6rem; min-height: 49px; padding: .7rem 1rem;
    cursor: pointer; font-weight: 700; border-radius: inherit;
}
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: "▾"; color: var(--brand); margin-left: auto; }
details[open].panel > summary::after { content: "▴"; }
.member > summary > div { flex: 1; min-width: 0; }
.member > summary > div small { font-weight: 500; }
.details-body { padding: .75rem 1rem 1rem; border-top: 1px solid var(--line); }
.details-body > details.panel, .panel > details.panel { background: #f8faff; margin: .65rem 0 0; box-shadow: none; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.filter { grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: end; margin: 0 0 1rem; }
.filter:has(> label:nth-of-type(1):last-of-type) { grid-template-columns: minmax(0,1fr) auto; max-width: 480px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,145px),1fr)); gap: .65rem; margin-bottom: 0; }
.stats div { background: #f2f6fd; padding: .72rem; border-radius: 9px; }
.stats dt { color: var(--muted); font-size: .83rem; }
.stats dd { margin: 0; font-weight: 750; }
.empty { padding: .5rem 0; }
.gate { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(ellipse at top, #dae7ff 0, #f4f7fd 66%); }
.gate .panel { width: min(100%, 435px); padding: clamp(1.2rem,5vw,2rem); }
.gate .brand { margin-bottom: 1.35rem; }
.gate form > button { width: 100%; }
.gate p { color: var(--muted); }
.gate .notice.error { color: #6e1b24; }
@media (max-width: 820px) {
    .shell { display: block; }
    .side { height: auto; gap: .4rem; padding: .65rem .75rem .35rem; z-index: 2; overflow: visible; }
    .side nav { display: flex; overflow-x: auto; padding: .15rem .15rem .3rem; scrollbar-width: thin; }
    .side nav a { padding: .58rem .68rem; }
    .account { display: none; }
    .split { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 490px) {
    .main { padding: .75rem; }
    .top { flex-wrap: wrap; }
    .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .form-grid, .filter { grid-template-columns: 1fr; }
    .panel { padding: .8rem; }
    .details-body { padding: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
}
