/* =========================
   PRIME DATA GH
   MOBILE-ONLY DESIGN SYSTEM
========================= */

:root {
    --bg: #070b14;
    --surface: #0d1422;
    --surface-focus: #111b2c;
    --border: #1c2537;
    --border-focus: #1263b8;
    --blue: #1263b8;
    --teal: #159fa8;
    --text: #f5f8fc;
    --muted: #8592a8;
    --muted-dim: #566078;
    --danger: #e35b5b;
    color-scheme: dark;

    --radius-lg: 20px;
    --radius-md: 15px;
    --radius-sm: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

button,
input {
    font-family: inherit;
}

button {
    cursor: pointer;
}

a {
    -webkit-touch-callout: none;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    background-attachment: fixed;
    background-image:
        radial-gradient(circle at 15% 0%, rgba(18, 99, 184, 0.16), transparent 55%),
        radial-gradient(circle at 100% 20%, rgba(21, 159, 168, 0.12), transparent 45%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* =========================
   PAGE
========================= */

.signup-page,
.login-page {
    width: 100%;
    max-width: 440px;
    min-height: 100vh;
    margin: 0 auto;
    padding: max(38px, env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom));
}

/* =========================
   BRAND
========================= */

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 40px;
    animation: brand-in 0.5s ease both;
}

@keyframes brand-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.brand-mark {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.brand-name h1 {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text);
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-suffix {
    font-size: 16px;
    font-weight: 600;
    color: var(--teal);
    margin-top: 1px;
}

/* =========================
   HEADER
========================= */

.signup-header,
.login-header {
    margin-bottom: 30px;
}

.signup-header h2,
.login-header h2 {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.25;
    margin-bottom: 8px;
}

.signup-header p,
.login-header p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

/* =========================
   FORM
========================= */

.signup-form,
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    color: #dce2ec;
    font-size: 13.5px;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    height: 54px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    padding: 0 16px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.input-group input::placeholder {
    color: var(--muted-dim);
}

.input-group input:focus {
    border-color: var(--border-focus);
    background: var(--surface-focus);
    box-shadow: 0 0 0 3px rgba(18, 99, 184, 0.16);
}

.field-hint {
    font-size: 12.5px;
    color: var(--muted-dim);
}

/* Phone field with GH prefix */

.phone-field {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.phone-field:focus-within {
    border-color: var(--border-focus);
    background: var(--surface-focus);
    box-shadow: 0 0 0 3px rgba(18, 99, 184, 0.16);
}

.phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
    border-right: 1px solid var(--border);
    white-space: nowrap;
}

.phone-field input {
    border: none;
    background: transparent;
    box-shadow: none !important;
    height: 54px;
}

.phone-field input:focus {
    border: none;
    background: transparent;
}

/* Password fields with visibility toggle */

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    padding-right: 48px;
}

.toggle-visibility {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted);
    border-radius: var(--radius-sm);
}

.toggle-visibility:hover {
    color: var(--teal);
}

.toggle-visibility svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toggle-visibility svg[hidden] {
    display: none;
}

/* Terms checkbox */

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding-top: 4px;
}

.checkbox-row input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.checkbox-box {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    position: relative;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.checkbox-row input:checked + .checkbox-box {
    background: linear-gradient(135deg, var(--blue), var(--teal));
    border-color: transparent;
}

.checkbox-row input:checked + .checkbox-box::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-row input:focus-visible + .checkbox-box {
    box-shadow: 0 0 0 3px rgba(18, 99, 184, 0.3);
}

.checkbox-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.checkbox-text a {
    color: var(--teal);
    text-decoration: none;
    font-weight: 600;
}

/* =========================
   BUTTON
========================= */

.primary-btn {
    width: 100%;
    height: 54px;
    margin-top: 6px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--blue), var(--teal));
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.1px;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 10px 24px -10px rgba(18, 99, 184, 0.55);
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn:hover {
    opacity: 0.94;
}

.primary-btn:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

/* =========================
   LOGIN LINK
========================= */

.login-link {
    text-align: center;
    margin-top: 26px;
}

.login-link p {
    color: var(--muted-dim);
    font-size: 14px;
}

.login-link a {
    color: var(--teal);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}

/* =========================
   LOGIN PAGE EXTRAS
========================= */

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

.password-label label {
    color: #dce2ec;
    font-size: 13.5px;
    font-weight: 600;
}

