/*
 * RAVTECH -- shared brand stylesheet
 * ---------------------------------------------------------------------
 * Single source of truth for brand tokens (color, fonts) and the
 * button/card/form styles reused across base.html, login.html,
 * signup.html, and every page that extends base.html. Previously these
 * were duplicated as separate inline <style> blocks in each file --
 * consolidated here so a color/font change only happens in one place.
 *
 * Landing page (index.html) now shares this same stylesheet too --
 * the previous approach of a separate theme-specific main.css (tied to
 * a commercial template whose image/font assets were never available)
 * has been dropped in favor of one consistent, original design built
 * entirely on icon fonts (no raster images to go missing).
 * ---------------------------------------------------------------------
 */

@import url("https://fonts.googleapis.com/css?family=Roboto:400,500,700");

:root {
    --brand-navy: #073482;
    --brand-navy-light: #014cda;
    --brand-navy-dark: #05245c;
    --brand-accent: #1062fe;
    --brand-success: #28a745;
    --text-muted: #6c757d;
    --surface-light: #f8f9fa;
    --radius-lg: 16px;
    --radius-md: 10px;
}

body {
    background: #fff;
    color: #5b5858;
    font-family: 'Roboto', sans-serif;
}

.brand-font {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    letter-spacing: 0;
}

/* ===== Brand color utilities ============================================= */
.text-brand-navy { color: var(--brand-navy) !important; }
.bg-brand-navy { background-color: var(--brand-navy) !important; }

.btn-brand-navy {
    background: linear-gradient(75deg, #073482, #014cda);
    border-color: #073482;
    color: #fff;
    font-weight: 600;
}
.btn-brand-navy:hover { background: #073482; color: #fff; }

.btn-outline-brand-navy {
    background: transparent;
    border: 1px solid rgba(7, 52, 130, 0.6);
    color: var(--brand-navy);
    font-weight: 600;
}
.btn-outline-brand-navy:hover {
    background: rgba(7, 52, 130, 0.06);
    border-color: var(--brand-navy);
    color: var(--brand-navy);
}

/* ===== Cards (app shell -- lighter than the landing page's promo cards) == */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 14px rgba(7, 52, 130, 0.08);
}

/* ===== Forms =============================================================== */
.form-control:focus, .form-select:focus {
    border-color: var(--brand-navy);
    box-shadow: 0 0 0 0.2rem rgba(16, 98, 254, 0.15);
}

/* ===== Full-page auth screens (login / signup) ============================ */
.auth-page {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-light) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}
.auth-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.auth-footer-note { color: rgba(255, 255, 255, 0.6); }
.referral-badge {
    background: #eef0ff;
    color: var(--brand-navy);
    border-radius: 8px;
    padding: 8px 14px;
}

