:root {
    --blue: #2446b8;
    --blue-dark: #17318f;
    --ink: #101828;
    --muted: #667085;
    --line: #e6e9f2;
    --bg: #f4f6fb;
    --green: #16a36f;
    --orange: #ff7a1a;
    --red: #d92d20;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.phone-shell {
    width: min(100%, 430px);
    min-height: 100vh;
    margin: 0 auto;
    background: #fff;
    position: relative;
    overflow-x: hidden;
    box-shadow: 0 0 0 1px rgba(16, 24, 40, .04);
}

.global-topbar {
    height: 62px;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
}
.topbar-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--blue);
    color: #fff;
    font-weight: 900;
}
.topbar-title { min-width: 0; display: grid; gap: 2px; }
.topbar-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar-title span { color: var(--muted); font-size: 12px; }
.topbar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    max-width: 112px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--blue);
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.app-top {
    background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #fff;
    padding: 18px 20px 26px;
}

.app-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-mark { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand-logo {
    width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
    background: #fff; color: var(--blue); font-weight: 900;
}
.wallet-pill { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24); padding: 8px 12px; border-radius: 999px; font-weight: 700; }

.content { padding: 16px 16px 92px; }
.section-title { font-size: 22px; margin: 24px 0 12px; }
.hero-slider, .promo-img { width: 100%; border-radius: 8px; object-fit: cover; display: block; }
.hero-slider { height: 138px; margin-top: -12px; }
.promo-stack { display: grid; gap: 14px; margin-top: 16px; }
.promo-img { height: 94px; }
.promo-link {
    position: relative;
    display: block;
}
.promo-link span {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: var(--blue);
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(16,24,40,.16);
}

