/* =============================================================
   KhalidData — fintech + verification platform stylesheet
   Light/dark theming via CSS custom properties. The dark theme is
   toggled with html[data-theme="dark"] (set before paint in header).
   ============================================================= */

:root {
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-dark: #1D4ED8;
    --indigo: #4F46E5;
    --navy: #0F172A;
    --accent: #06B6D4;
    --text-dark: #16283c;
    --text-light: #5b6b7a;
    --text-muted: #93a3b3;
    --bg-light: #f4f7fd;
    --bg-white: #ffffff;
    --bg-soft: #eef3fb;
    --border: #e3ebf6;
    --danger: #dc2626;
    --danger-bg: #fdeeee;
    --danger-border: #f6cfcf;
    --success: #16a34a;
    --success-bg: #e9f9f1;
    --success-border: #c2ecd8;
    --warning: #b45309;
    --warning-bg: #fdf3e0;
    --warning-border: #f5ddb0;
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.1);
    --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.18);
    --glow: 0 8px 24px rgba(37, 99, 235, 0.35);
    --gradient: linear-gradient(135deg, #2563EB 0%, #4F46E5 100%);
    --gradient-deep: linear-gradient(135deg, #0F172A 0%, #1E3A8A 55%, #4F46E5 100%);
    --gradient-cyan: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%);
    --tint: rgba(37, 99, 235, 0.08);
    --tint-strong: rgba(37, 99, 235, 0.16);
    --ring: rgba(59, 130, 246, 0.2);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-pill: 50px;
    --header-bg: rgba(255, 255, 255, 0.88);
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.25);
    /* Validated chart palette (light surface #ffffff) */
    --chart-1: #2563EB;
    --chart-2: #06B6D4;
    --chart-3: #F59E0B;
    --chart-4: #8B5CF6;
    --chart-grid: #eef2f8;
}

