/*
 * SmartPanel — Unified Design System
 * Mobile-first, app-like fintech aesthetic
 * ─────────────────────────────────────────
 */

/* ── Google Fonts ─────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');


/* ── Reset ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: #eef1fb; color: #0f172a; min-height: 100dvh; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }

/* ── CSS Variables ────────────────────────── */
:root {
  /* Brand */
  --blue:        #1a3af7;
  --blue-mid:    #2348f5;
  --blue-light:  #4f8ef7;
  --blue-glow:   rgba(79,142,247,.3);
  --indigo:      #4338ca;

  /* Accents */
  --green:   #22c55e;
  --orange:  #f97316;
  --yellow:  #eab308;
  --purple:  #a78bfa;
  --red:     #ef4444;
  --teal:    #14b8a6;
  --pink:    #ec4899;

  /* Backgrounds */
  --bg:         #eef1fb;
  --bg-card:    #ffffff;
  --bg-input:   #f8faff;

  /* Text */
  --text:       #0f172a;
  --text-2:     #475569;
  --text-3:     #94a3b8;
  --text-4:     #cbd5e1;

  /* Borders */
  --border:     rgba(79,142,247,.13);
  --border-2:   rgba(79,142,247,.06);

  /* Typography */
  --font-head: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Radius */
  --r-xs:  8px;
  --r-sm:  12px;
  --r:     16px;
  --r-lg:  22px;
  --r-xl:  28px;

  /* Shadow */
  --shadow-sm: 0 1px 4px rgba(26,58,247,.06);
  --shadow:    0 4px 20px rgba(26,58,247,.08);
  --shadow-lg: 0 12px 40px rgba(26,58,247,.12);

  /* Layout */
  --mobile-max: 480px;
  --sidebar-w:  240px;
  --header-h:   60px;
}

/* ══════════════════════════════════════════
   LAYOUT SHELL
══════════════════════════════════════════ */
.sp-app {
  display: flex;
  min-height: 100dvh;
}

/* ── Sidebar ────────────────────────────── */
.sp-sidebar {
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.sp-sidebar::-webkit-scrollbar { width: 3px; }
.sp-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sp-sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.sp-sidebar-logo img { height: 32px; width: auto; }
.sp-sidebar-close {
  display: none;
  background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 4px;
  border-radius: 8px;
  transition: color .15s;
}
.sp-sidebar-close:hover { color: var(--text); }

/* Nav sections */
.sp-nav-section { padding: 12px 12px 4px; }
.sp-nav-label {
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-3); padding: 0 8px;
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px;
}
.sp-nav-label::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border-2);
}

.sp-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  cursor: pointer; transition: all .15s;
  margin-bottom: 1px;
  position: relative;
}
.sp-nav-item:hover { background: var(--bg); color: var(--text); }
.sp-nav-item.active {
  background: rgba(26,58,247,.08);
  color: var(--blue);
  font-weight: 600;
}
.sp-nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3px; border-radius: 0 4px 4px 0;
  background: var(--blue);
}
.sp-nav-item svg { flex-shrink: 0; opacity: .7; }
.sp-nav-item.active svg { opacity: 1; }

/* VTU group */
.sp-nav-vtu {
  margin: 8px 12px;
  background: rgba(34,197,94,.04);
  border: 1px solid rgba(34,197,94,.15);
  border-radius: var(--r-sm);
  padding: 6px 0;
}
.sp-nav-vtu .sp-nav-label { color: var(--green); }
.sp-nav-vtu .sp-nav-item:hover { background: rgba(34,197,94,.06); }
.sp-nav-vtu .sp-nav-item.active {
  background: rgba(34,197,94,.1);
  color: #16a34a;
}
.sp-nav-vtu .sp-nav-item.active::before { background: var(--green); }

/* Pulse dot */
.sp-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: spPulse 2s ease-in-out infinite;
}
@keyframes spPulse {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  50%      { opacity: .5; box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}

/* Sidebar overlay */
.sp-sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 190;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}

/* ── Main content ─────────────────────────── */
.sp-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ── Top bar (desktop) ────────────────────── */
.sp-topbar {
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 100;
}
.sp-topbar-title {
  font-family: var(--font-head);
  font-size: 16px; font-weight: 700;
  color: var(--text); flex: 1;
}
.sp-topbar-balance {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px;
  font-size: 13px;
}
.sp-topbar-balance strong {
  font-family: var(--font-head);
  color: var(--blue); font-weight: 700;
}
.sp-topbar-balance span { color: var(--text-3); }

.sp-topbar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: #fff; font-family: var(--font-head);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}