.password-label a {
    color: var(--teal);
    font-size: 13px;
    text-decoration: none;
    font-weight: 600;
}

.register-link {
    text-align: center;
    margin-top: 26px;
}

.register-link p {
    color: var(--muted-dim);
    font-size: 14px;
}

.register-link a {
    color: var(--teal);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}

/* =========================
   ACCESSIBILITY
========================= */

@media (prefers-reduced-motion: reduce) {
    .brand {
        animation: none;
    }
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

/* =========================
   SMALL PHONES
========================= */

@media (max-width: 360px) {

    .signup-page,
    .login-page {
        padding-left: 18px;
        padding-right: 18px;
    }

    .brand-name h1 {
        font-size: 23px;
    }

    .brand-mark {
        width: 44px;
        height: 44px;
    }

    .signup-header h2,
    .login-header h2 {
        font-size: 22px;
    }

    .phone-prefix {
        font-size: 13.5px;
        padding: 0 9px;
    }
}

/* =========================
   TALL / LARGER PHONES
========================= */

@media (min-height: 800px) {
    .signup-page,
    .login-page {
        padding-top: 64px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* =========================
   ICONS (shared stroke style)
========================= */

.action-icon svg,
.nav-icon,
.empty-icon svg,
.arrow,
.buy-icon svg,
.back-button svg,
.orders-empty-icon svg,
.transaction-icon svg,
.wallet-action-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =========================
   DASHBOARD PAGE
========================= */

.dashboard-page {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    padding: max(28px, env(safe-area-inset-top)) 22px calc(104px + env(safe-area-inset-bottom));
}

/* Top bar */

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

.welcome-text {
    font-size: 13.5px;
    color: var(--muted);
    margin-bottom: 4px;
}

.dashboard-top h1 {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.profile-button {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.profile-button:hover {
    border-color: var(--border-focus);
}

/* Wallet card */

.wallet-card {
    border-radius: var(--radius-lg);
    padding: 22px 22px 20px;
    margin-bottom: 30px;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.14), transparent 55%),
        linear-gradient(135deg, var(--blue), var(--teal));
    box-shadow: 0 16px 32px -16px rgba(18, 99, 184, 0.55);
}

.wallet-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.wallet-top span:first-child {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}

.wallet-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.balance {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff;
    margin-bottom: 20px;
}

.wallet-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    height: 44px;
    padding: 0 22px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.15s ease, transform 0.15s ease;
}

.wallet-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.wallet-button:active {
    transform: scale(0.98);
}

/* Section heading */

.dashboard-section {
    margin-bottom: 30px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-heading h2 {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.section-heading a {
    font-size: 13px;
    font-weight: 600;
    color: var(--teal);
    text-decoration: none;
}

/* Quick actions */

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

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 16px 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    text-align: center;
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.action-card:hover {
    border-color: var(--border-focus);
    background: var(--surface-focus);
}

.action-card:active {
    transform: scale(0.96);
}

.action-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(18, 99, 184, 0.14);
    color: var(--teal);
}

.action-icon svg {
    width: 17px;
    height: 17px;
}

.action-card span {
    font-size: 11.5px;
    font-weight: 600;
    color: #dce2ec;
    line-height: 1.2;
}

/* Network list */

.network-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.network-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.network-card:hover {
    border-color: var(--border-focus);
    background: var(--surface-focus);
}

.network-logo {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
}

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

.network-logo.telecel {
    background: #e6273e;
    color: #ffffff;
}

.network-logo.at {
    background: #1263b8;
    color: #ffffff;
}

.network-info {
    flex: 1;
    min-width: 0;
}

.network-info h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.network-info p {
    font-size: 13px;
    color: var(--muted);
}

.arrow {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--muted-dim);
}

/* Recent orders - empty state */

.orders-section {
    margin-bottom: 10px;
}

.empty-orders {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 34px 24px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.empty-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(18, 99, 184, 0.14);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.empty-icon svg {
    width: 22px;
    height: 22px;
}

.empty-orders h3 {
    font-size: 15.5px;
    font-weight: 700;
}

.empty-orders p {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.5;
    max-width: 220px;
}

.small-button {
    margin-top: 10px;
    height: 40px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--blue), var(--teal));
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.small-button:hover {
    opacity: 0.92;
}

.small-button:active {
    transform: scale(0.97);
}

/* =========================
   BOTTOM NAVIGATION
========================= */

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 480px;
    margin: 0 auto;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    background: rgba(13, 20, 34, 0.9);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    padding: 4px 0;
    text-decoration: none;
    color: var(--muted-dim);
    font-size: 10.5px;
    font-weight: 600;
}

.nav-icon {
    width: 22px;
    height: 22px;
}

.nav-item.active {
    color: var(--teal);
}

.nav-item:not(.buy-nav):hover {
    color: var(--muted);
}

.buy-nav {
    color: var(--muted-dim);
}

.buy-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue), var(--teal));
    color: #ffffff;
    margin-top: -26px;
    box-shadow: 0 8px 18px -6px rgba(18, 99, 184, 0.65);
    border: 3px solid var(--bg);
}

