:root {
    --bg: #f2efe6;
    --panel: #fffdf8;
    --text: #222018;
    --muted: #6d6655;
    --brand: #1f6f5f;
    --brand-2: #f2b138;
    --danger: #a42e2e;
    --line: #d8cfbc;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", Verdana, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top right, #ffefc6 0, transparent 45%), linear-gradient(180deg, #ebe6d6, #f7f3ea);
}

.shell {
    width: min(1100px, 94vw);
    margin: 1.5rem auto 2rem;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

h1 {
    margin: 0;
    letter-spacing: 0.04em;
}

.muted {
    color: var(--muted);
}

.tabs {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tabs a {
    text-decoration: none;
    color: var(--text);
    background: #ede5d4;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
}

.tabs a.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.narrow {
    max-width: 460px;
    margin: 1rem auto;
}

.cards {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-currency-group {
    margin-bottom: 0.9rem;
}

.dashboard-currency-title {
    margin: 0 0 0.35rem;
    font-weight: 700;
}

.card.stat {
    padding: 0.55rem 0.65rem;
}

.stat h3 {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
}

.stat p {
    font-size: 1.05rem;
    margin: 0;
    color: var(--brand);
}

.grid {
    display: grid;
    gap: 0.8rem;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

label, fieldset {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
    color: #2f2b22;
}

input, select, textarea, button {
    font: inherit;
}

input, select, textarea {
    width: 100%;
    border: 1px solid #cbbfaa;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    background: #fff;
}

textarea {
    resize: vertical;
}

fieldset {
    border: 1px solid #d9ccb5;
    border-radius: 8px;
    padding: 0.7rem;
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    padding: 0;
}

.lock-check {
    justify-content: center;
    margin: 0;
}

.btn {
    border: none;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    padding: 0.6rem 1rem;
    cursor: pointer;
}

.btn:hover {
    filter: brightness(0.95);
}

.statement-action-btn {
    width: 12.5rem;
}

.btn-secondary {
    background: #2f4f7e;
}

.btn-danger {
    background: var(--danger);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    padding: 0.55rem 0.8rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.filter-actions {
    align-items: end;
}

.span-two {
    grid-column: 1 / -1;
}

.alert {
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.9rem;
}

.alert-success {
    background: #d7f3de;
    border: 1px solid #92d0a0;
}

.alert-error {
    background: #ffdede;
    border: 1px solid #e5a0a0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border-bottom: 1px solid #e5dcc8;
    padding: 0.55rem;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f9f3e5;
}

.holiday-summary-row {
    cursor: pointer;
}

.holiday-summary-row:hover {
    background: #f5efdf;
}

.holiday-summary-row:focus {
    outline: 2px solid #1f6f5f;
    outline-offset: -2px;
}

.holiday-detail-row {
    background: #fcf9f1;
}

.holiday-detail-panel {
    padding-top: 0.2rem;
    padding-bottom: 0.65rem;
}

.holiday-detail-table th,
.holiday-detail-table td {
    font-size: 0.92rem;
    padding: 0.4rem 0.5rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.inline-form {
    margin: 0;
}

.notes-cell {
    white-space: pre-wrap;
}

@media (max-width: 800px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .grid.two {
        grid-template-columns: 1fr;
    }

    .tabs {
        gap: 0.35rem;
    }

    th, td {
        font-size: 0.92rem;
    }
}
