:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --panel: #ffffff;
    --text: #17202a;
    --muted: #697586;
    --line: #d9e1ea;
    --accent: #146c94;
    --accent-strong: #0f4c75;
    --good: #1f8a5b;
    --warn: #b26a00;
    --bad: #bb3e3e;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
}
a { color: var(--accent); text-decoration: none; }
input, select, textarea, button {
    font: inherit;
}
.shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 100vh;
}
.side {
    background: #17202a;
    color: #fff;
    padding: 20px;
}
.brand {
    font-weight: 700;
    font-size: 19px;
    margin-bottom: 28px;
}
.nav {
    display: grid;
    gap: 8px;
}
.nav a, .nav button {
    color: #dbe4ee;
    background: transparent;
    border: 0;
    text-align: left;
    padding: 10px 8px;
    border-radius: 6px;
    cursor: pointer;
}
.nav a:hover, .nav button:hover { background: rgba(255,255,255,.1); }
.main { padding: 28px; }
.topline {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 22px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}
.panel h2, .panel h3 { margin: 0 0 14px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
input, select, textarea {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    background: #fff;
    color: var(--text);
    min-width: 0;
}
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
}
button.secondary, .button.secondary { background: #5d6d7e; }
button.danger { background: var(--bad); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th, .table td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}
.badge {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e7eef5;
    color: #34495e;
    font-size: 12px;
}
.ok { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.status {
    padding: 10px 12px;
    background: #e7f5ee;
    border: 1px solid #b9dfcb;
    border-radius: 6px;
    margin-bottom: 16px;
}
.errors {
    padding: 10px 12px;
    background: #fdecec;
    border: 1px solid #efb4b4;
    border-radius: 6px;
    margin-bottom: 16px;
}
.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}
.login .panel { width: min(420px, 100%); }
.terminal {
    min-height: 100vh;
    padding: 24px;
    background: #101820;
    color: #eef5fb;
}
.terminal input {
    font-size: 28px;
    padding: 18px;
}
.terminal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.person {
    background: #fff;
    color: var(--text);
    border-radius: 8px;
    padding: 18px;
    border-left: 8px solid var(--bad);
}
.person.in { border-left-color: var(--good); }
@media (max-width: 780px) {
    .shell { grid-template-columns: 1fr; }
    .side { position: static; }
    .topline { align-items: flex-start; flex-direction: column; }
}
