:root {
    --ink: #202124;
    --muted: #687076;
    --line: #d9e0e2;
    --bg: #f6f7f4;
    --panel: #ffffff;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --accent: #ca8a04;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: Arial, Helvetica, sans-serif;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 240px;
    background: #12312e;
    color: #fff;
    padding: 22px;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 32px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: #f5c451;
    color: #12312e;
    font-weight: 700;
}

.brand small {
    display: block;
    margin-top: 3px;
    color: #b8c9c6;
}

nav {
    display: grid;
    gap: 8px;
}

nav a {
    color: #d8e5e2;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 6px;
}

nav a.active,
nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.content {
    margin-left: 240px;
    padding: 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

h1 {
    margin: 0;
    font-size: 28px;
}

h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 7px;
    background: #dff4ea;
    color: #14532d;
}

.alert.error {
    background: #fee4e2;
    color: var(--danger);
}

.stats,
.grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats article,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.stats span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.stats strong {
    display: block;
    margin-top: 8px;
    font-size: 26px;
}

.two {
    grid-template-columns: 1fr 1fr;
}

.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-list {
    grid-template-columns: 360px 1fr;
}

.wide {
    min-width: 0;
}

label {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

textarea {
    min-height: 82px;
    resize: vertical;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

button {
    width: 100%;
    border: 0;
    border-radius: 6px;
    padding: 12px 14px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

button:hover {
    background: var(--brand-dark);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.list {
    display: grid;
    gap: 12px;
}

.list div,
.compact p,
.panel p {
    margin: 0 0 12px;
}

.list span,
.panel p span,
.metric {
    color: var(--muted);
}

.warn td {
    background: #fff7ed;
}

.empty {
    color: var(--muted);
}

@media (max-width: 960px) {
    .sidebar {
        position: static;
        width: auto;
    }

    nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content {
        margin-left: 0;
        padding: 18px;
    }

    .stats,
    .two,
    .three,
    .form-list,
    .row {
        grid-template-columns: 1fr;
    }
}
