:root {
    --green-950: #071a0c;
    --green-900: #0a2010;
    --green-800: #103019;
    --green-700: #1b7c2e;
    --green-500: #2daa45;
    --gold-500: #ffd966;
    --gold-700: #d4960a;
    --ink: #0d1711;
    --muted: #617066;
    --line: #dfe7e1;
    --paper: #f7f9f7;
    --white: #ffffff;
    --danger: #b42318;
    --success: #1b7c2e;
    --shadow: 0 18px 48px rgba(7, 26, 12, 0.18);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    color: var(--ink);
    background: radial-gradient(circle at 20% 0%, #173c22 0%, var(--green-950) 44%, #061208 100%);
    font-family: Avenir, "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

.flash {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 100;
    width: min(560px, calc(100% - 28px));
    transform: translateX(-50%);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--white);
    font-weight: 800;
    box-shadow: var(--shadow);
}

.flash-success {
    background: var(--success);
}

.flash-error {
    background: var(--danger);
}

.site-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 18px;
}

.topbar,
.ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0 18px;
}

.brand img {
    display: block;
    width: auto;
    height: 44px;
}

.top-actions {
    display: flex;
    gap: 10px;
}

.pill-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid rgba(255, 217, 102, 0.42);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--gold-500);
    text-decoration: none;
    font-weight: 900;
    font-size: 13px;
    background: rgba(255, 217, 102, 0.09);
}

.pill-link.muted {
    color: #bbd2c0;
    border-color: rgba(187, 210, 192, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.install-warning {
    margin: 0 0 14px;
    border: 1px solid rgba(255, 217, 102, 0.5);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--gold-500);
    background: rgba(10, 32, 16, 0.8);
    font-weight: 800;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 470px);
    grid-template-rows: auto 1fr;
    gap: 18px;
    align-items: stretch;
}

.hero-copy {
    position: relative;
    min-height: 440px;
    border: 1px solid rgba(255, 217, 102, 0.16);
    border-radius: 18px;
    padding: clamp(28px, 5vw, 56px);
    background: radial-gradient(90% 70% at 80% 10%, #1d512b 0%, var(--green-900) 58%, var(--green-950) 100%);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-copy h1 {
    margin: 16px 0 12px;
    color: var(--gold-500);
    font-size: clamp(52px, 9vw, 112px);
    line-height: 0.92;
    font-weight: 950;
    text-shadow: 0 8px 18px rgba(212, 150, 10, 0.28);
}

.hero-sub {
    max-width: 620px;
    margin: 0 0 24px;
    color: #cfe8d4;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.45;
    font-weight: 700;
}

.status-chip,
.eyebrow,
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    color: #cfe8d4;
    background: rgba(45, 170, 69, 0.18);
    border: 1px solid rgba(45, 170, 69, 0.38);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.countdown-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: 520px;
    gap: 10px;
}

.countdown-panel div {
    min-height: 86px;
    border: 1px solid rgba(255, 217, 102, 0.16);
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.22);
}

.countdown-panel span {
    display: block;
    color: var(--gold-500);
    font-weight: 950;
    font-size: 30px;
    line-height: 1;
}

.countdown-panel small {
    color: #9fcfab;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.trust-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 620px;
    margin-top: 24px;
}

.trust-row div {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px;
    color: #e8f4eb;
    background: rgba(255, 255, 255, 0.06);
    font-size: 13px;
    font-weight: 800;
}

.hero-visual {
    position: absolute;
    right: max(28px, calc((100vw - 1180px) / 2 + 42px));
    top: 128px;
    width: min(260px, 24vw);
    pointer-events: none;
}

.hero-visual img {
    width: 100%;
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.38));
}

.scratch-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--green-950);
    background: linear-gradient(90deg, var(--gold-700), var(--gold-500));
    font-weight: 900;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
}

