:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --panel: #ffffff;
    --ink: #17202a;
    --muted: #697586;
    --line: #d9dee8;
    --primary: #135d66;
    --primary-strong: #0f464d;
    --accent: #b7791f;
    --danger: #b42318;
    --ok: #0f7a4f;
    --wait: #7c3aed;
    --shadow: 0 10px 30px rgba(18, 38, 63, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

.topbar,
.admin-topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}

.topbar-inner,
.page,
.admin-content {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar-inner,
.admin-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
}

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

.nav a,
.nav button,
.sidebar a {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.nav a:hover,
.nav button:hover,
.sidebar a:hover {
    color: var(--ink);
}

.page {
    padding: 32px 0 56px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 28px;
    align-items: center;
    min-height: calc(100vh - 128px);
}

.hero-copy {
    display: grid;
    gap: 18px;
}

.hero-copy h1 {
    font-size: clamp(36px, 6vw, 68px);
}

.hero-panel {
    display: grid;
    gap: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 30px;
    font-weight: 900;
}

.price small {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.15;
}

h1 {
    font-size: clamp(28px, 4vw, 44px);
}

h2 {
    font-size: 26px;
}

h3 {
    font-size: 18px;
}

p {
    margin: 0;
}

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

.stack {
    display: grid;
    gap: 18px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.card {
    padding: 18px;
}

.panel {
    padding: 22px;
}

.metric {
    display: grid;
    gap: 6px;
}

.metric strong {
    font-size: 30px;
}

.button,
button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--primary);
    border-radius: 7px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.button:hover {
    background: var(--primary-strong);
    border-color: var(--primary-strong);
}

.button.secondary {
    background: #fff;
    color: var(--primary);
}

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

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
}

.field.full {
    grid-column: 1 / -1;
}

label {
    font-weight: 700;
    font-size: 14px;
}

.input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 9px 11px;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.errors,
.notice {
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.errors {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: var(--danger);
}

.notice {
    background: #edf7f2;
    border: 1px solid #b7e4cf;
    color: var(--ok);
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

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

.table th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.status-pending {
    background: #fff7e6;
    color: #9a5b00;
}

.status-verified {
    background: #e7f6f1;
    color: var(--ok);
}

.status-accepted {
    background: #e6f4ff;
    color: #0958a5;
}

.status-submitted {
    background: #fff7e6;
    color: #9a5b00;
}

.status-valid {
    background: #e7f6f1;
    color: var(--ok);
}

.status-revision {
    background: #f3edff;
    color: var(--wait);
}

.status-rejected {
    background: #fff1f0;
    color: var(--danger);
}

.status-waitlisted {
    background: #f3edff;
    color: var(--wait);
}

.status-active,
.status-approved,
.status-redeemed {
    background: #e7f6f1;
    color: var(--ok);
}

.status-pending_review,
.status-pending_payment,
.status-payment_review,
.status-pending,
.status-reserved {
    background: #fff7e6;
    color: #9a5b00;
}

.status-payment_rejected,
.status-rejected,
.status-void {
    background: #fff1f0;
    color: var(--danger);
}

.status-available {
    background: #e6f4ff;
    color: #0958a5;
}

.admin-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: #18242f;
    color: #fff;
    padding: 22px;
}

.sidebar .brand {
    color: #fff;
    margin-bottom: 24px;
}

.sidebar nav {
    display: grid;
    gap: 6px;
}

.sidebar a {
    color: #dbe3ea;
    border-radius: 7px;
    padding: 10px 12px;
}

.sidebar a.active,
.sidebar a:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.admin-main {
    min-width: 0;
}

.admin-topbar-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.admin-content {
    width: min(1240px, calc(100% - 32px));
    padding: 28px 0 56px;
}

.filterbar {
    display: grid;
    grid-template-columns: 1fr 180px 180px auto;
    gap: 10px;
    align-items: end;
}

.selection-inline {
    display: grid;
    grid-template-columns: 120px minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail {
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.detail span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.repeatable-list {
    display: grid;
    gap: 12px;
}

.repeatable-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(140px, .7fr) minmax(160px, 1fr) minmax(110px, .5fr) auto;
    gap: 12px;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fbfcfe;
}

.checkline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
}

.pagination {
    margin-top: 16px;
}

@media (max-width: 820px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .form-grid,
    .detail-grid,
    .filterbar,
    .repeatable-row,
    .selection-inline {
        grid-template-columns: 1fr;
    }

    .section-head,
    .topbar-inner,
    .admin-topbar-inner,
    .hero {
        align-items: flex-start;
        grid-template-columns: 1fr;
        flex-direction: column;
    }
}
