:root {
    --ink: #1d2630;
    --muted: #667281;
    --line: #dbe2ea;
    --bg: #f6f8fb;
    --panel: #ffffff;
    --accent: #226b5f;
    --accent-2: #b84a3d;
    --soft: #e8f3ef;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
.sidebar {
    background: #17252f;
    color: white;
    padding: 24px 18px;
}
.brand strong { display: block; font-size: 22px; margin-bottom: 6px; }
.brand span { color: #b8c8d4; font-size: 13px; }
nav { display: grid; gap: 8px; margin-top: 32px; }
nav a {
    color: #edf6f3;
    padding: 10px 12px;
    border-radius: 6px;
}
nav a:hover { background: rgba(255,255,255,.1); }
.main { min-width: 0; }
.topbar {
    min-height: 76px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    gap: 18px;
}
h1 { font-size: 24px; margin: 0; }
h2 { font-size: 18px; margin: 0 0 14px; }
.content { padding: 24px 28px 40px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel, .stat {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}
.stat strong { display: block; font-size: 30px; }
.stat span { color: var(--muted); font-size: 13px; }
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.btn, button {
    border: 0;
    background: var(--accent);
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}
.btn.secondary { background: #526071; }
.btn.danger { background: var(--accent-2); }
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}
th, td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
th { background: #eef3f7; font-size: 13px; color: #3b4652; }
tr:last-child td { border-bottom: 0; }
form .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
label { display: grid; gap: 6px; font-weight: 700; font-size: 13px; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
    background: white;
}
textarea { min-height: 98px; resize: vertical; }
.full { grid-column: 1 / -1; }
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}
.alert {
    background: #fff6df;
    border: 1px solid #ecd58c;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
}
fieldset.finding {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 18px 0 0;
    padding: 16px;
}
fieldset.finding legend {
    color: var(--accent);
    font-weight: 700;
    padding: 0 8px;
}
.login {
    grid-template-columns: 1fr;
    place-items: center;
}
.login-card { width: min(420px, calc(100vw - 32px)); }
@media (max-width: 850px) {
    body { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar { align-items: flex-start; flex-direction: column; }
    .grid.cols-2, .grid.cols-4, form .row { grid-template-columns: 1fr; }
}
