*{box-sizing:border-box}
:root{font-family:Inter,system-ui,sans-serif;color:#e8edf4;background:#10141c;color-scheme:dark}
body{margin:0}a{color:#a5d4ff}
.shell{display:grid;grid-template-columns:minmax(190px,260px) minmax(0,1fr);min-height:100vh}
aside{padding:22px 16px;background:#161d29;border-right:1px solid #2b3748}
aside h2{margin:0 0 14px;font-size:1.1rem}nav{display:grid;gap:4px}
nav a,.archive{display:block;padding:8px 10px;border-radius:6px;text-decoration:none;overflow-wrap:anywhere}
nav a:hover,nav a[aria-current]{background:#263d55;color:#fff}.archive{margin-top:16px}
main{padding:clamp(16px,4vw,48px);max-width:1000px}header{display:flex;justify-content:space-between;gap:16px;align-items:center}
h1{font-size:clamp(1.45rem,3vw,2rem);margin-top:0}section{border-top:1px solid #2b3748;padding:20px 0;margin-top:12px}
label{display:grid;gap:6px;margin:0 0 10px}input,textarea,button{border:1px solid #42526a;border-radius:6px;padding:9px 12px;font:inherit}
input,textarea{width:min(100%,36rem);background:#1d2837;color:#fff}textarea{resize:vertical}
button{cursor:pointer;background:#263d55;color:#fff}button:hover{background:#334f6c}.links{display:flex;flex-wrap:wrap;gap:15px;margin-bottom:16px}
.login{max-width:420px;margin:10vh auto}p[role=alert]{color:#ffb2ab}
.signin {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: none;
    padding: 24px 16px;
    background:
        radial-gradient(ellipse at 50% 12%, #213563 0%, transparent 58%),
        #0b101c;
}
.signin-card {
    width: min(100%, 440px);
    padding: clamp(24px, 7vw, 44px);
    border: 1px solid #334462;
    border-radius: 24px;
    background: linear-gradient(155deg, #1a253b, #121b2d 68%);
    box-shadow: 0 24px 72px #05081099;
}
.signin-mark {
    display: grid;
    grid-template-columns: repeat(2, 8px);
    grid-auto-rows: 8px;
    place-content: center;
    gap: 4px;
    width: 46px;
    height: 46px;
    margin-bottom: 22px;
    border: 1px solid #526fa7;
    border-radius: 13px;
    background: #263b63;
}
.signin-mark span { border-radius: 2px; background: #afc9ff; }
.signin-mark span:last-child { background: #86e5d2; }
.signin h1 {
    margin: 0;
    color: #f4f7ff;
    font-size: clamp(1.5rem, 5vw, 1.9rem);
    line-height: 1.2;
    letter-spacing: -.035em;
}
.signin-description { margin: 10px 0 28px; color: #bbc8e0; line-height: 1.55; }
.signin label { gap: 8px; margin-bottom: 16px; color: #e1e9fa; font-size: .9rem; font-weight: 600; }
.signin input[type=password] {
    width: 100%;
    min-height: 50px;
    border-color: #465878;
    border-radius: 10px;
    background: #0e1728;
    font-size: 1rem;
}
.signin button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 50px;
    padding-inline: 16px;
    border-color: transparent;
    border-radius: 10px;
    background: #b9ceff;
    color: #112041;
    font-weight: 700;
}
.signin button:hover { background: #d0ddff; }
.signin :is(input, button):focus-visible { outline: 2px solid #a9c7ff; outline-offset: 3px; }
.signin-error {
    margin: 0 0 18px;
    padding: 10px 12px;
    border: 1px solid #82495a;
    border-radius: 10px;
    background: #3b2332;
}
@media(max-width:600px){.shell{grid-template-columns:1fr}aside{border-right:0;border-bottom:1px solid #2b3748}nav{max-height:33vh;overflow:auto}header form{flex:none}}

.dashboard {
    --surface: #151e30;
    --edge: #2b3a53;
    --muted: #a9b8d1;
    --accent: #b9ceff;
    grid-template-columns: clamp(220px, 23vw, 280px) minmax(0, 1fr);
    background: radial-gradient(ellipse at 95% 0, #1e2c48, transparent 56%), #0e1523;
}
.dashboard-sidebar {
    padding: 28px 18px;
    border-color: var(--edge);
    background: #111a2a;
}
.dashboard-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; margin-bottom: 38px; }
.brand-icon {
    display: grid;
    flex: 0 0 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    color: #111b31;
    background: var(--accent);
    font-size: 1.15rem;
}
.dashboard-sidebar h2 { color: var(--muted); font-size: .86rem; margin: 0 0 10px; }
.site-tabs { display: flex; gap: 4px; padding: 4px; background: #0d1422; border: 1px solid var(--edge); border-radius: 10px; }
.site-tabs a {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 6px;
    padding: 7px 3px;
    color: var(--muted);
    font-size: .85rem;
    text-decoration: none;
}
.site-tabs a[aria-current], .site-tabs a:hover { background: #243550; color: #ecf2ff; }
.site-tabs span { font-size: .76rem; font-variant-numeric: tabular-nums; }
.site-list { margin-top: 12px; }
.site-list summary { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.site-list summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg); flex-shrink: 0; }
.site-list details[open] summary::after { transform: rotate(225deg); }
.site-list summary:hover, .site-list details[open] summary { background: #263d55; }
.site-dot { width: 7px; height: 7px; border-radius: 50%; background: #8394b2; }
.site-list details[open] .site-dot { background: var(--accent); }
.site-submenu { display: grid; gap: 4px; margin: 6px 0 6px 20px; }
.site-submenu .site-status { justify-self: start; }
.dashboard-main { width: 100%; max-width: 1240px; padding: clamp(20px, 4vw, 52px); }
.dashboard-main.panel-open { max-width: none; padding: 0; }
.dashboard-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.dashboard-card {
    min-width: 0;
    margin: 0;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid var(--edge);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: 0 12px 30px #060d192e;
    overflow-wrap: anywhere;
}
.dashboard-card h2 { margin: 0; font-size: 1.18rem; letter-spacing: -.015em; }
.dashboard-card p { color: var(--muted); margin: 10px 0 18px; line-height: 1.55; }
.empty-sites {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 124px;
    background: linear-gradient(110deg, #1d2b46, var(--surface) 78%);
}
.empty-sites p { margin-bottom: 0; }
.empty-icon {
    display: grid;
    flex: 0 0 48px;
    height: 48px;
    align-content: center;
    justify-items: center;
    gap: 4px;
    border: 1px solid #4a6089;
    border-radius: 13px;
    background: #273b61;
}
.empty-icon span { width: 20px; height: 3px; border-radius: 2px; background: var(--accent); }
.empty-icon span:last-child { width: 12px; }
.site-status { padding: 5px 10px; border-radius: 20px; background: #493b27; color: #ffe0ab; font-size: .8rem; }
.site-status.is-connected { background: #1b3e3a; color: #a0e7d5; }
.enrollment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.dashboard .panel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid #405371;
    border-radius: 9px;
    background: #202e46;
    color: #edf3ff;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}
.dashboard .panel-button:hover { background: #2b3d5b; }
.dashboard .primary-button { color: #111e39; background: var(--accent); border-color: transparent; }
.dashboard .primary-button:hover { background: #d5e1ff; }
.dashboard .danger-button { color: #ffc2c0; }
.dashboard :is(a, button, input, textarea, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.enrollment-card label { color: #dce6f8; font-size: .9rem; }
.enrollment-card h2 { margin-bottom: 16px; }
.enrollment-card .grant-settings { margin: 16px 0 0; }
.enrollment-card :is(input, textarea) { width: 100%; border-radius: 9px; background: #0e1727; font-size: 1rem; }
.enrollment-card input { min-height: 44px; }
.enrollment-card textarea { white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .86rem; }
.dashboard .dashboard-error { color: #ffb2ab; }
.dashboard-notice { color: #a0e7d5; }
.dashboard .settings-tab { width: 100%; justify-content: flex-start; margin-bottom: 20px; }
.dashboard .settings-tab[aria-current] { background: #263d55; }
.settings-sites h2 { margin-bottom: 12px; }
.settings-site { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--edge); }
.settings-site:last-child { padding-bottom: 0; }
.embedded-workspace { margin: 0; padding: 0; border: 0; }
.embedded-workspace iframe { display: block; width: 100%; height: 100vh; height: 100dvh; border: 0; background: #fff; }
@media (max-width: 980px) {
    .enrollment-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .dashboard { grid-template-columns: minmax(0, 1fr); }
    .dashboard-sidebar { padding: 16px 20px; border-right: 0; border-bottom: 1px solid var(--edge); }
    .dashboard-brand { margin-bottom: 14px; }
    .site-list { max-height: 25vh; overflow: auto; }
    .embedded-workspace iframe { height: max(420px, 75vh); }
}