.buy-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}

/* =========================
   DASHBOARD - SMALL PHONES
========================= */

@media (max-width: 360px) {

    .dashboard-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .balance {
        font-size: 29px;
    }

    .quick-actions {
        gap: 8px;
    }

    .action-card {
        padding: 13px 4px;
    }
}

/* =========================
   BUY DATA PAGE
========================= */

.data-page {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    padding: max(22px, env(safe-area-inset-top)) 20px 40px;
}

.data-section {
    margin-bottom: 24px;
}

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

.section-title h2 {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
}


/* =========================
   NETWORK SELECTOR
========================= */

.network-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.network-select {
    min-height: 55px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: #ffffff;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    font-size: 13px;
    font-weight: 700;
}

.network-select:active {
    transform: scale(0.97);
}

.network-select.active {
    border-color: var(--teal);
    background: #10202b;
    box-shadow: 0 0 0 3px rgba(21, 159, 168, 0.14);
}

.network-letter {
    width: 27px;
    height: 27px;
    border-radius: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 12px;
    font-weight: 800;
}

.mtn-bg {
    background: #ffd21c;
    color: #111;
}

.telecel-bg {
    background: #e31b3f;
    color: #fff;
}

.at-bg {
    background: #1263b8;
    color: #ffffff;
}


/* =========================
   PHONE NUMBER
========================= */

.phone-input {
    height: 56px;
    width: 100%;

    display: flex;
    align-items: center;

    background: #0d1422;
    border: 1px solid #202c40;
    border-radius: 15px;

    overflow: hidden;
}

.phone-input span {
    height: 100%;
    display: flex;
    align-items: center;

    padding: 0 14px;

    color: #b9c2d0;
    border-right: 1px solid #202c40;
    font-size: 14px;
}

.phone-input input {
    flex: 1;
    height: 100%;

    background: transparent;
    border: none;
    outline: none;

    padding: 0 14px;

    color: #ffffff;
    font-size: 15px;
}

.phone-input input::placeholder {
    color: #7d8aa0;
}

.phone-input {
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.phone-input:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(18, 99, 184, 0.16);
}

.phone-input.has-error {
    border-color: var(--danger);
}


/* =========================
   DATA PACKAGE GRID
========================= */

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

.package-card {
    min-height: 88px;

    padding: 12px;

    display: flex;
    align-items: center;
    gap: 10px;

    text-align: left;

    border: 1px solid #202c40;
    border-radius: 17px;

    background: #0d1422;
    color: #ffffff;

    cursor: pointer;
}

