:root {
    color-scheme: light;
    --bg: #f4f7f8;
    --panel: #ffffff;
    --ink: #172026;
    --muted: #65727a;
    --line: #dce5e8;
    --accent: #0f8b8d;
    --accent-dark: #0b6d70;
    --danger: #b23b3b;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px 1fr;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
aside {
    background: #172026;
    color: white;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.brand {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 22px;
}
aside a {
    display: block;
    color: #d7e8ea;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
}
aside a.active, aside a:hover { background: rgba(255,255,255,.12); color: white; }
main { padding: 28px; max-width: 1280px; width: 100%; }
h1 { margin: 0 0 20px; font-size: 30px; }
h2 { margin: 0 0 10px; font-size: 19px; }
section, .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 18px;
}
.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(6, minmax(120px, 1fr)); }
.stats article {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}
.stats strong { display: block; font-size: 28px; }
.stats span { color: var(--muted); text-transform: uppercase; font-size: 12px; }
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
th, td {
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
label { display: block; color: var(--muted); font-weight: 650; margin-bottom: 12px; }
input, textarea, select {
    display: block;
    width: 100%;
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 11px;
    font: inherit;
    color: var(--ink);
    background: white;
}
textarea { min-height: 90px; resize: vertical; }
button {
    border: 0;
    border-radius: 8px;
    padding: 10px 15px;
    background: var(--accent);
    color: white;
    font-weight: 750;
    cursor: pointer;
}
button:hover { background: var(--accent-dark); }
button.ghost { background: transparent; color: var(--danger); padding: 4px 0; }
.toggles {
    display: grid;
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    gap: 8px 16px;
    margin-bottom: 14px;
}
.toggles label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    margin: 0;
}
.toggles input { width: auto; margin: 0; }
.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.compact { max-width: 760px; }
.notice, .alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    background: #e4f4ef;
    border: 1px solid #b9ded2;
}
.alert {
    background: #fff0f0;
    border-color: #f0c2c2;
    color: var(--danger);
}
.login-page {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    background: linear-gradient(120deg, #172026, #0f8b8d);
}
.login {
    width: min(420px, calc(100vw - 32px));
    background: white;
    border-radius: 8px;
    padding: 26px;
}
.login h1 { margin-bottom: 4px; }
.login p { margin-top: 0; color: var(--muted); }
code {
    background: #edf2f4;
    padding: 2px 5px;
    border-radius: 5px;
}
@media (max-width: 880px) {
    body { grid-template-columns: 1fr; }
    aside { position: static; height: auto; }
    main { padding: 18px; }
    .stats, .toggles { grid-template-columns: 1fr 1fr; }
    table { display: block; overflow-x: auto; }
}
@media (max-width: 560px) {
    .stats, .toggles, .row { grid-template-columns: 1fr; }
}

