﻿:root {
    --bg: #070b16;
    --panel: #0f172a;
    --text: #e2e8f0;
    --muted: #93a4bf;
    --primary: #22d3ee;
    --primary-strong: #2563eb;
    --ring: rgba(34, 211, 238, 0.28);
    --border: #263244;
    --success: #10b981;
    --shadow: 0 20px 48px rgba(2, 6, 23, 0.5);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 24px;
    min-height: 100vh;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.12), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(37, 99, 235, 0.16), transparent 38%),
        var(--bg);
}

.page-wrap {
    max-width: 1060px;
    margin: 0 auto;
}

.hero-card {
    background: linear-gradient(130deg, #0b1224, #1e293b);
    color: #f8fafc;
    padding: 28px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}

.hero-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-copy {
    flex: 1;
    min-width: 0;
}

.hero-brand {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.hero-logo {
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.5);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 700;
}

h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 14px;
}

h3 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.hero-subtitle {
    margin-top: 8px;
    color: #9fb0d6;
    font-size: 0.98rem;
    line-height: 1.45;
}

.trust-points {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trust-points span {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.36);
    background: rgba(14, 165, 233, 0.12);
    color: #bae6fd;
    font-size: 0.78rem;
    font-weight: 600;
}

.marketing-strip {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(16, 185, 129, 0.45);
    background: linear-gradient(120deg, rgba(6, 78, 59, 0.45), rgba(15, 23, 42, 0.86));
}

.marketing-strip p {
    margin: 0;
    color: #d1fae5;
    font-weight: 600;
    line-height: 1.45;
}

.support-box {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.45);
    background: rgba(8, 47, 73, 0.35);
}

.support-box p {
    margin: 0;
    color: #dbeafe;
    font-size: 0.9rem;
}

.support-link {
    color: #7dd3fc;
    font-weight: 700;
    text-decoration: none;
}

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

.site-footer {
    max-width: 1060px;
    margin: 12px auto 0;
    padding: 12px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    text-align: center;
}

.site-footer p {
    margin: 0;
    color: #b6c7df;
    font-size: 0.9rem;
}

.section-note {
    margin: -4px 0 14px;
    color: #b5c6e4;
    font-size: 0.9rem;
    line-height: 1.5;
}

.price-note {
    margin: 14px 0 0;
    color: #9fb0d6;
    font-size: 0.86rem;
    line-height: 1.45;
}

.offer-section {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
    margin-bottom: 18px;
}

.packs {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 14px;
}

.pack {
    display: block;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pack p {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #7dd3fc;
}

.pack span {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.pack:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.28);
}

.pack-suggested {
    border-color: rgba(16, 185, 129, 0.45);
}

.hscroll-hint {
    display: none;
}

.packs-wrap {
    position: relative;
}

.hscroll-dots {
    display: none;
}