.purchase-panel {
    grid-column: 2;
    grid-row: 1 / span 2;
    border-radius: 18px;
    padding: 18px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.panel-head,
.amount-line,
.panel-title,
.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.panel-head h2,
.admin-head h1,
.combination-section h2,
.payment-card h2,
.content-band h2 {
    margin: 4px 0 0;
    font-size: 26px;
    line-height: 1.05;
}

.badge {
    color: var(--green-900);
    border-color: #cde4d3;
    background: #e7f2ea;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

label span,
.section-label {
    display: block;
    margin: 14px 0 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

input,
select {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    color: var(--ink);
    background: var(--white);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(45, 170, 69, 0.14);
}

.selected-slots {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.selected-slots span,
.ticket-numbers span {
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #8a948d;
    background: var(--white);
    border: 2px solid var(--line);
    font-weight: 950;
}

.selected-slots .is-filled,
.ticket-numbers span {
    color: #4b3400;
    border-color: var(--gold-700);
    background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.number-grid button {
    aspect-ratio: 1;
    border: 2px solid #d5e5da;
    border-radius: 50%;
    color: var(--green-700);
    background: var(--white);
    cursor: pointer;
    font-weight: 950;
}

.number-grid button.is-selected {
    color: #4b3400;
    border-color: var(--gold-700);
    background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
    transform: scale(1.05);
}

.number-grid button:disabled {
    cursor: default;
    color: #bcc6bf;
    background: #ecf0ed;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 0;
    border-radius: 11px;
    padding: 10px 16px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 950;
}

.btn-primary {
    color: var(--green-950);
    background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
    box-shadow: 0 10px 18px rgba(212, 150, 10, 0.28);
}

.btn-soft {
    margin-top: 10px;
    width: 100%;
    color: var(--green-700);
    border: 1.5px solid #cce3d2;
    background: #eaf5ed;
}

.btn-ghost {
    color: #d9ebe0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.btn-small {
    min-height: 34px;
    padding: 7px 10px;
    color: var(--white);
    background: var(--green-700);
}

.btn-wide {
    width: 100%;
    margin-top: 14px;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.package-list {
    display: grid;
    gap: 9px;
    max-height: 320px;
    overflow: auto;
    padding-right: 3px;
}

.package-card {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    background: var(--white);
    cursor: pointer;
}

.package-card span {
    display: grid;
    gap: 4px;
}

.package-card strong {
    font-size: 16px;
}

.package-card small {
    color: var(--muted);
    font-weight: 800;
}

.package-card b {
    white-space: nowrap;
    font-size: 18px;
}

.package-card.is-active {
    border-color: var(--green-500);
    background: #eaf6ee;
}

.package-card.is-vip {
    color: var(--gold-500);
    border-color: var(--gold-500);
    background: radial-gradient(100% 120% at 50% 0%, #143019, var(--green-950));
}

.pay-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pay-toggle label {
    margin: 0;
}

.pay-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pay-toggle span {
    display: grid;
    place-items: center;
    min-height: 52px;
    margin: 0;
    border: 1.5px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    background: var(--white);
}

.pay-toggle input:checked + span {
    color: var(--green-700);
    border-color: var(--green-700);
    background: #eaf6ee;
}

.content-band {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
    border-radius: 18px;
    padding: 24px;
    background: var(--paper);
}

.content-band p {
    margin: 8px 0 0;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.45;
}

.steps-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.steps-row span {
    border-radius: 12px;
    padding: 16px 12px;
    color: var(--green-900);
    background: #e9f4ec;
    font-weight: 950;
    text-align: center;
}

.simple-page,
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.simple-page {
    color: var(--white);
    text-align: center;
}

.login-card {
    width: min(420px, 100%);
    border-radius: 18px;
    padding: 24px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.login-card img {
    height: 58px;
    width: auto;
}

.login-card h1 {
    margin: 16px 0 8px;
}

.login-card p {
    color: var(--muted);
    font-weight: 700;
}

.text-link {
    display: block;
    margin-top: 16px;
    color: var(--green-700);
    font-weight: 900;
    text-align: center;
}

.ticket-page {
    width: min(1120px, 100%);
    margin: 0 auto;
    padding: 18px;
}

.ticket-grid {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 18px;
}

.receipt-card,
.payment-card,
.combination-section {
    border-radius: 16px;
    overflow: hidden;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.ticket-band {
    padding: 14px;
    color: var(--gold-500);
    background: var(--green-900);
    text-align: center;
    font-weight: 950;
    letter-spacing: 0.16em;
}

.receipt-body,
.payment-card,
.combination-section {
    padding: 20px;
}

.receipt-logo {
    height: 52px;
}

.receipt-body h1 {
    margin: 12px 0 4px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.ticket-status {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    color: #8a5d00;
    background: #fff3cf;
    font-weight: 900;
}

.ticket-numbers {
    display: grid;
    grid-template-columns: repeat(6, 42px);
    gap: 8px;
    margin: 16px 0;
}

.meta-list,
.payment-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.meta-list div,
.payment-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px dashed var(--line);
    padding-top: 8px;
}

dt {
    color: var(--muted);
    font-weight: 800;
}

dd {
    margin: 0;
    font-weight: 900;
    text-align: right;
}

.amount-line {
    margin: 10px 0 16px;
    border-radius: 12px;
    padding: 14px;
    color: var(--green-900);
    background: #eaf6ee;
}

.amount-line strong {
    font-size: 24px;
}

.upload-box {
    margin-top: 18px;
    border: 2px dashed #cbd7cf;
    border-radius: 14px;
    padding: 14px;
    background: var(--white);
}

.receipt-note,
.muted-copy {
    color: var(--muted);
    font-weight: 700;
}

.combination-section {
    margin-top: 18px;
}

.combination-section p {
    color: var(--muted);
    font-weight: 700;
}

.combo-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.combo-list div {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    padding: 9px 11px;
    background: var(--white);
}

.combo-list .is-picked {
    background: #fff1c9;
}

.combo-list b {
    color: var(--green-700);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.combo-list span {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-weight: 800;
}

.admin-body {
    background: var(--paper);
}

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

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 22px;
    color: #dff1e3;
    background: var(--green-900);
}

.admin-brand img {
    height: 54px;
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav a {
    border-radius: 10px;
    padding: 11px 12px;
    text-decoration: none;
    font-weight: 900;
    color: #dff1e3;
    background: rgba(255, 255, 255, 0.05);
}

.admin-logout {
    margin-top: auto;
}

.admin-user {
    margin-bottom: 10px;
    font-weight: 900;
}

.admin-main {
    padding: 28px;
}

.admin-head {
    margin-bottom: 18px;
}

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

.stat-grid div,
.admin-panel {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 10px 24px rgba(7, 26, 12, 0.06);
}

.stat-grid div {
    padding: 18px;
}

.stat-grid span {
    display: block;
    color: var(--muted);
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
}

.stat-grid strong {
    display: block;
    margin-top: 8px;
    font-size: 28px;
}

.admin-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
    gap: 18px;
    align-items: start;
}

.admin-panel {
    padding: 18px;
}

.panel-title {
    margin-bottom: 12px;
}

.panel-title h2,
.admin-form h2 {
    margin: 0;
}

.panel-title a {
    color: var(--green-700);
    font-weight: 900;
}

.table-wrap {
    width: 100%;
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 10px 8px;
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 8px;
    color: var(--green-700);
    background: #eaf6ee;
    font-weight: 900;
    font-size: 12px;
}

.draw-list {
    display: grid;
    gap: 10px;
}

.draw-list div {
    border-radius: 12px;
    padding: 12px;
    background: var(--paper);
}

.draw-list b,
.draw-list span,
.draw-list small {
    display: block;
}

.draw-list span,
.draw-list small {
    color: var(--muted);
    font-weight: 800;
}

.admin-form {
    display: grid;
    gap: 8px;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-form select {
    min-width: 150px;
}

@media (max-width: 980px) {
    .hero-grid,
    .ticket-grid,
    .content-band,
    .admin-columns {
        grid-template-columns: 1fr;
    }

    .purchase-panel {
        grid-column: auto;
        grid-row: auto;
    }

    .hero-visual {
        position: static;
        width: min(210px, 60vw);
        margin: -150px 22px 0 auto;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 720px) {
    .site-shell,
    .ticket-page {
        padding: 12px;
    }

    .topbar,
    .ticket-header {
        padding-top: 4px;
    }

    .brand img {
        height: 38px;
    }

    .hero-copy {
        min-height: 390px;
        padding: 22px;
    }

    .hero-copy h1 {
        font-size: 54px;
    }

    .hero-visual {
        margin-top: -120px;
    }

    .trust-row,
    .field-grid,
    .steps-row,
    .pay-toggle,
    .admin-shell,
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

    .admin-main {
        padding: 16px;
    }

    .number-grid {
        gap: 7px;
    }

    .number-grid button {
        font-size: 14px;
    }

    .countdown-panel div {
        min-height: 70px;
    }

    .ticket-numbers {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media print {
    body {
        background: #fff;
    }

    .ticket-header,
    .payment-card,
    .combination-section,
    .flash,
    .btn {
        display: none !important;
    }

    .ticket-grid {
        display: block;
    }

    .receipt-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

