:root {
    --bg: #f7f1df;
    --ink: #1f2419;
    --muted: #60684f;
    --panel: #fffaf0;
    --moss: #557a35;
    --moss-dark: #314c22;
    --rust: #b75d2a;
    --gold: #e5b83f;
    --bad: #9e2f24;
    --shadow: 0 24px 60px rgba(49, 76, 34, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    background:
        radial-gradient(circle at top left, rgba(229, 184, 63, 0.35), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(85, 122, 53, 0.25), transparent 28rem),
        var(--bg);
}

a {
    color: var(--moss-dark);
}

.shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
}

.hero {
    padding: 36px;
    margin-bottom: 24px;
    border: 3px solid var(--moss-dark);
    border-radius: 28px;
    background: linear-gradient(135deg, #fff6d9, #e7edd3);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--rust);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1,
h2 {
    margin-top: 0;
}

h1 {
    margin-bottom: 12px;
    font-size: clamp(2.4rem, 6vw, 5.25rem);
    line-height: 0.9;
}

.hero p {
    max-width: 720px;
    font-size: 1.1rem;
}

.status,
.flash {
    display: inline-flex;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
}

.status-ok {
    color: #173b20;
    background: #dff1ce;
}

.status-bad {
    color: #641c16;
    background: #ffd6cf;
}

.flash {
    margin-bottom: 18px;
    color: #533a05;
    background: #ffe9a8;
}

.panel {
    padding: 28px;
    border: 2px solid rgba(49, 76, 34, 0.25);
    border-radius: 24px;
    background: rgba(255, 250, 240, 0.92);
    box-shadow: var(--shadow);
}

.narrow {
    max-width: 680px;
}

.panel-heading {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.panel-heading p {
    margin: 0;
    color: var(--muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    color: #fffaf0;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    background: var(--moss-dark);
}

.button:hover {
    background: var(--moss);
}

.secondary {
    color: var(--moss-dark);
    background: #e6dfc8;
}

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

.empty {
    padding: 34px;
    border: 2px dashed rgba(49, 76, 34, 0.35);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
}

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

th,
td {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(49, 76, 34, 0.16);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--moss-dark);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.actions {
    white-space: nowrap;
}

.actions a {
    margin-right: 10px;
    font-weight: 700;
}

.actions .danger {
    color: var(--bad);
}

.form-card {
    display: grid;
    gap: 18px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 2px solid rgba(49, 76, 34, 0.25);
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--ink);
    font: inherit;
    background: #fffdf8;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--rust);
    outline: 3px solid rgba(183, 93, 42, 0.2);
}

.checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.checkbox input {
    width: auto;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.error-text {
    padding: 14px;
    border-radius: 14px;
    color: #641c16;
    background: #ffd6cf;
}

code {
    padding: 2px 6px;
    border-radius: 6px;
    background: #eee4ca;
}

@media (max-width: 720px) {
    .shell {
        width: min(100% - 20px, 1120px);
        padding: 20px 0;
    }

    .hero,
    .panel {
        padding: 20px;
        border-radius: 20px;
    }

    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