.package-card {
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.package-card:hover {
    border-color: #1263b8;
}

.package-card:active {
    transform: scale(0.98);
}

.package-card.selected {
    border-color: var(--teal);
    background: #10202b;
    box-shadow: 0 0 0 3px rgba(21, 159, 168, 0.14);
}


/* Package logo placeholder */

.package-logo {
    width: 46px;
    height: 46px;

    flex-shrink: 0;

    border-radius: 14px;

    background: #f4f5f6;

    color: #555;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 8px;
    font-weight: 800;

    text-align: center;
}

.package-logo.mtn-bg,
.package-logo.telecel-bg,
.package-logo.at-bg {
    font-family: "Space Grotesk", Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
}

.package-logo.mtn-bg { background: #ffd21c; color: #111; }
.package-logo.telecel-bg { background: #e31b3f; color: #fff; }
.package-logo.at-bg { background: #1263b8; color: #fff; }


/* Package information */

.package-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.package-info strong {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 17px;
    font-weight: 700;
}

.package-info span {
    color: #9aa5b6;
    font-size: 13px;
    white-space: nowrap;
}


/* =========================
   PURCHASE BOTTOM
========================= */

.purchase-bottom {
    position: sticky;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 10;

    display: flex;
    align-items: center;
    gap: 14px;

    margin-top: 10px;
    padding: 12px 12px 12px 16px;

    border: 1px solid #1d283b;
    border-radius: 18px;

    background: #0b111e;
    box-shadow: 0 -12px 24px -12px rgba(7, 11, 20, 0.9);
}

.selected-info {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.selected-info span {
    color: #737f93;
    font-size: 13px;
}

.selected-info strong {
    color: #dfe5ee;
    font-size: 13.5px;
    line-height: 1.3;
    text-align: left;
}

.continue-button {
    flex-shrink: 0;
    width: auto;
    min-width: 128px;
    padding: 0 22px;
    height: 50px;

    border: none;
    border-radius: 15px;

    background: linear-gradient(135deg, #1263b8, #0e7f88);

    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.continue-button:active {
    transform: scale(0.98);
}

.continue-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}


/* =========================
   SMALL PHONES
========================= */

@media (max-width: 360px) {

    .package-grid {
        gap: 8px;
    }

    .package-card {
        padding: 10px;
        gap: 8px;
    }

    .package-logo {
        width: 44px;
        height: 44px;
    }

    .package-info strong {
        font-size: 14px;
    }

    .package-info span {
        font-size: 12px;
    }
}

/* =========================
   PROFILE PAGE
========================= */

.profile-page {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    padding: max(22px, env(safe-area-inset-top)) 20px 110px;
}

/* Profile card */

.profile-card {
    text-align: center;
    padding: 25px 20px;
    margin-bottom: 28px;

    background: #0d1422;
    border: 1px solid #1d283b;
    border-radius: 21px;
}

.profile-avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 13px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, #1263b8, #159fa8);

    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
}

.profile-card h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.profile-card p {
    color: #7f8a9d;
    font-size: 13px;
}


/* Sections */

.profile-section {
    margin-bottom: 25px;
}

.profile-section > h2 {
    font-size: 16px;
    margin-bottom: 11px;
}


/* Profile list */

.profile-list {
    display: flex;
    flex-direction: column;

    background: #0d1422;
    border: 1px solid #1d283b;
    border-radius: 17px;
    overflow: hidden;
}

.profile-item {
    min-height: 68px;
    padding: 12px 15px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: #ffffff;
    text-decoration: none;

    border-bottom: 1px solid #1d283b;
}

.profile-item:last-child {
    border-bottom: none;
}

a.profile-item:active {
    background: var(--surface-focus);
}

.profile-item div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.profile-item span {
    color: #7f8a9d;
    font-size: 12px;
}

.profile-item strong {
    color: #e7ebf2;
    font-size: 14px;
    font-weight: 500;
}

.profile-arrow {
    color: #68758a !important;
    font-size: 23px !important;
}


/* Logout */

.logout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: 100%;
    height: 53px;

    margin-top: 5px;

    border: 1px solid #47222a;
    border-radius: 15px;

    background: #160f14;

    color: #e26b7b;

    font-size: 14px;
    font-weight: 700;
}

/* =========================
   ORDERS PAGE
========================= */

.orders-page {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    padding: max(22px, env(safe-area-inset-top)) 20px 110px;
}


/* =========================
   ORDER FILTER
========================= */

.order-filter {
    width: 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 22px;

    scrollbar-width: none;
}

.order-filter::-webkit-scrollbar {
    display: none;
}

.filter-button {
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;

    height: 38px;
    padding: 0 15px;

    border: 1px solid #202c40;
    border-radius: 11px;

    background: #0d1422;
    color: #7f8a9d;

    font-size: 12px;
    font-weight: 600;
}

.filter-button.active {
    background: #102b38;
    border-color: #159fa8;
    color: #ffffff;
}


/* =========================
   EMPTY ORDERS
========================= */

.orders-list {
    margin-top: 5px;
}

.orders-empty {
    min-height: 330px;

    padding: 40px 22px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    border: 1px dashed #29354a;
    border-radius: 20px;

    background: #0b111e;
}

.orders-empty-icon {
    width: 58px;
    height: 58px;

    margin-bottom: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #121c2d;
    color: #159fa8;

    font-size: 23px;
}

.orders-empty h2 {
    font-size: 18px;
    margin-bottom: 9px;
}

.orders-empty p {
    max-width: 280px;

    color: #737f93;
    font-size: 13px;
    line-height: 1.6;

    margin-bottom: 20px;
}

/* =========================
   PAGE HEADER (inner pages)
========================= */

.page-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.page-header h1 {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-align: center;
}

.back-button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.back-button svg {
    width: 20px;
    height: 20px;
}

.back-button:hover {
    border-color: var(--border-focus);
    background: var(--surface-focus);
}

.back-button:active {
    transform: scale(0.94);
}

.header-space {
    width: 44px;
    height: 44px;
}

/* Orders empty icon (svg version) */

.orders-empty-icon svg {
    width: 26px;
    height: 26px;
}


/* =========================
   WALLET PAGE
========================= */

.wallet-page {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    padding: max(22px, env(safe-area-inset-top)) 20px 110px;
}

/* Balance card */

.wallet-balance-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 22px;
    margin-bottom: 18px;
    border-radius: var(--radius-lg);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.14), transparent 55%),
        linear-gradient(135deg, var(--blue), var(--teal));
    box-shadow: 0 16px 32px -16px rgba(18, 99, 184, 0.55);
}

.wallet-balance-card p {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 10px;
}

.wallet-balance-card h2 {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.6px;
    color: #ffffff;
    margin-bottom: 18px;
}

.wallet-balance-card span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}

