:root {
    --bg: #f5efe4;
    --bg-strong: #efe5d4;
    --surface: rgba(255, 252, 246, 0.78);
    --surface-strong: #fffdf8;
    --text: #1d1a16;
    --muted: #62584a;
    --line: rgba(55, 39, 17, 0.12);
    --accent: #c2542d;
    --accent-dark: #81331a;
    --success: #2b7a57;
    --danger: #b44135;
    --shadow: 0 24px 60px rgba(65, 43, 16, 0.14);
    --radius: 24px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    color: var(--text);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(194, 84, 45, 0.18), transparent 32%),
        radial-gradient(circle at right 20%, rgba(129, 51, 26, 0.16), transparent 28%),
        linear-gradient(160deg, var(--bg), var(--bg-strong));
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0 4rem;
}

.shell--auth {
    display: grid;
    min-height: 100vh;
    align-items: center;
}

.hero-card,
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.hero-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    overflow: hidden;
}

.hero-copy,
.panel,
.panel--form {
    padding: 2rem;
}

.hero-copy {
    background:
        linear-gradient(145deg, rgba(129, 51, 26, 0.92), rgba(194, 84, 45, 0.82)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent);
    color: #fffaf2;
}

.hero-copy h1,
.page-header h1,
.section-head h2,
.panel h2 {
    margin: 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    letter-spacing: -0.03em;
}

.hero-copy h1 {
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    margin-bottom: 1rem;
}

.hero-copy p:last-child,
.page-header p,
.panel > p {
    margin-bottom: 0;
}

.panel--form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 253, 248, 0.92);
}

.page-header,
.header-actions,
.section-head,
.grid,
.list__item {
    display: flex;
}

.page-header,
.section-head {
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.header-actions {
    gap: 0.75rem;
    flex-wrap: wrap;
}

.grid {
    gap: 1.5rem;
    flex-wrap: wrap;
}

.grid--stats > *,
.grid--admin > * {
    flex: 1 1 320px;
}

.grid--admin-lists {
    margin-top: 1.5rem;
}

.grid--admin-lists > * {
    flex: 1 1 420px;
}

.stat-card h2 {
    margin: 0.25rem 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

.eyebrow {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

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

.button,
button,
.panel .btn,
form button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    padding: 0.85rem 1.2rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff7ef;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease;
    box-shadow: 0 12px 24px rgba(129, 51, 26, 0.2);
}

.button:hover,
button:hover,
form button:hover {
    transform: translateY(-1px);
}

.button--ghost {
    background: rgba(255, 255, 255, 0.55);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

form > div {
    margin-bottom: 1rem;
}

label {
    display: inline-block;
    margin-bottom: 0.45rem;
    font-weight: 600;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    border: 1px solid rgba(55, 39, 17, 0.18);
    border-radius: 16px;
    padding: 0.95rem 1rem;
    background: var(--surface-strong);
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

.list {
    display: grid;
    gap: 0.85rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.list__item {
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.5);
}

.list__item--empty {
    justify-content: center;
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(194, 84, 45, 0.12);
    color: var(--accent-dark);
    font-size: 0.9rem;
    font-weight: 700;
}

.alert {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid transparent;
}

.alert--success {
    color: var(--success);
    background: rgba(43, 122, 87, 0.12);
    border-color: rgba(43, 122, 87, 0.2);
}

.alert--error,
ul li:has(> ul) {
    color: var(--danger);
}

.alert--error {
    background: rgba(180, 65, 53, 0.12);
    border-color: rgba(180, 65, 53, 0.2);
}

.form-error-message,
ul {
    margin: 0.35rem 0 0;
    padding-left: 1rem;
}

@media (max-width: 860px) {
    .hero-card {
        grid-template-columns: 1fr;
    }

    .page-header,
    .section-head,
    .list__item {
        align-items: start;
    }

    .list__item {
        flex-direction: column;
    }
}