html[data-theme="dark"] {
    --primary: #3B82F6;
    --primary-light: #60A5FA;
    --primary-dark: #2563EB;
    --navy: #E2E8F0;
    --text-dark: #E2E8F0;
    --text-light: #94A3B8;
    --text-muted: #64748B;
    --bg-light: #0B1220;
    --bg-white: #131D31;
    --bg-soft: #0F1829;
    --border: #223048;
    --danger: #f87171;
    --danger-bg: rgba(220, 38, 38, 0.14);
    --danger-border: rgba(220, 38, 38, 0.35);
    --success: #4ade80;
    --success-bg: rgba(22, 163, 74, 0.14);
    --success-border: rgba(22, 163, 74, 0.35);
    --warning: #fbbf24;
    --warning-bg: rgba(180, 83, 9, 0.18);
    --warning-border: rgba(180, 83, 9, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --glow: 0 8px 24px rgba(37, 99, 235, 0.28);
    --tint: rgba(59, 130, 246, 0.12);
    --tint-strong: rgba(59, 130, 246, 0.22);
    --ring: rgba(96, 165, 250, 0.25);
    --header-bg: rgba(11, 18, 32, 0.88);
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    /* Validated chart palette (dark surface #1e293b) */
    --chart-1: #3B82F6;
    --chart-2: #0891B2;
    --chart-3: #D97706;
    --chart-4: #8B5CF6;
    --chart-grid: #1c2940;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
}

a { color: var(--primary); text-decoration: none; transition: color 0.25s ease; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; }

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 var(--ring); }
    70% { box-shadow: 0 0 0 14px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
@keyframes toast-in {
    from { opacity: 0; transform: translateY(14px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pop-in {
    0% { opacity: 0; transform: scale(0.8); }
    70% { transform: scale(1.04); }
    100% { opacity: 1; transform: scale(1); }
}
@keyframes check-draw {
    to { stroke-dashoffset: 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.animate-in { animation: fadeInUp 0.6s ease both; }
.animate-in.delay-1 { animation-delay: 0.1s; }
.animate-in.delay-2 { animation-delay: 0.2s; }
.animate-in.delay-3 { animation-delay: 0.3s; }

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

/* ---------- Navbar ---------- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.navbar {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    gap: 14px;
}

.logo a {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 9px;
}
.logo a:hover { color: var(--navy); }
.logo .logo-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: var(--glow);
}
.logo span.brand-accent { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 22px; }

.nav-links a {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.92rem;
    position: relative;
}
.nav-links a:not(.btn-link):not(.nav-icon-btn)::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}
.nav-links a:not(.btn-link):not(.nav-icon-btn):hover::after { width: 100%; }

.nav-links a.btn-link {
    background: var(--gradient);
    color: #fff;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    box-shadow: var(--glow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-links a.btn-link:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45); }

/* Round icon buttons (theme toggle, notifications) */
.nav-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}
.nav-icon-btn:hover { transform: translateY(-2px); border-color: var(--primary-light); color: var(--primary); }
.nav-icon-btn .notif-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--danger);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.nav-tools { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 24px;
    height: 2.5px;
    border-radius: 2px;
    background: var(--navy);
    display: block;
    transition: all 0.3s ease;
}

/* ---------- Layout ---------- */
main {
    max-width: 1140px;
    margin: 0 auto;
    padding: 36px 24px 70px;
    min-height: 62vh;
}

.bleed {
    width: 100vw;
    position: relative;
    left: 50%;
    margin-left: -50vw;
}

/* ---------- Hero ---------- */
.hero {
    background: var(--gradient-deep);
    color: #fff;
    text-align: center;
    padding: 96px 24px 110px;
    margin-top: -36px;
    position: relative;
    overflow: hidden;
}
.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    animation: float 7s ease-in-out infinite;
}
.hero::before { width: 340px; height: 340px; top: -120px; right: -80px; }
.hero::after { width: 240px; height: 240px; bottom: -90px; left: -60px; animation-delay: 1.6s; }

.hero > * { position: relative; z-index: 1; }

.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 7px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 26px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    max-width: 760px;
    margin: 0 auto 18px;
    color: #fff;
}
.hero h1 .grad {
    background: linear-gradient(90deg, #93C5FD, #22D3EE);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .subtitle {
    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
    margin: 0 auto 36px;
    font-size: 1.05rem;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-actions .btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: var(--primary-dark);
    padding: 15px 34px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-actions .btn-hero:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(255, 255, 255, 0.4); color: #1D4ED8; }

.hero-actions .btn-hero.ghost {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.55);
    box-shadow: none;
}
.hero-actions .btn-hero.ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

/* Glassmorphism service categories floating over the hero base */
.service-cats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 46px auto 0;
    text-align: left;
}
.service-cat {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius);
    padding: 26px 24px;
    color: #fff;
    display: block;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.service-cat:hover { transform: translateY(-6px); background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.service-cat .sc-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.service-cat h3 { color: #fff; font-size: 1.05rem; font-weight: 700; margin-bottom: 5px; }
.service-cat p { color: rgba(255, 255, 255, 0.78); font-size: 0.86rem; line-height: 1.5; }
.service-cat .sc-go { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 0.82rem; font-weight: 700; color: #A5F3FC; }

/* ---------- Section headers ---------- */
.section-head { text-align: center; margin: 64px 0 36px; }
.section-head h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; color: var(--navy); }
.section-head p { color: var(--text-light); max-width: 520px; margin: 8px auto 0; }

/* ---------- Cards ---------- */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.3s ease;
}
.card + .card { margin-top: 24px; }

.card-narrow { max-width: 500px; margin: 24px auto; }
.card-mid { max-width: 720px; margin: 24px auto; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 22px;
}

.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: var(--tint-strong); }
.feature-card:hover::before { transform: scaleX(1); }

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: var(--tint);
    color: var(--primary);
    font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: all 0.35s ease;
}
.feature-card:hover .feature-icon {
    background: var(--gradient);
    color: #fff;
    box-shadow: var(--glow);
    transform: scale(1.08) rotate(-4deg);
}
.feature-card h3 { font-size: 1.08rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.feature-card p { color: var(--text-light); font-size: 0.9rem; }

/* ---------- Headings ---------- */
h1, h2, h3 { color: var(--navy); letter-spacing: -0.02em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }

.subtitle { color: var(--text-light); }
.grad-text {
    background: var(--gradient-cyan);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }

label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 7px;
    color: var(--text-dark);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px var(--ring);
}
input.invalid { border-color: var(--danger); }
.field-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 5px; }
.field-error { font-size: 0.78rem; color: var(--danger); margin-top: 5px; }

