:root {
    --ink: #14213d;
    --ink-soft: #42526d;
    --sky: #d9ecff;
    --sand: #f6f0e8;
    --mint: #d5f4e6;
    --accent: #ff6b4a;
    --accent-dark: #d84a2b;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --line: rgba(20, 33, 61, 0.12);
    --shadow: 0 22px 70px rgba(20, 33, 61, 0.12);
    --radius: 22px;
    --radius-sm: 14px;
    --font-body: "Aptos", "Segoe UI", sans-serif;
    --font-title: "Rockwell", "Georgia", serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 107, 74, 0.18), transparent 36%),
        radial-gradient(circle at top right, rgba(78, 205, 196, 0.18), transparent 30%),
        linear-gradient(180deg, #eef7ff 0%, #f7efe6 100%);
    color: var(--ink);
    font-family: var(--font-body);
}

img {
    max-width: 100%;
    display: block;
}

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

code {
    padding: 0.18rem 0.4rem;
    border-radius: 999px;
    background: rgba(20, 33, 61, 0.07);
    font-size: 0.92rem;
}

.background-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.35;
    pointer-events: none;
}

.orb-a {
    top: 5rem;
    left: 3rem;
    width: 15rem;
    height: 15rem;
    background: rgba(255, 107, 74, 0.22);
}

.orb-b {
    right: 4rem;
    bottom: 6rem;
    width: 18rem;
    height: 18rem;
    background: rgba(78, 205, 196, 0.2);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(22px);
    background: rgba(255, 255, 255, 0.58);
    border-bottom: 1px solid rgba(20, 33, 61, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.brand strong {
    display: block;
    font-family: var(--font-title);
    font-size: 1.1rem;
}

.brand small {
    display: block;
    color: var(--ink-soft);
    text-transform: lowercase;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    color: white;
    font-family: var(--font-title);
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--accent) 0%, #ff936f 100%);
    box-shadow: 0 14px 30px rgba(255, 107, 74, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--ink-soft);
    font-weight: 600;
}

.page-shell {
    width: min(1680px, calc(100vw - 2rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.hero-card,
.panel,
.stat-card,
.alert {
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow);
}

.hero-card,
.panel,
.alert {
    background: var(--panel);
    border-radius: var(--radius);
}

.hero-card,
.panel {
    padding: 1.5rem;
}

.hero-card {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.hero-card h1,
.panel h2 {
    margin: 0.25rem 0 0.5rem;
    font-family: var(--font-title);
}

.eyebrow {
    margin: 0;
    color: var(--accent-dark);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.78rem;
    font-weight: 700;
}

.lede,
.muted {
    color: var(--ink-soft);
}

.hero-actions,
.actions,
.inline-stats {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.button {
    appearance: none;
    border: 0;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent) 0%, #ff8c69 100%);
    color: white;
    box-shadow: 0 16px 30px rgba(255, 107, 74, 0.25);
}

.button.secondary {
    background: rgba(20, 33, 61, 0.08);
    color: var(--ink);
    box-shadow: none;
}

.button.danger {
    background: linear-gradient(135deg, #c62828 0%, #ef5350 100%);
}

.inline-form {
    margin: 0;
}

.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    background: var(--panel-strong);
}

.stats-grid,
.split-grid,
.form-grid,
.gallery-grid {
    display: grid;
    gap: 1rem;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(232, 245, 255, 0.95));
    border-radius: var(--radius);
    padding: 1.25rem;
}

.stat-card span {
    display: block;
    color: var(--ink-soft);
}

.stat-card strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 2rem;
    font-family: var(--font-title);
}

.split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1.5rem;
}

.split-grid.wide {
    align-items: start;
}

.panel {
    margin-bottom: 1.5rem;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.panel-head h2 {
    margin: 0;
}

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

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

.data-table th,
.data-table td {
    padding: 0.85rem 0.7rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--ink-soft);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.34rem 0.7rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    background: rgba(20, 33, 61, 0.08);
}

.tag.success {
    background: rgba(56, 142, 60, 0.14);
    color: #1b5e20;
}

.tag.warning {
    background: rgba(245, 124, 0, 0.14);
    color: #a14d00;
}

.tag.danger {
    background: rgba(198, 40, 40, 0.14);
    color: #9d2323;
}

.tag.muted {
    background: rgba(20, 33, 61, 0.08);
    color: var(--ink-soft);
}

.auth-card {
    max-width: 760px;
    margin: 2rem auto 0;
}

.stack-form {
    display: grid;
    gap: 1rem;
}

.stack-form label,
.filter-form label {
    display: grid;
    gap: 0.45rem;
    font-weight: 600;
}

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

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    align-items: end;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(20, 33, 61, 0.13);
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
    font: inherit;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(255, 107, 74, 0.18);
    border-color: rgba(255, 107, 74, 0.42);
}

.check-row {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.check-row input {
    width: auto;
}

.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 1rem;
}

.photo-card {
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(20, 33, 61, 0.08);
}

.photo-card img {
    aspect-ratio: 4 / 3;
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 0.8rem;
}

.photo-meta {
    display: grid;
    gap: 0.2rem;
    margin-bottom: 0.7rem;
}

.admin-grid img {
    background: white;
}

.qr-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
}

.qr-block img {
    width: 160px;
    height: 160px;
    border-radius: 16px;
    background: white;
    padding: 0.7rem;
}

.consent-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(213, 244, 230, 0.5), rgba(255, 255, 255, 0.76));
    border: 1px solid rgba(20, 33, 61, 0.08);
}

.stack-section {
    display: grid;
    gap: 1rem;
}

@media (max-width: 960px) {
    .topbar,
    .hero-card,
    .panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

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

@media (max-width: 640px) {
    .page-shell {
        width: min(100vw - 1rem, 100%);
    }

    .topbar {
        padding: 1rem;
    }
}