/* Actions */

.wallet-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.wallet-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.wallet-action:hover {
    border-color: var(--border-focus);
    background: var(--surface-focus);
}

.wallet-action:active {
    transform: scale(0.97);
}

.wallet-action-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(18, 99, 184, 0.14);
    color: var(--teal);
}

.wallet-action-icon svg {
    width: 18px;
    height: 18px;
}

/* Transactions */

.transactions {
    margin-bottom: 10px;
}

.transaction-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 38px 24px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.transaction-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(18, 99, 184, 0.14);
    color: var(--teal);
}

.transaction-icon svg {
    width: 22px;
    height: 22px;
}

.transaction-empty h3 {
    font-size: 15.5px;
    font-weight: 700;
}

.transaction-empty p {
    max-width: 240px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--muted);
}


/* =========================
   FORM VALIDATION
========================= */

.field-error {
    display: none;
    font-size: 12.5px;
    color: var(--danger);
}

.input-group.has-error .field-error,
.checkbox-wrap.has-error .field-error {
    display: block;
}

.input-group.has-error input,
.input-group.has-error .phone-field {
    border-color: var(--danger);
}

.input-group.has-error .phone-field input {
    border: none;
}

.input-group.has-error input:focus,
.input-group.has-error .phone-field:focus-within {
    box-shadow: 0 0 0 3px rgba(227, 91, 91, 0.16);
}

.input-group.has-error .field-hint {
    display: none;
}

.checkbox-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkbox-wrap.has-error .checkbox-box {
    border-color: var(--danger);
}


/* =========================
   TOAST
========================= */

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(96px + env(safe-area-inset-bottom));
    z-index: 40;
    width: max-content;
    max-width: calc(100% - 40px);
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #16233a;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transform: translate(-50%, 10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* On pages without the bottom nav, sit lower */

.login-page ~ .toast,
.signup-page ~ .toast {
    bottom: calc(28px + env(safe-area-inset-bottom));
}


/* =========================
   REDUCED MOTION
========================= */

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


/* =========================
   VERY SMALL PHONES (all inner pages)
========================= */

@media (max-width: 360px) {

    .data-page,
    .orders-page,
    .profile-page,
    .wallet-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .wallet-balance-card h2 {
        font-size: 31px;
    }

    .wallet-action {
        padding: 12px;
        font-size: 13px;
    }
}


/* =========================
   MOBILE BROWSER POLISH
========================= */

/* Use the visible viewport height so toolbars don't cause stray scrolling */
@supports (min-height: 100dvh) {
    .signup-page,
    .login-page,
    .dashboard-page,
    .data-page,
    .orders-page,
    .profile-page,
    .wallet-page {
        min-height: 100dvh;
    }
}

/* Keep browser autofill on-brand instead of bright yellow/white */
input:-webkit-autofill,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--surface-focus) inset;
    transition: background-color 9999s ease-in-out 0s;
}


/* =========================
   PACKAGE CATEGORY TABS
========================= */

