/* Garde-fou global : aucune icône SVG de contenu ne peut s'étaler en pleine largeur */
.app-content svg:not([width]), #app-content svg:not([width]){ max-width: 28px; max-height: 28px; }
.action-ico svg, .loan-icon svg, .feature .ico svg, .tab svg{ max-width:none; max-height:none; }
/* ============================================================
   PrêtFlash — Système de design
   Palette : blanc + orange vif (thème clair)
   Display : Sora · Corps : Inter
   ============================================================ */

:root {
  color-scheme:    light;
  --bg:            #ffffff;
  --bg-elev:       #fff7ed;
  --bg-elev-2:     #ffedd5;
  --bg-card:       #ffffff;
  --surface:       #ffffff;
  --line:          #f3dcc4;
  --line-soft:     #f8e8d6;
  --border:        #f3dcc4;
  --text:          #1f1a17;
  --text-dim:      #6b5f57;
  --text-faint:    #a39489;
  --accent:        #f97316;
  --accent-2:      #ea580c;
  --accent-ink:    #c2410c;
  --accent-soft:   rgba(249,115,22,0.12);
  --success:       #16a34a;
  --success-soft:  rgba(22,163,74,0.12);
  --warning:       #b45309;
  --warning-soft:  rgba(245,158,11,0.16);
  --danger:        #dc2626;
  --danger-soft:   rgba(220,38,38,0.10);
  --grad:          linear-gradient(135deg, var(--accent), var(--accent-2));
  --radius:        18px;
  --radius-sm:     12px;
  --radius-lg:     26px;
  --shadow:        0 8px 30px rgba(124,58,10,0.16);
  --shadow-up:     0 -6px 24px rgba(124,58,10,0.08);
  --header-h:      62px;
  --tab-h:         68px;
  --maxw:          540px;
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  height: 100%;
}
html { height: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* défilement fluide sur anciens WebView Android/iOS */
}

h1, h2, h3, h4 { font-family: Sora, ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

::-webkit-scrollbar { width: 0; height: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Shell ---------- */
#app-shell { min-height: 100dvh; height: 100dvh; display: flex; flex-direction: column; }

.app-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; padding-top: 0; padding-top: env(safe-area-inset-top);
  background: rgba(255,255,255,0.90);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  font-family: 'Sora'; font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 14px var(--accent-soft);
}
.brand-name { font-family: 'Sora'; font-weight: 700; font-size: 18px; }
.brand-mark--back{ background:transparent; color:var(--text); box-shadow:none; }
.brand-mark--back:active{ color:var(--accent); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; color: var(--text-dim);
  transition: background .2s, color .2s;
}
.icon-btn:active { background: var(--bg-elev-2); color: var(--text); }
.badge {
  position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: var(--danger);
  color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--bg);
}
.badge.hidden { display: none; }
.avatar {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid var(--line);
  font-family: 'Sora'; font-weight: 700; font-size: 14px; color: var(--accent-ink);
  overflow: hidden; flex-shrink: 0;
}
.avatar--photo {
  background: transparent; border: none; padding: 0;
}
.community-entry{
  width:56px; height:56px; border-radius:14px; display:grid; place-items:center;
  color:var(--accent-ink); background:transparent; border:0;
  transition:transform .2s var(--ease), color .2s var(--ease);
}
.community-entry:active{ transform:scale(.92); color:var(--accent); }
.community-entry__media{ width:44px; height:44px; display:block; object-fit:contain; }
.community-entry .lottie-icon svg{ display:block; width:100%; height:100%; }

/* ---------- Contenu ---------- */
.app-content {
  flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto;
  /* Valeur de repli d'abord (WebView Android anciennes ne comprenant pas env()
     ignorent toute la déclaration calc() suivante, pas seulement env()) : sans
     ce repli, le padding-bottom entier disparaît et le bas de page reste
     caché derrière la barre d'onglets fixe, impossible à atteindre au scroll. */
  padding: 20px 18px calc(var(--tab-h) + 24px);
  padding: 20px 18px calc(var(--tab-h) + env(safe-area-inset-bottom) + 24px);
  animation: page-in .42s var(--ease) both;
}
.is-guest .app-content { padding-bottom: 40px; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.app-content.is-leaving { opacity: 0; transform: translateY(-8px); transition: opacity .18s, transform .18s; }

/* ---------- Navigation type app ---------- */
.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  height: var(--tab-h);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: 0;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(160%) blur(20px);
  border-top: 1px solid var(--line-soft);
  box-shadow: var(--shadow-up);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-faint); font-size: 10.5px; font-weight: 600;
  transition: color .2s; -webkit-tap-highlight-color: transparent;
}
.tab svg { width: 23px; height: 23px; transition: transform .25s var(--ease); }
.tab.active { color: var(--accent-2); }
.tab.active svg { transform: translateY(-1px); }
.tab--cta {
  flex: 0 0 auto; width: 56px; height: 56px; margin-top: -16px;
  border-radius: 50%; background: var(--grad); color: #fff;
  justify-content: center; box-shadow: 0 8px 22px rgba(234,88,12,0.40);
  transition: transform .2s var(--ease);
}
.tab--cta svg { width: 26px; height: 26px; }
.tab--cta:active { transform: scale(0.92); }
.tab--cta.active { color: #fff; }

/* ---------- Cartes & surfaces ---------- */
.card {
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px;
}
.card + .card { margin-top: 14px; }
.section-title { font-size: 13px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; margin: 22px 2px 12px; }
.section-title:first-child { margin-top: 4px; }

/* Carte solde principale */
.balance-card {
  position: relative; overflow: hidden;
  background: var(--grad); border-radius: var(--radius-lg);
  padding: 26px 22px; color: #fff;
  box-shadow: 0 12px 34px rgba(234,88,12,0.34);
}
.balance-card::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.balance-card::before {
  content: ''; position: absolute; right: 40px; bottom: -60px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.balance-card .label { font-size: 13px; opacity: .85; position: relative; z-index: 1; }
.balance-card .amount { font-family: 'Sora'; font-size: 34px; font-weight: 800; margin-top: 4px; position: relative; z-index: 1; }
.balance-card .sub { font-size: 13px; opacity: .85; margin-top: 8px; position: relative; z-index: 1; }

/* Grille de stats */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.stat {
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 16px;
}
.stat .v { font-family: 'Sora'; font-size: 22px; font-weight: 700; }
.stat .k { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ---------- Listes d’investissements ---------- */
.loan-item, .investment-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 15px; margin-bottom: 11px;
  transition: transform .15s var(--ease), border-color .2s;
}
.loan-item:active, .investment-item:active { transform: scale(0.985); border-color: var(--line); }
.loan-icon, .investment-icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink);
}
.loan-icon svg, .investment-icon svg { width: 22px; height: 22px; }
.loan-meta, .investment-meta { flex: 1; min-width: 0; }
.loan-meta .ref { font-size: 12px; color: var(--text-faint); }
.loan-meta .amt { font-family: 'Sora'; font-weight: 700; font-size: 17px; }
.loan-meta .dur { font-size: 12.5px; color: var(--text-dim); }

/* Badges de statut */
.status { font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 8px; white-space: nowrap; }
.status--pending  { background: var(--warning-soft); color: var(--warning); }
.status--approved,
.status--active   { background: var(--accent-soft); color: var(--accent-ink); }
.status--repaid   { background: var(--success-soft); color: var(--success); }
.status--rejected,
.status--defaulted{ background: var(--danger-soft); color: var(--danger); }

/* ---------- Formulaires ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.input, .select, textarea.input {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--bg-elev); border: 1px solid var(--line); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-soft);
}
.input::placeholder { color: var(--text-faint); }
.input-group { position: relative; }
.input-group .suffix { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 14px; }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 6px; display: none; }
.field.has-error .input { border-color: var(--danger); }
.field.has-error .field-error { display: block; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 20px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; transition: transform .12s var(--ease), opacity .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(234,88,12,0.32); }
.btn--ghost { background: var(--bg-elev); border: 1px solid var(--line); color: var(--text); }
.btn--success { background: var(--success); color: #fff; }
.btn--danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(220,38,38,0.28); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn.loading { color: transparent; position: relative; }
.btn.loading::after {
  content: ''; position: absolute; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 120px; }
.btn-row .field { flex: 1; min-width: 200px; }
.plan-heading { display:flex; align-items:center; gap:10px; min-width:0; }
.plan-heading h3 { margin:0; }
.plan-icon { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border-radius:13px; background:var(--accent-soft); color:var(--accent-ink); font-size:22px; overflow:hidden; }
.plan-icon img { width:100%; height:100%; object-fit:cover; }
.plan-icon__lottie{ width:100%; height:100%; display:block; }
.plan-icon__lottie svg{ display:block; width:100%; height:100%; max-width:none!important; max-height:none!important; }
.mini-plan-icon { width:24px; height:24px; object-fit:cover; border-radius:7px; vertical-align:middle; margin-right:5px; }
.card.plan-card--media{
  display:grid; grid-template-columns:minmax(130px,42%) minmax(0, 1fr);
  gap:0; min-height:220px; padding:0; overflow:hidden; align-items:stretch;
}
.plan-card__image{
  position:relative; grid-column:1; grid-row:1; min-height:220px; height:100%;
  overflow:hidden; background:var(--accent-soft);
}
.plan-card__image img{
  position:absolute; inset:0; display:block; width:100%; height:100%;
  object-fit:cover; object-position:center;
}
.plan-card--media .plan-card__body{
  grid-column:2; grid-row:1; display:flex; flex-direction:column; justify-content:flex-start;
  gap:2px; min-width:0; padding:14px 14px 14px;
}
.plan-card--media .plan-heading{ align-items:flex-start; gap:8px; }
.plan-card--media .plan-heading h3,.plan-card--media .plan-heading p{ overflow-wrap:anywhere; }
.infinite-sentinel{ display:flex; justify-content:center; padding:6px 0; }
.infinite-list__loading{ display:flex; align-items:center; gap:5px; padding:14px 0; }
.infinite-list__dot{
  width:6px; height:6px; border-radius:50%; background:var(--accent);
  animation:infinite-dot 1.1s ease-in-out infinite;
}
.infinite-list__dot:nth-child(2){ animation-delay:.15s; }
.infinite-list__dot:nth-child(3){ animation-delay:.3s; }
@keyframes infinite-dot{ 0%,80%,100%{ opacity:.25; transform:scale(.8); } 40%{ opacity:1; transform:scale(1); } }
@media (prefers-reduced-motion:reduce){ .infinite-list__dot{ animation:none; } }
.mini-plan-lottie{ display:inline-block; width:24px; height:24px; vertical-align:middle; margin-right:5px; }
.mini-plan-lottie svg{ display:block; width:100%; height:100%; max-width:none!important; max-height:none!important; }
.text-btn { color: var(--accent-ink); font-size: 13px; font-weight: 600; }

/* Range slider */
.range-wrap { margin: 6px 0 4px; }
input[type=range] {
  -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px;
  background: var(--bg-elev-2); outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 4px solid var(--accent); cursor: pointer;
  box-shadow: 0 3px 10px rgba(124,58,10,0.30); transition: transform .15s;
}
input[type=range]::-webkit-slider-thumb:active { transform: scale(1.15); }
input[type=range]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 4px solid var(--accent); cursor: pointer;
}

