:root {
    color-scheme: light;
    --bg: #f4f1ea;
    --card: #fffaf1;
    --ink: #1e2a24;
    --muted: #6f776f;
    --line: #ded5c5;
    --primary: #1d6f54;
    --primary-dark: #15543f;
    --danger: #a63b32;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #d8ead7, transparent 34rem), var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0;
}

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

.topbar nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.brand {
    color: var(--ink);
    font-size: 1.35rem;
    letter-spacing: -0.04em;
}

.card {
    background: color-mix(in srgb, var(--card) 94%, white);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 18px 45px rgb(78 64 40 / 10%);
    padding: 24px;
    margin-bottom: 20px;
}

.hero {
    min-height: 260px;
    display: grid;
    align-content: center;
}

.login-card {
    max-width: 430px;
    margin: 48px auto;
}

.grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    gap: 20px;
}

h1,
h2 {
    margin: 0 0 14px;
    letter-spacing: -0.04em;
}

h1 {
    font-size: clamp(2rem, 6vw, 4rem);
}

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

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff0ed;
    color: var(--danger);
    font-weight: 700;
}

.notice {
    padding: 12px 14px;
    border-radius: 14px;
    background: #d9efe5;
    color: var(--primary-dark);
    font-weight: 700;
}

.form {
    display: grid;
    gap: 14px;
}

.form.compact {
    gap: 10px;
}

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

.field-help {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.35;
}

input,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    color: var(--ink);
    font: inherit;
    padding: 12px 13px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox input {
    width: auto;
}

fieldset {
    min-width: 0;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
}

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

.option-grid,
.weekday-grid,
.form-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
}

.weekday-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.option {
    border-radius: 10px;
    background: #f8f4ec;
    padding: 10px;
    font-weight: 600;
}

.select-all {
    margin-bottom: 12px;
}

.actions,
.callout {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.callout {
    justify-content: space-between;
}

.callout-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.callout-heading h2,
.callout-heading p {
    margin-bottom: 4px;
}

.callout h2,
.callout p {
    margin-bottom: 6px;
}

.entry-filters {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8f4ec;
}

.filter-summary {
    margin: 0 0 10px;
}

.download-controls {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
}

.download-controls label {
    min-width: 190px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 13px 20px;
    width: fit-content;
}

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

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

.button.secondary {
    background: #e7dfd2;
    color: var(--ink);
}

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

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

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 0.9rem;
}

.pill {
    display: inline-flex;
    border-radius: 999px;
    background: #d9efe5;
    color: var(--primary-dark);
    font-weight: 800;
    padding: 4px 9px;
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 20px, 1100px);
        padding: 12px 0;
    }

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

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

    .card {
        border-radius: 18px;
        padding: 18px;
    }
}
