:root {
    color-scheme: light;
    --ink: #14251f;
    --muted: #5f716a;
    --brand: #176b4a;
    --brand-dark: #0c5037;
    --accent: #e4a83d;
    --paper: #fffdf7;
    --line: #dce5dd;
    --wash: #f0f6f0;
    --danger: #a7332b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(180deg, #eaf3eb 0, #f8f8f2 260px, #f8f8f2 100%);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}

header, main, footer {
    width: min(100% - 32px, 1000px);
    margin-inline: auto;
}

header { padding: 32px 0 20px; }

.brand { color: var(--brand); font-weight: 800; letter-spacing: .02em; }
.eyebrow { margin: 0 0 8px; color: var(--brand); font-size: .82rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0 0 8px; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.08; letter-spacing: -.04em; }
h2 { margin: 0 0 14px; font-size: 1.35rem; }
h3 { margin: 0 0 7px; font-size: 1.03rem; }
p { color: var(--muted); }

main { padding-bottom: 40px; }
.hero, .panel, .card, .stat {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 0 10px 28px rgb(31 69 49 / 5%);
}
.hero { padding: clamp(24px, 5vw, 48px); }
.panel { padding: 24px; margin: 18px 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; margin: 20px 0; }
.card { display: block; min-height: 130px; padding: 20px; color: inherit; text-decoration: none; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: #9abda5; }
.card p { margin: 0; font-size: .95rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { padding: 18px; }
.stat strong { display: block; color: var(--brand); font-size: 1.8rem; }
.stat span { color: var(--muted); font-size: .9rem; }

nav { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
a { color: var(--brand-dark); }
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: var(--brand);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
button:hover, .button:hover { background: var(--brand-dark); }
button.secondary, .button.secondary { color: var(--ink); background: #e7eee8; }
button.secondary:hover, .button.secondary:hover { background: #d9e6dc; }
button:disabled { cursor: wait; opacity: .62; }

form { display: grid; gap: 15px; max-width: 620px; }
label { display: block; margin-bottom: 5px; color: var(--ink); font-weight: 700; }
input:not([type="checkbox"]):not([type="radio"]), textarea, select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #bdccc1;
    border-radius: 9px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgb(23 107 74 / 15%); border-color: var(--brand); }
.choice { display: flex; align-items: center; gap: 8px; padding: 10px 0; }
.choice label { margin: 0; font-weight: 500; }
.notice { min-height: 1.5em; margin: 12px 0 0; font-weight: 700; }
.notice.success { color: var(--brand-dark); }
.notice.error { color: var(--danger); }
.list { display: grid; gap: 12px; }
.record { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.record p { margin: 6px 0; }
.record small { color: var(--muted); }
.record .actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.record .actions select { max-width: 220px; }
.empty { padding: 20px; border: 1px dashed #bdccc1; border-radius: 12px; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
footer { padding: 10px 0 28px; color: var(--muted); font-size: .88rem; }

@media (max-width: 600px) {
    header { padding-top: 22px; }
    .panel { padding: 18px; }
    .record .actions { align-items: stretch; flex-direction: column; }
    .record .actions select { max-width: none; }
}
