/* ===========================================================
   ATD Data Sub — global stylesheet
   =========================================================== */

:root {
    --color-primary: #f97316;
    --color-primary-dark: #ea580c;
    --color-primary-light: #fff2e8;
    --color-success: #16a34a;
    --color-success-light: #dcfce7;
    --color-error: #dc2626;
    --color-error-light: #fee2e2;
    --color-warning: #d97706;
    --color-warning-light: #fef3c7;
    --color-text: #111827;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-bg: #f9fafb;
    --color-white: #ffffff;
    --color-panel: #ffffff;
    --color-sidebar: #0f0f10;
    --color-sidebar-text: #d1d5db;
    --color-sidebar-border: #262626;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Dark content-area theme, toggled via [data-theme="dark"] on <html>.
   The sidebar (--color-sidebar*) intentionally stays constant in both modes. */
:root[data-theme="dark"] {
    --color-text: #f3f4f6;
    --color-text-muted: #9ca3af;
    --color-border: #2a2a2d;
    --color-bg: #17171a;
    --color-white: #1f1f23;
    --color-panel: #1f1f23;
    --color-primary-light: #3a2414;
    --color-success-light: #113322;
    --color-error-light: #3a1616;
    --color-warning-light: #3a2c0d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    transition: background-color 0.15s ease, color 0.15s ease;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 { margin: 0 0 12px; line-height: 1.25; letter-spacing: -0.02em; }

img { max-width: 100%; display: block; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25); }
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: 0 6px 16px rgba(249, 115, 22, 0.32); }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary-light); }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }
.btn-danger { background: var(--color-error); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Header / Nav ---------- */
.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}
.logo { font-size: 1.3rem; font-weight: 800; color: var(--color-primary); display: inline-flex; align-items: center; gap: 10px; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a:not(.btn) { color: var(--color-text); font-weight: 500; }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 16px auto;
    font-size: 0.92rem;
}
.alert-error { background: var(--color-error-light); color: var(--color-error); border: 1px solid #fca5a5; }
.alert-success { background: var(--color-success-light); color: var(--color-success); border: 1px solid #86efac; }
.receipt-inline-link { font-weight: 700; text-decoration: underline; color: inherit; margin-left: 4px; white-space: nowrap; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #7c3aed 100%);
    color: #fff;
    padding: 90px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.10) 0, transparent 40%),
                       radial-gradient(circle at 85% 80%, rgba(255,255,255,0.08) 0, transparent 45%);
    pointer-events: none;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    position: relative;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 18px;
}
.hero-copy h1 { font-size: 2.6rem; margin-bottom: 16px; }
.hero-copy p { font-size: 1.08rem; opacity: 0.92; margin-bottom: 28px; max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,0.6); }
.hero .btn-outline:hover { background: rgba(255,255,255,0.12); }
.hero-trust-row { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.85rem; opacity: 0.9; }
.hero-trust-row span { display: inline-flex; align-items: center; gap: 6px; }

.mock-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: calc(var(--radius) + 4px);
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.mock-card-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-size: 0.95rem;
}
.mock-card-row:last-child { border-bottom: none; }

/* ---------- Stats bar ---------- */
.stats-bar {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
}
.stats-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 34px 0;
    text-align: center;
}
.stat-value { font-size: 1.9rem; font-weight: 800; color: var(--color-primary); }
.stat-label { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 4px; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-alt { background: var(--color-white); }
.section-eyebrow {
    display: block;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
}
.section-title { text-align: center; font-size: 1.9rem; margin-bottom: 40px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.service-card, .step-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.service-card:hover, .step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}
.service-icon {
    font-size: 1.8rem;
    margin: 0 auto 14px;
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-primary-light);
    border-radius: 14px;
}
.step-number {
    width: 40px; height: 40px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    margin: 0 auto 14px;
}

.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 12px;
}
.faq-item summary { font-weight: 600; cursor: pointer; }
.faq-item p { margin: 10px 0 0; color: var(--color-text-muted); }