.input-wrap { position: relative; }
.input-wrap .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}
.input-wrap input { padding-left: 42px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: var(--gradient);
    color: #fff;
    border: none;
    padding: 14px 26px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    text-align: center;
    box-shadow: var(--glow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45); filter: brightness(1.05); color: #fff; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-outline {
    background: var(--bg-white);
    color: var(--primary);
    border: 1.5px solid var(--primary-light);
    box-shadow: none;
}
.btn-outline:hover { background: var(--tint); color: var(--primary-dark); box-shadow: none; }

.btn-ghost {
    background: transparent;
    color: var(--text-light);
    border: 1.5px solid var(--border);
    box-shadow: none;
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--text-dark); box-shadow: none; filter: none; }

.btn-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); box-shadow: 0 8px 24px rgba(220, 38, 38, 0.3); }
.btn-danger:hover { box-shadow: 0 12px 30px rgba(220, 38, 38, 0.4); }

.btn-sm { padding: 8px 16px; font-size: 0.82rem; width: auto; }
.btn-auto { width: auto; }

.btn.loading { pointer-events: none; opacity: 0.75; }
.btn .spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ---------- Alerts ---------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    animation: fadeInUp 0.4s ease both;
}
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; }
th, td {
    text-align: left;
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
tbody tr { transition: background 0.2s ease; }
tbody tr:hover { background: var(--tint); }
tbody tr:last-child td { border-bottom: none; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--danger-bg); color: var(--danger); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-neutral { background: var(--bg-soft); color: var(--text-light); }

.type-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--tint);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* ---------- Filter tabs & chips ---------- */
.tab-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.tab-row a, .tab-row button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-light);
    background: var(--bg-white);
    border: 1.5px solid var(--border);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}
.tab-row a:hover, .tab-row button:hover { border-color: var(--primary-light); color: var(--primary); }
.tab-row a.active, .tab-row button.active { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: var(--glow); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background: var(--tint);
    color: var(--primary);
    border: 1px solid transparent;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}
.chip:hover { border-color: var(--primary-light); background: var(--tint-strong); }