/* ---------- Hero invité ---------- */
.guest-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px 60px; }
.guest-hero { padding: 56px 0 32px; text-align: center; }
.guest-hero .eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft);
  padding: 6px 14px; border-radius: 20px; margin-bottom: 20px;
}
.guest-hero h1 { font-size: clamp(32px, 9vw, 46px); font-weight: 800; }
.guest-hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.guest-hero p { color: var(--text-dim); font-size: 16px; margin-top: 16px; max-width: 30ch; margin-inline: auto; }
.guest-cta { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.feature-row { display: flex; gap: 12px; margin-top: 36px; }
.feature {
  flex: 1; background: var(--bg-card); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px 14px; text-align: center;
}
.feature .ico { width: 40px; height: 40px; margin: 0 auto 10px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; }
.feature .ico svg { width: 20px; height: 20px; }
.feature h4 { font-size: 14px; }
.feature p { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ============================================================
   AUTH PAGES — MonCash-style design, mobile-first
   ============================================================ */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  position: relative;
  overflow-x: hidden;
}
.auth-page__header {
  position: relative;
  padding: 12px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: visible;
  z-index: 2;
  min-height: 0;
}
.auth-page__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.auth-page__logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
}
.auth-page__logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.auth-page__logo-text span {
  color: var(--accent-ink);
}
.auth-page__slogan {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}
.auth-page__banner {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 0;
  pointer-events: none;
}
.auth-page__banner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.auth-page__header {
  position: relative;
  z-index: 2;
}
.auth-page__body {
  position: relative;
  z-index: 2;
}
.auth-page__body {
  flex: 1;
  padding: 4px 24px 20px;
  display: flex;
  flex-direction: column;
}
.auth-page__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}
.auth-page__title .wave {
  display: inline-block;
  animation: waveHand 2s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes waveHand {
  0%, 100% { transform: rotate(0deg); }
  15% { transform: rotate(14deg); }
  30% { transform: rotate(-8deg); }
  45% { transform: rotate(14deg); }
  60% { transform: rotate(-4deg); }
  75% { transform: rotate(10deg); }
}
.auth-page__subtitle {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.5;
}
.auth-referral-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(249,115,22,0.08), rgba(251,191,36,0.08));
  border: 1px solid rgba(249,115,22,0.15);
  color: #c2410c;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  width: fit-content;
}
.auth-referral-badge strong { font-weight: 700; letter-spacing: 0.5px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form__row {
  display: flex;
  gap: 12px;
}
.auth-form__row .field { flex: 1; min-width: 0; }
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-wrap__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  display: grid;
  place-items: center;
  z-index: 2;
}
.auth-input-wrap__icon svg {
  width: 20px;
  height: 20px;
}
.auth-input-wrap .input {
  padding-left: 44px;
  padding-right: 44px;
  height: 52px;
  border-radius: 14px;
  border: 1.5px solid var(--line-soft);
  background: #fafafa;
  font-size: 14px;
  width: 100%;
}
.auth-input-wrap .input:focus {
  border-color: var(--accent-ink);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.08);
}
.auth-input-wrap .pass-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 6px;
  display: grid;
  place-items: center;
  z-index: 2;
}
.auth-input-wrap .pass-toggle:hover { color: var(--text); }
.auth-input-wrap .pass-toggle svg { width: 20px; height: 20px; }
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  flex-wrap: wrap;
  gap: 8px;
}
.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
}
.auth-checkbox input {
  /* Rendu personnalisé plutôt que le seul accent-color : certains WebView
     (app installée, anciens navigateurs Android) affichent mal l'état coché
     natif alors qu'il est bien enregistré, ce qui donne l'impression que le
     clic « ne marque pas » la case. Ce style garantit une coche visible
     partout, dans tous les états. */
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1.5px solid var(--line, #d8d0c8);
  background: #fff;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.auth-checkbox input::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform 0.1s ease-in;
  box-shadow: inset 1em 1em #fff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.auth-checkbox input:checked {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}
.auth-checkbox input:checked::before {
  transform: scale(1);
}
.auth-checkbox input:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}
.auth-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }
.auth-btn {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: none;
  background: var(--grad);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(234, 88, 12, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}
.auth-btn:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}
.auth-btn--white {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--line-soft);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.auth-btn--white:active {
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  color: var(--text-faint);
  font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-soft);
}
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 16px;
}
.auth-footer a {
  color: var(--accent-ink);
  font-weight: 700;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }
.auth-bottom-shape {
  position: relative;
  margin-top: auto;
  padding: 20px 24px 24px;
  background: linear-gradient(180deg, transparent 0%, rgba(249, 115, 22, 0.06) 100%);
  border-radius: 24px 24px 0 0;
}
.auth-bottom-shape::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(180deg, transparent 0%, rgba(249, 115, 22, 0.06) 100%);
}
.auth-secure {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
}
.auth-secure svg {
  width: 20px;
  height: 20px;
  color: var(--accent-ink);
  flex-shrink: 0;
}
.auth-secure strong {
  color: var(--text);
  font-weight: 700;
}
.auth-google-icon {
  width: 20px;
  height: 20px;
}

/* ---------- Skeleton loaders ---------- */
.skeleton {
  background: linear-gradient(100deg, var(--bg-elev) 30%, var(--bg-elev-2) 50%, var(--bg-elev) 70%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-line { height: 14px; margin-bottom: 9px; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; } .sk-line.w80 { width: 80%; }
.sk-card { height: 78px; border-radius: var(--radius); margin-bottom: 11px; }
.sk-balance { height: 150px; border-radius: var(--radius-lg); margin-bottom: 14px; }

/* ---------- Notifications drawer ---------- */
.notif-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 88vw); z-index: 90;
  background: var(--bg-elev); border-left: 1px solid var(--line);
  transform: translateX(105%); transition: transform .34s var(--ease);
  display: flex; flex-direction: column; padding-top: 0; padding-top: env(safe-area-inset-top);
}
.notif-drawer.open { transform: translateX(0); }
.notif-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 18px; border-bottom: 1px solid var(--line-soft); }
.notif-drawer__head h3 { font-size: 18px; }
.notif-drawer__list { flex: 1; overflow-y: auto; padding: 12px; }
.notif {
  display: flex; gap: 12px; padding: 13px; border-radius: var(--radius-sm);
  margin-bottom: 8px; background: var(--bg-card); border: 1px solid var(--line-soft);
}
.notif.unread { border-color: var(--accent-ink); background: var(--accent-soft); }
.notif .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--text-faint); }
.notif.unread .dot { background: var(--accent); }
.notif .body h5 { font-size: 14px; font-weight: 600; }
.notif .body p { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.notif .body time { font-size: 11px; color: var(--text-faint); }

.overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(31,26,23,0.45);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.overlay.show { opacity: 1; visibility: visible; }

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + 16px); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  pointer-events: auto; max-width: var(--maxw); width: 100%;
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); animation: toast-in .35s var(--ease);
}
.toast.out { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(16px); } }
.toast .ico { width: 22px; height: 22px; flex-shrink: 0; }
.toast--success .ico { color: var(--success); }
.toast--error .ico { color: var(--danger); }
.toast--info .ico { color: var(--accent); }
.toast .msg { font-size: 14px; flex: 1; }

/* ---------- Progress bar ---------- */
.page-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200;
  background: var(--grad); transition: width .3s var(--ease), opacity .3s;
}
.page-progress.active { width: 80%; }
.page-progress.done { width: 100%; opacity: 0; }

/* ---------- Géolocalisation ---------- */
.geo-box {
  display: flex; gap: 13px; align-items: flex-start; padding: 15px;
  border-radius: var(--radius-sm); background: var(--bg-elev); border: 1px solid var(--line); margin-bottom: 8px;
}
.geo-box.ok { border-color: var(--success); background: var(--success-soft); }
.geo-box.err { border-color: var(--danger); background: var(--danger-soft); }
.geo-box .ico { width: 24px; height: 24px; flex-shrink: 0; color: var(--text-dim); }
.geo-box.ok .ico { color: var(--success); }
.geo-box.err .ico { color: var(--danger); }
.geo-box h5 { font-size: 14px; } .geo-box p { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }

/* ---------- Verification ---------- */
.verify-channel { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line-soft); border-radius: var(--radius); margin-bottom: 12px; background: var(--bg-card); }
.verify-channel.done { border-color: var(--success); }
.verify-channel .vc-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex-shrink: 0; }
.verify-channel.done .vc-ico { background: var(--success-soft); color: var(--success); }
.verify-channel .vc-body { flex: 1; min-width: 0; }
.verify-channel .vc-body h4 { font-size: 15px; } .verify-channel .vc-body p { font-size: 12.5px; color: var(--text-dim); }
.code-inputs { display: flex; gap: 8px; margin: 14px 0; }
.code-inputs input {
  width: 100%; aspect-ratio: 1; text-align: center; font-size: 22px; font-weight: 700;
  font-family: 'Sora'; border-radius: var(--radius-sm); background: var(--bg-elev);
  border: 1px solid var(--line); color: var(--text);
}
.code-inputs input:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Tableaux admin ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th { text-align: left; color: var(--text-dim); font-weight: 600; padding: 10px; border-bottom: 1px solid var(--line); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.admin-table td { padding: 12px 10px; border-bottom: 1px solid var(--line-soft); }
.admin-table tr:active td { background: var(--bg-elev); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; border-radius: var(--radius); border: 1px solid var(--line-soft); }

.filter-row { display: flex; gap: 8px; overflow-x: auto; touch-action: pan-x pan-y; padding-bottom: 4px; margin-bottom: 14px; }
.chip { white-space: nowrap; padding: 8px 14px; border-radius: 20px; background: var(--bg-elev); border: 1px solid var(--line); font-size: 13px; color: var(--text-dim); }
.chip.active { background: var(--accent-soft); border-color: var(--accent-ink); color: var(--accent-ink); font-weight: 600; }

.kv { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-dim); } .kv .v { font-weight: 600; }

/* États vides */
.empty { text-align: center; padding: 50px 20px; color: var(--text-dim); }
.empty .ico { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; background: var(--bg-elev); display: grid; place-items: center; color: var(--text-faint); }
.empty h3 { font-size: 18px; color: var(--text); } .empty p { font-size: 14px; margin-top: 6px; }

/* Timeline échéances */
.timeline-item { display: flex; gap: 14px; padding: 12px 0; }
.timeline-item .tl-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; background: var(--text-faint); flex-shrink: 0; position: relative; }
.timeline-item .tl-dot::after { content: ''; position: absolute; top: 14px; left: 5px; width: 2px; height: calc(100% + 12px); background: var(--line); }
.timeline-item:last-child .tl-dot::after { display: none; }
.timeline-item.paid .tl-dot { background: var(--success); }
.timeline-item.overdue .tl-dot { background: var(--danger); }
.timeline-item .tl-body { flex: 1; }
.timeline-item .tl-body .d { font-size: 13px; font-weight: 600; }
.timeline-item .tl-body .s { font-size: 12px; color: var(--text-dim); }

.hidden { display: none !important; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.center { text-align: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--text-dim); } .small { font-size: 13px; }