/* ---------- Footer ---------- */
.site-footer { background: #111827; color: #d1d5db; padding: 54px 0 0; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 30px; }
.site-footer h3, .site-footer h4 { color: #fff; }
.site-footer h4 { font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.05em; }
.site-footer a { color: #d1d5db; display: block; margin-bottom: 10px; transition: color 0.15s ease; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.footer-trust { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 0.82rem; color: #9ca3af; }
.footer-trust span { display: inline-flex; align-items: center; gap: 6px; }
.footer-bottom {
    border-top: 1px solid #374151;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    text-align: center;
    font-size: 0.85rem;
}
.footer-bottom a { color: #9ca3af; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Static content pages (About, Legal, Contact) ---------- */
.content-page { padding: 60px 0 80px; }
.content-page .container { max-width: 820px; }
.content-page h1 { font-size: 2.1rem; margin-bottom: 6px; }
.content-page .content-updated { color: var(--color-text-muted); font-size: 0.85rem; margin-bottom: 34px; }
.content-page h2 { font-size: 1.3rem; margin-top: 34px; }
.content-page p, .content-page li { color: var(--color-text); line-height: 1.75; }
.content-page ul { padding-left: 22px; }
.content-page li { margin-bottom: 8px; }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.contact-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}
.contact-card .contact-icon { font-size: 1.8rem; margin-bottom: 10px; }
.contact-card h3 { font-size: 1rem; margin-bottom: 6px; }
.contact-card p { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 14px; }

/* ---------- Auth pages ---------- */
.auth-section { padding: 60px 0; }
.auth-container { display: flex; justify-content: center; }
.auth-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 36px;
    width: 100%;
    max-width: 440px;
}
.auth-subtitle { color: var(--color-text-muted); margin-bottom: 24px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--color-text-muted); }

.applock-section { min-height: 100vh; display: flex; align-items: center; }
.applock-card { text-align: center; }
.applock-logo { width: 88px; height: 88px; border-radius: 20px; object-fit: cover; margin: 0 auto 16px; display: block; }
.applock-card h2 { margin-bottom: 24px; }
.applock-card form,
.applock-card .form-group { text-align: left; }

/* Dark "remembered device" lock screen */
.applock-dark-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    background: radial-gradient(circle at 50% 0%, #c2410c 0%, #7c2d12 35%, #1a0f08 75%, #0f0f10 100%);
    color: #ffffff;
}
.applock-dark-card { width: 100%; max-width: 380px; text-align: center; }
.applock-dark-logo { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; margin: 0 auto 20px; display: block; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
.applock-greeting { font-size: 1.35rem; font-weight: 700; margin-bottom: 4px; }
.applock-greeting strong { color: #ffedd5; }
.applock-sub { color: rgba(255,255,255,0.65); font-size: 0.92rem; margin-bottom: 28px; }

.applock-fingerprint-btn {
    width: 96px; height: 96px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.35);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    box-shadow: 0 0 0 0 rgba(249,115,22,0.4);
}
.applock-fingerprint-btn:active { transform: scale(0.94); background: rgba(255,255,255,0.18); }
.applock-fingerprint-btn svg { width: 46px; height: 46px; }
.applock-fingerprint-label { font-weight: 600; margin-bottom: 26px; color: rgba(255,255,255,0.9); }

.applock-divider { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.45); font-size: 0.85rem; margin-bottom: 22px; }
.applock-divider::before, .applock-divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.2); }

.applock-identifier-chip { display: inline-block; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; padding: 6px 16px; font-size: 0.85rem; color: rgba(255,255,255,0.85); margin-bottom: 18px; }