/* ---------- Network selector ---------- */
.net-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}
.net-card { position: relative; }
.net-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.net-card .net-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 8px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    cursor: pointer;
    text-align: center;
    transition: all 0.22s ease;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-light);
}
.net-card .net-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: -0.02em;
    box-shadow: var(--shadow-sm);
}
.net-logo.net-mtn { background: #F7C600; color: #1f2937; }
.net-logo.net-airtel { background: #E4002B; }
.net-logo.net-glo { background: #3DAE2B; }
.net-logo.net-9mobile { background: #006B57; }
.net-card input:checked + .net-body {
    border-color: var(--primary);
    background: var(--tint);
    color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
    transform: translateY(-2px);
}
.net-card input:focus-visible + .net-body { box-shadow: 0 0 0 3px var(--ring); }

/* ---------- Data plan cards ---------- */
.plan-toolbar { display: flex; gap: 10px; align-items: center; margin: 14px 0 12px; flex-wrap: wrap; }
.plan-toolbar .input-wrap { flex: 1; min-width: 180px; }
.plan-toolbar input { padding-top: 10px; padding-bottom: 10px; }

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding: 4px;
    margin: 0 -4px 6px;
}
.plan-card { position: relative; }
.plan-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.plan-card .plan-body {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    padding: 14px 12px 12px;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 96px;
}
.plan-card .plan-body:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.plan-card input:checked + .plan-body {
    border-color: var(--primary);
    background: var(--tint);
    box-shadow: 0 0 0 3px var(--ring);
}
.plan-size { font-weight: 800; font-size: 1rem; color: var(--navy); }
.plan-price { font-weight: 700; font-size: 0.88rem; color: var(--primary); }
.plan-meta { font-size: 0.72rem; color: var(--text-muted); }
.plan-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 4px;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}
.plan-fav:hover { transform: scale(1.2); color: #F59E0B; }
.plan-fav.faved { color: #F59E0B; }
.plan-empty { grid-column: 1 / -1; text-align: center; color: var(--text-muted); padding: 26px 10px; font-size: 0.9rem; }

/* ---------- Amount quick buttons ---------- */
.amount-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.amount-quick button {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border);
    background: var(--bg-white);
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}
.amount-quick button:hover, .amount-quick button.active {
    border-color: var(--primary);
    background: var(--tint);
    color: var(--primary);
}

/* ---------- Summary / confirmation list ---------- */
.summary-list { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin: 14px 0; }
.summary-list .sum-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-white);
}
.summary-list .sum-row:last-child { border-bottom: none; }
.summary-list .sum-row span:first-child { color: var(--text-light); }
.summary-list .sum-row span:last-child { font-weight: 700; text-align: right; }
.summary-list .sum-row.total { background: var(--tint); }
.summary-list .sum-row.total span:last-child { color: var(--primary); font-size: 1rem; }

/* ---------- Toasts ---------- */
.toast-wrap {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(92vw, 380px);
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 14px;
    padding: 13px 16px;
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: toast-in 0.3s ease both;
}
.toast i { margin-top: 2px; }
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-success i { color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-error i { color: var(--danger); }
.toast.toast-info { border-left-color: var(--primary); }
.toast.toast-info i { color: var(--primary); }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: all 0.3s ease; }

/* ---------- Modal / confirm dialog ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInUp 0.2s ease both;
}
.modal {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 430px;
    width: 100%;
    padding: 28px 26px 24px;
    animation: pop-in 0.3s ease both;
    max-height: 88vh;
    overflow-y: auto;
}
.modal h3 { font-size: 1.15rem; margin-bottom: 6px; display: flex; align-items: center; gap: 9px; }
.modal p { color: var(--text-light); font-size: 0.9rem; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { padding: 12px 18px; }

/* ---------- Success overlay ---------- */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 3500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInUp 0.25s ease both;
}
.success-box {
    background: var(--bg-white);
    border-radius: 26px;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 100%;
    padding: 40px 30px 30px;
    text-align: center;
    animation: pop-in 0.4s ease both;
}
.success-box .check-ring {
    width: 88px;
    height: 88px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--success-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-ring 1.6s ease-out infinite;
}
.success-box svg { width: 52px; height: 52px; }
.success-box svg .ck {
    stroke: var(--success);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: check-draw 0.55s 0.25s ease forwards;
}
.success-box h2 { font-size: 1.3rem; margin-bottom: 6px; }
.success-box p { color: var(--text-light); font-size: 0.92rem; }
.success-box .modal-actions { justify-content: center; }