.simple-box {
    max-width: 520px;
    margin: 30px auto;
    padding: 24px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.payment-offer {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

.payment-total {
    margin-top: 10px;
    color: #e2e8f0;
    font-size: 1.02rem;
    font-weight: 700;
}

form {
    margin-top: 18px;
}

label {
    display: block;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 600;
    color: #cbd5e1;
    margin: 14px 0 8px;
}

input,
select {
    width: 100%;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 12px;
    font-size: 0.95rem;
    color: var(--text);
    background: rgba(2, 6, 23, 0.55);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--ring);
}

button {
    width: 100%;
    margin-top: 18px;
    border: none;
    border-radius: 10px;
    padding: 12px 14px;
    background: linear-gradient(120deg, var(--primary), var(--primary-strong));
    color: #e2e8f0;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.wait-text {
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.ussd-btn {
    width: auto;
    min-width: 190px;
}

.resume-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.resume-inline-text {
    margin: 0;
    flex: 1;
}

.resume-inline-label {
    margin: 0;
    flex: 1;
}

.ussd-btn.resume-mini {
    min-width: 120px;
    padding: 6px 10px;
    margin-top: 0;
    font-size: 0.82rem;
    border-radius: 999px;
}

.loader {
    border: 5px solid #334155;
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    margin: 16px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

a {
    color: #93c5fd;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.message-error,
.message-info {
    max-width: 420px;
    margin: 16px auto;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.92);
}

.message-error {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(127, 29, 29, 0.25);
}

.message-info {
    color: #a7f3d0;
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(6, 78, 59, 0.28);
}

table {
    border-collapse: collapse;
    width: 95%;
    max-width: 900px;
    margin: 20px auto;
    background: rgba(15, 23, 42, 0.94);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

th,
td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #223043;
}

th {
    background: rgba(30, 41, 59, 0.85);
}

.voucher {
    border: 1px dashed #38bdf8;
    border-radius: 16px;
    padding: 20px;
    width: 95%;
    max-width: 460px;
    margin: 28px auto;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.35);
}

.voucher p {
    margin: 8px 0;
}

.voucher img {
    margin-top: 14px;
    max-width: 62%;
}

.ticket-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ticket-shell {
    width: 100%;
    max-width: 540px;
}

.ticket-title {
    text-align: center;
    margin-bottom: 14px;
}

.ticket-card {
    border-style: solid;
    border-width: 1px;
    border-color: #38bdf8;
}

.ticket-card p {
    font-size: 1rem;
}

.ticket-code {
    font-size: 1.12em;
    letter-spacing: 0.02em;
}

.ticket-qr {
    display: block;
    width: min(72vw, 240px);
    max-width: 100%;
    margin: 14px auto 4px;
}

.ticket-login-btn {
    width: 100%;
    margin-top: 16px;
}

.ticket-back {
    text-align: center;
    margin-top: 12px;
}

.page-center {
    min-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-card {
    width: 100%;
    max-width: 560px;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.page-title {
    text-align: center;
    margin-bottom: 14px;
}

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

.admin-modern-shell {
    display: grid;
    gap: 16px;
}

.admin-header-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.88));
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
}

.admin-subtitle {
    margin: 8px 0 0;
    color: #c2d0e6;
    font-size: 0.92rem;
}

.admin-meta-row {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(125, 211, 252, 0.36);
    background: rgba(14, 165, 233, 0.12);
    color: #cfeeff;
    font-size: 0.78rem;
    font-weight: 600;
}

.admin-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 10px 14px;
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 10px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.22);
    text-decoration: none;
    font-weight: 700;
}

.admin-logout-btn:hover {
    text-decoration: none;
    background: rgba(127, 29, 29, 0.35);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 12px;
}

.admin-kpi-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
}

.admin-kpi-card h3 {
    margin: 0;
    color: #aac1e8;
    font-size: 0.86rem;
    font-weight: 600;
}

.admin-kpi-value {
    margin: 8px 0 0;
    color: #ecfeff;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
}

.admin-kpi-alert {
    border-color: rgba(248, 113, 113, 0.4);
}

.admin-health-card {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.88);
}

.admin-health-card h2 {
    margin-bottom: 10px;
}

.admin-progress-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid #334155;
    overflow: hidden;
}

.admin-progress-fill {
    height: 100%;
    min-width: 2px;
    background: linear-gradient(120deg, #22d3ee, #22c55e);
}

.admin-health-caption {
    margin: 10px 0 0;
    color: #b5c6e4;
    font-size: 0.88rem;
}

.admin-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.admin-list-card {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.9);
}

.admin-list-card h2 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.admin-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 8px;
}

body.admin-page table {
    min-width: 520px;
}