.stats-card, .panel, .order-row, .profile-card {
    background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 24px rgba(16,24,40,.06);
}
.stats-card { padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.stat strong { display: block; font-size: 18px; margin-top: 8px; }
.stat span, .muted { color: var(--muted); }
.profile-head {
    padding: 18px;
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 14px;
    align-items: center;
}
.profile-head .btn { grid-column: 1 / -1; }
.profile-avatar {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue), #0f7a9f);
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}
.profile-identity { min-width: 0; }
.profile-identity h2 { margin: 0 0 6px; font-size: 22px; }
.profile-menu-item {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    font-weight: 800;
}
.profile-menu-item strong { color: var(--muted); font-size: 22px; }
.profile-nav-grid {
    display: grid;
    gap: 10px;
}
.profile-nav-grid a {
    display: grid;
    gap: 5px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(16,24,40,.06);
}
.profile-nav-grid span {
    font-weight: 900;
}
.profile-nav-grid strong {
    color: var(--muted);
    font-size: 13px;
}
.refer-card {
    background: #101828;
    color: #fff;
    border-radius: 8px;
    padding: 18px;
    display: grid;
    gap: 16px;
    box-shadow: 0 14px 34px rgba(16,24,40,.2);
}
.refer-card h2 { margin: 12px 0 8px; font-size: 22px; line-height: 1.2; }
.refer-card p { margin: 0; color: #d0d5dd; }
.team-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.team-board div {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
}
.team-board span { display: block; color: var(--muted); font-size: 12px; }
.team-board strong { display: block; margin-top: 6px; font-size: 18px; }
.team-structure {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.team-node {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 10px;
    background: #fff;
    font-size: 12px;
    font-weight: 900;
}
.team-node.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.team-line { width: 24px; height: 1px; background: var(--line); }
.timeline-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.timeline-row span:not(.badge) {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.topup-hero {
    background: #24195f;
    color: #fff;
    border-radius: 8px;
    padding: 18px;
    display: grid;
    gap: 12px;
    box-shadow: 0 14px 34px rgba(36,25,95,.22);
}
.topup-hero h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.topup-hero p { margin: 0; color: #d8dcff; }
.topup-calculation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.topup-calculation div {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}
.topup-calculation span,
.wallet-token span { display: block; color: var(--muted); font-size: 12px; }
.topup-calculation strong,
.wallet-token strong { display: block; margin-top: 6px; font-size: 18px; }
.topup-calculation small { display: block; margin-top: 6px; color: var(--green); font-weight: 800; }
.wallet-token {
    border: 1px dashed #b8c4ff;
    border-radius: 8px;
    background: #f5f7ff;
    padding: 14px;
}
.qr-placeholder {
    width: 184px;
    height: 184px;
    margin: 0 auto;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.qr-placeholder span {
    background: #eef2ff;
    border-radius: 2px;
}
.qr-placeholder span.dark { background: #101828; }
.qr-image {
    width: 184px;
    height: 184px;
    margin: 0 auto;
    display: block;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
}

.bottom-nav {
    position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
    width: min(100%, 430px); height: 72px; background: #fff; border-top: 1px solid var(--line);
    display: grid; grid-template-columns: repeat(5, 1fr); z-index: 20;
}
.bottom-nav a { display: grid; place-items: center; gap: 4px; color: #8a94a6; font-size: 12px; }
.bottom-nav a.active { color: var(--blue); font-weight: 800; }
.nav-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; border: 1px solid currentColor; font-weight: 900; }

.modal-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.48); display: grid; place-items: center; z-index: 40; padding: 24px; }
.ad-modal { width: min(100%, 360px); background: #fff; border-radius: 22px; padding: 24px 18px; text-align: center; }
.ad-modal img { width: 100%; border-radius: 4px; margin: 14px 0 22px; }

.btn { border: 0; border-radius: 8px; padding: 12px 18px; background: var(--blue); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.btn.full { width: 100%; }
.btn.orange { background: var(--orange); }
.btn.soft { background: #eef2ff; color: var(--blue); }
.btn.danger { background: #fee4e2; color: var(--red); }
.btn.success { background: #dcfaec; color: var(--green); }

.auth-screen { min-height: 100vh; padding: 28px 20px; display: grid; align-content: center; gap: 18px; background: #fff8f0; }
.auth-card { background: #fff; border-radius: 8px; box-shadow: 0 20px 44px rgba(255,122,26,.14); overflow: hidden; }
.auth-head { background: linear-gradient(90deg, #ff7a1a, #ffae32); color: #fff; padding: 18px 22px; font-weight: 900; font-size: 20px; }
.form { padding: 20px; display: grid; gap: 14px; }
.field label { display: block; font-weight: 800; margin-bottom: 7px; }
.field input, .field select, .field textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 13px 14px; background: #fff; min-height: 48px;
}
.otp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.otp-grid input { text-align: center; font-size: 22px; font-weight: 800; }

.tabs { display: flex; gap: 10px; overflow-x: auto; padding: 14px 0; background: var(--blue); }
.tabs a { min-width: 52px; text-align: center; color: #dbe4ff; background: rgba(255,255,255,.12); padding: 9px 14px; border-radius: 999px; font-weight: 900; }
.tabs a.active { background: #fff; color: var(--ink); }
.toolbar { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; }
.order-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 18px 6px 18px 0; border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid #eff2f7; }
.order-row h3 { margin: 0 0 8px; font-size: 20px; }
.order-row p { margin: 4px 0; color: var(--muted); }
.order-final { color: var(--blue-dark); font-weight: 900; margin-top: 10px; text-align: right; }
.order-detail-list { display: grid; gap: 12px; }
.order-detail-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(16,24,40,.06);
    display: grid;
    gap: 14px;
}
.order-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.order-detail-head strong { display: block; font-size: 18px; }
.order-detail-head span:not(.badge) { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.order-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.order-field-grid div {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    min-width: 0;
}
.order-field-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 6px;
}
.order-field-grid strong {
    display: block;
    overflow-wrap: anywhere;
}

.activity-hero {
    background: linear-gradient(135deg, #2446b8, #0f7a9f);
    color: #fff;
    border-radius: 8px;
    padding: 18px;
    display: grid;
    gap: 14px;
    box-shadow: 0 14px 34px rgba(36, 70, 184, .22);
}
.activity-hero h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.activity-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.activity-summary div {
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 8px;
    padding: 10px;
}
.activity-summary span { display: block; color: rgba(255,255,255,.78); font-size: 12px; }
.activity-summary strong { display: block; margin-top: 5px; font-size: 18px; }
.activity-list { display: grid; gap: 12px; }
.activity-day {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(16,24,40,.06);
}
.activity-day.locked { opacity: .72; }
.day-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #eef2ff;
    color: var(--blue);
    font-weight: 900;
}
.activity-copy { min-width: 0; display: grid; gap: 8px; }
.activity-meter { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.activity-meter progress { width: 100%; min-width: 92px; }
progress { accent-color: var(--blue); height: 10px; }

.reward-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.reward-summary div {
    background: linear-gradient(135deg, #2446b8, #0f7a9f);
    color: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 12px 28px rgba(36, 70, 184, .18);
}
.reward-summary span { display: block; color: rgba(255,255,255,.78); font-size: 12px; }
.reward-summary strong { display: block; margin-top: 6px; font-size: 24px; }
.reward-list { display: grid; gap: 12px; }
.reward-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    display: grid;
    gap: 12px;
    box-shadow: 0 10px 24px rgba(16,24,40,.06);
}
.reward-card-head,
.reward-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.reward-card-head strong { display: block; margin-bottom: 5px; }
.reward-card-foot strong { font-size: 18px; }

.welcome-event-hero {
    background: linear-gradient(135deg, #0f7a9f, #ffb321);
    color: #fff;
    border-radius: 8px;
    padding: 18px;
    display: grid;
    gap: 12px;
    box-shadow: 0 14px 34px rgba(15,122,159,.22);
}
.welcome-event-hero h1 { margin: 0; font-size: 24px; line-height: 1.2; }
.welcome-event-hero p { margin: 0; color: rgba(255,255,255,.84); }

.table-card { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { background: #f8fafc; color: #475467; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.badge { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; background: #eef2ff; color: var(--blue); }
.badge.success { background: #dcfaec; color: var(--green); }
.badge.warn { background: #fff4d6; color: #b54708; }
.badge.danger { background: #fee4e2; color: var(--red); }

.btn.dark { background: #101828; color: #fff; box-shadow: 0 10px 18px rgba(16,24,40,.18); }

.admin-nav-toggle,
.admin-sidebar-scrim,
.admin-menu-btn {
    display: none;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    background:
        radial-gradient(circle at top left, rgba(224,231,255,.88), transparent 28%),
        linear-gradient(180deg, #f6f8fc 0%, #eef3f9 100%);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0)),
        linear-gradient(180deg, #0f172a 0%, #172554 100%);
    color: #d8e3f2;
    border-right: 1px solid rgba(148,163,184,.16);
    overflow-y: auto;
    display: grid;
    align-content: start;
    gap: 18px;
}

.admin-brand {
    margin-bottom: 6px;
    padding: 8px 10px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.admin-brand .brand-mark {
    color: #fff;
    margin-bottom: 6px;
    font-size: 22px;
}

.admin-brand > span {
    color: #9fb3d8;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .14em;
}

.admin-brand p {
    margin: 10px 0 0;
    color: #bfd0ea;
    font-size: 13px;
    line-height: 1.55;
}

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

.admin-nav-group {
    margin: 14px 10px 2px;
    color: #91a5c8;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.admin-nav a {
    position: relative;
    padding: 13px 14px;
    border-radius: 16px;
    color: #d8e3f2;
    font-weight: 800;
    display: grid;
    gap: 4px;
    border: 1px solid transparent;
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.admin-nav a::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 999px;
    background: transparent;
}

.admin-nav a span { font-size: 14px; }

.admin-nav a small {
    color: #8fa3c7;
    font-size: 11px;
    font-weight: 700;
}

.admin-nav a.active,
.admin-nav a:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.08);
    color: #fff;
    transform: translateX(2px);
}

.admin-nav a.active::before,
.admin-nav a:hover::before {
    background: linear-gradient(180deg, #f8fafc 0%, #93c5fd 100%);
}

.admin-nav a.active small,
.admin-nav a:hover small {
    color: #cad7ea;
}

.admin-sidebar-foot {
    margin-top: auto;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.05);
    display: grid;
    gap: 4px;
}

.admin-sidebar-foot span,
.admin-sidebar-foot small {
    color: #9fb3d8;
}

.admin-sidebar-foot strong {
    color: #fff;
    font-size: 16px;
}

.admin-main {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr;
}

.admin-topbar {
    min-height: 82px;
    padding: 16px 28px;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: rgba(246,248,252,.82);
    border-bottom: 1px solid rgba(148,163,184,.18);
    backdrop-filter: blur(18px);
}

.admin-topbar-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-topbar-title > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.admin-topbar strong {
    font-size: 22px;
    letter-spacing: -.02em;
}

.admin-topbar span:not(.badge) {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

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

.admin-page {
    width: min(100%, 1540px);
    padding: 28px;
    display: grid;
    gap: 18px;
}

.admin-page-head { margin-bottom: 2px; }

.admin-page-kicker {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--blue);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.admin-page-head h1 {
    margin: 10px 0 0;
    font-size: clamp(28px, 3vw, 34px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.admin-grid,
.admin-control-grid,
.admin-settings-grid,
.admin-two-col {
    display: grid;
    gap: 16px;
    align-items: start;
}

.admin-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-control-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-settings-grid,
.admin-two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-card,
.admin-metric,
.admin-module-card {
    background: rgba(255,255,255,.9);
    border: 1px solid rgba(226,232,240,.95);
    border-radius: 22px;
    box-shadow: 0 18px 42px rgba(15,23,42,.06);
}

.admin-card {
    padding: 22px;
    backdrop-filter: blur(8px);
}

.admin-card h3,
.admin-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
    letter-spacing: -.02em;
}

.admin-card strong {
    font-size: 28px;
}

.admin-card p {
    color: var(--muted);
}

.admin-info-badge {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #dbe7ff;
    color: #344054;
    line-height: 1.6;
}

.admin-info-badge strong {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--blue);
}

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

.admin-card-head h2 { margin: 0; }
.admin-card-head a { color: var(--blue); font-weight: 900; }

.admin-hero {
    background:
        radial-gradient(circle at top right, rgba(255,255,255,.14), transparent 26%),
        linear-gradient(135deg, #101828 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: 24px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 22px 54px rgba(16,24,40,.18);
}

.admin-hero h1 {
    margin: 10px 0 8px;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.04;
    letter-spacing: -.04em;
}

.admin-hero p {
    margin: 0;
    color: #dbe7ff;
    max-width: 720px;
    line-height: 1.7;
}

.admin-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.admin-metric {
    position: relative;
    padding: 18px 20px;
    display: grid;
    gap: 8px;
    min-height: 118px;
    overflow: hidden;
}

.admin-metric::after {
    content: "";
    position: absolute;
    inset: auto -30px -46px auto;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,246,.16), rgba(59,130,246,0));
}

.admin-metric span,
.admin-module-card span { color: var(--muted); }

.admin-metric strong {
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1;
    letter-spacing: -.03em;
}

.admin-metric small {
    color: var(--blue);
    font-weight: 900;
}

.admin-module-card {
    min-height: 174px;
    padding: 18px;
    display: grid;
    gap: 10px;
    align-content: start;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.admin-module-card:hover,
.admin-metric:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
    box-shadow: 0 24px 54px rgba(37,99,235,.11);
}

.admin-module-card strong { font-size: 18px; }
.admin-module-card span { white-space: normal; line-height: 1.6; }
.admin-module-card em { align-self: end; color: var(--blue); font-style: normal; font-weight: 900; }

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

.form-grid.compact {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.field label {
    display: block;
    margin-bottom: 8px;
    color: #344054;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.field input,
.field select,
.field textarea,
.inline-admin-form input,
.inline-admin-form select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d8e1ef;
    border-radius: 14px;
    padding: 12px 14px;
    background: #fff;
}

.field textarea {
    min-height: 116px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.inline-admin-form input:focus,
.inline-admin-form select:focus {
    outline: 3px solid rgba(36,70,184,.12);
    border-color: #6b8cff;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    font-weight: 800;
    color: #344054;
}

.check-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
}

.inline-admin-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr)) auto;
    align-items: center;
    gap: 10px;
    min-width: 360px;
}

.admin-sticky-actions {
    position: sticky;
    bottom: 16px;
    margin-top: 18px;
    background:
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: 22px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 18px 42px rgba(16,24,40,.22);
}

.admin-sticky-actions span {
    color: #dbeafe;
    font-weight: 800;
}

.admin-control-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(226,232,240,.95);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(15,23,42,.05);
}

.admin-control-strip a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475467;
    font-weight: 900;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.admin-control-strip a.active,
.admin-control-strip a:hover {
    background: #eef2ff;
    color: var(--blue);
    transform: translateY(-1px);
}

.admin-tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-tag {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #dbe5f0;
    color: #344054;
    font-weight: 800;
}

.table-card {
    overflow-x: auto;
    padding: 0;
}

.table-card table td[colspan] {
    padding: 22px 18px;
    color: #475467;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    border: 0;
}

th,
td {
    padding: 15px 18px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    color: #475467;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    z-index: 1;
    white-space: nowrap;
}

td {
    color: #101828;
    white-space: normal;
}

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

tbody tr:hover {
    background: #f8fbff;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    background: #eef2ff;
    color: var(--blue);
}

.badge.success { background: #dcfaec; color: var(--green); }
.badge.warn { background: #fff4d6; color: #b54708; }
.badge.danger { background: #fee4e2; color: var(--red); }

body {
    background:
        linear-gradient(180deg, #eef2ff 0%, #f8fafc 34%, #f4f6fb 100%);
}

.phone-shell {
    background: #f7f9fc;
}

.global-topbar {
    box-shadow: 0 10px 24px rgba(16,24,40,.05);
}

.topbar-action,
.wallet-pill,
.badge,
.btn {
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

.topbar-action:active,
.wallet-pill:active,
.btn:active,
.bottom-nav a:active {
    transform: translateY(1px);
}

.app-top {
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 0 14px 28px rgba(36,70,184,.16);
}

.app-title strong {
    font-size: 20px;
    line-height: 1.15;
}

.content {
    display: grid;
    gap: 14px;
}

.section-title {
    font-size: 19px;
    line-height: 1.2;
    margin: 12px 0 0;
}

.hero-slider,
.promo-img,
.stats-card,
.panel,
.profile-card,
.refer-card,
.topup-hero,
.activity-hero,
.reward-card,
.welcome-event-hero,
.order-detail-card {
    border-radius: 8px;
}

.hero-slider,
.promo-img {
    box-shadow: 0 12px 28px rgba(16,24,40,.08);
}

.panel,
.stats-card,
.profile-card,
.reward-card,
.order-detail-card,
.activity-day {
    border-color: #edf0f7;
    box-shadow: 0 12px 26px rgba(16,24,40,.07);
}

.form {
    gap: 16px;
}

.field input,
.field select,
.field textarea {
    border-color: #dfe4ef;
    box-shadow: inset 0 1px 0 rgba(16,24,40,.02);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 3px solid rgba(36,70,184,.14);
    border-color: var(--blue);
}

.btn {
    min-height: 44px;
    box-shadow: 0 10px 18px rgba(36,70,184,.14);
}

.btn.soft,
.btn.success,
.btn.danger {
    box-shadow: none;
}

.btn:hover,
.topbar-action:hover,
.wallet-pill:hover {
    box-shadow: 0 12px 24px rgba(36,70,184,.16);
}

.bottom-nav {
    height: 78px;
    padding-bottom: 4px;
    box-shadow: 0 -12px 28px rgba(16,24,40,.08);
}

.bottom-nav a {
    padding-top: 8px;
}

.bottom-nav a.active .nav-icon {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 8px 16px rgba(36,70,184,.22);
}

.tabs {
    scrollbar-width: none;
}

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

.tabs a {
    border: 1px solid rgba(36,70,184,.08);
}

.table-card {
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15,23,42,.06);
}

.badge {
    align-items: center;
    min-height: 26px;
}

.admin-topbar {
    box-shadow: 0 8px 22px rgba(16,24,40,.05);
}

.order-field-grid,
.topup-calculation,
.team-board,
.activity-summary {
    align-items: stretch;
}

.timeline-row:first-child,
.profile-menu-item:first-of-type {
    border-top: 0;
}

/* Admin density pass: keep operational screens compact and tables readable. */
.admin-shell {
    font-size: 14px;
}

.admin-card,
.admin-metric,
.admin-module-card {
    border-radius: 16px;
}

.admin-card {
    padding: 18px;
}

.admin-card h2,
.admin-card h3,
.admin-card-head h2 {
    font-size: 16px;
    line-height: 1.25;
    margin-bottom: 0;
}

.admin-card strong:not(.badge),
.admin-metric strong {
    font-size: 22px;
    line-height: 1.15;
}

.admin-metric {
    min-height: 102px;
    padding: 16px;
}

.admin-metric strong {
    display: block;
    margin-top: 7px;
}

.admin-metric small {
    display: none;
}

.admin-card-head {
    min-height: 32px;
    gap: 12px;
}

.table-card {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.table-card table {
    min-width: 720px;
}

.table-card th,
.table-card td {
    padding: 11px 14px;
    font-size: 13px;
    line-height: 1.4;
}

.table-card th {
    font-size: 11px;
    letter-spacing: .045em;
}

.badge {
    min-height: 24px;
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
}

.admin-info-badge {
    padding: 11px 13px;
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 1200px) {
    .admin-grid,
    .admin-control-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .admin-menu-btn,
    .admin-sidebar-scrim {
        display: block;
    }

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

    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 30;
        width: min(86vw, 320px);
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: 24px 0 48px rgba(15,23,42,.22);
    }

    .admin-sidebar-scrim {
        position: fixed;
        inset: 0;
        z-index: 20;
        background: rgba(15,23,42,.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .admin-nav-toggle:checked ~ .admin-shell .admin-sidebar {
        transform: translateX(0);
    }

    .admin-nav-toggle:checked ~ .admin-shell .admin-sidebar-scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .admin-menu-btn {
        min-height: 42px;
        padding: 10px 14px;
        border-radius: 999px;
        background: #e9efff;
        color: var(--blue);
        font-size: 13px;
        font-weight: 900;
        cursor: pointer;
    }

    .admin-topbar,
    .admin-page {
        padding-left: 18px;
        padding-right: 18px;
    }

    .admin-hero,
    .admin-sticky-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-grid,
    .admin-control-grid,
    .admin-settings-grid,
    .admin-two-col,
    .form-grid,
    .form-grid.compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-topbar-actions {
        width: 100%;
    }

    .admin-topbar-actions .btn,
    .admin-topbar-actions form {
        width: 100%;
    }

    .admin-topbar-actions form .btn {
        width: 100%;
    }

    .admin-card {
        padding: 18px;
    }

    .inline-admin-form {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    th,
    td {
        padding: 13px 14px;
    }
}

@media (max-width: 430px) {
    .content { padding: 14px 14px 92px; }
    .global-topbar { grid-template-columns: 38px 1fr auto; padding: 8px 12px; }
    .topbar-action { max-width: 96px; }
    .app-top { padding: 16px 16px 24px; }
    .brand-mark { font-size: 18px; }
    .order-field-grid,
    .topup-calculation {
        grid-template-columns: 1fr;
    }
    .reward-card-head,
    .reward-card-foot,
    .activity-meter,
    .order-detail-head,
    .timeline-row {
        align-items: flex-start;
        flex-direction: column;
    }
    .activity-day {
        grid-template-columns: 44px 1fr;
    }
    .activity-day > .btn {
        grid-column: 1 / -1;
        width: 100%;
    }
    .team-board {
        grid-template-columns: 1fr;
    }
}

/* Compact pager used by long admin data tables. */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.admin-pagination .btn.disabled {
    cursor: not-allowed;
    opacity: .48;
}

.proof-preview {
    display: block;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.proof-preview img {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: contain;
}