/* ===== Marquee (site-wide Alert model, dashboard shell) =================== */
.marquee-wrap {
    background: var(--brand-navy);
    color: #fff;
    padding: 6px 0;
    overflow: hidden;
    white-space: nowrap;
}
.marquee-track {
    display: inline-block;
    animation: marquee 25s linear infinite;
}
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ===== Dashboard: stat / balance cards ===================================== */
.stat-card {
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(75deg, #073482, #014cda);
    padding: 24px;
    min-height: 280px;
    height: 100%;
}
.stat-card .stat-label { opacity: 0.75; font-size: 0.85rem; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; }
.google-play-link {
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    display: flex;
    gap: 9px;
    padding-top: 14px;
    text-decoration: none;
    width: fit-content;
}
.google-play-link:hover { color: #fff; opacity: 0.86; }
.google-play-link i { font-size: 1.35rem; }
.google-play-link span { font-size: 0.78rem; font-weight: 600; }
.funding-account-list { border-top: 1px solid rgba(255,255,255,0.18); padding-top: 14px; }
.funding-account-heading { align-items: center; color: rgba(255,255,255,0.7); display: flex; font-size: 0.72rem; font-weight: 800; justify-content: space-between; letter-spacing: 0.5px; margin-bottom: 8px; text-transform: uppercase; }
.funding-account-row { align-items: center; background: rgba(255,255,255,0.11); border-radius: 10px; display: flex; gap: 10px; justify-content: space-between; margin-top: 8px; padding: 10px; }
.funding-account-row > div { min-width: 0; }
.funding-account-row strong, .funding-account-row span, .funding-account-row b { display: block; }
.funding-account-row strong { font-size: 0.78rem; }
.funding-account-row span { color: rgba(255,255,255,0.65); font-size: 0.7rem; margin-top: 2px; }
.funding-account-row b { font-size: 0.95rem; letter-spacing: 1px; margin-top: 3px; }
.account-copy-button { flex: 0 0 auto; }

.mini-stat {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(7, 52, 130, 0.06);
}
.mini-stat .mini-stat-value { font-size: 1.4rem; font-weight: 700; color: var(--brand-navy); }
.mini-stat .mini-stat-label { font-size: 0.8rem; color: var(--text-muted); }

.support-panel {
    background: linear-gradient(180deg, #1f3045 0%, #1b2a3d 100%);
    border-radius: 12px;
    padding: 30px 24px 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 280px;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: none;
}
.support-avatar {
    width: 180px;
    height: 180px;
    margin: 0 auto 8px;
    color: #f5f7fb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.support-avatar svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}
.support-label {
    color: #ff4b57;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 6px;
}
.support-title {
    color: #3de08d;
    font-size: clamp(2rem, 2.4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 10px;
}
.support-copy {
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.05rem;
    line-height: 1.45;
    margin-bottom: 18px;
    max-width: 520px;
}
.support-button {
    align-self: flex-start;
    border-radius: 8px;
    padding: 0.8rem 1.35rem;
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(180deg, #3f70ff 0%, #2b5ae8 100%);
    border: none;
}
.support-button:hover {
    background: linear-gradient(180deg, #2b5ae8 0%, #224cc7 100%);
    color: #fff;
}

.referral-panel {
    background: #f3f3f5;
    border: 1px solid #e2e4e8;
    border-radius: 12px;
    padding: 18px 18px 14px;
    min-height: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.referral-header {
    color: #2d2d2d;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.referral-message {
    color: #4d4d4d;
    font-size: 1.05rem;
    line-height: 1.45;
    margin-bottom: 14px;
}
.referral-link-box {
    display: flex;
    align-items: center;
    background: #dfe5eb;
    border: 1px solid #d7dfe9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 18px;
}
.referral-link-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 12px;
    color: #404040;
    font-size: 0.96rem;
    min-width: 0;
}
.referral-link-box button {
    width: 52px;
    height: 52px;
    border: none;
    background: linear-gradient(180deg, #5c6ef6 0%, #4f5ae9 100%);
    color: #fff;
    font-size: 1.2rem;
}
.referral-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 6px;
    border-top: 1px solid rgba(0,0,0,0.04);
}
.referral-row:first-of-type {
    margin-top: 2px;
}
.referral-row-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}
.referral-row-icon.purple {
    background: linear-gradient(180deg, #8f40ff 0%, #742fe6 100%);
}
.referral-row-label {
    flex: 1;
    font-size: 1rem;
    font-weight: 700;
    color: #2b2b2b;
}
.referral-row-count {
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(180deg, #8f40ff 0%, #742fe6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}
.referral-redeem-row {
    gap: 8px;
}
.referral-row-bonus {
    font-size: 0.9rem;
    font-weight: 800;
    color: #2b2b2b;
    white-space: nowrap;
}
.referral-redeem-button {
    border: none;
    border-radius: 8px;
    background: linear-gradient(180deg, #8f40ff 0%, #742fe6 100%);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
}
.referral-redeem-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Dashboard: product grid (buy airtime, data, cable, etc.) =========== */
.product-tile {
    display: block;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px 12px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(7, 52, 130, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(7, 52, 130, 0.14);
    color: inherit;
}
.product-tile .product-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(16, 98, 254, 0.1);
    color: #1062fe;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}
.product-tile .product-icon svg {
    width: 26px;
    height: 26px;
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.product-tile .product-icon i {
    font-size: 1.35rem;
    line-height: 1;
}
.product-tile .product-label { font-size: 0.85rem; font-weight: 600; }

/* ===== Dashboard: virtual account tabs ===================================== */
.account-tab-list { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.account-tab-list .nav-link {
    border: 1px solid rgba(1, 3, 81, 0.12);
    border-radius: 10px;
    color: var(--brand-navy);
    font-weight: 600;
}
.account-tab-list .nav-link.active {
    background: var(--brand-navy);
    color: #fff;
    border-color: var(--brand-navy);
}
.account-number-display {
    background: var(--surface-light);
    border-radius: var(--radius-md);
    padding: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== Dashboard: transactions table ======================================= */
.table-transactions tbody tr:hover { background: var(--surface-light); }
.txn-credit { color: var(--brand-success); font-weight: 600; }
.txn-debit { color: var(--brand-accent); font-weight: 600; }
.wallet-summary-heading, .wallet-ledger-toolbar, .wallet-search-form { align-items: center; display: flex; }
.wallet-summary-heading { justify-content: space-between; margin-bottom: 24px; }
.wallet-summary-heading h1 { font-size: 1.65rem; margin: 5px 0 0; }
.wallet-summary-kicker { color: var(--brand-accent); font-size: .72rem; font-weight: 700; letter-spacing: 1px; }
.wallet-stat-card { background: #fff; border-radius: 4px; box-shadow: 0 8px 18px rgba(7,52,130,.08); min-height: 126px; padding: 28px 24px; text-align: center; }
.wallet-stat-card span { color: var(--text-muted); display: block; font-size: .76rem; letter-spacing: .5px; }
.wallet-stat-card strong { color: var(--brand-navy); display: block; font-size: 1.25rem; margin-top: 16px; }
.wallet-ledger-card { background: #fff; padding: 22px; }
.wallet-ledger-toolbar { justify-content: space-between; margin-bottom: 24px; }
.wallet-ledger-toolbar h2 { color: var(--brand-navy); font-size: 1.1rem; margin: 0; }
.wallet-search-form { gap: 0; }
.wallet-search-form input { border: 1px solid #e5e9f2; border-radius: 4px 0 0 4px; min-height: 40px; padding: 8px 12px; width: 240px; }
.wallet-search-form .btn { border-radius: 0 4px 4px 0; min-height: 40px; }
.wallet-ledger-table { border-top: 1px solid #e5e9f2; margin-bottom: 0; }
.wallet-ledger-table th { color: var(--brand-navy); font-size: .78rem; font-weight: 600; padding: 16px 14px; white-space: nowrap; }
.wallet-ledger-table td { color: #495057; font-size: .82rem; padding: 16px 14px; white-space: nowrap; }
.wallet-ledger-table tbody tr:nth-child(odd) { background: #f3f6fb; }
.recharge-pins { display: grid; gap: 8px; }
.recharge-pins > div { align-items: center; background: var(--surface-light); border-radius: 6px; display: flex; justify-content: space-between; padding: 8px 10px; }
.recharge-pins code { color: var(--brand-navy); font-size: .95rem; letter-spacing: 1px; }
@media (max-width: 767.98px) {
    .wallet-summary-heading, .wallet-ledger-toolbar { align-items: stretch; flex-direction: column; gap: 14px; }
    .wallet-summary-heading .btn { align-self: flex-start; }
    .wallet-search-form { width: 100%; }
    .wallet-search-form input { flex: 1; min-width: 0; width: auto; }
    .wallet-ledger-card { padding: 14px; }
}

/* ===== Landing page ========================================================= */
.hero-section {
    background: linear-gradient(75deg, #073482, #014cda);
    color: #fff;
    padding: 100px 0 80px;
}
.hero-section p { color: rgba(255, 255, 255, 0.85); }
.hero-icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 16px;
}
.landing-feature-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    height: 100%;
    box-shadow: 0 4px 20px rgba(7, 52, 130, 0.08);
    transition: transform 0.2s ease;
}
.landing-feature-card:hover { transform: translateY(-6px); }
.section-heading-centered { text-align: center; }
.section-heading-centered > div { width: 100%; }
.section-heading-centered > p { margin-left: auto; margin-right: auto; }
.landing-feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(16, 98, 254, 0.1);
    color: var(--brand-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}
.landing-navbar { background: #fff; box-shadow: 0 2px 12px rgba(1, 3, 81, 0.06); padding: 14px 0; }
.landing-navbar .nav-link { color: #073482; font-weight: 600; }
.cta-band {
    background: linear-gradient(75deg, #073482, #014cda);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 50px 40px;
}
.landing-footer {
    background: var(--brand-navy-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 50px 0 20px;
}
.landing-footer a { color: rgba(255, 255, 255, 0.7); }
.landing-footer a:hover { color: #fff; }


/* ===== Loading spinner overlay (shown during purchase/action requests) === */
.ravtech-spinner {
    display: flex;
    gap: 8px;
}
.ravtech-spinner-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--brand-navy);
    animation: ravtech-bounce 1s infinite ease-in-out;
}
@keyframes ravtech-bounce {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 767.98px) {
    .landing-navbar { padding: 10px 0; }
    .landing-navbar .navbar-brand { font-size: 1.25rem; }
    .landing-navbar .navbar-collapse { background: #fff; padding-top: 12px; }
    .landing-navbar .navbar-nav { margin-bottom: 12px; }
    .landing-navbar .nav-link { padding: 10px 0; }
    .landing-navbar .d-flex { width: 100%; }
    .landing-navbar .d-flex .btn { flex: 1; }

    .hero-section { padding: 64px 0 56px; }
    .hero-section h1 { font-size: 2.35rem; line-height: 1.05; }
    .hero-section .lead { font-size: 1rem; }
    .hero-section .d-flex { flex-direction: column; }
    .hero-section .d-flex .btn { width: 100%; }

    main.container { padding-left: 16px !important; padding-right: 16px !important; }
    .navbar.bg-brand-navy { padding: 10px 12px !important; }
    .navbar.bg-brand-navy .navbar-brand { font-size: 1.15rem; margin-left: 8px !important; margin-right: auto !important; }
    .navbar.bg-brand-navy > .d-flex { gap: 6px !important; }
    .navbar.bg-brand-navy .topbar-balance { font-size: 0.72rem; max-width: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .navbar.bg-brand-navy .btn-warning { display: none; }
    .navbar.bg-brand-navy .btn-outline-light { padding: 5px 8px; }

    .stat-card { padding: 18px; }
    .stat-card .stat-value { font-size: 1.55rem; }
    .funding-account-row { padding: 9px; }
    .funding-account-row b { font-size: 0.85rem; letter-spacing: 0.5px; }
    .mini-stat { min-height: 88px; padding: 12px 8px; }
    .mini-stat .mini-stat-value { font-size: 1.2rem; }
    .mini-stat .mini-stat-label { font-size: 0.7rem; }
    .product-tile { min-height: 104px; padding: 14px 6px; }
    .product-tile .product-icon { height: 40px; margin-bottom: 7px; width: 40px; }
    .product-tile .product-label { font-size: 0.74rem; }
    .account-number-display { align-items: flex-start; flex-direction: column; gap: 12px; letter-spacing: 0; }
    .table-transactions { min-width: 620px; }
    .card { border-radius: 12px; }
}

@media (max-width: 380px) {
    .navbar.bg-brand-navy .navbar-brand { font-size: 1rem; }
    .navbar.bg-brand-navy .topbar-balance { max-width: 65px; }
    .product-tile .product-label { font-size: 0.68rem; }
    .funding-account-row b { font-size: 0.78rem; }
}
