:root {
    --bg: #050a09;
    --bg-soft: #08110f;
    --panel: #0d1916;
    --panel-raised: #11201c;
    --border: #1d322b;
    --border-strong: #2a473d;
    --text: #e9f4ef;
    --muted: #8ba79d;
    --accent: #5ee7a8;
    --accent-strong: #34d399;
    --accent-ink: #032117;
    --danger: #f87171;
    --pending: #fbbf24;
    --radius: 16px;
    --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: #9df5cb;
}

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

h1 {
    font-size: clamp(2rem, 4.5vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
    margin-bottom: 16px;
}

h2 {
    font-size: 1.2rem;
    letter-spacing: -0.015em;
    margin-bottom: 12px;
}

code,
.mono {
    font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas,
        monospace;
    font-size: 0.86em;
}

code {
    background: #071310;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
    color: #c7f7e2;
    overflow-wrap: anywhere;
}

.bg-glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(700px 420px at 15% -5%, rgba(94, 231, 168, 0.1), transparent 70%),
        radial-gradient(560px 380px at 95% 8%, rgba(52, 211, 153, 0.07), transparent 65%),
        linear-gradient(180deg, #050a09 0%, #050a09 55%, #060d0b 100%);
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px clamp(16px, 4vw, 40px);
    border-bottom: 1px solid rgba(29, 50, 43, 0.7);
    background: rgba(5, 10, 9, 0.78);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: 1.12rem;
}

.brand:hover {
    color: var(--text);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(140deg, #9df5cb, var(--accent-strong));
    color: var(--accent-ink);
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
}

.nav {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.9rem;
}

.nav a {
    color: var(--muted);
    font-weight: 600;
}

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

.nav-user {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-weight: 600;
}

.nav form {
    margin: 0;
}

.link-button {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    color: var(--muted);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.link-button:hover {
    color: var(--danger);
}

/* ---------- Layout ---------- */

.page {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 24px) 80px;
    flex: 1;
}

.site-footer {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 28px 16px;
    color: var(--muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

.site-footer .dot {
    opacity: 0.5;
}

.eyebrow {
    margin-bottom: 10px;
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

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

.lede {
    max-width: 620px;
    color: var(--muted);
    font-size: 1.02rem;
    margin-bottom: 0;
}

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

.page-head h1 {
    margin-bottom: 8px;
}

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

.section-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.catalogue-section {
    margin-top: 40px;
    scroll-margin-top: 88px;
}

.catalogue-section:first-of-type {
    margin-top: 28px;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: linear-gradient(180deg, #71efb5, var(--accent-strong));
    color: var(--accent-ink);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 120ms ease, filter 120ms ease, border-color 120ms ease,
        background 120ms ease;
}

.btn:hover {
    color: var(--accent-ink);
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    cursor: progress;
    opacity: 0.65;
    transform: none;
}

.btn-small {
    padding: 8px 14px;
    font-size: 0.82rem;
    border-radius: 10px;
}

.btn-block {
    width: 100%;
}

.btn-ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--panel-raised);
    border-color: var(--accent);
    color: var(--text);
    filter: none;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.85fr);
    gap: 40px;
    align-items: center;
    overflow: hidden;
    padding: clamp(28px, 5vw, 52px);
    border: 1px solid var(--border);
    border-radius: 28px;
    background:
        radial-gradient(540px 260px at 88% 8%, rgba(94, 231, 168, 0.14), transparent 70%),
        linear-gradient(150deg, #10201b, #0a1512 70%);
    box-shadow: var(--shadow);
    margin-bottom: 26px;
}

.hero::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -120px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(94, 231, 168, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

.hero h1 {
    max-width: 620px;
}

.hero .lede {
    margin-bottom: 26px;
}

.hero-stats {
    display: grid;
    gap: 12px;
}

.stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(5, 13, 11, 0.6);
}

.stat-value {
    color: var(--accent);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---------- Networks ---------- */

.network-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.network-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(13, 25, 22, 0.7);
    color: var(--text);
    font-size: 0.82rem;
}

.network-pill:hover {
    border-color: var(--accent);
    color: var(--text);
}

.network-pill .muted {
    font-size: 0.75rem;
}

.network-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
}

.network-mtn {
    background: #ffcb05;
    color: #151200;
}

.network-airtel {
    background: #e40000;
    color: #fff;
}

.network-glo {
    background: #00a651;
    color: #fff;
}

.network-9mobile {
    background: #006b3f;
    color: #fff;
}

/* ---------- Bundle cards ---------- */

.bundle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
    gap: 14px;
}

.bundle-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(165deg, var(--panel-raised), var(--panel));
    transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.bundle-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: 0 18px 40px -28px rgba(94, 231, 168, 0.5);
}

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

.allowance {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.validity {
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bundle-name {
    margin: 0;
    color: var(--muted);
    font-size: 0.83rem;
}

.bundle-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(29, 50, 43, 0.7);
}

.price {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ---------- Panels & forms ---------- */

.panel {
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(170deg, var(--panel-raised), var(--panel));
    box-shadow: var(--shadow);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.form label {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.form input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    background: #071310;
    color: var(--text);
    font: inherit;
    font-size: 0.98rem;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.form input::placeholder {
    color: #557067;
}

.form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(94, 231, 168, 0.14);
}

.form .btn {
    margin-top: 18px;
}

.hint {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.fine-print {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.form-error {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 11px;
    background: rgba(248, 113, 113, 0.08);
    color: #fecaca;
    font-size: 0.86rem;
}

.notice {
    display: block;
    margin-bottom: 24px;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 0.86rem;
    line-height: 1.5;
}

.notice-test {
    border: 1px solid rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.08);
    color: #fde68a;
}

.notice strong {
    color: inherit;
}

/* ---------- Auth ---------- */

.auth-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.75fr);
    gap: 24px;
    align-items: stretch;
    max-width: 900px;
    margin: clamp(16px, 6vh, 64px) auto 0;
}

.auth-card h1 {
    font-size: clamp(1.7rem, 3.4vw, 2.2rem);
}

.auth-switch {
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 0.87rem;
}

.auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background:
        radial-gradient(300px 200px at 90% 100%, rgba(94, 231, 168, 0.12), transparent 70%),
        linear-gradient(160deg, #0f1e19, #091310);
}

.auth-aside .network-badge {
    align-self: flex-start;
}

.auth-aside p {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.6;
}

/* ---------- Purchase ---------- */

.buy-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 20px;
    align-items: start;
}

.plan-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plan-amount {
    font-size: clamp(3rem, 7vw, 4.6rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 1;
    margin: 22px 0 6px;
    color: var(--accent);
}

.summary-list {
    margin: 24px 0 0;
}

.summary-list > div,
.detail-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(29, 50, 43, 0.65);
}

.summary-list dt,
.detail-list dt {
    color: var(--muted);
    font-size: 0.8rem;
}

.summary-list dd,
.detail-list dd {
    margin: 0;
    text-align: right;
    font-size: 0.88rem;
    font-weight: 600;
}

.summary-total {
    margin-top: 8px;
    border-bottom: 0 !important;
}

.summary-total dd {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 800;
}

/* ---------- Status & order ---------- */

.order-head {
    margin-bottom: 26px;
}

.order-head h1 {
    margin: 14px 0 8px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    line-height: 1.4;
}

.status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-successful {
    background: rgba(52, 211, 153, 0.12);
    color: #6ee7b7;
}

.status-failed {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
}

.status-pending {
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
}

.status-lg {
    padding: 8px 15px;
    font-size: 0.82rem;
}

.test-tag {
    display: inline-flex;
    margin-left: 7px;
    padding: 3px 7px;
    border: 1px solid rgba(251, 191, 36, 0.5);
    border-radius: 5px;
    color: #fcd34d;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    vertical-align: middle;
}

.order-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.8fr);
    gap: 20px;
    align-items: start;
}

