/* ============================================================
   Mobile Trade & Task — Design system v3 « Cobalt Ledger »
   (pages utilisateur uniquement)

   Identité : graphite profond, cobalt pour l'action, or réservé
   aux crédits / VIP, vert = gain, rouge = perte.
   Surfaces nettes (moins de verre), hiérarchie typographique
   forte, composants généreux au toucher (mobile-first).

   NB : ce fichier n'est chargé que par includes/header.php
   (espace utilisateur). L'administration utilise admin.css.
   Aucun nom de classe, d'identifiant ni d'attribut data-* n'a
   été retiré : seule la présentation change.
   ============================================================ */

:root {
  /* Surfaces */
  --bg: #080b13;
  --bg-soft: #0b101b;
  --surface: #0f1522;
  --surface-2: #141c2d;
  --surface-3: #1b2540;
  --card: rgba(255,255,255,0.03);
  --border: rgba(148,163,184,0.12);
  --border-strong: rgba(148,163,184,0.24);

  /* Marque : cobalt */
  --brand: #4f7cff;
  --brand-2: #3a63e8;
  --brand-soft: #93b2ff;
  --brand-bg: rgba(79,124,255,0.13);
  --brand-grad: linear-gradient(135deg, #6a93ff 0%, #3a63e8 100%);
  --brand-rgb: 79,124,255;

  /* Crédits / VIP */
  --gold: #f5b72e;
  --gold-soft: #fbcf6b;
  --gold-deep: #c58a12;
  --gold-bg: rgba(245,183,46,0.12);

  /* Sémantique */
  --emerald: #3ddc97;
  --rose: #ff6b81;
  --violet: #b39dff;
  --cyan: #4cc9f0;

  /* Texte */
  --fg: #e7ecf6;
  --fg-strong: #ffffff;
  --muted: #8fa0b8;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 10px 30px rgba(0,0,0,.28);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --sidebar-w: 272px;
  --bottom-nav-h: 64px;
  --ease: cubic-bezier(.22,.8,.3,1);

  /* Bootstrap 5.3 (dark) */
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--fg);
  --bs-body-font-family: var(--font);
  --bs-border-color: var(--border);
  --bs-link-color: var(--brand-soft);
  --bs-link-hover-color: #c3d4ff;
  --bs-secondary-color: var(--muted);
  --bs-emphasis-color: var(--fg-strong);
}