/* ---------- Skeletons ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--bg-soft) 25%, var(--border) 50%, var(--bg-soft) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s linear infinite;
    border-radius: 10px;
    min-height: 14px;
}

/* ---------- Dashboard ---------- */
.welcome-banner {
    background: var(--gradient-deep);
    color: #fff;
    border-radius: var(--radius);
    padding: 36px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.welcome-banner::before {
    content: '';
    position: absolute;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    top: -100px; right: -60px;
    animation: float 8s ease-in-out infinite;
}
.welcome-banner h1 { color: #fff; font-size: 1.55rem; margin-bottom: 4px; position: relative; }
.welcome-banner p { color: rgba(255, 255, 255, 0.82); font-size: 0.93rem; position: relative; }
.welcome-banner .wb-balance { position: relative; text-align: right; }
.welcome-banner .wb-balance .wb-label { font-size: 0.78rem; color: rgba(255,255,255,0.8); text-transform: uppercase; letter-spacing: 0.05em; }
.welcome-banner .wb-balance .wb-value { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.welcome-banner .wb-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    background: #fff;
    color: var(--primary-dark);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}
.welcome-banner .wb-btn:hover { transform: translateY(-2px); color: #1D4ED8; }

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
    margin: 24px 0;
}
.stat-tile {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-tile .stat-icon {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: var(--tint);
    color: var(--primary);
    flex-shrink: 0;
}
.stat-tile.tone-cyan .stat-icon { background: rgba(6, 182, 212, 0.12); color: #0891B2; }
.stat-tile.tone-amber .stat-icon { background: rgba(245, 158, 11, 0.14); color: #B45309; }
.stat-tile.tone-violet .stat-icon { background: rgba(139, 92, 246, 0.13); color: #7C3AED; }
html[data-theme="dark"] .stat-tile.tone-cyan .stat-icon { color: #22D3EE; }
html[data-theme="dark"] .stat-tile.tone-amber .stat-icon { color: #FBBF24; }
html[data-theme="dark"] .stat-tile.tone-violet .stat-icon { color: #A78BFA; }
.stat-tile .stat-value { font-size: 1.35rem; font-weight: 800; color: var(--navy); line-height: 1.2; }
.stat-tile .stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    margin: 24px 0;
}
.action-tile {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-dark);
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.action-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--tint-strong);
    color: var(--primary);
}
.action-tile .action-icon {
    width: 50px; height: 50px;
    border-radius: 15px;
    background: var(--gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--glow);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.action-tile:hover .action-icon { transform: scale(1.1) rotate(-5deg); }
.action-tile.tone-cyan .action-icon { background: var(--gradient-cyan); }
.action-tile small { display: block; color: var(--text-muted); font-weight: 500; font-size: 0.78rem; }

/* Two-column dashboard band */
.dash-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; margin: 24px 0; align-items: start; }
@media (max-width: 860px) { .dash-cols { grid-template-columns: 1fr; } }

/* ---------- Charts (single-series bars; values direct-labeled) ---------- */
.chart { margin-top: 18px; }
.chart .chart-title { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; }
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 150px;
    border-bottom: 1px solid var(--chart-grid);
    padding-bottom: 0;
}
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; min-width: 0; }
.chart-col .bar {
    width: 100%;
    max-width: 34px;
    background: var(--chart-1);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: filter 0.15s ease;
}
.chart-col:hover .bar { filter: brightness(1.15); }
.chart-col .bar-tip {
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy);
    color: var(--bg-white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 7px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 5;
}
html[data-theme="dark"] .chart-col .bar-tip { background: #E2E8F0; color: #0B1220; }
.chart-col:hover .bar-tip { opacity: 1; }
.chart-labels { display: flex; gap: 8px; margin-top: 7px; }
.chart-labels span { flex: 1; text-align: center; font-size: 0.68rem; color: var(--text-muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Horizontal breakdown bars (label + track + value) */
.hbar-list { display: flex; flex-direction: column; gap: 13px; margin-top: 16px; }
.hbar { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 12px; font-size: 0.84rem; }
.hbar .hbar-label { color: var(--text-light); font-weight: 600; display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .hbar-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.hbar .hbar-track { height: 10px; background: var(--chart-grid); border-radius: 5px; overflow: hidden; }
.hbar .hbar-fill { height: 100%; border-radius: 5px; min-width: 2px; }
.hbar .hbar-value { font-weight: 700; color: var(--text-dark); white-space: nowrap; }

/* ---------- Referral box ---------- */
.ref-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--tint);
    border: 1.5px dashed var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 12px;
}
.ref-box code { font-weight: 800; color: var(--primary); font-size: 1.05rem; letter-spacing: 0.06em; flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Notifications ---------- */
.notif-item {
    display: flex;
    gap: 14px;
    padding: 15px 4px;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
}
.notif-item:last-child { border-bottom: none; }
.notif-item .notif-icon {
    width: 38px; height: 38px;
    border-radius: 12px;
    background: var(--tint);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.92rem;
}
.notif-item h4 { font-size: 0.92rem; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.notif-item p { font-size: 0.84rem; color: var(--text-light); }
.notif-item .notif-time { font-size: 0.72rem; color: var(--text-muted); }
.notif-item.unread h4::after {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
}

/* ---------- Receipt ---------- */
.receipt {
    max-width: 420px;
    margin: 24px auto;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.receipt .receipt-head {
    background: var(--gradient-deep);
    color: #fff;
    text-align: center;
    padding: 30px 24px 24px;
}
.receipt .receipt-head .r-logo { font-weight: 800; font-size: 1.15rem; display: inline-flex; align-items: center; gap: 8px; }
.receipt .receipt-head .r-amount { font-size: 2rem; font-weight: 800; margin-top: 12px; }
.receipt .receipt-head .badge { margin-top: 8px; }
.receipt .receipt-body { padding: 22px 26px 26px; }
.receipt .r-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    font-size: 0.88rem;
    border-bottom: 1px dashed var(--border);
}
.receipt .r-row:last-child { border-bottom: none; }
.receipt .r-row span:first-child { color: var(--text-light); }
.receipt .r-row span:last-child { font-weight: 700; text-align: right; word-break: break-all; }
.receipt-actions { display: flex; gap: 10px; max-width: 420px; margin: 0 auto 20px; flex-wrap: wrap; }
.receipt-actions .btn { flex: 1; min-width: 120px; }

@media print {
    header, footer, .receipt-actions, .toast-wrap, .nav-tools { display: none !important; }
    body { background: #fff; }
    main { padding: 0; max-width: none; }
    .receipt { box-shadow: none; border: 1px solid #ddd; margin: 0 auto; }
    .receipt .receipt-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Auth pages ---------- */
body.auth-page {
    background: var(--gradient-deep);
    min-height: 100vh;
}
body.auth-page header { display: none; }
body.auth-page main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
}
body.auth-page footer { display: none; }

.auth-card {
    background: var(--bg-white);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 44px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.55s ease both;
}
.auth-card .auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}
.auth-card .auth-logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.auth-card h1 { text-align: center; font-size: 1.45rem; margin-bottom: 4px; }
.auth-card .subtitle { text-align: center; font-size: 0.9rem; margin-bottom: 26px; }
.auth-card .switch-link { margin-top: 20px; text-align: center; font-size: 0.9rem; color: var(--text-light); }

/* ---------- Result photo ---------- */
.result-photo {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* ---------- Admin layout ---------- */
.admin-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 26px;
    align-items: start;
}
.admin-side {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px 10px;
    position: sticky;
    top: 84px;
}
.admin-side .as-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    padding: 8px 14px 6px;
}
.admin-side a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}
.admin-side a i { width: 18px; text-align: center; }
.admin-side a:hover { background: var(--tint); color: var(--primary); }
.admin-side a.active { background: var(--gradient); color: #fff; box-shadow: var(--glow); }
.admin-main { min-width: 0; }
.admin-main .card { margin-bottom: 22px; }

.mini-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mini-form input, .mini-form select { width: auto; padding: 8px 12px; font-size: 0.84rem; }
.mini-form .btn { width: auto; padding: 9px 16px; font-size: 0.82rem; }

.page-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-side { position: static; display: flex; overflow-x: auto; padding: 8px; gap: 4px; }
    .admin-side .as-title { display: none; }
    .admin-side a { white-space: nowrap; padding: 9px 13px; }
}

/* ---------- Empty state ---------- */
.empty {
    text-align: center;
    padding: 44px 20px;
    color: var(--text-muted);
}
.empty i { font-size: 2rem; margin-bottom: 12px; display: block; opacity: 0.5; }

/* ---------- Pager ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.pager a, .pager span {
    padding: 7px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-light);
    font-size: 0.84rem;
    font-weight: 600;
}
.pager a:hover { border-color: var(--primary-light); color: var(--primary); }
.pager .current { background: var(--gradient); color: #fff; border-color: transparent; }

/* ---------- Footer ---------- */
footer {
    background: #0F172A;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    padding: 34px 24px;
    font-size: 0.87rem;
}
footer .foot-brand { font-weight: 800; color: #fff; font-size: 1.05rem; display: block; margin-bottom: 6px; }
html[data-theme="dark"] footer { background: #0B1220; border-top: 1px solid var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--header-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: 18px 24px 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        display: none;
        gap: 16px;
    }
    .nav-links.open { display: flex; animation: fadeInUp 0.3s ease both; }
    .nav-links a.btn-link { text-align: center; justify-content: center; display: inline-flex; }
    .hero { padding: 64px 20px 76px; }
    .card { padding: 24px 20px; }
    .auth-card { padding: 34px 24px; }
    .welcome-banner { padding: 28px 22px; }
    .welcome-banner .wb-balance { text-align: left; }
    .chart-bars { gap: 5px; }
    .chart-labels { gap: 5px; }
    .hbar { grid-template-columns: 76px 1fr auto; }
    .btn, .tab-row a, .chip, .amount-quick button { min-height: 42px; }
}