.order-aside p {
    color: var(--muted);
    font-size: 0.88rem;
}

.order-aside .btn + .btn {
    margin-top: 10px;
}

.pulse-row {
    display: flex;
    gap: 6px;
    margin: 22px 0;
}

.pulse-row span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pending);
    animation: pulse 1.2s ease-in-out infinite;
}

.pulse-row span:nth-child(2) {
    animation-delay: 0.15s;
}

.pulse-row span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.25;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

/* ---------- History table ---------- */

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

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.orders-table th {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.orders-table td {
    padding: 15px 16px;
    border-bottom: 1px solid rgba(29, 50, 43, 0.55);
    white-space: nowrap;
}

.orders-table tbody tr:last-child td {
    border-bottom: 0;
}

.orders-table tbody tr:hover {
    background: rgba(94, 231, 168, 0.035);
}

.order-bundle {
    display: block;
    font-weight: 700;
}

.orders-table .muted {
    font-size: 0.74rem;
}

.table-link {
    font-weight: 700;
    font-size: 0.8rem;
}

/* ---------- Empty & error ---------- */

.empty-state {
    padding: 56px 24px;
    border: 1px dashed var(--border-strong);
    border-radius: 20px;
    text-align: center;
    background: rgba(13, 25, 22, 0.45);
}

.empty-state h2 {
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 20px;
}

.error-wrap {
    display: grid;
    place-items: center;
    min-height: 52vh;
}

.error-card {
    max-width: 520px;
    text-align: center;
}

.error-code {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 12px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.error-card h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.error-card .muted {
    margin-bottom: 24px;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* ---------- Focus & motion ---------- */

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- Responsive ---------- */

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

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .auth-wrap,
    .buy-layout,
    .order-layout {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        display: none;
    }

    .auth-wrap {
        max-width: 520px;
    }
}

@media (max-width: 680px) {
    .site-header {
        gap: 12px;
        flex-wrap: wrap;
    }

    .nav {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
        font-size: 0.84rem;
        padding-top: 10px;
        border-top: 1px solid rgba(29, 50, 43, 0.55);
    }

    .nav-user {
        display: none;
    }

    .page-head {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .stat {
        flex-direction: row;
        align-items: baseline;
    }

    .bundle-grid {
        grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
    }

    .allowance {
        font-size: 1.3rem;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .order-head h1 {
        font-size: 2rem;
    }
}

@media (max-width: 460px) {
    .bundle-grid {
        grid-template-columns: 1fr;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px 16px;
    }

    .form input,
    .form .btn {
        font-size: 16px;
    }
}

/* ---------- Admin ---------- */

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

.page-actions form {
    margin: 0;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.admin-stats .stat {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.admin-grid .panel,
.admin-grid + .panel,
.page > .panel {
    margin-bottom: 24px;
}

.notice-success {
    border: 1px solid rgba(52, 211, 153, 0.4);
    background: rgba(52, 211, 153, 0.08);
    color: #a7f3d0;
}

.notice-error {
    border: 1px solid rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.08);
    color: #fecaca;
}

.text-danger {
    color: #fca5a5;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.inline-form input {
    width: 92px;
    padding: 6px 8px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: #071310;
    color: var(--text);
    font: inherit;
    font-size: 0.82rem;
}

.admin-table td {
    white-space: normal;
    vertical-align: top;
}

.admin-table .order-bundle {
    display: block;
}