/* ── Mobile header ────────────────────────── */
.sp-mobile-header {
  display: none;
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 16px; gap: 12px;
  position: sticky; top: 0; z-index: 150;
}
.sp-mobile-header img { height: 28px; width: auto; flex: 1; }
.sp-menu-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text); padding: 6px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  transition: background .15s;
}
.sp-menu-btn:hover { background: var(--bg); }

/* ── Content area ─────────────────────────── */
.sp-content {
  flex: 1;
  padding: 24px;
  max-width: 1200px;
}

/* ── Page header ──────────────────────────── */
.sp-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.sp-page-header h1 {
  font-family: var(--font-head);
  font-size: 22px; font-weight: 800;
  color: var(--text); letter-spacing: -.4px;
  display: flex; align-items: center; gap: 8px;
}
.sp-page-header p { font-size: 13px; color: var(--text-3); margin-top: 3px; }

/* ══════════════════════════════════════════
   MOBILE DASHBOARD HERO
══════════════════════════════════════════ */
.sp-hero {
  background: linear-gradient(145deg, #1430e8 0%, #1f46f6 40%, #3468f8 100%);
  padding: 24px 20px 32px;
  position: relative; overflow: hidden;
}
.sp-hero::before {
  content: ''; position: absolute;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.06);
  top: -60px; right: -50px; pointer-events: none;
}
.sp-hero::after {
  content: ''; position: absolute;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -40px; left: -30px; pointer-events: none;
}
.sp-hero-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.sp-hero-user { display: flex; align-items: center; gap: 10px; }
.sp-avatar-sm {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 15px; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.sp-hero-name {
  font-family: var(--font-head);
  font-size: 14px; font-weight: 600; color: rgba(255,255,255,.95);
}
.sp-hero-tier { font-size: 11px; color: rgba(255,255,255,.6); margin-top: 1px; }

.sp-notif-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer; position: relative;
  flex-shrink: 0; transition: background .15s;
}
.sp-notif-btn:hover { background: rgba(255,255,255,.25); }
.sp-notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fbbf24; border: 2px solid #1430e8;
  position: absolute; top: 5px; right: 5px;
}

.sp-balance-block { text-align: center; }
.sp-balance-label {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11.5px; color: rgba(255,255,255,.6); margin-bottom: 4px;
}
.sp-balance-amount {
  font-family: var(--font-head);
  font-size: 36px; font-weight: 800; color: #fff;
  letter-spacing: -1.2px; line-height: 1;
}
.sp-bonus-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; padding: 4px 12px 4px 8px;
  font-size: 11.5px; color: #fff; font-weight: 600;
  margin-top: 10px;
}

.sp-hero-actions {
  display: flex; justify-content: center; gap: 24px; margin-top: 24px;
}
.sp-action-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.sp-action-circle {
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: all .15s; backdrop-filter: blur(4px);
}
.sp-action-btn:hover .sp-action-circle { transform: scale(1.08); background: rgba(255,255,255,.26); }
.sp-action-label { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.9); font-family: var(--font-head); }

/* eye toggle */
.sp-eye-btn { background: none; border: none; cursor: pointer; color: rgba(255,255,255,.65); padding: 0; line-height: 1; }

/* ══════════════════════════════════════════
   CARDS & COMPONENTS
══════════════════════════════════════════ */
.sp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.sp-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; gap: 12px;
  border-bottom: 1px solid var(--border-2);
  flex-wrap: wrap;
}
.sp-card-header h2 {
  font-family: var(--font-head);
  font-size: 14px; font-weight: 700; color: var(--text);
}
.sp-card-body { padding: 18px 20px; }

/* ── Stat card ────────────────────────────── */
.sp-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.sp-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sp-stat-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sp-stat-val {
  font-family: var(--font-head);
  font-size: 20px; font-weight: 800; color: var(--text);
  line-height: 1; letter-spacing: -.4px;
}
.sp-stat-lbl { font-size: 11px; color: var(--text-3); margin-top: 3px; font-weight: 500; }