.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-tabs[hidden] {
    display: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    flex-shrink: 0;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.category-tab.active {
    background: #102b38;
    border-color: var(--teal);
    color: #ffffff;
}


/* =========================
   LOCKED (UNAVAILABLE) PACKAGES
========================= */

.package-card.locked,
.package-card.locked:hover,
.package-card.locked:active {
    border-color: var(--border);
    background: var(--surface);
    transform: none;
    cursor: not-allowed;
}

.package-card.locked .package-logo {
    opacity: 0.4;
    filter: grayscale(1);
}

.package-card.locked .package-info strong {
    color: var(--muted);
}

.lock-note {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--danger) !important;
    font-size: 12.5px;
    font-weight: 600;
}

.lock-note svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================
   PAYMENT SHEET
========================= */

body.sheet-open {
    overflow: hidden;
}

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(3, 6, 12, 0.72);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sheet-backdrop.open {
    opacity: 1;
}

.pay-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    max-width: 480px;
    max-height: 92vh;
    max-height: 92dvh;
    margin: 0 auto;
    padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, 0.6);
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pay-sheet.open {
    transform: translateY(0);
}

.sheet-handle {
    width: 40px;
    height: 4px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: var(--border);
}

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

.sheet-head h2,
.pay-success h2 {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.sheet-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg);
    color: var(--muted);
}

.sheet-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Order summary */

.order-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
}

.order-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.order-summary dt {
    font-size: 13.5px;
    color: var(--muted);
}

.order-summary dd {
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.order-summary .total {
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.order-summary .total dt {
    color: var(--text);
    font-weight: 600;
}

.order-summary .total dd {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--teal);
}

/* Payment options */

.pay-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    color: var(--text);
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.pay-option:hover {
    border-color: var(--border-focus);
    background: var(--surface-focus);
}

.pay-option:active {
    transform: scale(0.98);
}

.pay-option:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.pay-option:disabled:hover {
    border-color: var(--border);
    background: var(--bg);
}

.pay-option-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(18, 99, 184, 0.14);
    color: var(--teal);
}

.pay-option-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pay-option-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pay-option-text strong {
    font-size: 15px;
    font-weight: 700;
}

.pay-option-text span {
    font-size: 12.5px;
    color: var(--muted);
}

.pay-option-text span.low {
    color: var(--danger);
}

.pay-message {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(227, 91, 91, 0.35);
    border-radius: var(--radius-sm);
    background: rgba(227, 91, 91, 0.08);
    color: #f0a0a0;
    font-size: 13px;
    line-height: 1.5;
}

.pay-message[hidden] {
    display: none;
}

.pay-message a {
    color: var(--teal);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

/* Success view */

.pay-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 18px 8px 22px;
}

.pay-success-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(62, 207, 142, 0.14);
    color: #3ecf8e;
}

.pay-success-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pay-success p {
    max-width: 300px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}

.pay-ref {
    font-size: 12.5px !important;
}

.pay-ref strong {
    color: var(--text);
    font-weight: 600;
    word-break: break-all;
}

.pay-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-actions .primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    text-decoration: none;
}

