:root {
    --bg: #f4f1ea;
    --panel: #fffaf2;
    --ink: #1d1c1a;
    --muted: #6f655a;
    --line: #dacdbb;
    --brand: #1f5f5b;
    --brand-soft: #d7ebe8;
    --danger: #8d2f2f;
    --success: #1f6b45;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    background:
        radial-gradient(circle at top left, rgba(31,95,91,.18), transparent 32%),
        linear-gradient(135deg, #f4f1ea 0%, #efe6d9 100%);
    color: var(--ink);
}

a { color: inherit; text-decoration: none; }
input, select, button {
    font: inherit;
    width: 100%;
    padding: .8rem .95rem;
    border-radius: .8rem;
    border: 1px solid var(--line);
    background: #fff;
}

button { cursor: pointer; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .8rem; border-bottom: 1px solid var(--line); }
pre { white-space: pre-wrap; word-break: break-word; }

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 320px 1fr;
}

.sidebar {
    padding: 2rem;
    background: linear-gradient(180deg, #19393a 0%, #1f5f5b 100%);
    color: #f8f3ea;
}

.eyebrow {
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: .8rem;
    opacity: .8;
}

.nav {
    display: grid;
    gap: .75rem;
    margin-top: 2rem;
}

.nav a {
    padding: .85rem 1rem;
    border-radius: .9rem;
    background: rgba(255,255,255,.08);
}

.main { padding: 1.5rem; }
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.panel, .metric-card {
    background: rgba(255,250,242,.92);
    border: 1px solid rgba(218,205,187,.8);
    border-radius: 1.2rem;
    padding: 1.2rem;
    box-shadow: 0 12px 30px rgba(39,34,27,.05);
}

.metric-card strong { display: block; margin-top: .5rem; font-size: 1.5rem; }
.metric-card span { color: var(--muted); }
.grid { display: grid; gap: 1rem; }
.metrics-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1rem; }
.two-columns { grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
.stack { display: grid; gap: .9rem; }
.muted { color: var(--muted); }
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.event-chip {
    display: inline-block;
    margin: .2rem .25rem .2rem 0;
    padding: .35rem .55rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: .85rem;
}
.button {
    background: var(--brand);
    color: #fff;
    border: 0;
}
.button-secondary {
    width: auto;
    background: transparent;
    border: 1px solid rgba(255,255,255,.3);
    color: inherit;
}
.alert {
    padding: 1rem;
    border-radius: .9rem;
    margin-bottom: 1rem;
}
.alert-success { background: #ebf7f0; color: var(--success); }
.alert-error { background: #fbe8e8; color: var(--danger); }
.simple-list { margin: 0; padding-left: 1rem; }
.auth-panel { max-width: 440px; }

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .two-columns { grid-template-columns: 1fr; }
    .sidebar { padding-bottom: 1rem; }
}
