:root {
    --primary: #1e3a5f;
    --primary-light: #2d5a8a;
    --primary-dark: #0f2744;
    --accent: #25d366;
    --accent-soft: rgba(37, 211, 102, 0.12);
    --success: #16a34a;
    --danger: #dc3545;
    --warning: #f59e0b;
    --bg: #f4f6f9;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 14px;
    --shadow: 0 4px 24px rgba(15, 39, 68, 0.08);
    --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom { background: var(--primary) !important; }

.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, #0f2744 100%);
    color: white;
    padding: 80px 0;
}

.hero-section h1 { font-weight: 700; font-size: 2.5rem; }

.stat-card {
    background: var(--card);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    height: 100%;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    color: var(--muted);
    font-size: .875rem;
}

.sidebar {
    background: var(--primary);
    min-height: 100vh;
    width: 260px;
    position: fixed;
    left: 0;
    top: 0;
    padding-top: 1rem;
    z-index: 100;
}

.sidebar .brand {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: .5rem;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.85);
    padding: .6rem 1.25rem;
    display: block;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255,255,255,.1);
    color: white;
    text-decoration: none;
    border-left-color: #fff;
}

.main-content {
    margin-left: 260px;
    padding: 1.5rem 2rem;
    min-height: 100vh;
}

.top-bar {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: .75rem 2rem;
    margin: -1.5rem -2rem 1.5rem;
}

.card-panel {
    background: var(--card);
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.card-panel .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.table th { font-weight: 600; font-size: .875rem; color: var(--muted); }

.badge-status-granted { background: var(--success); }
.badge-status-denied { background: var(--danger); }

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #0f2744 100%);
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.step-card {
    text-align: center;
    padding: 1.5rem;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .sidebar { width: 100%; position: relative; min-height: auto; }
    .main-content { margin-left: 0; padding: 1rem; }
    .top-bar { margin: -1rem -1rem 1rem; padding: .75rem 1rem; }
}

.message-preview {
    background: #f8f9fa;
    border-left: 4px solid var(--primary);
    padding: 1rem;
    white-space: pre-wrap;
    font-size: .9rem;
    border-radius: 0 8px 8px 0;
}

.wallet-flow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.wallet-step {
    background: linear-gradient(135deg, var(--primary) 0%, #0f2744 100%);
    color: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    opacity: .55;
}

.wallet-step.active { opacity: 1; box-shadow: 0 4px 16px rgba(30,58,95,.25); }
.wallet-step.done { opacity: .85; background: linear-gradient(135deg, #1a5f3a 0%, #0d3d24 100%); }

.wallet-step .step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.wallet-step small { display: block; opacity: .85; font-size: .75rem; }

.wallet-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: .75rem 1.25rem;
}

.wallet-bar-item .label {
    display: block;
    font-size: .7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

@media (max-width: 768px) {
    .wallet-flow { grid-template-columns: 1fr; }
}

/* ========== LANDING PAGE ========== */
.landing-body { background: #fff; }

.landing-nav {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: .75rem 0;
}

.landing-nav .navbar-brand { color: var(--primary); font-size: 1.15rem; }
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
}
.brand-icon.sm { width: 28px; height: 28px; font-size: .85rem; }

.landing-nav .nav-link { color: var(--muted); font-weight: 500; font-size: .925rem; }
.landing-nav .nav-link:hover { color: var(--primary); }
.nav-link-btn { color: var(--primary) !important; text-decoration: none !important; font-weight: 600; }

.landing-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 45%, #1a4a7a 100%);
    color: #fff; padding: 4rem 0 5rem;
}
.hero-bg {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(37,211,102,.15) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(255,255,255,.08) 0%, transparent 40%);
}
.min-vh-75 { min-height: 75vh; display: flex; align-items: center; }

.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--accent-soft); color: var(--accent);
    padding: .4rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
}

