:root {
    --bg: #f5f0e7;
    --ink: #1d211d;
    --muted: #667063;
    --panel: #fffaf1;
    --line: #ded3c2;
    --accent: #2f6b4f;
    --accent-dark: #204936;
    --gold: #bc8b2c;
    --danger: #9f2f2f;
    --success: #27684a;
}

* {
    box-sizing: border-box;
}

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

.site-hero {
    position: relative;
    min-height: 420px;
    color: #fff;
    background-image: url("https://sontheimer-hoehle.de/wp-content/uploads/2021/09/Abb-3_2480.jpg");
    background-position: center;
    background-size: cover;
    display: flex;
    flex-direction: column;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(19, 24, 18, .78), rgba(19, 24, 18, .38));
}

.topbar,
.hero-content {
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px clamp(20px, 5vw, 72px);
    font-weight: 700;
}

.topbar img {
    width: 108px;
    max-height: 62px;
    object-fit: contain;
}

.hero-content {
    width: min(880px, calc(100% - 40px));
    margin: auto auto 56px clamp(20px, 8vw, 110px);
}

.hero-content h1 {
    margin: 8px 0 12px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: .98;
    letter-spacing: 0;
}

.hero-content p {
    max-width: 680px;
    font-size: 19px;
}

.eyebrow {
    margin: 0;
    color: #f0cc80;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--gold);
}

.page {
    width: min(1120px, calc(100% - 28px));
    margin: -34px auto 60px;
    position: relative;
    z-index: 2;
}

.page.standalone {
    margin-top: 40px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 55px rgba(42, 35, 23, .16);
    padding: clamp(22px, 4vw, 42px);
}

.panel.narrow {
    max-width: 560px;
    margin-inline: auto;
}

.panel.wide {
    max-width: 1240px;
    margin-inline: auto;
}

.panel h1,
.panel h2 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.15;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

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

.form {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

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

fieldset {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    margin: 0;
    display: grid;
    gap: 14px;
}

.grid-form fieldset {
    align-self: start;
}

legend {
    padding: 0 8px;
    font-weight: 800;
}

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

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

input:disabled {
    background: #eee6d8;
}

.choice {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.choice input {
    width: auto;
}

.choice.compact {
    min-width: 130px;
    padding-top: 26px;
}

.companion-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: end;
}

button,
.button-link,
.logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    padding: 11px 18px;
    cursor: pointer;
}

button:hover,
.button-link:hover,
.logout:hover {
    background: var(--accent-dark);
}

button:disabled {
    background: #9a9a9a;
    cursor: not-allowed;
}

.logout {
    background: #3a3329;
}

.notice {
    border-radius: 6px;
    padding: 12px 14px;
    margin: 14px 0;
    font-weight: 700;
}

.notice.error {
    background: #f7dddd;
    color: var(--danger);
}

.notice.success {
    background: #dff0e7;
    color: var(--success);
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.stats article {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}

.stats strong {
    display: block;
    font-size: 34px;
    line-height: 1;
    color: var(--accent-dark);
}

.stats span {
    color: var(--muted);
    font-weight: 700;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

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

th {
    color: var(--accent-dark);
    font-size: 14px;
}

.action-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.action-cell form {
    margin: 0;
}

.small-link {
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.danger-button {
    min-height: 34px;
    padding: 7px 11px;
    background: var(--danger);
    font-size: 14px;
}

.danger-button:hover {
    background: #772121;
}

.export-box {
    min-height: 220px;
    font-family: Consolas, monospace;
    white-space: pre;
}

@media (max-width: 760px) {
    .site-hero {
        min-height: 360px;
    }

    .topbar {
        padding: 18px;
    }

    .topbar img {
        width: 82px;
    }

    .hero-content {
        margin: auto 18px 48px;
        width: auto;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .grid-form,
    .companion-row,
    .stats {
        grid-template-columns: 1fr;
    }

    .panel-head {
        display: grid;
    }

    .choice.compact {
        padding-top: 0;
    }
}