@media (min-width: 768px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Bouton flottant WhatsApp ---------- */
.wa-fab{
  position: fixed;
  right: 14px;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 6px);
  width: 56px; height: 56px; border-radius: 50%;
  background: transparent; color: #fff;
  display: grid; place-items: center;
  z-index: 60;
  transition: transform .2s var(--ease);
  padding: 0;
  border: none;
  overflow: visible;
}
.wa-fab--custom{ background: transparent !important; box-shadow: none !important; }
.wa-fab--custom img{ width: 60px; height: 60px; object-fit: contain; display: block; filter: drop-shadow(0 4px 10px rgba(37,211,102,0.35)); }
.wa-fab:not(.wa-fab--custom){ background: #25d366; box-shadow: 0 8px 22px rgba(37,211,102,0.45); }
.wa-fab:not(.wa-fab--custom) svg{ width: 32px; height: 32px; }
.wa-fab:active{ transform: scale(0.92); }
.is-guest .wa-fab{ bottom: calc(env(safe-area-inset-bottom) + 6px); }

/* ---------- Bouton flottant Audio (Micro) ---------- */
.voice-wrap {
  position: fixed;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 6px);
  right: 80px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.voice-wrap--hidden { display: none !important; }

/* === CACHER les boutons flottants sur page Communauté et Notifications === */
body.pf-page-communaute .voice-wrap,
body.pf-page-communaute .wa-fab,
body.pf-page-notifications .voice-wrap,
body.pf-page-notifications .wa-fab { display: none !important; }

/* === Boutons flottants déplaçables (glisser-déposer) === */
.voice-wrap.is-draggable,
.wa-fab.is-draggable {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.voice-wrap.is-dragging,
.wa-fab.is-dragging {
  transition: none !important;
  opacity: 0.88;
  cursor: grabbing;
}

/* === Position micro sur page Tableau de bord (juste sous l'en-tête,
   au niveau du "Bonjour" — repère fixe sous l'en-tête plutôt qu'un
   pourcentage d'écran, qui dérive trop selon la hauteur de l'appareil) === */
body.pf-page-tableau-de-bord .voice-wrap {
  bottom: auto;
  top: calc(var(--header-h) + 28px);
  top: calc(var(--header-h) + env(safe-area-inset-top) + 28px);
  right: 18px;
}
/* Micro plus visible et invitant au clic : légère pulsation continue,
   plus marquée que l'ombre statique précédente. */
body.pf-page-tableau-de-bord .voice-fab {
  animation: voice-fab-pulse 2.4s ease-in-out infinite;
}
@keyframes voice-fab-pulse {
  0%, 100% { box-shadow: 0 6px 16px rgba(234,88,12,.35), 0 0 0 0 rgba(234,88,12,.45); }
  50%      { box-shadow: 0 6px 16px rgba(234,88,12,.35), 0 0 0 10px rgba(234,88,12,0); }
}
body.pf-page-tableau-de-bord .voice-fab:active { animation: none; }
body.pf-page-tableau-de-bord .wa-fab {
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 6px);
}

.voice-bubble {
  background: rgba(23,23,26,0.94);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .1px;
  padding: 8px 14px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22);
  max-width: min(72vw, 260px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.voice-bubble.show {
  opacity: 1;
  transform: translateY(0);
}
/* Bulle de confirmation vocale (recharge / investissement) */
.voice-confirm {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: #fff;
  color: var(--text, #1f1a17);
  font-size: 13px;
  line-height: 1.4;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18);
  border: 1px solid rgba(0,0,0,0.06);
  width: max(220px, min(78vw, 270px));
  white-space: normal;
  pointer-events: auto;
}
.voice-confirm.show { display: flex; }
.voice-confirm__msg { font-weight: 600; }
.voice-confirm__hint { font-size: 11.5px; color: #8b8279; }
.voice-confirm__actions { display: flex; gap: 8px; margin-top: 2px; }
.voice-confirm__actions button {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 9px 10px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}
.voice-confirm__ok { background: linear-gradient(135deg,#f97316,#ea580c); color: #fff; }
.voice-confirm__cancel { background: #f3ede7; color: #5a4e42; }
/* Onboarding bulle */
.voice-bubble--onboard {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 12px;
  animation: voiceOnboardIn 0.5s ease both;
}
@keyframes voiceOnboardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.voice-fab {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #f97316, #ea580c);
  color: #fff;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(249,115,22,0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.voice-fab:active { transform: scale(0.90); }
.voice-fab.recording {
  background: linear-gradient(145deg, #ef4444, #dc2626);
  box-shadow: 0 4px 14px rgba(239,68,68,0.45);
  animation: voicePulse 1.2s ease-in-out infinite;
}
@keyframes voicePulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(239,68,68,0.35), 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 4px 18px rgba(239,68,68,0.45), 0 0 0 10px rgba(239,68,68,0); }
}

/* ============================================================
   Confort de lecture — sobre et professionnel
   Tailles légèrement augmentées pour la lisibilité,
   sans casser la hiérarchie visuelle.
   ============================================================ */

body { font-size: 15px; line-height: 1.55; }
h2 { font-size: 20px; }
.section-title { font-size: 13px; letter-spacing: .03em; }
.field label { font-size: 13.5px; }
.muted, .small { font-size: 13px; }

.input, .select, textarea.input {
  font-size: 15px;
  padding: 13px 15px;
}

.btn {
  font-size: 15px;
  padding: 13px 18px;
  min-height: 48px;
}

.text-btn { font-size: 14px; }
.kv { font-size: 14px; padding: 11px 0; }

.tab { font-size: 11px; }
.tab span { font-weight: 600; }

.card { padding: 16px; }
.card + .card { margin-top: 12px; }
.loan-item { padding: 14px; margin-bottom: 10px; }

.code-inputs input { font-size: 22px; }

@media (max-width: 380px) {
  body { font-size: 14px; }
}

/* ---------- Tuiles d'action du tableau de bord ---------- */
.dash-actions{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.action-tile{
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 18px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  font-weight: 600; font-size: 15px;
  text-align: center;
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.action-tile:active{ transform: scale(.97); }
.action-ico{
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
}
.action-ico svg{ width: 22px; height: 22px; }

/* ---------- Bouton "Télécharger l'application" ---------- */
.btn--install{
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(234,88,12,.32);
}
.btn--install:active{ transform: scale(.98); }
.btn--install svg{ flex-shrink: 0; }

/* ---------- Carte solde portefeuille ---------- */
.wallet-card{
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-radius: 20px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 12px 30px rgba(234,88,12,.35);
  position: relative;
  overflow: hidden;
}
.wallet-card::after{
  content:''; position:absolute; right:-30px; top:-30px;
  width:140px; height:140px; border-radius:50%;
  background:rgba(255,255,255,.12); pointer-events:none;
}
.wallet-card > *{ position:relative; z-index:1; }
.wallet-card__label{ font-size:13px; opacity:.9; }
.wallet-card__amount{ font-size:32px; font-weight:800; margin:4px 0 12px; }
.wallet-card__amount span{ font-size:16px; font-weight:600; opacity:.85; }
.wallet-card__btn{
  display:inline-block;
  background:#fff;
  border:1px solid #fff;
  color:#ea580c; font-weight:700; font-size:14px;
  padding:10px 18px; border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
}
.wallet-card__btn:active{ transform:scale(.97); }

/* Actions rapides dans la carte orange : elles occupent les deux emplacements
   réservés à droite du bouton de dépôt, sans créer une seconde grille blanche. */
.wallet-card__footer{
  display:flex; align-items:center; gap:10px; position:relative; z-index:2;
}
.wallet-card__footer > .wallet-card__btn{
  flex:1; min-width:0; white-space:nowrap; text-align:center;
}
.wallet-card__quick-actions{ display:flex; gap:8px; flex:0 0 auto; }
.wallet-card__quick-action{
  width:68px; height:76px; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:5px; border-radius:14px;
  background:#fff; color:var(--accent-ink); font-size:11px; font-weight:700;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
  transition:transform .15s var(--ease), box-shadow .15s var(--ease);
}
.wallet-card__quick-action:active{ transform:scale(.95); box-shadow:0 2px 8px rgba(0,0,0,.12); }
.wallet-card__quick-action .action-ico{ width:30px; height:30px; border-radius:9px; }
.wallet-card__quick-action .action-ico svg{ width:18px; height:18px; }
.recent-withdrawal-sim{
  position:relative; overflow:hidden; padding:9px 11px 8px; margin-top:9px;
  border:1px solid rgba(249,115,22,.16); border-radius:14px; background:#fffaf5;
  box-shadow:0 4px 14px rgba(124,58,10,.05);
}
.recent-withdrawal-sim::before{
  content:""; position:absolute; inset:0 auto 0 -45%; width:34%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.8),transparent);
  transform:skewX(-18deg); animation:withdrawal-shine 3.8s linear infinite; pointer-events:none;
}
@keyframes withdrawal-shine{ 0%{left:-45%;} 65%,100%{left:125%;} }
.recent-withdrawal-sim__topline{
  display:flex; align-items:center; gap:5px; color:var(--text-faint);
  font-size:9px; font-weight:800; letter-spacing:.07em; text-transform:uppercase;
}
.recent-withdrawal-sim__topline em{
  margin-left:auto; padding:3px 5px; border-radius:5px; color:var(--accent-ink);
  background:var(--accent-soft); font-size:7px; font-style:normal; font-weight:800; letter-spacing:.08em; text-transform:uppercase;
}
.recent-withdrawal-sim__pulse{
  width:6px; height:6px; border-radius:50%; background:#22c55e;
  box-shadow:0 0 0 0 rgba(34,197,94,.45); animation:withdrawal-pulse 1.7s infinite;
}
@keyframes withdrawal-pulse{ 70%{box-shadow:0 0 0 5px rgba(34,197,94,0);} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0);} }
.recent-withdrawal-sim__live{
  position:relative; z-index:1; display:flex; align-items:center; gap:8px; min-height:31px; margin-top:6px;
}
.recent-withdrawal-sim__avatar{
  width:28px; height:28px; flex:0 0 28px; display:grid; place-items:center;
  border-radius:9px; color:#fff; background:var(--grad); font-size:9px; font-weight:800;
}
.recent-withdrawal-sim__identity{ min-width:0; flex:1; }
.recent-withdrawal-sim__identity strong{ display:block; color:var(--text); font-size:11px; }
.recent-withdrawal-sim__identity > span{ display:block; overflow:hidden; color:var(--text-faint); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.recent-withdrawal-sim__identity b{ color:var(--text-dim); font-weight:700; }
.recent-withdrawal-sim__amount{ flex:0 0 auto; text-align:right; }
.recent-withdrawal-sim__amount strong{ display:block; color:#c2410c; font-size:11px; font-variant-numeric:tabular-nums; }
.recent-withdrawal-sim__amount span{ display:flex; align-items:center; justify-content:flex-end; gap:3px; margin-top:1px; color:#16a34a; font-size:8px; font-weight:800; }
.recent-withdrawal-sim__amount span svg{ flex:0 0 auto; }
.recent-withdrawal-sim__track{ height:2px; overflow:hidden; margin-top:6px; border-radius:99px; background:#fed7aa; }
.recent-withdrawal-sim__track i{ display:block; width:22%; height:100%; border-radius:inherit; background:var(--grad); transition:width .8s var(--ease); }
.recent-withdrawal-sim.is-changing .recent-withdrawal-sim__live{ animation:withdrawal-swap .36s var(--ease); }
@keyframes withdrawal-swap{ 0%{opacity:1; transform:translateY(0) scale(1);} 45%{opacity:0; transform:translateY(-5px) scale(.98);} 100%{opacity:1; transform:translateY(0) scale(1);} }
@media (prefers-reduced-motion:reduce){
  .recent-withdrawal-sim::before,.recent-withdrawal-sim__pulse{ animation:none; }
  .recent-withdrawal-sim.is-changing .recent-withdrawal-sim__live{ animation:none; }
  .recent-withdrawal-sim__track i{ transition:none; }
}

/* Profile : hiérarchie claire et données réelles plutôt qu'un formulaire de démonstration. */
.profile-hero{
  padding:20px; margin:-2px 0 16px; border-radius:22px;
  background:linear-gradient(135deg,#fff7ed 0%,#fff 72%);
  border:1px solid var(--line-soft); box-shadow:0 8px 24px rgba(124,58,10,.07);
}
.profile-hero__top{ display:flex; align-items:center; gap:14px; }
.profile-avatar{ width:64px; height:64px; border-radius:20px; font-size:22px; background:var(--grad); color:#fff; border:0; box-shadow:0 7px 18px rgba(234,88,12,.26); }
.profile-hero__identity h2{ font-size:20px; margin:2px 0 3px; }
.profile-hero__meta{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:18px; padding-top:14px; border-top:1px solid var(--line-soft); }
.profile-pill{ display:inline-flex; align-items:center; gap:7px; padding:6px 10px; border-radius:99px; background:var(--warning-soft); color:var(--warning); font-size:11px; font-weight:700; }
.profile-pill--success{ background:var(--success-soft); color:var(--success); }
.profile-pill__dot{ width:6px; height:6px; border-radius:50%; background:currentColor; }
.section-heading{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.section-heading h3{ font-size:17px; }
.section-heading .eyebrow{ margin-bottom:2px; }
.section-heading__icon{ width:34px; height:34px; display:grid; place-items:center; border-radius:11px; color:var(--accent-ink); background:var(--accent-soft); font-weight:800; }
.profile-intro{ margin-bottom:18px; line-height:1.5; }
.profile-readonly-grid{ display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-bottom:16px; }
.profile-readonly{ min-width:0; padding:11px 12px; border:1px solid var(--line-soft); border-radius:12px; background:#fffaf5; }
.profile-readonly span{ display:block; color:var(--text-faint); font-size:11px; margin-bottom:3px; }
.profile-readonly strong{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.profile-logout .btn{ width:100%; }

/* Parrainage */
.referral-hero{ position:relative; overflow:hidden; padding:24px 20px; margin:-2px 0 16px; border-radius:22px; color:#fff; background:var(--grad); box-shadow:0 12px 30px rgba(234,88,12,.27); }
.referral-hero__glow{ position:absolute; width:180px; height:180px; right:-55px; top:-75px; border-radius:50%; background:rgba(255,255,255,.13); }
.referral-hero__icon{ position:absolute; top:18px; right:20px; width:40px; height:40px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.35); border-radius:13px; font-size:23px; }
.referral-hero .eyebrow{ color:rgba(255,255,255,.8); }
.referral-hero h2{ position:relative; font-size:23px; margin:8px 0 10px; }
.referral-hero h2 span{ color:#ffedd5; }
.referral-hero p:last-child{ position:relative; max-width:330px; color:rgba(255,255,255,.85); font-size:13px; line-height:1.55; }
.referral-code-card h3{ font-size:20px; letter-spacing:.08em; }
.referral-link{ display:flex; align-items:center; gap:8px; padding:10px; margin:14px 0; border:1px dashed var(--line); border-radius:12px; background:#fffaf5; }
.referral-link span{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-dim); font-size:11px; }
.copy-btn{ flex-shrink:0; padding:7px 9px; border-radius:8px; background:var(--accent-soft); color:var(--accent-ink); font-size:11px; font-weight:700; }
.referral-share-btn{ width:100%; }
.referral-stats{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.referral-person{ display:flex; align-items:center; gap:11px; padding:13px; margin-bottom:9px; border:1px solid var(--line-soft); border-radius:15px; background:var(--bg-card); box-shadow:0 1px 2px rgba(124,58,10,.04); }
.referral-person .avatar{ width:39px; height:39px; border-radius:12px; flex-shrink:0; font-size:12px; }
.referral-person__meta{ flex:1; min-width:0; }
.referral-person__meta strong,.referral-person__meta span{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.referral-person__meta strong{ font-size:13px; }
.referral-person__meta span{ margin-top:2px; color:var(--text-faint); font-size:11px; }

/* Navigation tactile : horizontalement glissable, verticalement libre. */
#app-content{ touch-action:pan-y; }
#app-content.swipe-dragging{ transition:none; }
#app-content.swipe-next,#app-content.swipe-prev{ transition:transform .28s var(--ease), opacity .28s var(--ease); }
#app-content.swipe-next{ transform:translateX(-18px); opacity:.82; }
#app-content.swipe-prev{ transform:translateX(18px); opacity:.82; }
.brand-mark--image{ overflow:hidden; padding:0; background:#fff; }
.brand-mark--image img{ display:block; width:100%; height:100%; object-fit:cover; }
.branding-preview--community{ color:var(--accent-ink); }
.branding-preview--community img{ width:64px; height:64px; object-fit:contain; }
.branding-preview--community svg{ width:42px; height:42px; }
.branding-preview .lottie-icon{ width:64px; height:64px; display:block; }
.branding-preview .lottie-icon svg{ width:100%; height:100%; max-width:none; max-height:none; }
.branding-size-control{ display:flex; align-items:center; gap:12px; }
.branding-size-control input[type=range]{ flex:1; accent-color:var(--accent); }
.branding-size-control output{ min-width:44px; color:var(--accent-ink); font-size:13px; font-weight:700; text-align:right; }

/* ---------- Communauté (plein écran, façon WhatsApp) ---------- */
.eyebrow{ color:var(--accent-ink); text-transform:uppercase; letter-spacing:.09em; font-size:10px; font-weight:800; }
.is-community{
  display:flex; flex-direction:column;
  height:100vh; height:100dvh; min-height:0; max-height:100dvh;
  overflow:hidden; overscroll-behavior:none;
}
.is-community .app-header{ flex:0 0 auto; }
.is-community .app-content{
  flex:1 1 auto; width:100%; min-height:0;
  overflow:hidden; display:flex; flex-direction:column;
}
.is-community .tab-bar{ display:none; }
#app-content[data-page="Communauté"]{
  display:flex; flex-direction:column;
  max-width:none; min-height:0; padding:0; overflow:hidden;
}
.community-page{
  display:flex; flex:1; flex-direction:column;
  width:100%; min-height:0; overflow:hidden;
}
.community-chat{
  display:flex; flex:1; flex-direction:column;
  width:100%; height:100%; min-height:0; overflow:hidden;
  background:#fffaf5; position:relative;
}
.community-chat__list{
  flex:1 1 auto; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
  width:100%; max-width:760px; margin:0 auto; padding:16px 14px 10px; scroll-behavior:smooth;
  background-image:radial-gradient(rgba(249,115,22,.06) 1px, transparent 1px);
  background-size:18px 18px; min-height:0; touch-action:pan-y;
}
body:has(#app-content[data-page="Communauté"]) .wa-fab{ display:none; }
.community-message{ display:flex; align-items:flex-end; gap:8px; margin-bottom:11px; }
.community-message--mine{ justify-content:flex-end; }
.community-message__avatar{
  width:29px; height:29px; flex:0 0 29px; display:grid; place-items:center;
  border-radius:10px; background:var(--accent-soft); color:var(--accent-ink);
  font-size:10px; font-weight:800;
}
.community-message__body{ max-width:min(82%, 620px); min-width:0; }
.community-message__author{ margin:0 0 3px 5px; color:var(--accent-ink); font-size:10px; font-weight:800; }
.community-message__bubble{
  padding:9px 12px; border-radius:15px 15px 15px 4px; color:var(--text);
  background:#fff; border:1px solid var(--line-soft); box-shadow:0 2px 7px rgba(124,58,10,.05);
  font-size:13px; line-height:1.45; overflow-wrap:anywhere;
}
.community-message--mine .community-message__bubble{
  border-radius:15px 15px 4px 15px; color:#fff; background:var(--grad); border-color:transparent;
}
.community-media{ display:block; max-width:100%; border-radius:10px; }
.community-media--image{ width:100%; max-height:220px; object-fit:cover; border-radius:10px; display:block; }
.community-media--audio{ width:220px; max-width:100%; height:34px; }
.community-message__bubble > div + .community-media,
.community-message__bubble > .community-media + div{ margin-top:7px; }
.community-message time{ display:block; margin:3px 5px 0; color:var(--text-faint); font-size:9px; }
.community-message--mine time{ text-align:right; }
.community-message--closed{ opacity:.72; }
.community-message--closed .community-message__bubble{ border-style:dashed; }
.community-message__admin{
  display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; margin:6px 4px 0;
}
.community-message__admin-btn{
  min-height:28px; padding:4px 8px; border:1px solid var(--line); border-radius:8px;
  color:var(--accent-ink); background:#fff; font-size:10px; font-weight:800;
}
.community-message__admin-btn--warn{ color:var(--warning); background:var(--warning-soft); border-color:rgba(180,83,9,.18); }
.community-message__admin-btn--danger{ color:var(--danger); background:var(--danger-soft); border-color:rgba(220,38,38,.18); }
.community-message__admin-btn.loading{ opacity:.55; pointer-events:none; }
.community-empty{ padding:45px 18px; color:var(--text-dim); text-align:center; }
.community-empty__icon{
  width:55px; height:55px; display:grid; place-items:center; margin:0 auto 12px;
  border-radius:18px; color:var(--accent-ink); background:var(--accent-soft);
}
.community-empty__icon svg{ width:27px; height:27px; }
.community-empty strong{ display:block; color:var(--text); font-size:14px; }
.community-empty p{ margin-top:4px; font-size:12px; }
.community-composer{
  display:flex; align-items:flex-end; gap:8px; padding:10px; background:#fff;
  border-top:1px solid var(--line-soft); padding-bottom:calc(10px + env(safe-area-inset-bottom));
}
.community-composer--restricted{
  align-items:center; justify-content:center; min-height:60px; color:var(--text-dim);
  font-size:12px; text-align:center;
}
.community-composer__attach{
  width:38px; height:42px; flex:0 0 38px; display:grid; place-items:center;
  border:1px solid var(--line); border-radius:13px; color:var(--accent-ink); background:#fffaf5;
  cursor:pointer;
}
.community-composer__attach input{ position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.community-composer__attach svg{ width:18px; height:18px; }
.community-composer__fields{ flex:1; min-width:0; }
.community-media-preview{
  position:relative; display:flex; align-items:center; gap:8px; min-height:54px;
  margin-bottom:7px; padding:6px 34px 6px 7px; border:1px solid var(--line);
  border-radius:12px; background:#fff7ed; color:var(--text-dim); font-size:10px;
}
.community-media-preview.hidden{ display:none; }
.community-media-preview__content{ display:flex; align-items:center; gap:8px; min-width:0; }
.community-media-preview__content img{ width:48px; height:48px; border-radius:8px; object-fit:cover; background:#fff; }
.community-media-preview__content audio{ width:min(220px,100%); height:32px; }
.community-media-preview__content span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.community-media-preview__remove{
  position:absolute; top:5px; right:5px; width:24px; height:24px; border-radius:8px;
  color:var(--accent-ink); background:#fff; font-size:20px; line-height:1;
}
.community-composer textarea{
  width:100%; min-height:42px; max-height:120px; resize:none; padding:11px 13px;
  border:1px solid var(--line); border-radius:14px; outline:none; background:#fffaf5;
  color:#2d2a26; font-size:13px; line-height:1.35;
  -webkit-text-fill-color:#2d2a26;
}
.community-composer textarea::placeholder{
  color:#8b8279;
  opacity:1;
  -webkit-text-fill-color:#8b8279;
}
.community-composer__fields small{ display:block; margin:3px 4px 0; color:var(--text-faint); font-size:9px; }
.community-composer textarea:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.community-composer button{
  width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center;
  border-radius:13px; color:#fff; background:var(--grad); box-shadow:0 6px 14px rgba(234,88,12,.25);
}
.community-composer button:disabled{ opacity:.55; }
.community-composer button svg{ width:19px; height:19px; }
.market-simulation{
  --market-color:#16a34a;
  position:relative; overflow:hidden; padding:16px; border:1px solid rgba(249,115,22,.2);
  border-radius:20px; background:linear-gradient(145deg,#fff7ed,#fff 65%);
  box-shadow:0 7px 22px rgba(124,58,10,.06);
}
.market-simulation.is-negative{ --market-color:#dc2626; }
.market-simulation__head,.market-simulation__controls{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.market-simulation__head h3{ margin-top:3px; font-size:16px; }
.market-simulation__badge{
  flex:0 0 auto; padding:5px 8px; border-radius:999px; color:#166534;
  background:#dcfce7; font-size:9px; font-weight:800; text-transform:uppercase;
}
.market-simulation__disclaimer{
  margin-top:10px; padding:9px 10px; border:1px solid var(--line-soft); border-radius:12px;
  color:var(--text-dim); background:rgba(255,255,255,.82); font-size:10px; line-height:1.45;
}
.market-simulation__selected{
  display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:15px;
}
.market-simulation__selected > div:first-child{ min-width:0; }
.market-simulation__symbol{
  display:block; color:var(--accent-ink); font-size:9px; font-weight:800; letter-spacing:.06em;
}
.market-simulation__selected strong{ display:block; margin-top:2px; font-size:13px; overflow-wrap:anywhere; }
.market-simulation__index{ flex:0 0 auto; text-align:right; font-variant-numeric:tabular-nums; }
.market-simulation__index span{ display:block; color:var(--text-faint); font-size:9px; }
.market-simulation__index strong{ display:inline-block; font-size:15px; }
.market-simulation__index b{ display:block; color:var(--market-color); font-size:11px; }
.market-simulation__chart{
  margin-top:10px; padding:8px 8px 5px; border:1px solid var(--line-soft);
  border-radius:14px; background:rgba(255,255,255,.78);
}
.market-simulation__chart svg{ display:block; width:100%; height:auto; max-width:none!important; max-height:none!important; }
.market-simulation__grid{ fill:none; stroke:#f1e7de; stroke-width:1; stroke-dasharray:3 5; }
.market-simulation__area{ fill:url(#market-simulation-fill); }
.market-simulation__line{
  fill:none; stroke:var(--market-color); stroke-width:2.8; stroke-linecap:round; stroke-linejoin:round;
  vector-effect:non-scaling-stroke; transition:stroke .2s;
}
.market-simulation__dot{ fill:var(--market-color); stroke:#fff; stroke-width:2; vector-effect:non-scaling-stroke; }
.market-simulation stop:first-child{ stop-color:var(--market-color); }
.market-simulation__chart-foot{
  display:flex; justify-content:space-between; gap:8px; padding:2px 3px 0;
  color:var(--text-faint); font-size:9px;
}
.market-simulation__markets{
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin-top:12px;
}
.market-simulation__market{
  min-width:0; min-height:43px; padding:6px 7px; border:1px solid var(--line-soft);
  border-radius:11px; color:var(--text-dim); background:#fff; text-align:left;
}
.market-simulation__market strong,.market-simulation__market span{
  display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.market-simulation__market strong{ color:var(--text); font-size:9px; }
.market-simulation__market span{ margin-top:1px; font-size:9px; }
.market-simulation__market[aria-pressed="true"]{
  border-color:var(--accent); color:var(--accent-ink); background:var(--accent-soft);
  box-shadow:0 0 0 1px rgba(249,115,22,.12);
}
.market-simulation__controls{ margin-top:12px; color:var(--text-dim); font-size:9px; }
.market-simulation__controls > span{ min-width:0; }
.market-simulation__controls > div{ display:flex; flex:0 0 auto; gap:5px; }
.market-simulation__control{
  min-height:32px; padding:5px 8px; border:1px solid var(--line); border-radius:9px;
  color:var(--accent-ink); background:#fff; font-size:9px; font-weight:800;
}
.admin-user-notification{ padding:12px; border-radius:14px; background:#fff7ed; border:1px solid var(--line); }
.admin-user-notification label{ display:block; color:var(--accent-ink); font-weight:700; margin-bottom:8px; }
.admin-user-notification .input{ background:#fff; padding:10px 12px; font-size:13px; }

@media (max-width:380px){
  .wallet-card{ padding:18px 14px; }
  .wallet-card__footer{ gap:7px; }
  .wallet-card__quick-actions{ gap:5px; }
  .wallet-card__quick-action{ width:60px; height:72px; font-size:10px; }
  .wallet-card__btn{ padding-left:10px; padding-right:10px; font-size:12px; }
  .card.plan-card--media{ grid-template-columns:minmax(118px,40%) minmax(0,1fr); }
  .plan-card__image{ min-height:204px; }
  .plan-card--media .plan-card__body{ padding:13px 11px; }
}

@media (max-width:520px){
  .app-header{ padding-left:12px; padding-right:12px; }
  .header-actions{ gap:5px; }
  .community-entry{ width:48px; height:48px; }
  .community-entry__media{ width:38px; height:38px; }
  .community-message__body{ max-width:88%; }
  .community-chat__list{ padding-left:10px; padding-right:10px; }
  .community-composer{ gap:6px; padding-left:8px; padding-right:8px; }
}

/* ---------- Communauté : défilement infini vers le haut (historique) ---------- */
.community-chat__top-sentinel{
  height: 1px;
}
.community-chat__top-sentinel.is-loading{
  height: 34px;
  position: relative;
}
.community-chat__top-sentinel.is-loading::after{
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border: 2px solid rgba(249,115,22,.25);
  border-top-color: #f97316;
  border-radius: 50%;
  animation: pf-spin .7s linear infinite;
}
@media (prefers-reduced-motion:reduce){ .community-chat__top-sentinel.is-loading::after{ animation:none; } }

/* ---------- Scroll infini : indicateur de chargement ---------- */
.infinite-sentinel{
  height: 40px;
  margin: 8px 0 24px;
}
.infinite-sentinel.loading-more{
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg%3E%3Ccircle cx='12' cy='3' r='2' fill='%23f97316'/%3E%3C/g%3E%3C/svg%3E") center no-repeat;
  position: relative;
}
.infinite-sentinel.loading-more::after{
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 2px solid rgba(249,115,22,.25);
  border-top-color: #f97316;
  border-radius: 50%;
  animation: pf-spin .7s linear infinite;
}
@keyframes pf-spin{ to { transform: rotate(360deg); } }

/* ---------- Champ mot de passe avec icône œil ---------- */
.pass-wrap{ position: relative; }
.pass-wrap > input{ padding-right: 48px !important; width: 100%; }
.pass-toggle{
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 38px; height: 38px; border: none; background: transparent;
  color: var(--text-dim, #8a93a6); cursor: pointer;
  display: grid; place-items: center; border-radius: 10px;
  padding: 0;
}
.pass-toggle:hover{ color: var(--text); }
.pass-toggle.is-visible{ color: #ea580c; }

/* ---------- Éléments de transaction ---------- */
.tx-item{
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; margin-bottom: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.tx-icon{
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
}
.tx-icon--credit{ background: rgba(22,163,74,.12); color: #16a34a; }
.tx-icon--debit{ background: rgba(220,38,38,.10); color: #dc2626; }
.tx-meta{ flex: 1; min-width: 0; }
.tx-reason{ font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-date{ font-size: 12px; color: var(--text-dim, #8a93a6); margin-top: 2px; }
.tx-amount{ text-align: right; font-weight: 800; font-size: 15px; white-space: nowrap; }
.tx-amount--credit{ color: #16a34a; }
.tx-amount--debit{ color: #dc2626; }
.tx-bal{ display: block; font-weight: 500; font-size: 11px; color: var(--text-dim, #8a93a6); margin-top: 2px; }


/* ---------- Thème clair : relief léger des cartes blanches ---------- */
.card, .stat, .loan-item, .feature, .verify-channel, .action-tile, .tx-item {
  box-shadow: 0 1px 2px rgba(124,58,10,0.05), 0 4px 14px rgba(124,58,10,0.05);
}
.wa-fab { box-shadow: 0 8px 22px rgba(37,211,102,0.40); }

/* ---------- Bandeau d'activation des notifications push ---------- */
.push-banner {
  display: flex; align-items: center; gap: 12px;
  max-width: var(--maxw); margin: 12px auto 0; padding: 12px 14px;
  width: calc(100% - 36px);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.push-banner .pb-ico { width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center; background: var(--grad); color: #fff; }
.push-banner .pb-ico svg { width: 20px; height: 20px; }
.push-banner .pb-txt { flex: 1; min-width: 0; font-size: 13px; line-height: 1.4; color: var(--text); }
.push-banner .pb-btn { padding: 9px 14px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; }
.push-banner .pb-close { width: 28px; height: 28px; border-radius: 8px; color: var(--text-faint); display: grid; place-items: center; flex-shrink: 0; }
.push-banner .pb-close svg { width: 16px; height: 16px; }

.btn--ghost.loading::after, .btn--danger.loading::after { border-color: rgba(194,65,12,0.30); border-top-color: #ea580c; }

/* ============================================================
   PROMPT 4+ FIXES — Wallet image, stat icons, history swipe,
   referral image, wa-fab hidden
   ============================================================ */

/* Wallet card top row */
.wallet-card__top { position: relative; z-index: 1; }
.wallet-card__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wallet-card__detail {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}
.wallet-card__gain {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wallet-card__gain-ico {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}

/* Wallet card image — positioned right, large */
.wallet-card__image {
  position: absolute;
  right: -10px;
  bottom: 40px;
  width: 150px;
  height: auto;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

/* Wallet card — two equal buttons */
.wallet-card__footer--two {
  display: flex;
  gap: 10px;
}
.wallet-card__footer--two .wallet-card__btn {
  flex: 1;
  text-align: center;
}
.wallet-card__btn--secondary {
  background: rgba(255,255,255,0.25);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
}

/* Stat icons (color circles with SVG or uploaded image) */
.stat__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}
.stat__icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.stat__icon--orange { background: var(--accent-soft); color: var(--accent-ink); }
.stat__icon--green  { background: var(--success-soft); color: var(--success); }
.stat__icon--purple { background: rgba(147,51,234,0.12); color: #9333ea; }
.stat__icon--blue   { background: rgba(59,130,246,0.12); color: #2563eb; }

/* Referral hero image — positioned right, large */
.referral-hero__image {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 180px;
  height: auto;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
}

/* History filters */
.history-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  touch-action: pan-x pan-y;
  padding-bottom: 4px;
  margin: 14px 0;
}
.history-filter {
  white-space: nowrap;
  padding: 8px 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  transition: all .2s;
  cursor: pointer;
}
.history-filter.active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}

/* History panels */
.history-panel { display: none; }
.history-panel.active { display: block; animation: panelFadeIn 0.2s ease; }
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   COMPACT STATS — well organized, icon + value inline, label below
   ============================================================ */

/* Compact stat grid */
.stat-grid--compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.stat-grid--compact .stat {
  padding: 12px 14px;
}

/* Stat row: icon + value side by side */
.stat__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.stat__row .stat__icon {
  margin-bottom: 0;
  flex-shrink: 0;
}
.stat__row .v {
  font-size: 18px;
}
.stat-grid--compact .stat .k {
  font-size: 11px;
  color: var(--text-dim);
}

/* Referral stats same compact style */
.referral-stats--compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
.referral-stats--compact .stat {
  padding: 12px 14px;
}

/* wa-fab visible */
.wa-fab { display: flex !important; }

/* ============================================================
   ADMIN TABS — professional settings navigation
   ============================================================ */
/* ============================================================
   ADMIN PANEL — completely rewritten, mobile-first, professional
   ============================================================ */

/* Tabs: scrollable on all screens, icon-only on very small */
.admin-tabs {
  display: flex; gap: 6px; margin-top: 16px;
  overflow-x: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y;
  padding-bottom: 6px; scrollbar-width: none;
  position: sticky; top: 0; z-index: 10;
  background: var(--bg); padding-top: 4px;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--bg-elev); color: var(--text-dim);
  font-size: 13px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--line-soft);
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
  text-decoration: none; cursor: pointer;
  flex: 0 0 auto;
  min-height: 42px;
}
.admin-tab:hover { background: var(--bg-card); color: var(--text); }
.admin-tab.active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(234,88,12,.28);
}
.admin-tab__icon { display: grid; place-items: center; flex: 0 0 16px; }
.admin-tab__icon svg { width: 16px; height: 16px; }
.admin-tab__label { display: inline; }

/* Panels: always visible area, scrollable content */
.admin-panel {
  display: none;
  animation: adminFadeIn .25s ease;
}
.admin-panel.active { display: block; }
@keyframes adminFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Branding grid: 1 column mobile, 2 tablet, 3 desktop */
.branding-upload-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.branding-upload-grid form {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border: 1px solid var(--line-soft);
  border-radius: 14px; background: #fffaf5;
  min-width: 0;
}
.branding-preview {
  display: grid; place-items: center;
  height: 90px; border-radius: 12px;
  background: #fff; border: 1px dashed var(--line);
  overflow: hidden;
}
.branding-preview img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.branding-preview--logo img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.branding-preview--icon img { width: 56px; height: 56px; border-radius: 14px; }
.upload-label {
  display: flex; flex-direction: column; gap: 5px;
  color: var(--text-dim); font-size: 12px; font-weight: 600;
  min-width: 0;
}
.upload-label input[type=file] {
  width: 100%; font-size: 11px; color: var(--text-faint);
}
.branding-upload-grid .btn {
  width: 100%; padding: 10px 8px; font-size: 12px;
}

/* Section headings in admin */
.section-heading {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
}
.section-heading h3 { font-size: 16px; margin: 0; }
.section-heading .eyebrow { margin-bottom: 2px; font-size: 11px; }
.section-heading__icon {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 10px; color: var(--accent-ink);
  background: var(--accent-soft); font-weight: 800; font-size: 14px;
}

/* Admin form rows: always wrap on mobile */
.admin-panel .btn-row {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.admin-panel .btn-row .field {
  flex: 1 1 100%;
  min-width: 0;
}
.admin-panel .btn-row .btn {
  flex: 1 1 auto;
  min-width: 120px;
}

/* Deposit amounts list in admin */
.admin-panel .kv {
  padding: 10px 12px; background: var(--bg-elev);
  border-radius: 12px; border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.admin-panel .kv .k { font-weight: 600; font-size: 13px; }
.admin-panel .kv .v { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Small screen: icon-only tabs */
@media (max-width: 360px) {
  .admin-tab { padding: 10px 12px; }
  .admin-tab__label { display: none; }
}

/* Tablet: 2-column branding grid */
@media (min-width: 480px) {
  .branding-upload-grid { grid-template-columns: 1fr 1fr; }
  .admin-panel .btn-row .field { flex: 1 1 calc(50% - 5px); min-width: 180px; }
}

/* Desktop: 3-column branding, 4-column fields */
@media (min-width: 720px) {
  .branding-upload-grid { grid-template-columns: repeat(3, 1fr); }
  .admin-panel .btn-row .field { flex: 1 1 calc(25% - 8px); min-width: 160px; }
}

/* ============================================================
   PROMO BANNER — exact shape from user screenshot
   Horizontal rounded card with icon, text, arrow, optional bg
   ============================================================ */
.promo-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7ed 0%, #fff0df 100%);
  border: 1px solid var(--line-soft);
  margin-top: 14px;
}
.promo-banner__bg {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 55%;
  object-fit: cover;
  object-position: left center;
  z-index: 1;
  pointer-events: none;
  mask-image: linear-gradient(to right, transparent 0%, black 50%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 50%);
}
.promo-banner__ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  z-index: 2;
  font-size: 20px;
}
.promo-banner__text {
  flex: 1;
  min-width: 0;
  z-index: 2;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}
.promo-banner__text strong {
  font-weight: 700;
}
.promo-banner__arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  z-index: 2;
  font-size: 20px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(234,88,12,0.35);
}

/* ============================================================
   HISTORY ITEMS — deposit / withdraw lists
   ============================================================ */
.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 10px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: transform .15s var(--ease), border-color .2s;
}
.history-item:active { transform: scale(0.985); border-color: var(--line); }
.history-item__ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.history-item__ico--deposit { background: var(--success-soft); color: var(--success); }
.history-item__ico--withdraw { background: var(--danger-soft); color: var(--danger); }
.history-item__ico svg { width: 20px; height: 20px; }
.history-item__meta { flex: 1; min-width: 0; }
.history-item__ref { font-size: 12px; color: var(--text-faint); }
.history-item__amt { font-family: 'Sora'; font-weight: 700; font-size: 16px; }
.history-item__amt--minus { color: var(--danger); }
.history-item__sub { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.history-item__badge {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.history-item__badge--pending { background: var(--warning-soft); color: var(--warning); }
.history-item__badge--approved,
.history-item__badge--active { background: var(--accent-soft); color: var(--accent-ink); }
.history-item__badge--paid,
.history-item__badge--repaid { background: var(--success-soft); color: var(--success); }
.history-item__badge--rejected { background: var(--danger-soft); color: var(--danger); }

/* ============================================================
   EYE TOGGLE — hide/show balance
   ============================================================ */
.eye-toggle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  border: none;
  flex-shrink: 0;
}
.eye-toggle svg { width: 18px; height: 18px; }

/* ============================================================
   PIN OVERLAY (withdrawal page)
   ============================================================ */
.pin-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(12px);
}
.pin-box {
  width: min(320px, 92vw);
  text-align: center;
  padding: 24px;
}
.pin-box__icon {
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center; margin: 0 auto 16px;
}
.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 18px 0 8px; }
.pin-dots span {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--bg-card);
  transition: background .2s, border-color .2s;
}
.pin-dots span.filled { background: var(--accent); border-color: var(--accent); }
.pin-error { color: var(--danger); font-size: 13px; min-height: 20px; margin: 4px 0 8px; }
.pin-keypad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 10px;
}
.pin-keypad button {
  height: 56px; border-radius: 14px; border: 1px solid var(--line-soft);
  background: var(--bg-card); color: var(--text);
  font-size: 22px; font-weight: 600; font-family: 'Sora', sans-serif;
  cursor: pointer; transition: background .15s, transform .1s;
}
.pin-keypad button:active { transform: scale(0.96); background: var(--bg-elev); }
.pin-keypad__action { font-size: 16px !important; color: var(--accent-ink) !important; background: var(--accent-soft) !important; border-color: var(--accent-soft) !important; }

/* ============================================================
   PROFILE PHOTO UPLOAD
   ============================================================ */
.profile-photo-wrap {
  position: relative;
  display: inline-block;
}
.profile-photo {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  object-fit: cover;
  background: var(--grad);
  border: 0;
  box-shadow: 0 7px 18px rgba(234,88,12,.26);
}
.profile-photo--initials {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}
.profile-photo__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.profile-photo__hint {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
}

/* ============================================================
   ANIMATED STAT BARS (plan cards)
   ============================================================ */
.stat-bars { display:flex; align-items:flex-end; gap:2px; height:18px; }
.stat-bars i { display:block; width:3px; background:currentColor; border-radius:2px; animation: statBar 1.2s ease-in-out infinite; }
.stat-bars i:nth-child(1) { height:40%; animation-delay:0s; }
.stat-bars i:nth-child(2) { height:70%; animation-delay:.2s; }
.stat-bars i:nth-child(3) { height:55%; animation-delay:.4s; }
.stat-bars i:nth-child(4) { height:90%; animation-delay:.1s; }
@keyframes statBar { 0%,100%{ transform:scaleY(1); } 50%{ transform:scaleY(.4); } }

/* ============================================================
   PLAN CARD — compact text, intact image
   ============================================================ */
/* ============================================================
   MINI CANDLESTICK CHART (plan card icon)
   ============================================================ */
.mini-candles { display:flex; align-items:flex-end; justify-content:center; gap:2px; height:22px; width:22px; }
.mini-candles .candle { position:relative; width:3px; background:transparent; }
.mini-candles .candle::before {
  content:''; position:absolute; left:50%; transform:translateX(-50%);
  width:1px; background:currentColor; opacity:.6;
}
.mini-candles .candle::after {
  content:''; display:block; width:100%; border-radius:1px;
}
.mini-candles .candle.up::after   { background:#16a34a; }
.mini-candles .candle.up::before  { top:-3px; height:calc(100% + 6px); background:#16a34a; }
.mini-candles .candle.down::after { background:#dc2626; }
.mini-candles .candle.down::before{ top:-3px; height:calc(100% + 6px); background:#dc2626; }
.mini-candles .candle:nth-child(1)::after { height:45%; animation: candleH1 1.8s ease-in-out infinite; }
.mini-candles .candle:nth-child(2)::after { height:70%; animation: candleH2 2.1s ease-in-out infinite; }
.mini-candles .candle:nth-child(3)::after { height:55%; animation: candleH3 1.5s ease-in-out infinite; }
.mini-candles .candle:nth-child(4)::after { height:85%; animation: candleH4 2.3s ease-in-out infinite; }
@keyframes candleH1 { 0%,100%{ height:45%; } 50%{ height:75%; } }
@keyframes candleH2 { 0%,100%{ height:70%; } 50%{ height:40%; } }
@keyframes candleH3 { 0%,100%{ height:55%; } 50%{ height:80%; } }
@keyframes candleH4 { 0%,100%{ height:85%; } 50%{ height:50%; } }

/* ============================================================
   PLAN CARD — compact, image fills, text/button moved UP
   ============================================================ */
.plan-card--media { display:grid; grid-template-columns:minmax(110px,38%) minmax(0,1fr); gap:0; min-height:0; padding:0; overflow:hidden; align-items:stretch; }
.plan-card--media .plan-card__image { position:relative; grid-column:1; grid-row:1; min-height:170px; height:100%; overflow:hidden; background:var(--accent-soft); }
.plan-card--media .plan-card__image img { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; object-position:center; }
.plan-card--media .plan-card__body { grid-column:2; grid-row:1; display:flex; flex-direction:column; justify-content:flex-start; gap:1px; min-width:0; padding:10px 12px 10px; }
.plan-card--media .plan-heading { align-items:flex-start; gap:8px; }
.plan-card--media .plan-heading h3 { font-size:14px; line-height:1.2; margin:0; }
.plan-card--media .plan-heading p { font-size:10px; line-height:1.2; margin:0; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; color:var(--text-dim); }
.plan-roi { color:var(--accent-ink); font-size:13px; white-space:nowrap; margin-left:6px; }
.plan-card .kv { margin:0; font-size:11px; line-height:1.3; }
.plan-card .kv .k { font-size:10px; }
.plan-card .mt12 { margin-top:4px; }
.plan-card .btn--primary { padding:7px 10px; font-size:12px; }
.plan-icon--anim { color:var(--accent-ink); background:var(--accent-soft); display:grid; place-items:center; }

/* ============================================================
   ACTIVITY MINI (investment detail buy/sell)
   ============================================================ */
.activity-mini { margin-top:8px; padding-top:8px; border-top:1px solid var(--line-soft); }
.activity-mini__title { font-size:11px; font-weight:600; color:var(--text-dim); text-transform:uppercase; letter-spacing:0.4px; margin:0 0 5px; }
.activity-mini__row { display:flex; align-items:center; gap:8px; font-size:12px; margin:2px 0; }
.activity-mini__badge { font-size:10px; font-weight:700; padding:2px 6px; border-radius:5px; white-space:nowrap; }
.activity-mini__badge--buy { background:#dcfce7; color:#166534; }
.activity-mini__badge--sell { background:#fee2e2; color:#991b1b; }
.activity-mini__badge--profit { background:#ffedd5; color:#9a3412; }
.activity-mini__market { color:var(--text); font-weight:600; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.activity-mini__amt { color:var(--text-dim); font-size:11px; white-space:nowrap; }

/* ============================================================
   INVESTMENT CARD IMAGE — fixed, visible, large
   ============================================================ */
.invest-card__image {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 160px;
  height: auto;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

/* ============================================================
   MINI MARKET CHART — sophisticated animation under invest button
   ============================================================ */
.mini-market-chart {
  position: relative;
  width: 100%;
  height: 40px;
  margin-top: 6px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(249,115,22,.04) 0%, rgba(249,115,22,.01) 100%);
  overflow: hidden;
}
.mini-market-chart canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.mini-market-chart__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  pointer-events: none;
}
.mini-market-chart__ticker {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.3px;
}
.mini-market-chart__pct {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}
.mini-market-chart__pct--up {
  color: #15803d;
  background: #dcfce7;
}
.mini-market-chart__pct--down {
  color: #b91c1c;
  background: #fee2e2;
}
.mini-market-chart__candles {
  position: absolute;
  bottom: 4px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
  pointer-events: none;
}
.mini-market-chart__candle {
  flex: 1;
  border-radius: 1.5px;
  min-width: 2px;
  animation: miniCandlePulse 2.4s ease-in-out infinite;
}
.mini-market-chart__candle:nth-child(1) { animation-delay: 0s; height: 45%; background: #16a34a; }
.mini-market-chart__candle:nth-child(2) { animation-delay: .2s; height: 70%; background: #dc2626; }
.mini-market-chart__candle:nth-child(3) { animation-delay: .4s; height: 55%; background: #16a34a; }
.mini-market-chart__candle:nth-child(4) { animation-delay: .6s; height: 85%; background: #16a34a; }
.mini-market-chart__candle:nth-child(5) { animation-delay: .8s; height: 35%; background: #dc2626; }
.mini-market-chart__candle:nth-child(6) { animation-delay: 1s; height: 60%; background: #16a34a; }
.mini-market-chart__candle:nth-child(7) { animation-delay: 1.2s; height: 75%; background: #dc2626; }
.mini-market-chart__candle:nth-child(8) { animation-delay: 1.4s; height: 50%; background: #16a34a; }
.mini-market-chart__candle:nth-child(9) { animation-delay: 1.6s; height: 80%; background: #16a34a; }
.mini-market-chart__candle:nth-child(10) { animation-delay: 1.8s; height: 40%; background: #dc2626; }
.mini-market-chart__candle:nth-child(11) { animation-delay: 2s; height: 65%; background: #16a34a; }
.mini-market-chart__candle:nth-child(12) { animation-delay: 2.2s; height: 55%; background: #dc2626; }
@keyframes miniCandlePulse {
  0%, 100% { opacity: .85; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.15); }
}

/* ============================================================
   AVATAR VOCAL INTELLIGENT — Flash (Production Grade)
   ============================================================ */

/* ---- Root vars ---- */
:root {

  --avatar-ring: 3px;
}

/* ---- Container ---- */

/* ============================================================
   ADMIN USERS TABLE — Production Grade
   ============================================================ */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.admin-stat-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.admin-stat-card__value {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.admin-stat-card__label {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
  font-weight: 500;
}
.admin-stat-card--success .admin-stat-card__value { color: #16a34a; }
.admin-stat-card--warning .admin-stat-card__value { color: #d97706; }
.admin-stat-card--danger  .admin-stat-card__value { color: #dc2626; }

.admin-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.admin-toolbar__search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 0 12px;
}
.admin-toolbar__search svg {
  flex-shrink: 0;
  color: var(--text-faint);
}
.admin-toolbar__search input {
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  flex: 1;
  outline: none;
}
.admin-toolbar__filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-filter {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line-soft);
  color: var(--text-faint);
  text-decoration: none;
  transition: all .15s ease;
  white-space: nowrap;
}
.admin-filter--active,
.admin-filter:hover {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(249,115,22,.25);
}

.admin-user-table-wrap {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  /* #app-content restreint le glissement tactile au vertical (pan-y) pour la
     navigation par balayage entre onglets. Ce tableau a, lui, besoin du
     glissement horizontal pour atteindre la colonne d'actions sur mobile :
     sans cette ligne, impossible de faire défiler vers la droite au doigt. */
  touch-action: pan-x pan-y;
  box-shadow: 0 2px 12px rgba(0,0,0,.03);
}
.admin-user-table-wrap .admin-user-table { min-width: 640px; }
.admin-user-actions__grid { min-width: 640px; }
.admin-user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-user-table thead {
  background: #faf8f5;
  position: sticky;
  top: 0;
  z-index: 10;
}
.admin-user-table th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-faint);
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}
.admin-user-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #f3ede7;
  vertical-align: middle;
}
/* La colonne "Solde" ne doit jamais passer à la ligne : un montant qui
   s'enroule sur deux lignes peut visuellement chevaucher la ligne suivante. */
.admin-user-table td.admin-user-balance {
  white-space: nowrap;
}
.admin-user-row {
  cursor: pointer;
  transition: background .12s ease;
}
.admin-user-row:hover {
  background: #fffaf5;
}
.admin-user-row td:first-child {
  padding-left: 12px;
}
.admin-user-row td:last-child {
  padding-right: 12px;
}

.admin-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-user-info__avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.admin-user-info__name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-user-info__email {
  font-size: 11.5px;
  color: var(--text-faint);
  margin-top: 1px;
}
.admin-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.admin-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.admin-status--active   { background: #dcfce7; color: #166534; }
.admin-status--suspended{ background: #fef3c7; color: #92400e; }
.admin-status--blocked  { background: #fee2e2; color: #991b1b; }

.admin-user-expand {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all .2s ease;
  display: grid;
  place-items: center;
}
.admin-user-expand:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* Expanded actions panel */
.admin-user-actions {
  background: #faf8f5;
}
.admin-user-actions.hidden {
  display: none;
}
.admin-user-actions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 14px;
}
.admin-user-actions__group {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px;
}
.admin-user-actions__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.admin-user-actions__btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-user-actions__group--danger {
  border-color: #fecaca;
  background: #fef2f2;
}

/* Bulk bar */
.admin-bulk-bar {
  position: fixed;
  bottom: calc(70px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1e293b;
  color: #fff;
  padding: 10px 18px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  animation: bulkBarSlideUp .3s cubic-bezier(.22,1,.36,1);
}
.admin-bulk-bar.hidden { display: none; }
.admin-bulk-bar__actions { display: flex; gap: 8px; }
@keyframes bulkBarSlideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@media (max-width: 480px) {
  .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
  .hide-mobile { display: none; }
  .admin-user-actions__grid { grid-template-columns: 1fr; }
  .admin-user-table th,
  .admin-user-table td { padding: 8px 6px; }
}

/* ============================================================
   Feedback visuel clic — évite les doubles-clics
   ============================================================ */
button, .btn, .tab, a[data-link], .icon-btn, .voice-fab, .wa-fab {
  -webkit-tap-highlight-color: rgba(249,115,22,0.15);
}
button:active, .btn:active, .tab:active, a[data-link]:active, .icon-btn:active {
  opacity: 0.75;
  transform: scale(0.97);
}
.btn.loading, .btn[disabled], button[disabled] {
  opacity: 0.55 !important;
  pointer-events: none !important;
  cursor: not-allowed;
}
/* Ripple sur les boutons principaux */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: width 0.4s ease, height 0.4s ease;
}
.btn--primary:active::after {
  width: 200%; height: 200%;
}