.applock-pin-inputs { display: flex; gap: 10px; justify-content: center; margin-bottom: 10px; }
.applock-pin-inputs input {
    width: 48px; height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius);
    background: rgba(0,0,0,0.25);
    color: #ffffff;
    -webkit-text-security: disc;
    text-security: disc;
}
.applock-pin-inputs input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(249,115,22,0.3); }
.applock-pin-error { color: #fca5a5; font-size: 0.85rem; min-height: 18px; margin-bottom: 12px; }

.applock-links { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.applock-links a { color: rgba(255,255,255,0.75); font-size: 0.88rem; text-decoration: underline; }
.applock-links a:hover { color: #ffffff; }

.applock-password-fallback .auth-card { max-width: 380px; margin: 0 auto; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-group input, .form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--color-panel);
    color: var(--color-text);
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}
.form-group input:disabled { background: var(--color-bg); color: var(--color-text-muted); }
.form-checkbox label { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.field-hint { display: block; margin-top: 6px; color: var(--color-text-muted); font-size: 0.85rem; }
.field-hint.valid { color: var(--color-success); }
.field-hint.invalid { color: var(--color-error); }

.inline-search { display: flex; gap: 10px; }
.inline-search input, .inline-search select { padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--color-border); }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-form input, .inline-form select { padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--color-border); }
.inline-form-tight { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price-label { font-size: 0.78rem; color: var(--color-text-muted); display: flex; align-items: center; gap: 6px; }
.price-input { width: 90px; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: 6px; }
.wallet-adjust-form { gap: 8px; margin-top: 8px; align-items: center; }
.wallet-adjust-form select, .wallet-adjust-form input { padding: 6px 8px; border-radius: 6px; border: 1px solid var(--color-border); }

/* ---------- Dashboard shell ---------- */
.dashboard-body { background: var(--color-bg); }
.dashboard-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    background: var(--color-sidebar);
    color: var(--color-sidebar-text);
    flex-shrink: 0;
    padding: 22px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar .logo {
    color: #fff;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    position: sticky;
    top: 0;
    background: var(--color-sidebar);
    z-index: 1;
    padding-top: 4px;
}
.sidebar .logo .logo-badge {
    width: 30px; height: 30px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}
.sidebar .logo-img { height: 38px; width: 38px; object-fit: contain; flex-shrink: 0; }
.site-header .logo-img { height: 42px; width: 42px; object-fit: contain; vertical-align: middle; }
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--color-sidebar-border);
}
.avatar-circle-lg { width: 42px; height: 42px; font-size: 1.05rem; }
.sidebar-user-info { min-width: 0; }
.sidebar-user-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-balance, .sidebar-user-role {
    color: var(--color-sidebar-text);
    font-size: 0.78rem;
    margin-top: 2px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
    color: var(--color-sidebar-text);
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.sidebar-nav a.active .nav-icon { opacity: 1; }
.sidebar-nav a:hover { background: #1f1f22; text-decoration: none; }
.sidebar-nav a.active { background: var(--color-primary); color: #fff; }
.sidebar-nav a.admin-link { margin-top: 14px; border-top: 1px solid var(--color-sidebar-border); padding-top: 14px; color: #fbbf24; }
.sidebar-nav a.logout-link { color: #f87171; }
.sidebar-nav .nav-divider { border-top: 1px solid var(--color-sidebar-border); margin: 10px 0; }

.dashboard-main { flex: 1; min-width: 0; }
.topbar {
    background: var(--color-panel);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-title { font-weight: 700; font-size: 1.1rem; }
.topbar-wallet { font-size: 0.92rem; color: var(--color-text-muted); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.theme-toggle-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    cursor: pointer;
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
}
.theme-toggle-btn:hover { border-color: var(--color-primary); }

.avatar-menu { position: relative; }
.avatar-trigger {
    display: flex; align-items: center; gap: 8px;
    background: none; border: none; cursor: pointer;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 4px;
}
.avatar-circle {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}
.avatar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--color-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: 8px;
    z-index: 30;
}
.avatar-dropdown.open { display: block; }
.avatar-dropdown a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--color-text);
    font-size: 0.88rem;
    font-weight: 500;
}
.avatar-dropdown a:hover { background: var(--color-bg); text-decoration: none; }
.avatar-dropdown a.logout-link { color: var(--color-error); }

.dashboard-content { padding: 26px; }

/* ---------- Stat cards ---------- */
.stat-row { margin-bottom: 26px; }
.stat-card {
    background: var(--color-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}
.stat-label { display: block; color: var(--color-text-muted); font-size: 0.85rem; margin-bottom: 8px; }
.stat-value { font-size: 1.4rem; font-weight: 700; }
.status-active { color: var(--color-success); }
.status-suspended { color: var(--color-error); }

.stat-tile {
    background: var(--color-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-tile .stat-tile-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.stat-tile .stat-tile-value { font-size: 1.5rem; font-weight: 700; }
.stat-tile .stat-tile-sub { font-size: 0.8rem; color: var(--color-text-muted); }

/* ---------- Wallet hero card ---------- */
.wallet-hero {
    background: linear-gradient(135deg, #1a1310 0%, #100c0a 60%, #0a0807 100%);
    border-radius: 16px;
    padding: 28px 30px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
}
.wallet-hero::after {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(249,115,22,0.35) 0%, rgba(249,115,22,0) 70%);
    border-radius: 50%;
}
.wallet-hero-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: #d1d5db; position: relative; }
.wallet-hero-balance { font-size: 2.2rem; font-weight: 800; margin: 10px 0 20px; position: relative; }
.wallet-hero-actions { display: flex; gap: 12px; position: relative; flex-wrap: wrap; }
.wallet-hero-actions .btn-outline { color: #fff; border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.06); }
.wallet-hero-actions .btn-outline:hover { background: rgba(255,255,255,0.14); }

/* ---------- Promo carousel ---------- */
.promo-carousel {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 22px;
    min-height: 128px;
}
.promo-slide {
    display: none;
    padding: 22px 26px;
    color: #fff;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 128px;
}
.promo-slide.active { display: flex; }
.promo-slide.promo-orange { background: linear-gradient(120deg, #f97316 0%, #ea580c 100%); }
.promo-slide.promo-indigo { background: linear-gradient(120deg, #4338ca 0%, #1e1b4b 100%); }
.promo-slide-icon { font-size: 1.8rem; }
.promo-slide-body { flex: 1; min-width: 200px; }
.promo-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.promo-slide h4 { margin: 0 0 4px; font-size: 1.05rem; }
.promo-slide p { margin: 0; font-size: 0.85rem; opacity: 0.9; }
.promo-dots { display: flex; gap: 6px; justify-content: center; padding: 10px 0; background: var(--color-panel); }
.promo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-border); border: none; cursor: pointer; padding: 0; }
.promo-dot.active { background: var(--color-primary); width: 20px; border-radius: 4px; }

/* ---------- Quick actions ---------- */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 26px;
}
.quick-action {
    background: var(--color-panel);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 28px 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.87rem;
    color: var(--color-primary-dark);
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.quick-action:hover { border-color: var(--color-primary); text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.quick-action-icon {
    width: 64px; height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
}
.quick-action span { display: block; margin-top: 8px; }

.quick-action-icon[data-color="green"] { background: #dcfce7; }
.quick-action-icon[data-color="blue"] { background: #dbeafe; }
.quick-action-icon[data-color="purple"] { background: #ede9fe; }
.quick-action-icon[data-color="pink"] { background: #fce7f3; }
.quick-action-icon[data-color="teal"] { background: #ccfbf1; }
.quick-action-icon[data-color="amber"] { background: #fef3c7; }
.quick-action-icon[data-color="red"] { background: #fee2e2; }
.quick-action-icon[data-color="indigo"] { background: #e0e7ff; }

/* ---------- Panels ---------- */
.panel {
    background: var(--color-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.narrow-panel { max-width: 520px; }
.wide-panel { max-width: 820px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.muted { color: var(--color-text-muted); font-size: 0.9rem; }
.empty-state { color: var(--color-text-muted); text-align: center; padding: 30px 0; }

/* ---------- Tables ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.data-table th { color: var(--color-text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
.actions-cell { display: flex; flex-wrap: wrap; gap: 6px; }

.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: var(--color-success-light); color: var(--color-success); }
.badge-pending { background: var(--color-warning-light); color: var(--color-warning); }
.badge-failed { background: var(--color-error-light); color: var(--color-error); }

.pagination { display: flex; gap: 8px; margin-top: 18px; }
.pagination a {
    padding: 7px 13px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 0.85rem;
}
.pagination a.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ---------- Transfer details (fund wallet) ---------- */
.transfer-details {
    background: var(--color-primary-light);
    border-radius: var(--radius);
    padding: 18px;
    margin: 16px 0;
}
.transfer-details .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.92rem; }
.payment-status { text-align: center; color: var(--color-text-muted); margin: 14px 0; font-size: 0.9rem; }

/* ---------- Referrals & Reseller ---------- */
.badge-info { background: var(--color-primary-light); color: var(--color-primary-dark); }
.referral-code-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-bg);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
    padding: 14px 18px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    flex-wrap: wrap;
}
.api-key-box {
    background: #0f0f10;
    color: #34d399;
    border-radius: var(--radius);
    padding: 14px 18px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    margin: 12px 0;
}

.doc-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.doc-tab {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}
.doc-tab.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.reseller-perks { list-style: none; margin: 0; padding: 0; }
.reseller-perks li { padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.reseller-perks li:last-child { border-bottom: none; }

/* ---------- Service form shell (wallet strip + card) ---------- */
.service-topbar {
    background: linear-gradient(135deg, #1a1310 0%, #100c0a 60%, #0a0807 100%);
    border-radius: 14px;
    padding: 18px 24px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.service-topbar::after {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(249,115,22,0.35) 0%, rgba(249,115,22,0) 70%);
    border-radius: 50%;
}
.service-topbar-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #d1d5db; position: relative; }
.service-topbar-value { font-size: 1.5rem; font-weight: 800; margin-top: 4px; position: relative; }
.service-topbar .btn { position: relative; }

.form-section-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 700;
    margin: 18px 0 10px;
}
.form-section-label:first-child { margin-top: 0; }

/* ---------- Choice button groups (network / provider selection) ---------- */
.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.choice-btn {
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 14px 16px;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    color: #fff;
    background: #9ca3af;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.choice-btn:hover { transform: translateY(-1px); }
.choice-btn.selected { border-color: rgba(0,0,0,0.35); box-shadow: 0 0 0 3px var(--color-primary-light); }
.choice-btn[data-color="mtn"] { background: #f6c700; color: #1a1a1a; }
.choice-btn[data-color="airtel"] { background: #e0525f; }
.choice-btn[data-color="glo"] { background: #4caf7d; }
.choice-btn[data-color="9mobile"] { background: #3c8f6e; }
.choice-btn[data-color="dstv"] { background: #4f7bbd; }
.choice-btn[data-color="gotv"] { background: #17181c; }
.choice-btn[data-color="startimes"] { background: #d9636f; }

.choice-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; }
.choice-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    background: var(--color-panel);
    font-weight: 600;
    font-size: 0.9rem;
}
.choice-list-item:hover { border-color: var(--color-primary); }
.choice-list-item.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
.choice-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Amount chips ---------- */
.amount-chip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
.amount-chip {
    border: 1px solid var(--color-border);
    background: var(--color-panel);
    border-radius: var(--radius);
    padding: 14px 10px;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
    color: var(--color-text);
}
.amount-chip:hover { border-color: var(--color-primary); }
.amount-chip.selected { border-color: var(--color-primary); background: var(--color-primary-light); color: var(--color-primary-dark); }

/* ---------- Use my number ---------- */
.use-my-number {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: #fff;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 12px 14px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    margin-bottom: 14px;
    width: 100%;
    justify-content: center;
    box-shadow: var(--shadow);
}
.use-my-number:hover { background: var(--color-primary-dark); }

/* ---------- Data plan category tabs + cards ---------- */
.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
}
.category-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    background: var(--color-panel);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text);
}
.category-tab.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.plan-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    background: var(--color-panel);
    text-align: left;
}
.plan-card:hover { border-color: var(--color-primary); }
.plan-card.selected { border-color: var(--color-primary); background: var(--color-primary-light); }
.plan-card .plan-size { font-weight: 800; font-size: 1rem; margin-bottom: 4px; }
.plan-card .plan-validity { font-size: 0.78rem; color: var(--color-text-muted); margin-bottom: 8px; }
.plan-card .plan-price { font-weight: 700; color: var(--color-primary); }
.plan-card .plan-tag { display: block; font-size: 0.68rem; text-transform: uppercase; color: var(--color-text-muted); margin-top: 6px; letter-spacing: 0.03em; }

/* ---------- Transaction stats + filter tabs ---------- */
.tx-stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    background: var(--color-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 20px;
}
.tx-stat { text-align: center; }
.tx-stat .tx-stat-value { display: block; font-size: 1.3rem; font-weight: 800; }
.tx-stat .tx-stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.tx-stat.tx-stat-spent .tx-stat-value { color: var(--color-primary); }
.tx-stat.tx-stat-success .tx-stat-value { color: var(--color-success); }
.tx-stat.tx-stat-failed .tx-stat-value { color: var(--color-error); }

.tx-filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 18px;
    padding-bottom: 2px;
}
.tx-filter-tab {
    flex-shrink: 0;
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    background: var(--color-primary-light);
    border: 1px solid transparent;
    border-radius: 999px;
    white-space: nowrap;
}
.tx-filter-tab.active { color: #fff; background: var(--color-primary); }
.tx-filter-tab:hover { border-color: var(--color-primary); text-decoration: none; }

.tx-search-bar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.tx-search-bar input[type="text"] { flex: 1; min-width: 200px; }

/* ---------- Chat bubble ---------- */
.chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    z-index: 40;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.chat-bubble:hover { background: var(--color-primary-dark); text-decoration: none; }
.whatsapp-bubble { background: #25D366; }
.whatsapp-bubble:hover { background: #1ebe57; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .quick-actions { grid-template-columns: repeat(3, 1fr); }
    .contact-cards { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
    .hero-copy h1 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .site-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        padding: 16px 20px;
        border-bottom: 1px solid var(--color-border);
    }
    .site-nav.open { display: flex; }
    .header-inner { position: relative; }

    .dashboard-shell { flex-direction: column; }
    .sidebar {
        width: 260px;
        max-width: 82vw;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 70;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
    }
    .sidebar.open { display: block; transform: translateX(0); }
    .sidebar-toggle { display: block; }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 65;
    }
    .sidebar-backdrop.open { display: block; }
    body.drawer-open { overflow: hidden; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
    .data-table { display: block; overflow-x: auto; }

    .plan-grid { grid-template-columns: repeat(2, 1fr); }
    .amount-chip-grid { grid-template-columns: repeat(2, 1fr); }
    .tx-stats-bar { grid-template-columns: repeat(2, 1fr); }
    .service-topbar { flex-direction: column; align-items: flex-start; }
    .chat-bubble { bottom: 16px; right: 16px; width: 46px; height: 46px; font-size: 1.2rem; }
}

/* ---------- Receipt ---------- */
.receipt-box { max-width: 460px; margin: 0 auto; text-align: center; }
.receipt-header { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 18px; }
.receipt-logo { height: 56px; width: 56px; object-fit: contain; }
.receipt-site-name { font-weight: 800; font-size: 1.1rem; }
.receipt-title { font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8rem; margin: 4px 0; }
.receipt-description { font-weight: 600; font-size: 1rem; padding: 12px; background: var(--color-bg); border-radius: var(--radius); margin-bottom: 16px; }
.receipt-table { width: 100%; border-collapse: collapse; text-align: left; }
.receipt-table th, .receipt-table td { padding: 9px 4px; border-bottom: 1px dashed var(--color-border); font-size: 0.92rem; }
.receipt-table th { color: var(--color-text-muted); font-weight: 600; width: 45%; }
.receipt-footer { margin-top: 18px; font-size: 0.85rem; color: var(--color-text-muted); }

/* ---------- Scratch card (printable pin) ---------- */
.scratch-card {
    border: 2px dashed var(--color-primary);
    border-radius: 14px;
    padding: 26px 20px;
    background: var(--color-primary-light);
}
.scratch-card-header { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 14px; }
.scratch-card-tag {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 12px;
    border-radius: 999px;
}
.scratch-card-product { font-weight: 700; font-size: 1rem; margin-bottom: 16px; }
.scratch-card-pin-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.scratch-card-pin {
    font-family: 'Courier New', monospace;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--color-primary-dark);
    padding: 10px 0;
    word-break: break-all;
}
.scratch-card-serial { font-size: 0.85rem; color: var(--color-text-muted); }

/* ---------- Welcome popup ---------- */
.welcome-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}
.welcome-modal-box {
    background: var(--color-panel);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 32px 28px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}
.welcome-modal-logo { height: 56px; width: 56px; object-fit: contain; margin: 0 auto 14px; }
.welcome-modal-box h3 { font-size: 1.2rem; margin-bottom: 10px; }
.welcome-modal-box p { color: var(--color-text-muted); margin-bottom: 22px; white-space: pre-line; }

/* ---------- Transaction PIN modal ---------- */
.pin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 110;
    padding: 20px;
}
.pin-modal-box {
    background: var(--color-panel);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 32px 28px;
    max-width: 360px;
    width: 100%;
    text-align: center;
}
.pin-modal-box h3 { font-size: 1.1rem; margin-bottom: 6px; }
.pin-modal-box p { color: var(--color-text-muted); font-size: 0.88rem; margin-bottom: 20px; }
.pin-modal-inputs { display: flex; gap: 10px; justify-content: center; margin-bottom: 8px; }
.pin-modal-inputs input {
    width: 48px; height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-bg);
    color: var(--color-text);
}
.pin-modal-inputs input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
.pin-modal-error { color: var(--color-error); font-size: 0.85rem; min-height: 18px; margin-bottom: 10px; }
.pin-modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.pin-modal-actions .btn { flex: 1; }

.pin-mask-input {
    -webkit-text-security: disc;
    text-security: disc;
    letter-spacing: 4px;
}

/* ---------- Print (receipt only) ---------- */
@media print {
    .sidebar, .topbar, .nav-toggle, .no-print, .alert { display: none !important; }
    .dashboard-shell, .dashboard-main, .dashboard-content { display: block !important; height: auto !important; padding: 0 !important; margin: 0 !important; }
    .receipt-box { box-shadow: none !important; border: none !important; max-width: 100% !important; }
    body { background: #fff !important; }
}