/* ── Quick action icons ───────────────────── */
.sp-qa-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.sp-qa-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; padding: 4px 2px;
}
.sp-qa-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s, box-shadow .15s;
}
.sp-qa-item:hover .sp-qa-icon { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.sp-qa-label { font-size: 11px; font-weight: 600; color: var(--text-2); text-align: center; font-family: var(--font-head); }

.qa-airtime  { background: rgba(249,115,22,.12); color: #f97316; }
.qa-data     { background: rgba(79,142,247,.12);  color: #4f8ef7; }
.qa-cable    { background: rgba(167,139,250,.12); color: #a78bfa; }
.qa-elec     { background: rgba(234,179,8,.12);   color: #eab308; }
.qa-edu      { background: rgba(34,197,94,.12);   color: #22c55e; }
.qa-recharge { background: rgba(99,102,241,.12);  color: #6366f1; }
.qa-sms      { background: rgba(239,68,68,.12);   color: #ef4444; }
.qa-more     { background: rgba(15,23,42,.07);    color: #475569; }

/* ── Transaction item ─────────────────────── */
.sp-txn-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-2);
  transition: background .15s;
}
.sp-txn-item:last-child { border-bottom: none; }
.sp-txn-icon {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sp-txn-desc { flex: 1; min-width: 0; }
.sp-txn-name { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-txn-date { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.sp-txn-right { text-align: right; flex-shrink: 0; }
.sp-txn-amount { font-family: var(--font-head); font-size: 13px; font-weight: 700; }
.sp-txn-amount.credit { color: var(--green); }
.sp-txn-amount.debit  { color: var(--text); }
.sp-badge {
  display: inline-block;
  font-size: 9.5px; font-weight: 700; padding: 2px 7px;
  border-radius: 999px; margin-top: 3px;
}
.sp-badge-success { background: rgba(34,197,94,.12);  color: #16a34a; }
.sp-badge-pending { background: rgba(234,179,8,.12);  color: #b45309; }
.sp-badge-failed  { background: rgba(239,68,68,.12);  color: #dc2626; }

/* ── Promo banner ─────────────────────────── */
.sp-promo {
  background: linear-gradient(130deg, #f97316 0%, #f43f5e 100%);
  border-radius: var(--r-lg); padding: 20px;
  position: relative; overflow: hidden;
}
.sp-promo::after {
  content: ''; position: absolute;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.1); right: -20px; bottom: -20px;
  pointer-events: none;
}
.sp-promo-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.2); border-radius: 999px;
  padding: 3px 10px; font-size: 10.5px; font-weight: 700; color: #fff;
  margin-bottom: 8px;
}
.sp-promo h3 { font-family: var(--font-head); font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.sp-promo p  { font-size: 12px; color: rgba(255,255,255,.8); line-height: 1.5; margin-bottom: 12px; }
.sp-promo-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: #fff; border-radius: 999px; padding: 7px 16px;
  font-size: 12px; font-weight: 700; color: #f97316;
  font-family: var(--font-head); border: none; cursor: pointer;
  transition: transform .15s;
}
.sp-promo-btn:hover { transform: scale(1.04); }

/* ── Bottom mobile nav ────────────────────── */
.sp-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 150;
}
.sp-bottom-nav-inner {
  display: flex; max-width: var(--mobile-max); margin: 0 auto;
}
.sp-bnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 4px 0; color: var(--text-3);
  font-size: 10px; font-weight: 600; font-family: var(--font-head);
  text-decoration: none; transition: color .15s;
}
.sp-bnav-item.active { color: var(--blue); }
.sp-bnav-icon {
  width: 30px; height: 30px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.sp-bnav-item.active .sp-bnav-icon { background: rgba(26,58,247,.1); }

/* ══════════════════════════════════════════
   FORMS
══════════════════════════════════════════ */
.sp-form-group { margin-bottom: 16px; }
.sp-label {
  display: block; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-2); margin-bottom: 6px;
}
.sp-input {
  width: 100%; padding: 11px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.sp-input:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px var(--blue-glow);
}
.sp-input::placeholder { color: var(--text-4); }

/* ── Buttons ──────────────────────────────── */
.sp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--r-sm);
  font-family: var(--font-head); font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; transition: all .15s; line-height: 1;
}
.sp-btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.sp-btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 4px 14px rgba(26,58,247,.3);
}
.sp-btn-primary:hover { background: #1630d6; box-shadow: 0 6px 18px rgba(26,58,247,.4); transform: translateY(-1px); }
.sp-btn-secondary {
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--border);
}
.sp-btn-secondary:hover { background: #e8ecf8; }
.sp-btn-full { width: 100%; }
.sp-btn-sm { padding: 8px 16px; font-size: 12px; }

/* ══════════════════════════════════════════
   TABLES
══════════════════════════════════════════ */
.sp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sp-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.sp-table th {
  font-family: var(--font-head);
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-3); padding: 10px 14px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.sp-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-2);
  color: var(--text-2); vertical-align: middle;
}
.sp-table tr:last-child td { border-bottom: none; }
.sp-table tr:hover td { background: rgba(79,142,247,.02); }

/* ══════════════════════════════════════════
   NOTIFICATION DRAWER
══════════════════════════════════════════ */
.sp-notif-overlay {
  display: none; position: fixed; inset: 0; z-index: 9980;
  background: rgba(0,0,0,.45); backdrop-filter: blur(3px);
}
.sp-notif-overlay.show { display: block; }
.sp-notif-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(360px, 100vw);
  background: #fff; z-index: 9981;
  display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.15);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.sp-notif-drawer.show { transform: translateX(0); }
.sp-notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #e5e7eb; flex-shrink: 0;
}
.sp-notif-head h3 {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 800; color: #111;
  margin: 0; display: flex; align-items: center; gap: 8px; flex: 1;
}
.sp-notif-count {
  font-size: 11px; font-weight: 700;
  background: #fee2e2; color: #ef4444;
  padding: 2px 8px; border-radius: 20px;
}
.sp-notif-count.zero { background: #f3f4f6; color: #9ca3af; }
.sp-notif-close {
  background: #f3f4f6; border: none; border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; color: #6b7280;
  transition: background .15s;
}
.sp-notif-close:hover { background: #e5e7eb; }
.sp-notif-list { flex: 1; overflow-y: auto; }
.sp-notif-list::-webkit-scrollbar { width: 3px; }
.sp-notif-list::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 3px; }
.sp-notif-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 18px; cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  transition: background .15s; position: relative;
}
.sp-notif-item:last-child { border-bottom: none; }
.sp-notif-item:hover { background: #f9fafb; }
.sp-notif-item.unread { background: #eff6ff; }
.sp-notif-item.unread::before {
  content: ''; position: absolute;
  left: 6px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--blue-light);
}
.sp-notif-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.sp-notif-icon.success { background: rgba(34,197,94,.12);  color: #16a34a; }
.sp-notif-icon.pending { background: rgba(234,179,8,.12);  color: #b45309; }
.sp-notif-icon.failed  { background: rgba(239,68,68,.12);  color: #dc2626; }
.sp-notif-icon.deposit { background: rgba(59,130,246,.12); color: #2563eb; }
.sp-notif-icon.info    { background: rgba(107,114,128,.1); color: #4b5563; }
.sp-notif-icon.promo   { background: rgba(168,85,247,.12); color: #9333ea; }
.sp-notif-body { flex: 1; min-width: 0; }
.sp-notif-title { font-size: 13px; font-weight: 700; color: #111; }
.sp-notif-desc  { font-size: 12px; color: #6b7280; margin-top: 2px; line-height: 1.45; }
.sp-notif-time  { font-size: 10.5px; color: #9ca3af; margin-top: 4px; }
.sp-notif-empty {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 3rem 2rem;
  color: #9ca3af; text-align: center; gap: 10px;
}
.sp-notif-footer {
  padding: 14px 18px; border-top: 1px solid #e5e7eb; flex-shrink: 0;
}
.sp-notif-footer a {
  display: block; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--blue);
  padding: 10px; background: rgba(26,58,247,.06);
  border-radius: 9px; transition: background .15s;
}
.sp-notif-footer a:hover { background: rgba(26,58,247,.12); }

/* ── Notification badge ───────────────────── */
.sp-badge-notif {
  position: absolute; top: 1px; right: 1px;
  min-width: 16px; height: 16px; border-radius: 999px;
  background: #ef4444; color: #fff;
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px; border: 2px solid #fff;
}
.sp-badge-notif.hidden { display: none; }

/* ── WhatsApp float ───────────────────────── */
.sp-wa {
  position: fixed; bottom: 28px; right: 24px; z-index: 9000;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; cursor: pointer;
}
.sp-wa-bubble {
  background: #25D366; color: #fff; border-radius: 50%;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  position: relative; transition: transform .2s;
}
.sp-wa:hover .sp-wa-bubble { transform: scale(1.1); }
.sp-wa-bubble::after {
  content: ''; position: absolute;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(37,211,102,.3);
  animation: waPulse 2.2s ease-out infinite;
}
@keyframes waPulse { 0%{transform:scale(1);opacity:.8} 100%{transform:scale(1.8);opacity:0} }
.sp-wa-label {
  background: #fff; color: #128C7E;
  font-size: .8rem; font-weight: 600;
  padding: 6px 12px; border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  white-space: nowrap; opacity: 0; transform: translateX(10px);
  transition: all .2s; pointer-events: none;
}
.sp-wa:hover .sp-wa-label { opacity: 1; transform: translateX(0); }

/* ── Preloader ────────────────────────────── */
#sp-preloader {
  position: fixed; inset: 0; z-index: 99999;
  background: #001536;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 24px;
  transition: opacity .5s, visibility .5s;
}
#sp-preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.sp-pre-logo { animation: prePop .6s cubic-bezier(.34,1.56,.64,1) forwards; opacity: 0; }
@keyframes prePop { from{opacity:0;transform:scale(.7)} to{opacity:1;transform:scale(1)} }
.sp-pre-logo img { width: 130px; height: auto; filter: brightness(0) invert(1); }
.sp-pre-bar { width: 150px; height: 3px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.sp-pre-fill { height: 100%; width: 0; background: linear-gradient(90deg, #1a5fa8, #4a9eff); border-radius: 99px; animation: preFill 1.2s cubic-bezier(.4,0,.2,1) .3s forwards; }
@keyframes preFill { to{width:100%} }

/* ══════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sp-fade-1 { animation: fadeUp .4s ease both .05s; }
.sp-fade-2 { animation: fadeUp .4s ease both .10s; }
.sp-fade-3 { animation: fadeUp .4s ease both .15s; }
.sp-fade-4 { animation: fadeUp .4s ease both .20s; }
.sp-fade-5 { animation: fadeUp .4s ease both .25s; }

/* ══════════════════════════════════════════
   RESPONSIVE — DESKTOP LAYOUT
══════════════════════════════════════════ */
@media (min-width: 769px) {
  .sp-mobile-header { display: none; }
  .sp-bottom-nav    { display: none; }
  .sp-hero          { display: none; } /* desktop uses topbar + grid stats */
  .sp-sidebar-close { display: none; }
  .sp-sidebar-overlay { display: none !important; }

  .sp-content { padding: 28px 32px; }

  /* stats grid 3-col on desktop */
  .sp-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
  }
  .sp-grid-2 { grid-template-columns: repeat(2, 1fr) !important; }

  /* dashboard two-col layout */
  .sp-dash-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
  }

  /* section title padding */
  .sp-section-title { margin-bottom: 14px; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE LAYOUT
══════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --sidebar-w: 260px; }

  /* Hide desktop elements */
  .sp-sidebar  { transform: translateX(-100%); }
  .sp-sidebar.open { transform: translateX(0); }
  .sp-sidebar-close { display: flex; }
  .sp-topbar   { display: none; }
  .sp-main     { margin-left: 0; }
  .sp-mobile-header { display: flex; }
  .sp-bottom-nav    { display: flex; }
  .sp-hero          { display: block; }
  .sp-wa            { bottom: 80px; right: 16px; }
  .sp-wa-label      { display: none; }

  .sp-content {
    padding: 16px 14px 90px;
    max-width: 100%;
  }
  .sp-page-header h1 { font-size: 18px; }

  .sp-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
  }
  .sp-stat-val { font-size: 17px; }

  /* Hide desktop hero balance section */
  .sp-desktop-balance { display: none; }

  /* Mobile qa icons smaller */
  .sp-qa-icon { width: 48px; height: 48px; border-radius: 14px; }
  .sp-qa-label { font-size: 10.5px; }

  .sp-card-body { padding: 14px 16px; }
  .sp-card-header { padding: 14px 16px 10px; }

  .sp-table th, .sp-table td { padding: 9px 12px; font-size: 12px; }
}

@media (max-width: 380px) {
  .sp-balance-amount { font-size: 30px; }
  .sp-hero-actions { gap: 16px; }
  .sp-action-circle { width: 44px; height: 44px; }
}

/* ── Utility ──────────────────────────────── */
.sp-section-title {
  font-family: var(--font-head);
  font-size: 13px; font-weight: 700;
  color: var(--text); margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.sp-link-sm { font-size: 12px; font-weight: 600; color: var(--blue-light); font-family: var(--font-head); }
.sp-gap-16  { margin-bottom: 16px; }
.sp-gap-20  { margin-bottom: 20px; }
.sp-gap-24  { margin-bottom: 24px; }
.sp-flex    { display: flex; align-items: center; }
.sp-flex-between { display: flex; align-items: center; justify-content: space-between; }
.sp-text-sm { font-size: 12px; color: var(--text-3); }

* { box-sizing: border-box; }
body { overflow-x: hidden; }

.sp-hero {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
}

.sp-content {
  width: 100%;
  max-width: 100%;
  padding: 16px;
  overflow-x: hidden;
}

.sp-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.sp-qa-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 480px) {
  .sp-qa-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .sp-qa-label {
    font-size: 10px;
  }
  .sp-qa-icon {
    width: 44px;
    height: 44px;
  }
  .sp-stat-val {
    font-size: 14px !important;
  }
  .sp-desktop-balance {
    display: none !important;
  }
}
