/* ============================================================
   Flexi Access Bank – Main Stylesheet
   ============================================================ */
:root {
  --primary: #c0392b;
  --primary-dark: #922b21;
  --primary-light: #f9ebea;
  --secondary: #1a1a2e;
  --accent: #e74c3c;
  --gold: #f39c12;
  --text: #2c3e50;
  --text-muted: #7f8c8d;
  --bg: #f4f6f9;
  --card-bg: #ffffff;
  --border: #e0e0e0;
  --sidebar-w: 260px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }

/* ─── Navbar ─────────────────────────────────────────────── */
.portal-nav { background: linear-gradient(135deg, var(--secondary) 0%, #16213e 100%); box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.portal-nav .navbar-brand img { filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.portal-nav .nav-link { color: rgba(255,255,255,.85) !important; font-size: .88rem; font-weight: 500; border-radius: 6px; padding: .45rem .75rem !important; transition: all .2s; }
.portal-nav .nav-link:hover, .portal-nav .nav-link.active { color: #fff !important; background: rgba(255,255,255,.1); }
.portal-nav .dropdown-menu { background: var(--secondary); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); margin-top: .5rem; }
.portal-nav .dropdown-item { color: rgba(255,255,255,.85); font-size: .88rem; }
.portal-nav .dropdown-item:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ─── Page layout ───────────────────────────────────────── */
.page-wrapper { flex: 1; padding: 1.5rem 0; }
.page-title { font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 1.25rem; }

/* ─── Cards ─────────────────────────────────────────────── */
.card { border: none; border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--card-bg); }
.card-header { background: transparent; border-bottom: 1px solid var(--border); font-weight: 600; padding: 1rem 1.25rem; }
.card-body { padding: 1.25rem; }

/* ─── Stat Cards ─────────────────────────────────────────── */
.stat-card { border-radius: var(--radius); padding: 1.4rem 1.25rem; color: #fff; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card .icon { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.stat-card .label { font-size: .78rem; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; margin: .25rem 0 0; }
.stat-card.primary { background: linear-gradient(135deg, var(--primary), #e74c3c); }
.stat-card.dark { background: linear-gradient(135deg, #16213e, #0f3460); }
.stat-card.gold { background: linear-gradient(135deg, #d4a017, #f39c12); }
.stat-card.green { background: linear-gradient(135deg, #1abc9c, #16a085); }
.stat-card.purple { background: linear-gradient(135deg, #8e44ad, #9b59b6); }
.stat-card.blue { background: linear-gradient(135deg, #2980b9, #3498db); }

/* ─── Buttons ───────────────────────────────────────────── */
.btn-primary { background: var(--primary); border-color: var(--primary); font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

/* ─── Forms ─────────────────────────────────────────────── */
.form-control, .form-select { border-radius: 8px; border: 1.5px solid var(--border); padding: .55rem .9rem; font-size: .9rem; transition: border .2s, box-shadow .2s; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
.form-label { font-weight: 600; font-size: .85rem; color: var(--text); margin-bottom: .35rem; }
.input-group-text { background: var(--primary-light); border-color: var(--border); color: var(--primary); font-weight: 600; }

/* ─── Tables ────────────────────────────────────────────── */
.table { font-size: .88rem; }
.table th { font-weight: 600; background: #f8f9fa; border-bottom: 2px solid var(--border); }
.table-hover tbody tr:hover { background: var(--primary-light); }
.badge { font-size: .75rem; font-weight: 600; border-radius: 5px; padding: .35em .65em; }

/* ─── Transaction list ──────────────────────────────────── */
.txn-item { display: flex; align-items: center; gap: 1rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); transition: background .15s; }
.txn-item:last-child { border-bottom: none; }
.txn-item:hover { background: #fafafa; }
.txn-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.txn-icon.credit { background: #d5f5e3; color: #1abc9c; }
.txn-icon.debit { background: #fdecea; color: #e74c3c; }
.txn-amount.credit { color: #1abc9c; font-weight: 700; }
.txn-amount.debit { color: #e74c3c; font-weight: 700; }

/* ─── Auth pages ────────────────────────────────────────── */
.auth-page { min-height: 100vh; background: linear-gradient(135deg, var(--secondary) 0%, #16213e 60%, #1a1a2e 100%); display: flex; align-items: center; justify-content: center; }
.auth-card { background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 2.5rem; width: 100%; max-width: 440px; }
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-logo img { height: 55px; }
.auth-title { text-align: center; font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: .25rem; }
.auth-subtitle { text-align: center; font-size: .88rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* ─── Security Gate ─────────────────────────────────────── */
.security-gate { background: linear-gradient(135deg, #fff8e1, #fff3cd); border: 2px solid var(--gold); border-radius: var(--radius); padding: 1.5rem; text-align: center; margin-bottom: 1.25rem; }
.security-gate .gate-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.security-gate h5 { font-weight: 700; color: #856404; margin-bottom: .25rem; }
.security-gate p { font-size: .85rem; color: #6d5302; margin-bottom: 1rem; }

/* ─── Banking card display ──────────────────────────────── */
.bank-card { border-radius: 16px; padding: 1.5rem; color: #fff; position: relative; overflow: hidden; min-height: 180px; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }
.bank-card.visa { background: linear-gradient(135deg, #1a1a2e, #2c3e50); }
.bank-card.mastercard { background: linear-gradient(135deg, #c0392b, #922b21); }
.bank-card.verve { background: linear-gradient(135deg, #16a085, #1abc9c); }
.bank-card .card-number { font-size: 1.2rem; letter-spacing: 4px; margin: 1.25rem 0 .5rem; font-family: 'Courier New', monospace; }
.bank-card .card-holder { font-size: .8rem; opacity: .75; text-transform: uppercase; letter-spacing: 1px; }
.bank-card .card-expiry { font-size: .95rem; font-weight: 600; }
.bank-card::before { content: ''; position: absolute; top: -30px; right: -30px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.06); }
.bank-card::after { content: ''; position: absolute; bottom: -40px; left: -20px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.04); }

/* ─── KYC progress ──────────────────────────────────────── */
.kyc-step { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; border-radius: 10px; border: 1.5px solid var(--border); margin-bottom: .75rem; }
.kyc-step .step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.kyc-step.done .step-num { background: #1abc9c; }
.kyc-step.done { border-color: #1abc9c; background: #f0faf7; }

/* ─── Landing page ──────────────────────────────────────── */
.landing-hero { background: linear-gradient(135deg, var(--secondary) 0%, #16213e 60%, #0f3460 100%); color: #fff; padding: 6rem 0; position: relative; overflow: hidden; }
.landing-hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.landing-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; }
.hero-badge { background: rgba(192,57,43,.3); border: 1px solid rgba(192,57,43,.5); color: #f1948a; border-radius: 20px; padding: .3rem .9rem; font-size: .8rem; font-weight: 600; display: inline-block; margin-bottom: 1rem; }
.feature-icon-box { width: 64px; height: 64px; border-radius: 16px; background: var(--primary-light); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--primary); margin-bottom: 1rem; }
.section-title { font-size: 2rem; font-weight: 800; color: var(--text); }
.section-subtitle { color: var(--text-muted); font-size: 1rem; max-width: 560px; margin: .5rem auto 0; }

/* ─── Sidebar-style nav for portal ──────────────────────── */
.portal-footer { background: var(--secondary); color: rgba(255,255,255,.6); }
.portal-footer a { color: rgba(255,255,255,.6); }
.portal-footer a:hover { color: rgba(255,255,255,.9); }

/* ─── Animations ────────────────────────────────────────── */
@keyframes fadeInUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.fade-in-up { animation: fadeInUp .5s ease forwards; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-card { margin: 1rem; padding: 1.75rem; }
  .stat-card .value { font-size: 1.3rem; }
  .bank-card { min-height: 155px; }
}