@media (max-width: 860px) {
    .packs {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .admin-stats-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .admin-breakdown-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    body {
        padding: 16px;
    }

    .hscroll-hint {
        display: block;
        margin: 6px 0 10px;
        color: #93c5fd;
        font-size: 0.82rem;
        font-weight: 700;
        letter-spacing: 0.01em;
    }

    body.swipe-hint-hidden .hscroll-hint {
        display: none;
    }

    .packs {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-top: 8px;
        padding-bottom: 6px;
        padding-left: 10px;
        padding-right: 28px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 20px), transparent 100%);
    }

    .packs-wrap::before,
    .packs-wrap::after {
        content: "›";
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 28px;
        height: 28px;
        border-radius: 999px;
        border: 1px solid rgba(125, 211, 252, 0.38);
        background: rgba(2, 132, 199, 0.5);
        color: rgba(240, 249, 255, 0.78);
        font-size: 1.2rem;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        box-shadow: 0 6px 14px rgba(2, 132, 199, 0.22);
        pointer-events: none;
        z-index: 3;
        opacity: 0;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .packs-wrap::before {
        content: "‹";
        left: 2px;
        transform: translateY(-50%);
    }

    .packs-wrap::after {
        content: "›";
        right: 2px;
        transform: translateY(-50%);
    }

    .packs-wrap.show-left::before {
        opacity: 0.72;
    }

    .packs-wrap.show-right::after {
        opacity: 0.72;
    }

    .packs::-webkit-scrollbar {
        height: 6px;
    }

    .packs::-webkit-scrollbar-thumb {
        background: rgba(148, 163, 184, 0.35);
        border-radius: 999px;
    }

    .pack {
        flex: 0 0 min(48vw, 160px);
        aspect-ratio: 1 / 1;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        min-height: 0;
        transform: translateY(0) scale(0.94);
        opacity: 0.76;
        transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    }

    .pack.is-focus {
        transform: translateY(-4px) scale(1.04);
        opacity: 1;
        border-color: rgba(125, 211, 252, 0.85);
        box-shadow: 0 12px 20px rgba(2, 132, 199, 0.25);
    }

    .hscroll-dots {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        width: max-content;
        margin-top: 8px;
        margin-left: auto;
        margin-right: auto;
        padding: 2px 8px;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.32);
    }

    .hscroll-dot {
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: rgba(148, 163, 184, 0.45);
        transition: transform 0.18s ease, background-color 0.18s ease, opacity 0.18s ease;
        opacity: 0.75;
    }

    .hscroll-dot.is-active {
        transform: scale(1.4);
        background: rgba(125, 211, 252, 0.98);
        opacity: 1;
    }

    .hero-card,
    .offer-section,
    .simple-box {
        padding: 16px;
        border-radius: 14px;
    }

    .simple-box {
        margin: 16px auto;
        max-width: 100%;
    }

    h1 {
        font-size: 1.35rem;
    }

    .hero-logo {
        width: 66px;
        height: 66px;
        border-radius: 14px;
    }

    .hero-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .payment-offer,
    .wait-text {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .marketing-strip p,
    .section-note,
    .price-note {
        font-size: 0.92rem;
    }

    .trust-points span {
        font-size: 0.75rem;
    }

    input,
    select,
    button {
        min-height: 46px;
        font-size: 16px;
    }

    .ussd-btn {
        width: 100%;
        min-width: 0;
    }

    .resume-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .ussd-btn.resume-mini {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        font-size: 0.9rem;
    }

    .loader {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }

    .ticket-page {
        padding: 12px;
    }

    .ticket-title {
        font-size: 1.45rem;
        margin-bottom: 12px;
    }

    .ticket-card {
        width: 100%;
        padding: 16px;
    }

    .ticket-card p {
        font-size: 0.98rem;
        line-height: 1.45;
    }

    .ticket-qr {
        width: min(68vw, 200px);
        margin-top: 10px;
    }

    .ticket-login-btn {
        min-width: 0;
    }

    .page-center {
        min-height: auto;
        align-items: flex-start;
        padding-top: 10px;
    }

    .page-card {
        padding: 16px;
        border-radius: 14px;
    }

    .admin-shell {
        width: 100%;
    }

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

    .admin-logout-btn {
        width: 100%;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
}