.secondary-btn {
    width: 100%;
    height: 54px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.secondary-btn:hover {
    border-color: var(--border-focus);
}

.secondary-btn:active {
    transform: scale(0.98);
}


/* =========================
   ORDER ROWS
========================= */

.order-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-items[hidden],
.empty-orders[hidden],
.orders-empty[hidden] {
    display: none;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.order-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.order-main strong {
    font-size: 15px;
    font-weight: 700;
}

.order-main span {
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-side {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.order-side strong {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 14.5px;
    font-weight: 700;
}

.order-status {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
}

.order-status.pending {
    color: #e8b84a;
    background: rgba(232, 184, 74, 0.12);
}

.order-status.successful {
    color: #3ecf8e;
    background: rgba(62, 207, 142, 0.12);
}

.order-status.failed {
    color: var(--danger);
    background: rgba(227, 91, 91, 0.12);
}

/* =========================
   ADMIN LOGIN
========================= */

.admin-login-page {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;

    padding: 55px 22px 35px;

    display: flex;
    flex-direction: column;
}


/* Brand */

.admin-login-brand {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    margin-bottom: 55px;
}


/* Header */

.admin-login-header {
    margin-bottom: 30px;
}

.admin-login-header > span {
    display: inline-block;

    margin-bottom: 9px;

    color: #159fa8;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.admin-login-header h2 {
    font-size: 27px;
    margin-bottom: 8px;
}

.admin-login-header p {
    color: #8d97aa;
    font-size: 14px;
    line-height: 1.5;
}


/* Form */

.admin-login-form {
    display: flex;
    flex-direction: column;

    gap: 20px;
}


/* Back */

.back-customer-login {
    display: block;

    margin-top: 28px;

    text-align: center;

    color: #159fa8;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;
}

/* ================================
   ADMIN CUSTOMERS
================================ */

.admin-page {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    padding: max(24px, env(safe-area-inset-top)) 18px calc(100px + env(safe-area-inset-bottom));
}

.admin-topbar {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.back-button {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #0d1422;
    border: 1px solid #202b40;
    color: #fff;
    text-decoration: none;
    font-size: 20px;
}

.admin-topbar h1 {
    font-size: 23px;
    margin-top: 3px;
}

.admin-label {
    color: #159fa8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.admin-avatar {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1263b8, #159fa8);
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
}


/* Search */

.admin-search {
    margin-bottom: 28px;
}

.admin-search input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid #202b40;
    outline: none;
    background: #0d1422;
    color: #fff;
    font-size: 14px;
}

.admin-search input::placeholder {
    color: #687386;
}

.admin-search input:focus {
    border-color: #159fa8;
}


/* Section title */

.admin-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.admin-section-title span {
    color: #159fa8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.admin-section-title h2 {
    margin-top: 5px;
    font-size: 20px;
}

.admin-section-title strong {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #0d1422;
    border: 1px solid #202b40;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}


/* Empty state */

.admin-empty {
    padding: 55px 20px;
    text-align: center;
    border: 1px solid #202b40;
    border-radius: 18px;
    background: #0b111d;
}

.empty-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 17px;
    background: #111b2c;
    font-size: 22px;
}

.admin-empty h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

.admin-empty p {
    color: #7e899d;
    font-size: 13px;
    line-height: 1.5;
}


/* Back link */

.admin-back-link {
    display: block;
    margin-top: 25px;
    text-align: center;
    color: #159fa8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

/* =========================
   LIVE PACKAGE STATUS
========================= */

.package-status {
    grid-column: 1 / -1;
    min-height: 88px;
    padding: 22px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px dashed #26344b;
    border-radius: 17px;
    background: #0d1422;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

/* =========================
   ADMIN DASHBOARD
========================= */

.admin-topbar.no-back {
    grid-template-columns: 1fr 42px;
}

.admin-label-block h1 {
    font-size: 23px;
    margin-top: 3px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.admin-stat-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.admin-stat-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.admin-stat-card strong {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

/* Hint text (manual sale page) */

.admin-hint {
    margin: -12px 0 22px;
    padding: 12px 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.5;
}

/* Customer rows (customers.html) */

.admin-customers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-customers-list[hidden] {
    display: none;
}

.customer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.customer-item .admin-avatar {
    flex-shrink: 0;
    text-decoration: none;
}

.customer-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.customer-main strong {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-main span {
    font-size: 12.5px;
    color: var(--muted);
}

.customer-side {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.customer-side strong {
    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 14.5px;
    font-weight: 700;
}

.customer-side span {
    font-size: 12px;
    color: var(--muted);
}

/* Admin bottom nav reuses .bottom-nav / .nav-item as-is */

.admin-sale-result[hidden] {
    display: none;
}


/* =========================
   WALLET FUNDING
========================= */

.fund-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fund-form .category-tabs {
    margin-bottom: 0;
}

/* these set display:flex, which would otherwise beat the [hidden] attribute */
.transaction-empty[hidden],
.pay-actions .primary-btn[hidden] {
    display: none;
}

.order-item .transaction-icon {
    flex-shrink: 0;
    margin-bottom: 0;
}

.pay-success-icon.warn {
    background: rgba(232, 184, 74, 0.14);
    color: #e8b84a;
}


/* =========================
   SPLASH SCREEN
   Shown once per browser session (the head script adds html.splash-on).
   Timeline: logo draws (0-1.2s) -> name forms letter by letter
   (0.45-1.65s) -> hold -> fade out (2.1-2.6s).
========================= */

.splash {
    display: none;
}

html.splash-on .splash {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(120% 60% at 50% 38%, rgba(18, 99, 184, 0.16), transparent 60%),
        var(--bg);

    animation: splashOut 0.5s ease 2.1s forwards;
}

.splash-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    padding: 0 24px;
}

.splash-mark {
    width: 84px;
    height: 84px;
    overflow: visible;
    animation: markPop 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 1.1s both;
}

.splash-mark .sp {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: markDraw 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.splash-mark .sp-frame { animation-delay: 0s; }
.splash-mark .sp-ring  { animation-delay: 0.3s; }

.splash-name {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.28em;

    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: clamp(30px, 9vw, 40px);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.1;
    color: var(--text);
    white-space: nowrap;
}

.splash-suffix {
    color: var(--teal);
}

.splash-space {
    display: inline-block;
    width: 0.28em;
}

.splash-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(16px) scale(0.85);
    filter: blur(6px);

    animation: letterIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: calc(0.45s + var(--i) * 0.07s);
}

.splash-bar {
    width: 120px;
    height: 3px;
    border-radius: 3px;
    background: var(--border);
    overflow: hidden;
}

.splash-bar span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--blue), #22c3cc);
    transform: scaleX(0);
    transform-origin: left center;
    animation: barFill 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes markDraw {
    0%   { stroke-dashoffset: 1; opacity: 0; }
    5%   { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes markPop {
    from { transform: scale(0.94); }
    to   { transform: scale(1); }
}

@keyframes letterIn {
    to {
        opacity: 1;
        transform: none;
        filter: blur(0);
    }
}

@keyframes barFill {
    to { transform: scaleX(1); }
}

@keyframes splashOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* The site-wide reduced-motion rule above turns every animation off, which would
   leave the splash on screen for good. People who ask for less motion skip it. */
@media (prefers-reduced-motion: reduce) {
    html.splash-on .splash {
        display: none;
    }
}


/* =========================
   RECEIPT
   Opens after a successful purchase. On screen it is a full-screen
   "paper" receipt; when printed (or saved as PDF) only the receipt shows.
========================= */

.receipt {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: flex;
    flex-direction: column;

    background: var(--bg);
}

.receipt[hidden] {
    display: none;
}

body.receipt-open {
    overflow: hidden;
}

.receipt-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: max(22px, env(safe-area-inset-top)) 20px 16px;
}

.receipt-paper {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 28px 22px 22px;

    border-radius: 18px;
    background: #ffffff;
    color: #0b1220;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.receipt-head {
    text-align: center;
}

.receipt-mark {
    width: 46px;
    height: 46px;
}

.receipt-brand {
    margin-top: 8px;

    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: #0b1220;
}

.receipt-brand span {
    margin-left: 0.28em;
    color: #159fa8;
}

.receipt-kicker {
    margin-top: 4px;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #5b6678;
}

.receipt-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin: 20px 0 14px;

    font-size: 14px;
    font-weight: 700;
    color: #0f8a4d;
}

.receipt-check {
    display: grid;
    place-items: center;

    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0f8a4d;
}

.receipt-check svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.receipt-amount-label {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #5b6678;
}

.receipt-amount {
    margin: 2px 0 20px;
    text-align: center;

    font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #0b1220;
}

.receipt-rows {
    padding-top: 6px;
    border-top: 1.5px dashed #c9d1de;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;

    padding: 11px 0;
    border-bottom: 1px solid #eef1f6;

    font-size: 14px;
}

.receipt-row[hidden] {
    display: none;
}

.receipt-row dt {
    flex-shrink: 0;
    color: #5b6678;
}

.receipt-row dd {
    text-align: right;
    font-weight: 600;
    color: #0b1220;
    overflow-wrap: anywhere;
}

.receipt-foot {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1.5px dashed #c9d1de;

    text-align: center;
    font-size: 12.5px;
    line-height: 1.55;
    color: #5b6678;
}

.receipt-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;

    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 12px 20px max(20px, env(safe-area-inset-bottom));
}

.receipt-actions .primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

/* @page has to sit outside @media print or browsers ignore it. */
@page {
    margin: 14mm;
}

@media print {

    /* The site is dark (color-scheme: dark), which would otherwise paint the page margins black. */
    :root {
        color-scheme: light;
    }

    html,
    body.receipt-open {
        background: #ffffff !important;
        overflow: visible;
    }

    body.receipt-open > *:not(#receipt) {
        display: none !important;
    }

    body.receipt-open .receipt {
        position: static;
        display: block;
        background: #ffffff;
    }

    body.receipt-open .receipt-scroll {
        overflow: visible;
        padding: 0;
    }

    body.receipt-open .receipt-paper {
        max-width: 105mm;
        margin: 0 auto;
        padding: 3mm 0 0;
        border-radius: 0;
        box-shadow: none;
    }

    body.receipt-open .receipt-actions {
        display: none !important;
    }

    body.receipt-open .receipt-paper,
    body.receipt-open .receipt-paper * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
