:root {
    color-scheme: light;
    --ink: #18201c;
    --muted: #66736b;
    --line: #d8e2db;
    --paper: #fbf8ef;
    --white: #ffffff;
    --green: #1f6b46;
    --green-dark: #12402d;
    --mint: #dff2e5;
    --gold: #d7a82f;
    --danger: #b42318;
    --success: #107c41;
    --shadow: 0 20px 60px rgba(24, 32, 28, .12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 22px clamp(18px, 5vw, 64px);
}

.topbar.compact {
    padding-block: 16px;
}

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

.brand-mark {
    align-items: center;
    background: var(--green);
    border-radius: 8px;
    color: var(--white);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    letter-spacing: 0;
    width: 38px;
}

.nav {
    display: flex;
    gap: clamp(12px, 3vw, 28px);
    color: var(--muted);
    font-weight: 700;
}

.nav a:hover {
    color: var(--green);
}

.hero {
    align-items: center;
    display: grid;
    gap: clamp(28px, 6vw, 72px);
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, .7fr);
    min-height: calc(100vh - 92px);
    padding: 24px clamp(18px, 5vw, 64px) 64px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    color: var(--green);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0 0 12px;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(42px, 7vw, 84px);
    line-height: .96;
    margin-bottom: 22px;
    max-width: 920px;
}

h2 {
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.04;
    margin-bottom: 18px;
}

h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.lead {
    color: #46534b;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.6;
    max-width: 720px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0;
}

.btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 850;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    background: var(--green);
    color: var(--white);
}

.btn.primary:hover {
    background: var(--green-dark);
}

.btn.secondary {
    background: var(--white);
    border-color: var(--line);
    color: var(--green-dark);
}

.btn.icon {
    background: var(--mint);
    color: var(--green-dark);
    min-height: 36px;
    padding: 8px 12px;
}

.btn.full {
    width: 100%;
}

.quick-facts {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    max-width: 620px;
}

.quick-facts div,
.metric-row div {
    background: rgba(255, 255, 255, .68);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.quick-facts dt,
.metric-row small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.quick-facts dd,
.metric-row span {
    display: block;
    font-size: 22px;
    font-weight: 900;
    margin: 0;
}

.cover-panel {
    margin: 0;
}

.cover-panel img {
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: block;
    width: 100%;
}

.section {
    padding: 72px clamp(18px, 5vw, 64px);
}

.band {
    background: #eef5ee;
}

.feature-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 26px;
}

.feature-card,
.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(24, 32, 28, .06);
    padding: 22px;
}

.feature-card p,
.muted {
    color: var(--muted);
    line-height: 1.55;
}

.checkout-layout,
.admin-shell {
    padding: 30px clamp(16px, 4vw, 56px) 64px;
}

.checkout-copy {
    margin: 0 auto 28px;
    max-width: 1120px;
}

.checkout-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, .9fr) minmax(320px, .7fr);
    margin: 0 auto;
    max-width: 1120px;
}

.form-panel,
.payment-panel {
    min-width: 0;
}

label {
    color: var(--ink);
    display: grid;
    font-size: 14px;
    font-weight: 850;
    gap: 8px;
    margin-bottom: 16px;
}

input,
select,
textarea {
    background: #fffefa;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);
    outline: 3px solid rgba(31, 107, 70, .14);
}

small.error {
    color: var(--danger);
}

.notice {
    background: #fff7d6;
    border: 1px solid #e6c85c;
    border-radius: 8px;
    color: #665000;
    line-height: 1.5;
    padding: 14px 16px;
}

.status-pill {
    background: #f3f5f2;
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 16px;
    padding: 8px 12px;
}

.status-pill.success,
.status.success {
    background: #dcfce7;
    color: var(--success);
}

.status.pending {
    background: #fff7d6;
    color: #8a6200;
}

.status.cancelled {
    background: #fee2e2;
    color: var(--danger);
}

.summary {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 16px;
    padding: 14px;
}

.summary strong {
    color: var(--ink);
}

.qr-box {
    align-items: center;
    aspect-ratio: 1;
    background: #f5f7f3;
    border: 1px dashed #a6b7aa;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
    overflow: hidden;
}

.qr-box img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.qr-empty {
    color: #9aa89d;
    font-size: 38px;
    font-weight: 950;
}

.transfer-box {
    align-items: center;
    background: #edf8ef;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 14px;
}

.transfer-box span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.transfer-box strong {
    font-size: 24px;
    overflow-wrap: anywhere;
}

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

.admin-head h1 {
    font-size: clamp(32px, 5vw, 56px);
    margin-bottom: 0;
}

.admin-token {
    display: flex;
    gap: 8px;
    max-width: 360px;
}

.metric-row {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 20px;
}

.tabs {
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
}

.tab {
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 900;
    padding: 14px 18px;
}

.tab.active {
    border-color: var(--green);
    color: var(--green-dark);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.inline-form {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
    margin-bottom: 16px;
}

.table-wrap {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow-x: auto;
}

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

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

th {
    background: #f6faf7;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

td {
    color: #2d3931;
}

.status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 10px;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.row-actions button {
    background: #f4f7f4;
    border: 1px solid var(--line);
    border-radius: 7px;
    cursor: pointer;
    font-weight: 800;
    padding: 7px 9px;
}

.toast {
    background: var(--green-dark);
    border-radius: 8px;
    bottom: 20px;
    color: var(--white);
    font-weight: 800;
    left: 50%;
    padding: 12px 16px;
    position: fixed;
    transform: translateX(-50%);
    z-index: 20;
}

@media (max-width: 900px) {
    .hero,
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 0;
    }

    .quick-facts,
    .feature-grid,
    .metric-row {
        grid-template-columns: 1fr;
    }

    .inline-form {
        grid-template-columns: 1fr;
    }

    .admin-head {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    h1 {
        font-size: 40px;
    }

    .panel,
    .feature-card {
        padding: 18px;
    }
}
