/* ============================================================
   Flexi Access Bank – Admin Panel Stylesheet
   ============================================================ */
:root {
  --primary: #c0392b;
  --primary-dark: #922b21;
  --secondary: #1a1a2e;
  --sidebar-w: 250px;
  --topbar-h: 60px;
  --bg: #f0f2f5;
  --card-bg: #fff;
  --border: #e0e4ea;
  --text: #2c3e50;
  --text-muted: #7f8c8d;
  --radius: 10px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
  --shadow: 0 4px 20px rgba(0,0,0,.09);
}
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: var(--bg); color: var(--text); margin: 0; }

/* ─── Layout ─────────────────────────────────────────────── */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar { width: var(--sidebar-w); background: var(--secondary); flex-shrink: 0; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 1000; transition: transform .3s; }
.admin-sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); }
.admin-main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; transition: margin-left .3s; }
.admin-main.expanded { margin-left: 0; }
.admin-topbar { height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 1.5rem; gap: .75rem; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; }
.admin-content { padding: 1.5rem; flex: 1; }

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar-brand { padding: 1rem 1.25rem; display: flex; align-items: center; gap: .75rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand span { color: #fff; font-weight: 700; font-size: 1rem; white-space: nowrap; }
.sidebar-nav { padding: .75rem 0; }
.nav-section { color: rgba(255,255,255,.35); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: .75rem 1.25rem .25rem; }
.sidebar-link { display: flex; align-items: center; gap: .75rem; padding: .6rem 1.25rem; color: rgba(255,255,255,.78); font-size: .88rem; font-weight: 500; text-decoration: none; transition: all .2s; border-left: 3px solid transparent; }
.sidebar-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-link.active { background: rgba(192,57,43,.25); color: #fff; border-left-color: var(--primary); }
.sidebar-link i { width: 18px; text-align: center; font-size: .9rem; }

/* ─── 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: .85rem 1.25rem; font-size: .9rem; }
.card-body { padding: 1.25rem; }

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

/* ─── Tables ────────────────────────────────────────────── */
.table { font-size: .86rem; }
.table th { font-weight: 600; font-size: .8rem; background: #f8f9fa; border-bottom: 2px solid var(--border); text-transform: uppercase; letter-spacing: .03em; }
.table-hover tbody tr:hover { background: #fef9f9; }
.badge { font-size: .72rem; font-weight: 600; border-radius: 5px; padding: .3em .6em; }
.btn-xs { font-size: .75rem; padding: .2rem .5rem; }

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

/* ─── Forms ─────────────────────────────────────────────── */
.form-control, .form-select { border-radius: 7px; border: 1.5px solid var(--border); font-size: .88rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(192,57,43,.1); }
.form-label { font-weight: 600; font-size: .82rem; margin-bottom: .3rem; }

/* ─── Page Title ─────────────────────────────────────────── */
.page-title { font-size: 1.3rem; font-weight: 700; color: var(--text); margin-bottom: 1.25rem; }

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 992px) {
  .admin-sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}