.hero-title { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; line-height: 1.15; margin-bottom: 1rem; }
.text-gradient { background: linear-gradient(90deg, #fff, #a7f3d0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-lead { font-size: 1.1rem; opacity: .88; max-width: 520px; line-height: 1.7; }

.hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-size: 1.25rem; }
.hero-stats div span { font-size: .8rem; opacity: .7; }

.hero-mockup { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.mockup-card {
    background: rgba(255,255,255,.1); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius);
    padding: 1.25rem; min-width: 200px;
}
.mockup-header { font-size: .85rem; opacity: .9; margin-bottom: .75rem; }
.mockup-rows { display: flex; flex-wrap: wrap; gap: .4rem; }
.mockup-rows .tag { font-size: .7rem; padding: .25rem .6rem; border-radius: 6px; font-weight: 600; }
.tag.transfer { background: #dbeafe; color: #1d4ed8; }
.tag.distribution { background: #fef3c7; color: #b45309; }
.tag.notice { background: #fce7f3; color: #be185d; }
.mockup-arrow { font-size: 1.5rem; opacity: .6; }
.wa-card { background: #075e54; border-color: #075e54; }
.wa-bubble { background: #dcf8c6; color: #111; border-radius: 12px 12px 4px 12px; padding: .75rem 1rem; max-width: 260px; }
.wa-bubble small { color: #075e54; font-weight: 600; }
.wa-bubble p { margin: .35rem 0; font-size: .85rem; line-height: 1.4; }
.wa-time { font-size: .65rem; color: #667; float: right; }

.landing-section { padding: 5rem 0; }
.bg-soft { background: #f8fafc; }
.section-head { max-width: 640px; margin: 0 auto 2rem; }
.section-label {
    display: inline-block; color: var(--primary-light); font-weight: 700;
    font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem;
}
.section-head h2 { font-weight: 800; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.25; }

.feature-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.75rem; height: 100%; transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; margin-bottom: 1rem;
}
.feature-card h5 { font-weight: 700; margin-bottom: .5rem; }
.feature-card p { color: var(--muted); font-size: .925rem; margin: 0; }

.process-timeline { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 0; }
.process-step { display: flex; gap: 1.5rem; padding: 1.5rem 0; border-left: 2px solid var(--border); margin-left: 1.25rem; padding-left: 2rem; position: relative; }
.process-step:last-child { border-left-color: transparent; }
.process-num {
    position: absolute; left: -1.35rem; top: 1.25rem;
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    background: var(--primary); color: #fff; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 4px #fff;
}
.process-content h5 { font-weight: 700; margin-bottom: .35rem; }
.process-content p { color: var(--muted); margin: 0; font-size: .95rem; }

.pricing-card {
    background: #fff; border: 2px solid var(--border); border-radius: var(--radius);
    padding: 2rem; text-align: center; height: 100%; position: relative;
    transition: border-color .2s, box-shadow .2s;
}
.pricing-card.featured { border-color: var(--primary); box-shadow: var(--shadow); transform: scale(1.03); }
.pricing-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700;
    padding: .25rem .75rem; border-radius: 999px;
}
.pricing-card h4 { font-weight: 700; }
.pricing-price { font-size: 2.75rem; font-weight: 800; color: var(--primary); line-height: 1; margin: 1rem 0; }
.pricing-price small { font-size: 1rem; font-weight: 600; }
.pricing-credits { color: var(--muted); }
.pricing-features { list-style: none; padding: 0; margin: 1.5rem 0; text-align: left; }
.pricing-features li { padding: .35rem 0; font-size: .9rem; color: var(--muted); }
.pricing-features i { color: var(--success); margin-right: .5rem; }

.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 4rem 0;
}

.faq-accordion .accordion-item { border: 1px solid var(--border); border-radius: var(--radius) !important; margin-bottom: .75rem; overflow: hidden; }
.faq-accordion .accordion-button { font-weight: 600; box-shadow: none; }
.faq-accordion .accordion-button:not(.collapsed) { background: #f1f5f9; color: var(--primary); }

.landing-footer { background: var(--primary-dark); color: rgba(255,255,255,.85); }
.landing-footer a { display: block; color: rgba(255,255,255,.65); text-decoration: none; padding: .2rem 0; font-size: .9rem; }
.landing-footer a:hover { color: #fff; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: 1rem; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.5); }
.trust-badges { display: flex; gap: 1rem; flex-wrap: wrap; }
.trust-badges span { font-size: .8rem; background: rgba(255,255,255,.08); padding: .35rem .75rem; border-radius: 8px; }

/* ========== AUTH SPLIT ========== */
.auth-body { margin: 0; }
.auth-split { display: flex; min-height: 100vh; }
.auth-brand-panel {
    flex: 0 0 42%; max-width: 520px;
    background: linear-gradient(165deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff; padding: 2.5rem; display: flex; flex-direction: column;
}
.auth-logo { color: #fff; font-size: 1.25rem; font-weight: 800; text-decoration: none !important; display: flex; align-items: center; gap: .5rem; }
.auth-brand-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 2rem 0; }
.auth-brand-content h2 { font-weight: 800; font-size: 1.75rem; line-height: 1.3; margin-bottom: 2rem; }
.auth-benefits { list-style: none; padding: 0; margin: 0; }
.auth-benefits li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; font-size: .95rem; opacity: .92; }
.auth-benefits i { color: var(--accent); }
.auth-brand-footer { opacity: .5; font-size: .8rem; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem; background: #f8fafc; }
.auth-card-v2 { width: 100%; max-width: 520px; background: #fff; border-radius: var(--radius); padding: 2.5rem; box-shadow: var(--shadow); border: 1px solid var(--border); }
.auth-header h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: .35rem; }
.auth-section-label {
    font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
    color: var(--primary); margin-bottom: .75rem;
}
.auth-billing-type { display: flex; flex-direction: column; gap: .65rem; }
.auth-billing-option {
    display: flex; align-items: flex-start; gap: .75rem; padding: .85rem 1rem;
    border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: border-color .2s, background .2s;
}
.auth-billing-option:has(input:checked) { border-color: var(--primary-light); background: #f8fafc; }
.auth-billing-option input { margin-top: .25rem; accent-color: var(--primary); }
.auth-billing-option span { display: flex; flex-direction: column; gap: .15rem; }
.auth-billing-option strong { font-size: .9rem; }
.auth-billing-option small { color: var(--muted); font-size: .78rem; }
.auth-form .form-floating > .form-control { border-radius: 10px; border-color: var(--border); }
.auth-form .form-floating > .form-control:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(30,58,95,.12); }
.btn-password-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--muted); z-index: 5; padding: .25rem;
}
.auth-switch a { font-weight: 600; }

.verify-steps { display: flex; flex-direction: column; gap: 1rem; }
.verify-step {
    display: flex; gap: 1rem; padding: 1.25rem;
    border: 2px solid var(--border); border-radius: var(--radius);
    transition: border-color .2s;
}
.verify-step.active { border-color: var(--primary-light); background: #f8fafc; }
.verify-step.done { border-color: var(--success); background: #f0fdf4; }
.verify-step-icon {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.verify-step.done .verify-step-icon { background: var(--success); }
.verify-step-body { flex: 1; }
.verify-step-body h6 { font-weight: 700; margin-bottom: .35rem; }
.otp-input-group { display: flex; gap: .5rem; }
.otp-input-group input { letter-spacing: .35em; font-weight: 700; font-size: 1.25rem; }
.letter-spacing { letter-spacing: .35em; }

/* ========== PANEL / ADMIN ENHANCEMENTS ========== */
.sidebar {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: 4px 0 24px rgba(0,0,0,.08);
}
.sidebar .brand {
    display: flex; align-items: center; gap: .5rem;
    font-size: 1.05rem; letter-spacing: -.02em;
}
.sidebar .brand::before {
    content: '\F5EA'; font-family: 'bootstrap-icons';
    font-size: 1.1rem; opacity: .9;
}
.sidebar-user {
    padding: 1rem 1.25rem; margin: .5rem 1rem 1rem;
    background: rgba(255,255,255,.08); border-radius: 10px;
    color: rgba(255,255,255,.9); font-size: .85rem;
}
.sidebar-user strong { display: block; color: #fff; font-size: .925rem; }
.sidebar .nav-link {
    font-size: .9rem; font-weight: 500;
    display: flex; align-items: center; gap: .6rem;
}
.sidebar .nav-link::before { font-family: 'bootstrap-icons'; opacity: .75; width: 1.1rem; }
.sidebar .nav-link[href*="dashboard"]::before { content: '\F3FD'; }
.sidebar .nav-link[href*="upload"]::before { content: '\F62A'; }
.sidebar .nav-link[href*="send"]::before { content: '\F1C6'; }
.sidebar .nav-link[href*="templates"]::before { content: '\F4A9'; }
.sidebar .nav-link[href*="balance"]::before { content: '\F638'; }
.sidebar .nav-link[href*="packages"]::before { content: '\F5B0'; }
.sidebar .nav-link[href*="transactions"]::before { content: '\F2D0'; }
.sidebar .nav-link[href*="reports"]::before { content: '\F3E9'; }
.sidebar .nav-link[href*="settings"]::before { content: '\F3E5'; }
.sidebar .nav-link[href*="logout"]::before { content: '\F340'; }
.sidebar .nav-link[href*="users"]::before { content: '\F4DA'; }
.sidebar .nav-link[href*="companies"]::before { content: '\F1AD'; }
.sidebar .nav-link[href*="payments"]::before { content: '\F2DC'; }
.sidebar .nav-link[href*="messages"]::before { content: '\F4AD'; }
.sidebar .nav-link[href*="status-rules"]::before { content: '\F1DE'; }
.sidebar .nav-link[href*="pricing"]::before { content: '\F20E'; }
.sidebar .nav-link[href*="bonus"]::before { content: '\F4B1'; }
.sidebar .nav-link[href*="system-logs"]::before { content: '\F468'; }
.sidebar .nav-link[href*="api-settings"]::before { content: '\F1C0'; }

.top-bar {
    border-radius: 0; box-shadow: 0 1px 0 var(--border);
    display: flex; align-items: center; gap: 1rem;
}
.sidebar-toggle {
    display: none; background: none; border: 1px solid var(--border);
    border-radius: 8px; padding: .35rem .6rem; color: var(--primary);
}

.badge-verify-ok { background: #dcfce7; color: #166534; font-weight: 600; }
.badge-verify-pending { background: #fef3c7; color: #92400e; font-weight: 600; }

@media (max-width: 991px) {
    .auth-brand-panel { display: none; }
    .auth-main { padding: 1rem; }
    .auth-card-v2 { padding: 1.5rem; }
    .pricing-card.featured { transform: none; }
    .sidebar-toggle { display: inline-flex; }
    .sidebar {
        transform: translateX(-100%); transition: transform .3s;
        width: 280px; position: fixed; z-index: 200;
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
}

@media (max-width: 768px) {
    .landing-section { padding: 3rem 0; }
    .hero-stats { gap: 1.5rem; }
    .process-step { margin-left: .75rem; padding-left: 1.5rem; }
}
