:root {
    --ink: #17131c;
    --muted: #686071;
    --line: #251a2b;
    --surface: #ffffff;
    --soft: #fff5fb;
    --teal: #00a7bb;
    --teal-dark: #007d90;
    --coral: #e8007f;
    --gold: #ffd23f;
    --lime: #95d82b;
    --green: #17895d;
    --red: #b42318;
    --shadow: 8px 8px 0 rgba(23, 19, 28, .95);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(232, 0, 127, .08) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 167, 187, .08) 1px, transparent 1px),
        var(--soft);
    background-size: 28px 28px;
    font-family: Figtree, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    overflow-x: hidden;
}

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

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, .98);
    border-bottom: 4px solid var(--ink);
    display: flex;
    height: 76px;
    justify-content: space-between;
    padding: 0 clamp(18px, 4vw, 48px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand,
.topnav,
.hero-actions,
.admin-heading,
.filter-bar {
    align-items: center;
    display: flex;
}

.brand {
    font-weight: 800;
    gap: 10px;
    max-width: min(54vw, 300px);
    min-width: 0;
}

.brand-logo {
    display: block;
    height: auto;
    max-height: 42px;
    max-width: 100%;
    object-fit: contain;
}

.topnav {
    gap: 18px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

.topnav a:hover,
.table-link {
    color: var(--coral);
}

.hero {
    background-position: center;
    background-size: cover;
    border-bottom: 4px solid var(--ink);
    color: var(--ink);
    min-height: min(780px, calc(84vh - 76px));
    padding: clamp(56px, 11vw, 120px) clamp(20px, 7vw, 90px);
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 690px;
    min-width: 0;
    width: 100%;
}

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

.eyebrow.dark {
    color: var(--teal);
}

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

h1 {
    font-size: clamp(42px, 8vw, 82px);
    line-height: .98;
    margin-bottom: 18px;
}

.hero-logo-title {
    font-size: 0;
    line-height: 1;
    margin-bottom: 22px;
}

.hero-logo {
    display: block;
    height: auto;
    image-rendering: auto;
    max-width: min(600px, 92vw);
    width: 100%;
}

h2 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.05;
    margin-bottom: 12px;
}

h3 {
    font-size: 20px;
    line-height: 1.2;
    margin-bottom: 0;
}

.hero-copy {
    color: var(--ink);
    font-size: clamp(17px, 2vw, 21px);
    font-weight: 800;
    line-height: 1.55;
    max-width: 520px;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.hero-note {
    color: var(--ink);
    font-weight: 700;
}

.section,
.admin-shell,
.ticket-page {
    padding: clamp(36px, 7vw, 76px) clamp(18px, 4vw, 56px);
}

.section-heading {
    margin: 0 auto 28px;
    max-width: 1160px;
}

.narrow {
    max-width: 1040px;
    margin: 0 auto;
}

.booking-layout,
.payment-layout,
.admin-detail-layout,
.info-grid {
    display: grid;
    gap: 22px;
    margin: 0 auto;
    max-width: 1160px;
}

.booking-layout {
    grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr);
}

.payment-layout,
.admin-detail-layout,
.info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-info-section {
    padding-bottom: 0;
}

.home-status-section {
    padding-bottom: 0;
}

.save-code-panel,
.ticket-ready-panel,
.status-search-panel {
    align-items: center;
    background: #fff;
    border: 4px solid var(--ink);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 18px;
    margin: 0 auto 24px;
    max-width: 1160px;
    padding: clamp(18px, 4vw, 28px);
}

.save-code-panel {
    grid-template-columns: minmax(260px, 1fr) auto auto;
}

.ticket-ready-panel {
    border-top: 8px solid var(--teal);
    grid-template-columns: 1fr auto;
}

.status-search-panel {
    grid-template-columns: 1fr auto;
    width: 100%;
}

.home-status-panel {
    grid-template-columns: minmax(260px, 1.1fr) minmax(260px, .9fr) auto;
}

.status-search-panel > * {
    min-width: 0;
}

.status-search-panel .field {
    margin-bottom: 0;
}

.code-box,
.ticket-action-row {
    align-items: center;
    display: flex;
    gap: 12px;
}

.code-box {
    background: var(--soft);
    border: 3px solid var(--ink);
    border-radius: 8px;
    padding: 10px;
}

.code-box strong {
    color: var(--coral);
    font-size: clamp(20px, 3vw, 30px);
    line-height: 1;
    white-space: nowrap;
}

.instruction-copy {
    color: var(--muted);
    font-weight: 800;
    line-height: 1.55;
    margin-bottom: 0;
}

.status-result-panel,
.status-result-layout {
    margin-top: 24px;
}

.prize-panel {
    border-top: 8px solid var(--coral);
}

.contact-panel {
    border-top: 8px solid var(--teal);
}

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

.prize-card {
    border: 3px solid var(--ink);
    border-radius: 8px;
    padding: 18px;
}

.prize-card h3 {
    color: var(--coral);
    margin-bottom: 14px;
    text-transform: uppercase;
}

.prize-list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.prize-list li {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
}

.prize-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

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

.prize-list strong {
    font-size: 20px;
}

.category-list {
    display: grid;
    gap: 14px;
}

.category-card,
.form-panel,
.detail-panel,
.auth-panel,
.metric,
.ticket {
    background: var(--surface);
    border: 4px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.category-card {
    padding: 22px;
    position: relative;
}

.category-card::after {
    background: linear-gradient(90deg, var(--coral) 0 10px, transparent 10px 16px, var(--teal) 16px 26px, transparent 26px);
    bottom: 14px;
    content: "";
    height: 6px;
    position: absolute;
    right: 16px;
    width: 70px;
}

.category-distance {
    color: var(--coral);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 6px;
}

.category-price {
    font-size: 24px;
    font-weight: 800;
    margin: 18px 0 8px;
}

.category-meta,
.category-pack,
label,
.detail-list dt,
table span {
    color: var(--muted);
}

.category-pack {
    line-height: 1.5;
    margin-bottom: 0;
}

.form-panel,
.detail-panel,
.auth-panel {
    padding: clamp(20px, 4vw, 32px);
}

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

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
}

.span-2 {
    grid-column: span 2;
}

label {
    font-size: 13px;
    font-weight: 800;
}

input,
select,
textarea {
    background: #fff;
    border: 3px solid var(--ink);
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    min-height: 46px;
    padding: 10px 12px;
    width: 100%;
}

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

input:focus,
select:focus,
textarea:focus {
    border-color: var(--coral);
    box-shadow: 0 0 0 4px rgba(232, 0, 127, .18);
    outline: none;
}

.button {
    align-items: center;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    text-transform: uppercase;
}

.button-primary {
    background: var(--coral);
    box-shadow: 5px 5px 0 var(--ink);
    color: #fff;
}

.button-primary:hover {
    background: #c7006d;
}

.button-secondary {
    background: var(--teal);
    box-shadow: 5px 5px 0 var(--ink);
    color: #fff;
}

.button-secondary:hover {
    background: var(--teal-dark);
}

.button-ghost {
    background: #fff;
    border: 3px solid var(--ink);
    color: var(--ink);
}

.button-full {
    width: 100%;
}

.detail-panel h2 {
    font-size: 24px;
}

.accent-panel {
    border-top: 8px solid var(--coral);
}

.detail-list {
    display: grid;
    gap: 14px;
    margin: 0;
}

.detail-list div {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 4px;
    padding-bottom: 12px;
}

.detail-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-list dt {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-list dd {
    font-weight: 700;
    margin: 0;
}

.detail-link {
    color: var(--coral);
    display: inline-flex;
    font-weight: 800;
}

.detail-link:hover {
    color: #c7006d;
    text-decoration: underline;
}

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

.status-unpaid,
.status-not_issued,
.status-not_collected {
    background: #fff1bd;
    color: #6e4d00;
}

.status-waiting_confirmation {
    background: #dcfbff;
    color: var(--teal-dark);
}

.status-paid,
.status-issued,
.status-collected {
    background: #ecffd2;
    color: var(--green);
}

.status-rejected {
    background: #fdebea;
    color: var(--red);
}

.flash {
    border-radius: 6px;
    font-weight: 700;
    margin: 18px auto 0;
    max-width: 1080px;
    padding: 14px 16px;
}

.flash-success {
    background: #ecffd2;
    color: var(--green);
}

.flash-error {
    background: #fdebea;
    color: var(--red);
}

.auth-section {
    display: grid;
    min-height: calc(100vh - 68px);
    place-items: center;
}

.auth-panel {
    width: min(100%, 420px);
}

.auth-panel h1 {
    font-size: 32px;
}

.admin-shell {
    max-width: 1240px;
    margin: 0 auto;
}

.admin-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.admin-user-pill {
    background: #fff;
    border: 3px solid var(--ink);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
}

.admin-heading {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

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

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

.metric {
    padding: 18px;
    border-color: var(--ink);
}

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

.metric strong {
    display: block;
    font-size: 32px;
    margin-top: 8px;
}

.filter-bar {
    background: #fff;
    border: 4px solid var(--ink);
    border-radius: 8px;
    gap: 10px;
    margin-bottom: 18px;
    padding: 12px;
}

.filter-bar input {
    flex: 1;
}

.filter-bar select {
    width: 240px;
}

.table-wrap {
    background: #fff;
    border: 4px solid var(--ink);
    border-radius: 8px;
    overflow-x: auto;
}

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

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

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

td strong,
td span {
    display: block;
}

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

.link-button {
    background: transparent;
    border: 0;
    color: var(--red);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 0;
}

.link-button:hover {
    text-decoration: underline;
}

.empty-row {
    color: var(--muted);
    text-align: center;
}

.pagination-wrap {
    margin-top: 18px;
}

.action-stack {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.user-form-panel {
    margin: 0 auto;
    max-width: 860px;
}

.field-help {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
}

.primary-note {
    margin-bottom: 18px;
}

.activity-panel {
    margin-top: 24px;
}

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

.activity-item {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr auto;
    padding-bottom: 12px;
}

.activity-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.activity-item p {
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 0;
}

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

.ticket-page {
    display: grid;
    min-height: calc(100vh - 76px);
    place-items: center;
}

.ticket {
    max-width: 760px;
    overflow: hidden;
    width: 100%;
}

.ticket-band {
    background:
        linear-gradient(90deg, rgba(232, 0, 127, .97), rgba(0, 167, 187, .95)),
        var(--ink);
    color: #fff;
    padding: 32px;
}

.ticket-band h1 {
    font-size: 0;
    line-height: 1;
    margin-bottom: 18px;
}

.ticket-logo {
    display: block;
    filter: drop-shadow(3px 3px 0 var(--ink));
    height: auto;
    max-width: 520px;
    width: 100%;
}

.ticket-body {
    display: grid;
    gap: 22px;
    padding: 32px;
}

.ticket-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.ticket-code {
    font-size: clamp(30px, 7vw, 58px);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0;
}

@media (max-width: 860px) {
    .hero {
        min-height: 76vh;
    }

    .booking-layout,
    .payment-layout,
    .admin-detail-layout,
    .info-grid,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .save-code-panel,
    .ticket-ready-panel,
    .status-search-panel {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .status-search-panel.home-status-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .code-box,
    .ticket-action-row {
        align-items: stretch;
        flex-direction: column;
    }

    .code-box strong {
        text-align: center;
        white-space: normal;
        word-break: break-word;
    }

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

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

    .span-2 {
        grid-column: span 1;
    }

    .filter-bar,
    .admin-heading,
    .admin-nav,
    .activity-item {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .filter-bar select {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        height: auto;
        padding-bottom: 12px;
        padding-top: 12px;
    }

    .topnav {
        gap: 10px;
        width: 100%;
    }

    .hero {
        background-image: linear-gradient(90deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .74)), url('/images/sarkoro-theme.png') !important;
        background-position: 58% center;
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 52px;
    }

    .hero-content {
        max-width: calc(100vw - 40px);
    }

    .hero .eyebrow,
    .hero-copy {
        max-width: 32ch;
    }

    .hero .eyebrow {
        font-size: 11px;
        line-height: 1.4;
    }

    .hero-copy {
        font-size: 16px;
        font-weight: 800;
    }

    h1 {
        font-size: 40px;
    }

    .hero h1 {
        max-width: 100%;
    }

    .hero-logo {
        max-width: min(100%, 330px);
    }

    .button {
        width: 100%;
    }

    .hero .button {
        width: min(100%, 320px);
    }

    .hero-actions {
        max-width: 320px;
    }

    .prize-card {
        padding: 16px;
    }

    .prize-list li {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .prize-list strong {
        font-size: 18px;
    }
}