* { box-sizing: border-box; }
html, body { background: var(--bg); color: var(--fg); }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
body.user-body {
  background:
    radial-gradient(900px 480px at 100% -8%, rgba(79,124,255,0.13), transparent 60%),
    radial-gradient(700px 420px at -5% 105%, rgba(245,183,46,0.045), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 { color: var(--fg-strong); letter-spacing: -0.02em; font-weight: 700; font-family: var(--font-display); }
h4 { font-size: 1.2rem; }
h5 { font-size: .98rem; display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
h5 > i {
  width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem; color: var(--brand-soft); background: var(--brand-bg);
}
h6 { font-size: .92rem; }

/* Titre de page */
h1.h3 {
  font-size: 1.55rem; display: flex; align-items: center; gap: .85rem;
  font-weight: 800; letter-spacing: -.03em;
}
h1.h3 > i {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 10px 22px rgba(var(--brand-rgb),.32), inset 0 1px 0 rgba(255,255,255,.28);
}
h1.h3 > i.text-warning { color: #2a1c05 !important; background: linear-gradient(135deg, var(--gold-soft), var(--gold)); box-shadow: 0 10px 22px rgba(245,183,46,.25); }

a { color: var(--brand-soft); text-decoration: none; transition: color .15s; }
a:hover { color: #c3d4ff; }
::selection { background: rgba(var(--brand-rgb),.4); }
:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 2px; }

.text-gold { color: var(--gold-soft) !important; }
.text-muted-2, .text-light-50 { color: var(--muted) !important; }
.text-muted { color: var(--muted) !important; }
.text-warning { color: var(--gold-soft) !important; }
.text-success { color: var(--emerald) !important; }
.text-danger { color: var(--rose) !important; }
.text-info { color: var(--cyan) !important; }
.text-light { color: var(--fg) !important; }
hr.border-secondary, hr { border-color: var(--border) !important; opacity: 1; }
.border-secondary-subtle { border-color: var(--border) !important; }
.min-w-0 { min-width: 0; }

/* ============================================================
   Layout
   ============================================================ */
.app-wrapper { min-height: 100vh; }
.app-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: none;
}
.app-sidebar::-webkit-scrollbar { display: none; }
.app-main { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
.app-content { flex: 1; max-width: 1240px; width: 100%; margin: 0 auto; }
.app-footer { border-top: 1px solid var(--border); padding: 18px 16px; color: var(--muted); font-size: 12px; }

/* ---------- Topbar ---------- */
.app-header {
  position: sticky; top: 0; z-index: 1020;
  background: rgba(8,11,19,0.78);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.topbar { min-height: 66px; }
.topbar-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 10px; flex-shrink: 0; }
.topbar-title {
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem;
  color: var(--fg-strong); letter-spacing: -.02em; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.topbar-sub { font-size: 11.5px; color: var(--muted); line-height: 1.2; }

.balance-pill {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 5px 16px 5px 5px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border-strong);
}
.balance-pill > i {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; color: #2a1c05;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
}
.balance-pill .lbl { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); line-height: 1; font-weight: 700; }
.balance-pill .val { font-size: 14.5px; font-weight: 800; color: var(--fg-strong); line-height: 1.25; font-variant-numeric: tabular-nums; font-family: var(--font-display); letter-spacing: -.02em; }
.balance-pill .val small { font-size: 10px; color: var(--gold-soft); font-weight: 700; font-family: var(--font); letter-spacing: 0; }

.badge-plan {
  background: var(--brand-bg); color: var(--brand-soft);
  border: 1px solid rgba(var(--brand-rgb),0.35);
}

.topbar-btn {
  position: relative; width: 42px; height: 42px; padding: 0 !important;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 13px !important; font-size: 17px;
  background: var(--surface); border: 1px solid var(--border-strong) !important; color: var(--fg);
}
.topbar-btn:hover, .topbar-btn.show { background: var(--surface-2); color: #fff; }
.avatar-btn { font-size: 13px; font-weight: 800; letter-spacing: .02em; color: #fff; background: var(--brand-grad) !important; border: 0 !important; box-shadow: 0 6px 16px rgba(var(--brand-rgb),.35); }
.avatar-btn:hover { color: #fff; filter: brightness(1.1); background: var(--brand-grad) !important; }

/* ---------- Sidebar ---------- */
.sidebar-brand { padding: 22px 20px 12px; display: flex; align-items: center; gap: 12px; overflow: hidden; }
.logo-box {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 13px;
  overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  color: #fff; font-weight: 800; font-size: 15px;
}
.logo-box .logo-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.offcanvas-header .logo-box { width: 36px; height: 36px; }
.brand-name { color: var(--fg-strong); font-weight: 800; font-size: 14.5px; line-height: 1.2; font-family: var(--font-display); letter-spacing: -.02em; }
.brand-sub { color: var(--gold-soft); font-size: 11px; font-weight: 600; }
.brand-mobile { color: var(--fg-strong); font-weight: 700; font-size: 14px; }

.sidebar-nav { padding: 4px 14px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-section {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  color: rgba(143,160,184,.55); padding: 18px 12px 6px;
}
.nav-section:first-child { padding-top: 6px; }
.nav-link-custom {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 12px;
  color: var(--muted); font-size: 14px; font-weight: 600;
  transition: background .18s, color .18s, transform .18s;
}
.nav-link-custom i {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; background: transparent;
  transition: background .18s, color .18s;
}
.nav-link-custom:hover { background: rgba(255,255,255,0.045); color: var(--fg-strong); }
.nav-link-custom:hover i { background: rgba(255,255,255,.06); }
.nav-link-custom.active { color: #fff; background: var(--brand-bg); }
.nav-link-custom.active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--brand-grad);
}
.nav-link-custom.active i { background: var(--brand-grad); color: #fff; box-shadow: 0 6px 14px rgba(var(--brand-rgb),.4); }
.nav-link-custom.nav-link-vip i { color: var(--gold-soft); }
.nav-link-custom.nav-link-vip.active { background: var(--gold-bg); }
.nav-link-custom.nav-link-vip.active::before { background: linear-gradient(180deg, var(--gold-soft), var(--gold)); }
.nav-link-custom.nav-link-vip.active i { color: #2a1c05; background: linear-gradient(135deg, var(--gold-soft), var(--gold)); box-shadow: 0 6px 14px rgba(245,183,46,.3); }

.sidebar-foot { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.balance-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius); padding: 18px;
  background:
    radial-gradient(220px 120px at 100% 0%, rgba(255,255,255,.16), transparent 70%),
    linear-gradient(150deg, #3f6bf0 0%, #2f4fd0 60%, #263fa8 100%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 16px 34px rgba(47,79,208,.32);
}
.balance-card .lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,.78); font-weight: 700; }
.balance-card .val { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -.04em; line-height: 1.15; margin-top: 2px; font-variant-numeric: tabular-nums; }
.balance-card .sub { font-size: 11.5px; color: rgba(255,255,255,.75); }
.balance-card .sub strong, .balance-card .sub .text-success { color: #b8f5d8 !important; }
.balance-card .bc-actions { display: flex; gap: 8px; margin-top: 14px; }
.balance-card .bc-actions a {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 6px; border-radius: 11px; font-size: 12.5px; font-weight: 700;
  color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2);
  transition: background .15s, transform .15s;
}
.balance-card .bc-actions a:first-child { background: #fff; color: #263fa8; border-color: #fff; }
.balance-card .bc-actions a:hover { transform: translateY(-1px); background: rgba(255,255,255,.26); }
.balance-card .bc-actions a:first-child:hover { background: #eef3ff; }
.sidebar-logout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 13.5px;
  border: 1px solid var(--border); background: transparent; transition: all .15s;
}
.sidebar-logout:hover { color: var(--rose); border-color: rgba(255,107,129,.4); background: rgba(255,107,129,.07); }

/* Tiroir mobile */
.mobile-sidebar { background: var(--bg-soft); color: var(--fg); max-width: 310px; border-right: 1px solid var(--border); }
.mobile-sidebar .offcanvas-header { padding: 18px 18px 12px; }
.mobile-sidebar .offcanvas-body { padding: 4px 12px 22px; display: flex; flex-direction: column; gap: 10px; }
.mobile-sidebar .sidebar-nav { padding: 0 0 6px; }
.mobile-sidebar .nav-link-custom.active::before { left: -12px; }
.mobile-sidebar .nav-link-custom { padding: 10px 12px; }
.btn-close-white { filter: invert(1) grayscale(100%) brightness(200%); }

/* ============================================================
   Notifications
   ============================================================ */
.notif-menu {
  min-width: 330px; max-width: 370px; padding: 0 !important;
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  border: 1px solid var(--border-strong);
}
.notif-header {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13.5px; font-weight: 700; color: var(--fg-strong); user-select: none;
  font-family: var(--font-display);
}
.notif-header i { font-size: 14px; }
.notif-header-count {
  margin-left: auto; background: var(--rose); color: #fff;
  font-size: 10px; font-weight: 800; min-width: 20px; height: 20px; line-height: 20px;
  text-align: center; padding: 0 6px; border-radius: 999px; font-family: var(--font);
}
.notif-scroll { max-height: 340px; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.notif-item {
  position: relative; padding: 12px 16px 12px 22px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background-color 0.15s ease; list-style: none;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: rgba(255,255,255,0.04); }
.notif-item.unread { background: var(--brand-bg); }
.notif-item.unread::before {
  content: ""; position: absolute; left: 9px; top: 18px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.2);
}
.notif-item.unread:hover { background: rgba(var(--brand-rgb),.2); }
.notif-item:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: -2px; }
.notif-title { font-weight: 700; font-size: 13px; color: var(--fg-strong); line-height: 1.3; }
.notif-msg { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.notif-time { font-size: 10.5px; color: rgba(143,160,184,.7); margin-top: 5px; }
.notif-empty { padding: 34px 16px; text-align: center; color: var(--muted); font-size: 12.5px; list-style: none; }
.notif-empty i { font-size: 26px; display: block; margin-bottom: 6px; opacity: 0.5; }
.notif-mark-all {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px; border-top: 1px solid var(--border); background: var(--surface-2);
  font-size: 12px; font-weight: 700; color: var(--brand-soft);
  cursor: pointer; transition: background-color 0.15s ease; list-style: none; user-select: none;
}
.notif-mark-all:hover { background: var(--brand-bg); }
.notif-mark-all:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: -2px; }
.notif-dot {
  position: absolute; top: -5px; right: -5px;
  background: var(--rose); color: #fff; font-size: 9.5px; font-weight: 800;
  min-width: 19px; height: 19px; line-height: 15px; text-align: center;
  padding: 0 4px; border-radius: 999px; border: 2px solid var(--bg);
}
.btn-outline-light { position: relative; }
.notif-scroll::-webkit-scrollbar { width: 5px; }
.notif-scroll::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.3); border-radius: 999px; }
.notif-scroll { scrollbar-width: thin; scrollbar-color: rgba(148,163,184,0.3) transparent; }

/* ============================================================
   Cartes
   ============================================================ */
.glass-card, .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--fg);
  transition: border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.card-header { border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.card-body { color: var(--fg); }

/* ---------- Stat cards ---------- */
.stat-card { padding: 18px; height: 100%; position: relative; overflow: hidden; }
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-card .stat-ico, .stat-card .stat-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px; font-size: 17px;
  background: var(--brand-bg); color: var(--brand-soft);
}
.stat-card .stat-lbl, .stat-card .stat-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.stat-card .stat-val, .stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 800; margin-top: 3px; color: var(--fg-strong);
  letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.2;
}
.stat-card .stat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-icon i { color: inherit; font-size: inherit; }
.ico-amber { background: rgba(245,183,46,0.14) !important; color: var(--gold-soft) !important; }
.ico-emerald { background: rgba(61,220,151,0.14) !important; color: var(--emerald) !important; }
.ico-rose { background: rgba(255,107,129,0.14) !important; color: var(--rose) !important; }
.ico-cyan { background: rgba(76,201,240,0.14) !important; color: var(--cyan) !important; }
.ico-violet { background: rgba(179,157,255,0.14) !important; color: var(--violet) !important; }
.row > div:nth-child(2) > .stat-card .stat-icon { background: rgba(61,220,151,0.14); color: var(--emerald); }
.row > div:nth-child(3) > .stat-card .stat-icon { background: rgba(255,107,129,0.14); color: var(--rose); }
.row > div:nth-child(4) > .stat-card .stat-icon { background: rgba(245,183,46,0.14); color: var(--gold-soft); }

/* ---------- Dashboard ---------- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.page-head .greet { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.035em; margin: 0; color: var(--fg-strong); display: block; }
.page-head .greet-sub { color: var(--muted); font-size: 13.5px; margin: 3px 0 0; }

.hero-balance {
  position: relative; overflow: hidden; border-radius: 26px; padding: 28px;
  background:
    radial-gradient(520px 260px at 95% -25%, rgba(255,255,255,.24), transparent 65%),
    radial-gradient(380px 220px at 0% 120%, rgba(245,183,46,.18), transparent 65%),
    linear-gradient(135deg, #4a78ff 0%, #2f55dd 55%, #22389d 100%);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 26px 56px rgba(34,56,157,.4);
  color: #fff; height: 100%;
}
.hero-balance::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .4;
  background-image: radial-gradient(rgba(255,255,255,.2) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(120deg, transparent 45%, #000 100%); mask-image: linear-gradient(120deg, transparent 45%, #000 100%);
}
.hero-balance > * { position: relative; z-index: 1; }
.hero-balance .hb-label { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.8); }
.hero-balance .hb-value { font-family: var(--font-display); font-size: clamp(2.1rem, 6vw, 3rem); font-weight: 800; letter-spacing: -.05em; line-height: 1.1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; color: #fff; }
.hero-balance .hb-value small { font-size: .38em; font-weight: 700; opacity: .8; letter-spacing: 0; font-family: var(--font); }
.hero-balance .hb-ar { font-size: 13px; color: rgba(255,255,255,.78); }
.hero-balance .hb-split { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-balance .hb-chip {
  flex: 1 1 140px; padding: 11px 14px; border-radius: 15px;
  background: rgba(8,12,30,.28); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-balance .hb-chip .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: rgba(255,255,255,.75); font-weight: 700; }
.hero-balance .hb-chip .v { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-display); letter-spacing: -.02em; }
.hero-balance .hb-chip .v small { font-family: var(--font); font-size: 11px; opacity: .75; }
.hero-balance .hb-chip .v.ok { color: #b8f5d8; }
.hero-balance .hb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn-hero {
  --bs-btn-padding-y: .65rem; --bs-btn-padding-x: 1.25rem;
  background: #fff; color: #22389d !important; border: 0; font-weight: 800; border-radius: 13px;
  box-shadow: 0 10px 22px rgba(0,0,0,.22);
}
.btn-hero:hover { background: #eef3ff; color: #1a2c7a !important; transform: translateY(-1px); }
.btn-hero-ghost {
  background: rgba(255,255,255,.14); color: #fff !important; border: 1px solid rgba(255,255,255,.3); font-weight: 700; border-radius: 13px;
  --bs-btn-padding-y: .65rem; --bs-btn-padding-x: 1.25rem;
}
.btn-hero-ghost:hover { background: rgba(255,255,255,.24); transform: translateY(-1px); }

.section-title-sm {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-size: .74rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin: 26px 0 14px;
}
.section-title-sm::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  padding: 16px 8px; border-radius: 16px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--fg) !important; font-weight: 700; font-size: 13px;
  transition: all .18s var(--ease);
}
.quick-tile i {
  width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; background: var(--brand-bg); color: var(--brand-soft); transition: all .18s;
}
.quick-tile:hover { transform: translateY(-3px); border-color: rgba(var(--brand-rgb),.5); background: var(--surface-3); }
.quick-tile:hover i { background: var(--brand-grad); color: #fff; }
.quick-tile.t-green i { background: rgba(61,220,151,.14); color: var(--emerald); }
.quick-tile.t-rose i { background: rgba(255,107,129,.14); color: var(--rose); }
.quick-tile.t-gold i { background: var(--gold-bg); color: var(--gold-soft); }
.quick-tile.t-cyan i { background: rgba(76,201,240,.14); color: var(--cyan); }
.quick-tile.t-green:hover i { background: var(--emerald); color: #04261a; }
.quick-tile.t-rose:hover i { background: var(--rose); color: #3a0510; }
.quick-tile.t-gold:hover i { background: var(--gold); color: #2a1c05; }
.quick-tile.t-cyan:hover i { background: var(--cyan); color: #031a24; }

.mini-stat { display: flex; align-items: center; gap: 12px; padding: 14px 16px; height: 100%; }
.mini-stat .stat-icon { margin: 0; flex-shrink: 0; }
.mini-stat .stat-value { font-size: 20px; }

/* ============================================================
   Boutons
   ============================================================ */
.btn {
  --bs-btn-font-weight: 700;
  --bs-btn-border-radius: 13px;
  --bs-btn-padding-y: .58rem;
  --bs-btn-padding-x: 1.15rem;
  font-size: 14px; transition: all .18s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  letter-spacing: -.005em;
}
.btn i { line-height: 1; }
.btn.w-100 { display: flex; }
.btn > small.d-block { flex-basis: 100%; }
.btn:has(> small.d-block) { flex-wrap: wrap; row-gap: 0; }
.btn-lg { --bs-btn-padding-y: .85rem; --bs-btn-padding-x: 1.7rem; font-size: 15.5px; --bs-btn-border-radius: 15px; }
.btn-sm { --bs-btn-padding-y: .38rem; --bs-btn-padding-x: .85rem; font-size: 13px; --bs-btn-border-radius: 10px; }

.btn-primary, .btn-gold {
  --bs-btn-color: #fff; --bs-btn-border-color: transparent;
  --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: #fff; --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-border-color: transparent;
  background: var(--brand-grad); border: 0; color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.28) inset, 0 10px 24px rgba(var(--brand-rgb),.3);
}
.btn-primary:hover, .btn-gold:hover { background: linear-gradient(135deg, #7ca0ff 0%, #4a73f2 100%); color: #fff; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 14px 30px rgba(var(--brand-rgb),.42); }
.btn-primary:active { transform: translateY(0); background: var(--brand-2); }
.btn-primary:disabled, .btn-primary.disabled { background: var(--brand-grad); color: #fff; }

.btn-warning {
  --bs-btn-color: #2a1c05; --bs-btn-border-color: transparent;
  --bs-btn-hover-color: #2a1c05; --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: #2a1c05; --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: #2a1c05; --bs-btn-disabled-border-color: transparent;
  background: linear-gradient(135deg, #fcd77a 0%, #f5b72e 100%); border: 0; color: #2a1c05;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 10px 24px rgba(245,183,46,.24);
}
.btn-warning:hover { background: linear-gradient(135deg, #ffe09a 0%, #f9c248 100%); color: #2a1c05; transform: translateY(-1px); }
.btn-warning:disabled { background: linear-gradient(135deg, #fcd77a 0%, #f5b72e 100%); color: #2a1c05; }

.btn-success {
  --bs-btn-color: #04261a; --bs-btn-bg: var(--emerald); --bs-btn-border-color: transparent;
  --bs-btn-hover-color: #04261a; --bs-btn-hover-bg: #66e8b2; --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: #25b57c; --bs-btn-active-border-color: transparent; --bs-btn-active-color: #04261a;
  --bs-btn-disabled-bg: var(--emerald); --bs-btn-disabled-border-color: transparent; --bs-btn-disabled-color: #04261a;
  box-shadow: 0 10px 22px rgba(61,220,151,.2);
}
.btn-success:hover { transform: translateY(-1px); }
.btn-danger {
  --bs-btn-bg: #ef4466; --bs-btn-border-color: transparent; --bs-btn-hover-bg: #ff6b81; --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: #e11d48; --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-bg: #ef4466; --bs-btn-disabled-border-color: transparent;
  box-shadow: 0 10px 22px rgba(239,68,102,.24);
}
.btn-danger:hover { transform: translateY(-1px); }
.btn-secondary {
  --bs-btn-color: var(--fg); --bs-btn-bg: var(--surface-2); --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--surface-3); --bs-btn-hover-border-color: var(--border-strong);
  --bs-btn-disabled-color: var(--muted); --bs-btn-disabled-bg: var(--surface); --bs-btn-disabled-border-color: var(--border);
}
.btn-info {
  --bs-btn-color: #031a24; --bs-btn-bg: var(--cyan); --bs-btn-border-color: transparent;
  --bs-btn-hover-color: #031a24; --bs-btn-hover-bg: #86d9f6; --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: #34b6dc; --bs-btn-active-color: #031a24; --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-color: #031a24; --bs-btn-disabled-bg: var(--cyan); --bs-btn-disabled-border-color: transparent;
  box-shadow: 0 10px 22px rgba(76,201,240,.2);
}
.btn-info:hover { transform: translateY(-1px); }
.btn-light {
  --bs-btn-color: #101a3d; --bs-btn-bg: #e8eeff; --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: transparent; --bs-btn-hover-color: #101a3d;
}
.btn-outline-light {
  --bs-btn-color: var(--fg); --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: rgba(255,255,255,.07); --bs-btn-hover-border-color: rgba(148,163,184,.45);
  --bs-btn-active-bg: rgba(255,255,255,.1); --bs-btn-active-border-color: rgba(148,163,184,.45); --bs-btn-active-color: #fff;
  --bs-btn-disabled-color: var(--muted); --bs-btn-disabled-border-color: var(--border);
  background: rgba(255,255,255,.025);
}
.btn-outline-secondary {
  --bs-btn-color: var(--muted); --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: rgba(255,255,255,.07); --bs-btn-hover-border-color: var(--border-strong);
  --bs-btn-active-bg: rgba(255,255,255,.1); --bs-btn-active-border-color: var(--border-strong);
}
.btn-outline-warning { --bs-btn-color: var(--gold-soft); --bs-btn-border-color: rgba(245,183,46,.45); --bs-btn-hover-bg: var(--gold); --bs-btn-hover-border-color: var(--gold); --bs-btn-hover-color: #2a1c05; --bs-btn-disabled-color: var(--gold-soft); --bs-btn-disabled-border-color: rgba(245,183,46,.3); }
.btn-outline-danger { --bs-btn-color: var(--rose); --bs-btn-border-color: rgba(255,107,129,.5); --bs-btn-hover-bg: #ef4466; --bs-btn-hover-border-color: #ef4466; }
.btn-outline-success { --bs-btn-color: var(--emerald); --bs-btn-border-color: rgba(61,220,151,.5); --bs-btn-hover-bg: var(--emerald); --bs-btn-hover-border-color: var(--emerald); --bs-btn-hover-color: #04261a; }
.btn-link { --bs-btn-color: var(--brand-soft); --bs-btn-hover-color: #c3d4ff; text-decoration: none; font-weight: 600; }
.btn:disabled, .btn.disabled { opacity: .5; box-shadow: none; transform: none !important; }
.btn:active:not(:disabled) { transform: scale(.985); }

/* ============================================================
   Dropdowns / alertes / modales
   ============================================================ */
.dropdown-menu {
  --bs-dropdown-bg: var(--surface); --bs-dropdown-border-color: var(--border-strong);
  --bs-dropdown-link-color: var(--fg); --bs-dropdown-link-hover-bg: rgba(255,255,255,.06);
  --bs-dropdown-link-hover-color: #fff; --bs-dropdown-divider-bg: var(--border);
  --bs-dropdown-border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6); padding: 8px;
  animation: dd-in .16s var(--ease) both;
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.dropdown-item { border-radius: 10px; font-size: 14px; padding: 9px 12px; font-weight: 500; }
.dropdown-item i { color: var(--muted); }
.dropdown-item.text-danger i { color: var(--rose); }
.dropdown-toggle::after { display: none; }
.user-menu-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.user-menu-head .av { width: 38px; height: 38px; border-radius: 12px; background: var(--brand-grad); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.user-menu-head .nm { font-weight: 700; color: var(--fg-strong); line-height: 1.2; font-size: 14px; }
.user-menu-head .ph { font-size: 12px; color: var(--muted); }

.alert { border-radius: 14px; border-width: 1px; font-size: 14px; --bs-alert-padding-y: .9rem; --bs-alert-padding-x: 1.1rem; }
.alert-success { background: rgba(61,220,151,.09); border-color: rgba(61,220,151,.3); color: #8cf0c3; }
.alert-danger  { background: rgba(255,107,129,.09); border-color: rgba(255,107,129,.3); color: #ffa3b0; }
.alert-warning { background: rgba(245,183,46,.09); border-color: rgba(245,183,46,.3); color: var(--gold-soft); }
.alert-info    { background: rgba(76,201,240,.09); border-color: rgba(76,201,240,.3); color: #86d9f6; }
.alert strong { color: inherit; }

.modal-content { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 22px; }
.modal-header, .modal-footer { border-color: var(--border); }

/* ============================================================
   Tableaux
   ============================================================ */
.table { --bs-table-bg: transparent; --bs-table-color: var(--fg); --bs-table-border-color: var(--border); color: var(--fg); }
.table > :not(caption) > * > * { background-color: transparent; border-color: var(--border); }
.table thead th { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.table-hover > tbody > tr:hover > * { background: rgba(255,255,255,.03); color: var(--fg); }
.table-dark { --bs-table-bg: rgba(0,0,0,.25); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: rgba(255,255,255,0.02); }
.table-borderless > :not(caption) > * > * { padding-top: .55rem; padding-bottom: .55rem; }
.table-sm.table-borderless td { font-size: 13.5px; }
.table-sm.table-borderless tr + tr td { border-top: 1px dashed var(--border) !important; }
.table-sm.table-borderless td:first-child { color: var(--muted); }
.table-sm.table-borderless td:first-child i { color: var(--brand-soft); margin-right: 5px; }
.table-sm.table-borderless td.text-end { font-weight: 700; color: var(--fg-strong); font-variant-numeric: tabular-nums; }
.table-sm.table-borderless td.text-end.text-success { color: var(--emerald); }

.table-tx {
  color: var(--fg); margin-bottom: 0;
  --bs-table-bg: transparent; --bs-table-color: var(--fg);
  --bs-table-striped-bg: rgba(255,255,255,0.02); --bs-table-striped-color: var(--fg);
  --bs-table-hover-bg: rgba(var(--brand-rgb),0.07); --bs-table-hover-color: #fff;
}
.table-tx thead th {
  color: var(--muted); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em;
  border-bottom: 1px solid var(--border-strong); padding: 13px 16px;
  background: rgba(255,255,255,0.025); white-space: nowrap;
}
.table-tx thead th:first-child { border-top-left-radius: 12px; }
.table-tx thead th:last-child { border-top-right-radius: 12px; }
.table-tx tbody td { color: var(--fg); border-bottom: 1px solid var(--border); padding: 14px 16px; vertical-align: middle; }
.table-tx tbody tr:last-child td { border-bottom: none; }
.table-tx tbody tr { transition: background .15s; }
.table-tx tbody tr:hover { background: rgba(var(--brand-rgb),0.06); }
.table-tx-compact thead th { padding: 10px 12px; font-size: 0.65rem; }
.table-tx-compact tbody td { padding: 12px; }

.tx-date { color: var(--muted) !important; font-size: 0.8rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tx-desc { color: var(--fg) !important; font-size: 0.86rem; }
.tx-amount { font-weight: 800; font-size: 0.92rem; white-space: nowrap; font-variant-numeric: tabular-nums; font-family: var(--font-display); letter-spacing: -.02em; }
.tx-unit { font-size: 0.7rem; opacity: 0.6; font-weight: 500; font-family: var(--font); }
.tx-balance { color: rgba(231,236,246,.8) !important; font-weight: 600; font-size: 0.86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-pos  { color: var(--emerald) !important; }
.tx-neg  { color: var(--rose) !important; }
.tx-zero { color: #94a3b8 !important; }

.tx-type-badge { font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.tx-type-deposit    { background: rgba(61,220,151,0.12); color: var(--emerald); border-color: rgba(61,220,151,0.3); }
.tx-type-withdraw   { background: rgba(255,107,129,0.12); color: var(--rose); border-color: rgba(255,107,129,0.3); }
.tx-type-reward     { background: rgba(245,183,46,0.12); color: var(--gold-soft); border-color: rgba(245,183,46,0.3); }
.tx-type-commission { background: rgba(251,146,60,0.12); color: #fb923c; border-color: rgba(251,146,60,0.3); }
.tx-type-plan       { background: rgba(179,157,255,0.12); color: var(--violet); border-color: rgba(179,157,255,0.3); }
.tx-type-referral   { background: rgba(76,201,240,0.12); color: var(--cyan); border-color: rgba(76,201,240,0.3); }
.tx-type-default    { background: rgba(255,255,255,0.07); color: rgba(231,236,246,.7); border-color: rgba(255,255,255,0.14); }

/* ============================================================
   Badges & statuts (contrastes AA)
   ============================================================ */
.badge { padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .01em; }
.badge-light-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand-bg); color: #b9ccff;
  border: 1px solid rgba(var(--brand-rgb),.4); padding: 7px 15px; font-size: 12px;
}
.badge.bg-success { background: rgba(61,220,151,.15) !important; color: var(--emerald) !important; border: 1px solid rgba(61,220,151,.35); }
.badge.bg-danger { background: rgba(255,107,129,.15) !important; color: var(--rose) !important; border: 1px solid rgba(255,107,129,.35); }
.badge.bg-warning { background: rgba(245,183,46,.15) !important; color: var(--gold-soft) !important; border: 1px solid rgba(245,183,46,.35); }
.badge.bg-info { background: rgba(76,201,240,.15) !important; color: #86d9f6 !important; border: 1px solid rgba(76,201,240,.35); }
.badge.bg-secondary { background: rgba(148,163,184,.15) !important; color: #cbd5e1 !important; border: 1px solid rgba(148,163,184,.3); }
.badge.text-dark { color: inherit; }
.badge.bg-success-subtle, .badge.bg-danger-subtle, .badge.bg-info-subtle, .badge.bg-warning-subtle { font-weight: 700; }
.badge.bg-success-subtle { background: rgba(61,220,151,.12) !important; border-color: rgba(61,220,151,.3) !important; }
.badge.bg-danger-subtle { background: rgba(255,107,129,.12) !important; border-color: rgba(255,107,129,.3) !important; }
.badge.bg-info-subtle { background: rgba(76,201,240,.12) !important; border-color: rgba(76,201,240,.3) !important; }
.badge.bg-warning-subtle { background: rgba(245,183,46,.12) !important; border-color: rgba(245,183,46,.3) !important; }

.tx-status-pending, .tx-status-confirmed, .tx-status-approved, .tx-status-rejected,
.tx-status-cancelled, .tx-status-default,
.badge-status-pending, .badge-status-confirmed, .badge-status-approved, .badge-status-completed,
.badge-status-rejected, .badge-status-cancelled, .badge-status-canceled, .badge-status-credited,
.badge-status-active, .badge-status-suspended, .badge-status-inactive, .badge-status-expired {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px; border: 0;
  font-size: .72rem; font-weight: 700; letter-spacing: .01em; line-height: 1.4; box-shadow: none;
}
.tx-status-pending::before, .tx-status-confirmed::before, .tx-status-approved::before, .tx-status-rejected::before,
.tx-status-cancelled::before, .badge-status-pending::before, .badge-status-confirmed::before, .badge-status-approved::before,
.badge-status-completed::before, .badge-status-rejected::before, .badge-status-cancelled::before, .badge-status-active::before,
.badge-status-suspended::before, .badge-status-credited::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85;
}
.tx-status-confirmed, .badge-status-confirmed, .badge-status-completed, .badge-status-active, .badge-status-credited { background: #047857 !important; color: #fff !important; }
.tx-status-approved, .badge-status-approved { background: #22d3ee !important; color: #052e38 !important; }
.tx-status-pending, .badge-status-pending { background: #f59e0b !important; color: #2b1700 !important; }
.tx-status-rejected, .badge-status-rejected, .badge-status-suspended { background: #dc2626 !important; color: #fff !important; }
.tx-status-cancelled, .badge-status-cancelled, .badge-status-canceled, .badge-status-inactive { background: #5b6577 !important; color: #fff !important; }
.badge-status-expired { background: #ea580c !important; color: #fff !important; }
.tx-status-default { background: #475569 !important; color: #fff !important; }
.badge.tx-status-confirmed { border: 0 !important; }

/* ============================================================
   Formulaires
   ============================================================ */
.form-control, .form-select {
  background-color: var(--surface-2); border: 1px solid var(--border-strong); color: var(--fg);
  border-radius: 13px; padding: .72rem 1rem; font-size: 15px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.form-control-sm, .form-select-sm { padding: .42rem .75rem; font-size: 13px; border-radius: 10px; }
.form-control:hover, .form-select:hover { border-color: rgba(148,163,184,.4); }
.form-control:focus, .form-select:focus {
  background-color: var(--surface-2); border-color: var(--brand); color: var(--fg);
  box-shadow: 0 0 0 .25rem rgba(var(--brand-rgb),0.2);
}
.form-control:disabled, .form-control[readonly] { background-color: rgba(255,255,255,.03); color: var(--muted); }
.form-control::placeholder { color: rgba(143,160,184,.55); }
.form-control[type="file"]::file-selector-button { background: var(--brand-bg); color: var(--brand-soft); border: 0; border-right: 1px solid var(--border-strong); margin: -.72rem .8rem -.72rem -1rem; padding: .72rem 1rem; font-weight: 600; }
.form-label { color: #c3cce0; font-size: 13px; font-weight: 600; margin-bottom: .45rem; }
.form-text { color: var(--muted); }
.input-group-text { background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--muted); border-radius: 13px; }
.input-group > .form-control:not(:last-child), .input-group > .form-select:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .form-control:not(:first-child), .input-group > .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > .input-group-text:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .input-group-text:first-child { border-top-left-radius: 13px; border-bottom-left-radius: 13px; }
.input-group > .btn { --bs-btn-border-radius: 0; }
.input-group > .btn:last-child { border-top-right-radius: 13px; border-bottom-right-radius: 13px; }
.form-check-input { background-color: rgba(255,255,255,.06); border-color: var(--border-strong); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb),.25); border-color: var(--brand); }
.form-select { --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238fa0b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.form-select option { background: var(--surface); color: var(--fg); }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { opacity: .4; }
/* 16px min sur mobile : évite le zoom automatique d'iOS au focus */
@media (max-width: 575.98px) { .form-control, .form-select { font-size: 16px; } .form-control-sm, .form-select-sm { font-size: 14px; } }

.progress { background: rgba(255,255,255,.08); border-radius: 999px; height: 8px; }
.progress-bar { background: var(--brand-grad); }

.pagination { --bs-pagination-bg: transparent; --bs-pagination-border-color: var(--border); --bs-pagination-color: var(--muted);
  --bs-pagination-hover-bg: rgba(255,255,255,.06); --bs-pagination-hover-color: #fff; --bs-pagination-hover-border-color: var(--border-strong);
  --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-active-color: #fff;
  --bs-pagination-disabled-bg: transparent; --bs-pagination-disabled-border-color: var(--border); --bs-pagination-disabled-color: rgba(148,163,184,.4);
  --bs-pagination-focus-bg: rgba(255,255,255,.06); --bs-pagination-focus-color: #fff; --bs-pagination-focus-box-shadow: none;
  --bs-pagination-border-radius: 11px; gap: 4px; flex-wrap: wrap; }
.pagination .page-link { border-radius: 11px !important; font-weight: 600; min-width: 40px; text-align: center; }

/* ============================================================
   Plans
   ============================================================ */
.plan-card {
  border-radius: 22px; overflow: hidden; position: relative;
  background: var(--surface);
  border: 1px solid var(--border); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.plan-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-grad); }
.plan-card:hover { transform: translateY(-4px); border-color: rgba(var(--brand-rgb),.45); box-shadow: 0 24px 50px rgba(0,0,0,.42), 0 0 0 1px rgba(var(--brand-rgb),.14); }
.plan-card-current { border-color: rgba(61,220,151,.4); }
.plan-card-current::before { background: linear-gradient(90deg, #3ddc97, #10b981); }
.plan-card .plan-name { font-size: 20px; font-weight: 700; }
.plan-card .plan-price {
  font-family: var(--font-display); font-size: 31px; font-weight: 800; color: var(--fg-strong);
  letter-spacing: -.04em; line-height: 1.15; padding: 14px 16px; border-radius: 15px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.plan-card .plan-price small { font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.plan-card.premium::before { background: linear-gradient(90deg, var(--violet), #d946ef); }
.plan-card.premium .plan-price { color: var(--violet); }
.plan-card ul li i, .glass-card ul.list-unstyled li > i:first-child { color: var(--brand-soft); width: 20px; display: inline-block; }
.plan-instance { background: var(--surface-2); border-radius: 14px !important; }

.plan-card-soon, .vip-plan-card-soon { border: 1px dashed rgba(245,183,46,.4) !important; opacity: .92; }
.plan-card-soon::before { background: linear-gradient(90deg, var(--gold-soft), var(--gold-deep)); }
.plan-card-soon:hover, .vip-plan-card-soon:hover { border-color: rgba(245,183,46,.6) !important; opacity: 1; }

/* ============================================================
   Méthodes de paiement
   ============================================================ */
.payment-method-card {
  border-radius: var(--radius); padding: 18px 14px;
  border: 1.5px solid var(--border); cursor: pointer;
  transition: all .18s var(--ease); background: var(--surface-2); height: 100%;
}
.payment-method-card:hover { border-color: rgba(var(--brand-rgb),0.5); transform: translateY(-2px); }
.payment-method-card.selected { border-color: var(--brand); background: var(--brand-bg); box-shadow: 0 0 0 3px rgba(var(--brand-rgb),.15); }
.pm-icon {
  width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: rgba(255,255,255,.06);
}
.pm-name { font-weight: 700; color: var(--fg-strong); }
.pm-number { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pm-orange { color: #fb923c; background: rgba(251,146,60,.14); }
.pm-airtel { color: var(--rose); background: rgba(255,107,129,.14); }
.pm-mvola { color: var(--gold-soft); background: rgba(245,183,46,.14); }

/* ============================================================
   Parrainage
   ============================================================ */
.referral-stat {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 8px; text-align: center; height: 100%;
  transition: border-color .2s, transform .2s var(--ease);
}
.referral-stat:hover { border-color: rgba(var(--brand-rgb),.4); transform: translateY(-2px); }
.referral-stat .lvl { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.08em; font-weight: 700; }
.referral-stat .pct, .referral-stat .num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--fg-strong); line-height: 1.2; margin-top: 4px; letter-spacing: -.04em; }
.referral-stat .taux { display: inline-block; margin-top: 4px; padding: 2px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--brand-soft); background: var(--brand-bg); }
.referral-stat .cnt { font-size: 13px; color: var(--fg); margin-top: 4px; }
.referral-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(var(--brand-rgb),.14), rgba(var(--brand-rgb),.04));
  border: 1px dashed rgba(var(--brand-rgb),.5); border-radius: 16px; padding: 16px 18px;
}
.referral-code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-weight: 800; letter-spacing: .14em; color: #fff; font-size: 1.4rem; }
.referral-code.fs-2 { font-size: 1.8rem !important; }
.referral-link-box {
  background: rgba(0,0,0,0.3); border: 1px dashed var(--border-strong);
  border-radius: 12px; padding: 12px 14px; font-family: ui-monospace, Menlo, monospace; font-size: 13px;
  color: var(--brand-soft); word-break: break-all;
}

/* ============================================================
   Tâches : machine à sous / terminal / compte à rebours
   (dimensions des rouleaux inchangées : tasks.js anime en px)
   ============================================================ */
.slot-machine {
  display: flex !important; flex-direction: row !important;
  justify-content: center !important; align-items: stretch !important;
  gap: 12px !important; flex-wrap: nowrap !important;
  background: linear-gradient(180deg, #172042 0%, #0a0f1f 100%);
  border: 1px solid rgba(var(--brand-rgb),0.45);
  border-radius: 22px; padding: 24px;
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb),.06), 0 24px 56px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,.06);
  position: relative;
}
.reel {
  flex: 0 0 auto; width: 80px; height: 198px;
  background: linear-gradient(180deg, #05070d 0%, #131b30 50%, #05070d 100%);
  border: 1px solid var(--border-strong); border-radius: 14px;
  overflow: hidden; position: relative; box-shadow: inset 0 0 14px rgba(0,0,0,.8);
}
.reel::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.8) 100%);
}
.reel::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 66px;
  transform: translateY(-50%); z-index: 2; pointer-events: none;
  border-top: 2px solid rgba(var(--brand-rgb),0.7); border-bottom: 2px solid rgba(var(--brand-rgb),0.7);
  background: rgba(var(--brand-rgb),0.08);
}
.reel-strip { display: flex; flex-direction: column; align-items: center; will-change: transform; }
.reel-symbol { height: 66px; display: flex; align-items: center; justify-content: center; font-size: 38px; font-weight: 900; width: 80px; line-height: 1; }
.reel-spinning .reel-strip { animation: reel-blur 0.12s linear infinite; }
@keyframes reel-blur { 0%{filter:blur(0)} 50%{filter:blur(2px)} 100%{filter:blur(0)} }
.slot-machine .slot-bulbs { display: flex; justify-content: center; gap: 6px; margin: 8px 0; }
.slot-machine .bulb { width: 8px; height: 8px; border-radius: 999px; background: var(--brand-soft); box-shadow: 0 0 8px var(--brand); }
.slot-machine.spinning { border-color: rgba(var(--brand-rgb),.9); box-shadow: 0 0 0 4px rgba(var(--brand-rgb),.14), 0 0 48px rgba(var(--brand-rgb),.38), 0 24px 56px rgba(0,0,0,.55); }
.slot-machine.spinning .bulb { animation: bulb-flash 0.6s steps(2) infinite; }
@keyframes bulb-flash { 0%,49%{opacity:1} 50%,100%{opacity:0.25} }

.terminal {
  background: #05080f; border: 1px solid var(--border-strong); border-radius: 16px;
  padding: 16px 18px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px;
  min-height: 280px; max-height: 380px; overflow-y: auto; box-shadow: inset 0 0 40px rgba(0,0,0,.55);
}
.terminal-line { margin-bottom: 5px; color: var(--emerald); word-break: break-word; }
.terminal-prompt { color: var(--brand-soft); margin-right: 4px; }
.terminal-system { color: var(--muted); }
.terminal-info { color: var(--cyan); }
.terminal-warn { color: var(--gold-soft); }
.terminal-success { color: var(--emerald); font-weight: 700; }
.terminal-error { color: var(--rose); }

.countdown-display {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(61,220,151,0.3);
  border-radius: 16px; padding: 16px; margin-top: 12px; text-align: center;
}
.countdown-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.countdown-value { font-family: var(--font-display); font-size: 34px; font-weight: 800; color: var(--emerald); font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.countdown-progress { height: 6px; background: rgba(255,255,255,0.08); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.countdown-bar { height: 100%; background: linear-gradient(90deg, var(--emerald), #10b981); transition: width 1s linear; }

.spin-btn { animation: pulse-glow 2.4s ease-in-out infinite; }
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 10px 24px rgba(var(--brand-rgb),.28); }
  50% { box-shadow: 0 10px 38px rgba(var(--brand-rgb),.6); }
}

#captchaZone { background: rgba(76,201,240,.05); border-color: rgba(76,201,240,.35) !important; border-radius: 16px !important; }
#captchaImg { background: #fff; border-radius: 10px; }
#captchaInput { text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700; font-size: 1.1em; text-align: center; }

/* ============================================================
   Divers
   ============================================================ */
.gold-text {
  background: linear-gradient(180deg, #fde9b4 0%, var(--gold) 70%, var(--gold-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.fade-in { animation: fade-in-up 0.4s var(--ease) both; }
@keyframes fade-in-up { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
.app-content > .container-fluid { animation: fade-in-up .4s var(--ease) both; padding: 0; }
.row.g-3 > [class*="col"] { animation: fade-in-up .45s var(--ease) both; }
.row.g-3 > [class*="col"]:nth-child(2) { animation-delay: .04s; }
.row.g-3 > [class*="col"]:nth-child(3) { animation-delay: .08s; }
.row.g-3 > [class*="col"]:nth-child(4) { animation-delay: .12s; }
.row.g-3 > [class*="col"]:nth-child(n+5) { animation-delay: .16s; }

.fee-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 13px 15px; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
@keyframes tc-flash { 0% { color: var(--emerald); text-shadow: 0 0 12px rgba(61,220,151,.6); } 100% { text-shadow: none; } }
.tc-flash { animation: tc-flash .9s ease-out; }

.glass-card ol, .glass-card ul:not(.list-unstyled):not(.pagination) { padding-left: 1.2rem; }
.glass-card ol li::marker { color: var(--brand-soft); font-weight: 700; }
.glass-card ul:not(.list-unstyled) li::marker { color: var(--brand-soft); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.35); }

/* ============================================================
   Navigation basse (mobile) — barre flottante, action centrale
   ============================================================ */
.bottom-nav { display: none; }
@media (max-width: 991.98px) {
  .bottom-nav {
    display: flex; align-items: stretch; justify-content: space-around; gap: 2px;
    position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 1040; height: var(--bottom-nav-h); padding: 6px;
    background: rgba(15,21,34,.9);
    border: 1px solid var(--border-strong); border-radius: 22px;
    backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 18px 44px rgba(0,0,0,.6);
  }
  .bottom-nav-item {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border-radius: 16px; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .01em;
    background: transparent; border: 0; padding: 0; transition: color .18s, background .18s, transform .18s;
  }
  .bottom-nav-item i { font-size: 20px; line-height: 1; transition: transform .2s var(--ease); }
  .bottom-nav-item:hover { color: var(--fg-strong); }
  .bottom-nav-item.active { color: #fff; background: var(--brand-bg); }
  .bottom-nav-item.active i { color: var(--brand-soft); transform: translateY(-1px) scale(1.08); }
  .bottom-nav-item:active { transform: scale(.94); }
  /* Action centrale mise en avant (Tâches) */
  .bottom-nav-item.bn-main { flex: 0 0 62px; position: relative; color: #fff; }
  .bottom-nav-item.bn-main i {
    position: absolute; top: -22px; width: 52px; height: 52px; border-radius: 18px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 22px; color: #fff;
    background: var(--brand-grad); border: 4px solid var(--bg);
    box-shadow: 0 10px 24px rgba(var(--brand-rgb),.5);
  }
  .bottom-nav-item.bn-main span { margin-top: 30px; color: var(--muted); }
  .bottom-nav-item.bn-main.active { background: transparent; }
  .bottom-nav-item.bn-main.active i { color: #fff; transform: none; }
  .bottom-nav-item.bn-main.active span { color: #fff; }
  body.has-bottom-nav .app-content { padding-bottom: calc(var(--bottom-nav-h) + 40px + env(safe-area-inset-bottom)) !important; }
  body.has-bottom-nav .app-footer { display: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991.98px) {
  .topbar { min-height: 60px; }
  h1.h3 { font-size: 1.35rem; }
}
@media (max-width: 575.98px) {
  body { font-size: 14px; }
  .app-content { padding: 14px !important; }
  h1.h3 { font-size: 1.22rem; gap: .65rem; }
  h1.h3 > i { width: 38px; height: 38px; border-radius: 12px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-icon { width: 34px; height: 34px; margin-bottom: 10px; font-size: 15px; }
  .stat-card .stat-val, .stat-card .stat-value { font-size: 20px; }
  .stat-card .stat-label { font-size: 10px; }
  .card-body.p-4 { padding: 1.1rem !important; }
  .hero-balance { padding: 22px 20px; border-radius: 24px; }
  .page-head .greet { font-size: 1.3rem; }
  .reel { width: 64px; height: 198px; }
  .reel-symbol { width: 64px; font-size: 32px; }
  .slot-machine { padding: 16px; gap: 8px !important; }
  .referral-code { font-size: 1.15rem; }
  .referral-code.fs-2 { font-size: 1.4rem !important; }
  .table-tx thead th, .table-tx tbody td { padding: 11px 10px; }
  .brand-mobile { display: none !important; }
  .balance-pill { padding: 4px 12px 4px 4px; gap: 8px; border-radius: 13px; }
  .balance-pill > i { width: 28px; height: 28px; font-size: 13px; border-radius: 9px; }
  .balance-pill .val { font-size: 13.5px; }
  .app-header .badge-plan { display: none; }
  .topbar-btn { width: 40px; height: 40px; }
  .quick-grid { gap: 8px; }
  .quick-tile { padding: 14px 6px; font-size: 12px; }
  .btn-lg { --bs-btn-padding-y: .75rem; font-size: 15px; }
  .section-title-sm { margin: 22px 0 12px; }
  .plan-card .plan-price { font-size: 26px; }
}
@media (max-width: 380px) {
  .balance-pill .lbl { display: none; }
  .balance-pill { padding-right: 10px; }
  .topbar-title { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 575.98px) {
  .tx-date { white-space: normal; font-size: .74rem; min-width: 70px; }
  .table-tx-compact tbody td, .table-tx-compact thead th { padding: 10px 8px; }
  .page-head > .btn { width: 100%; }
}

/* ============================================================
   Modale de confirmation (confirm-modal.css est partagé avec
   l'admin : on ne l'altère pas, on la surcharge côté utilisateur)
   ============================================================ */
body.user-body .cfm-overlay { background: rgba(4,7,14,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.user-body .cfm-box { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.65); }
body.user-body .cfm-body { padding: 26px; }
body.user-body .cfm-icon { border-radius: 16px; width: 52px; height: 52px; }
body.user-body .cfm-title { font-family: var(--font-display); letter-spacing: -.02em; color: var(--fg-strong); }
body.user-body .cfm-message { color: var(--muted); }
body.user-body .cfm-bar.cfm-primary { background: var(--brand-grad); }
body.user-body .cfm-icon.cfm-primary { background: var(--brand-bg); color: var(--brand-soft); }
body.user-body .cfm-btn { border-radius: 13px; padding: 12px 16px; font-weight: 700; }
body.user-body .cfm-btn-cancel { background: var(--surface-2); border-color: var(--border-strong); color: var(--fg); }
body.user-body .cfm-btn-cancel:hover { background: var(--surface-3); }
body.user-body .cfm-btn-confirm.cfm-primary { background: var(--brand-grad); box-shadow: 0 8px 20px rgba(var(--brand-rgb),.3); }
body.user-body .cfm-btn-confirm.cfm-primary:hover { background: linear-gradient(135deg, #7ca0ff, #4a73f2); }
@media (max-width: 480px) {
  body.user-body .cfm-overlay { align-items: flex-end; padding: 12px; }
  body.user-body .cfm-box { max-width: 100%; border-radius: 24px; }
}

/* Protection légère des images (pas de glisser-déposer / menu d'appui long iOS) */
img { -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; }

/* ============================================================
   Notifications — panneau mobile (< 576px)
   Le menu devient un panneau ancré sous l'en-tête, avec marges
   latérales égales, hauteur bornée à l'écran (au-dessus de la
   barre du bas) et défilement interne du contenu.
   ============================================================ */
.notif-title, .notif-msg { overflow-wrap: anywhere; word-break: break-word; }
.notif-scroll { overscroll-behavior: contain; }
@media (max-width: 991.98px) {
  /* le flou de l'en-tête créerait un bloc conteneur pour `fixed` : on l'évite ici */
  .app-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(7,11,20,.94); }
  .notif-menu {
    position: fixed !important;
    top: calc(61px + 8px + env(safe-area-inset-top)) !important;
    right: 12px !important; left: auto !important; bottom: auto !important;
    width: min(380px, calc(100vw - 24px)) !important; min-width: 0 !important; max-width: none !important;
    margin: 0 !important; transform: none !important;
    max-height: calc(100vh - 176px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 176px - env(safe-area-inset-bottom));
    z-index: 1060;
  }
  .notif-menu.show { display: flex !important; flex-direction: column; animation: dd-in .16s ease-out both; }
  .notif-header, .notif-mark-all { flex-shrink: 0; }
  .notif-scroll { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .notif-item { padding: 13px 14px 13px 20px; }
  .notif-msg { font-size: 12.5px; }
}
@media (max-width: 575.98px) {
  .notif-menu { left: 12px !important; width: auto !important; inset-inline: 12px !important; }
}
@media (max-width: 991.98px) and (max-height: 520px) {
  /* paysage : on garde la liste utilisable au-dessus de la barre du bas */
  .notif-menu { max-height: calc(100dvh - 166px); }
}
