:root {
    color-scheme: light;
    --bg: #f7f7f4;
    --ink: #1f2933;
    --muted: #657487;
    --panel: #ffffff;
    --line: #dde3ea;
    --green: #1e7c55;
    --red: #b42318;
    --gold: #b77812;
}

* {
    box-sizing: border-box;
}

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

a {
    color: var(--green);
}

.topbar {
    align-items: center;
    background: #0f3d2e;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 14px 22px;
}

.topbar span {
    color: #c8e0d5;
    margin-left: 10px;
}

.topbar a {
    color: #fff;
    text-decoration: none;
}

.nav {
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 18px;
}

.nav a {
    border-radius: 6px;
    color: var(--ink);
    padding: 9px 12px;
    text-decoration: none;
    white-space: nowrap;
}

.nav a:hover {
    background: #eef4ef;
}

.container {
    margin: 0 auto;
    max-width: 1120px;
    padding: 24px;
}

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

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card, form, table {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.card {
    padding: 18px;
}

.metric {
    display: block;
    font-size: 34px;
    font-weight: 700;
    margin-top: 8px;
}

form {
    margin-bottom: 22px;
    padding: 18px;
}

label {
    display: block;
    font-weight: 700;
    margin: 0 0 6px;
}

input, textarea, select {
    border: 1px solid #cbd5df;
    border-radius: 6px;
    font: inherit;
    margin-bottom: 14px;
    padding: 10px 11px;
    width: 100%;
}

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

button, .button {
    background: var(--green);
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font: inherit;
    font-weight: 700;
    padding: 10px 14px;
    text-decoration: none;
}

.button.secondary {
    background: var(--gold);
}

.button.danger, button.danger {
    background: var(--red);
}

.flash {
    background: #eaf6ee;
    border: 1px solid #b8dec8;
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 12px 14px;
}

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

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

th {
    background: #f0f3f1;
}

.actions {
    display: flex;
    gap: 8px;
}

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

.login {
    max-width: 420px;
}

@media (max-width: 720px) {
    .container {
        padding: 18px;
    }

    table, thead, tbody, tr, th, td {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        border-bottom: 1px solid var(--line);
    }
}

