/* ============================================================
   WAFRICASTORE — Compte · Design System v2
   Palette : Navy #001830 | Amber #da6f0d | Cream #fdf8f3
   ============================================================ */

:root {
  --primary:    #da6f0d;
  --primary-dk: #b85d0a;
  --primary-lt: #fff5ee;
  --navy:       #001830;
  --navy-mid:   #0a2442;
  --navy-lt:    #1a3a5c;
  --surface:    #ffffff;
  --bg:         #f5f4f1;
  --border:     #e8e4de;
  --text:       #1a1a2e;
  --muted:      #6b7280;
  --success:    #059669;
  --danger:     #dc2626;
  --radius-sm:  0.5rem;
  --radius:     0.875rem;
  --radius-lg:  1.25rem;
  --shadow-sm:  0 1px 4px rgba(0,0,0,.06);
  --shadow:     0 4px 20px rgba(0,24,48,.09);
  --shadow-lg:  0 12px 40px rgba(0,24,48,.14);
  --transition: 0.22s cubic-bezier(.4,0,.2,1);
}

html, body { font-family: 'Poppins', sans-serif; overflow-x: hidden; scroll-behavior: smooth; }
* { -webkit-backface-visibility: hidden; backface-visibility: hidden; box-sizing: border-box; }

/* ── Announcement bar ── */
#top-announcement-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 34px; background: var(--primary);
  z-index: 60; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
#top-announcement-bar .announcement-text {
  color: #fff; font-size: 0.8rem; font-weight: 600;
  white-space: nowrap; animation: marqueeSlide 14s linear infinite;
  display: flex; align-items: center; gap: 0.6rem;
}
#top-announcement-bar .announcement-text i { color: rgba(255,255,255,.85); }
@keyframes marqueeSlide {
  0%   { transform: translateX(60%); opacity: 0; }
  8%   { opacity: 1; }
  45%  { transform: translateX(0%); }
  55%  { transform: translateX(0%); }
  92%  { opacity: 1; }
  100% { transform: translateX(-60%); opacity: 0; }
}

/* ── Header ── */
header { top: 34px !important; background: rgba(255,255,255,.97) !important; border-bottom: 1px solid var(--border); }
#hero-spacer { height: calc(34px + 64px) !important; }

/* ── Loading screen ── */
#loading-screen {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-color: #f1ece6;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .5s ease, visibility .5s ease;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; }
#loading-screen.loading-screen-gone { display: none; }
.loading-logo {
  width: 120px; height: 120px;
  background-image: url('https://i.postimg.cc/vBjDkrGd/logo-wafricastore.png');
  background-size: contain; background-repeat: no-repeat; background-position: center;
  animation: logoPulse 1.5s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ── Toast notification — redesign moderne & responsive ── */
#lp-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  z-index: 10001;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: min(19rem, calc(100vw - 2rem));
  max-width: 19rem;
  padding: .75rem .95rem .75rem .7rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(0,24,48,.97) 0%, rgba(7,33,60,.95) 100%);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow:
    0 24px 60px rgba(0,24,48,.32),
    0 8px 20px rgba(0,0,0,.16),
    inset 0 1px 0 rgba(255,255,255,.08);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(-50% + 1rem)) scale(.94);
  transform-origin: center;
  transition:
    opacity .26s ease,
    transform .32s cubic-bezier(.34,1.4,.64,1),
    visibility .26s ease;
  pointer-events: none;
  overflow: hidden;
  white-space: normal;
}

/* barre de progression en bas */
#lp-toast::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  width: 100%;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--primary) 0%, #f59e0b 100%);
  transform-origin: left;
  transform: scaleX(0);
}
#lp-toast.show::before {
  animation: toastProgress 3.2s linear forwards;
}
@keyframes toastProgress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); transform-origin: right; }
}

#lp-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

/* Icône dans un cercle coloré compact */
#lp-toast i {
  width: 2rem;
  height: 2rem;
  border-radius: .65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .8rem;
  position: relative;
  z-index: 1;
  transition: background .2s, color .2s;
}
#lp-toast.success i {
  background: rgba(16,185,129,.22);
  color: #34d399;
  box-shadow: 0 0 0 4px rgba(16,185,129,.1);
}
#lp-toast.error i {
  background: rgba(248,113,113,.22);
  color: #f87171;
  box-shadow: 0 0 0 4px rgba(248,113,113,.1);
}
/* état neutre / par défaut */
#lp-toast:not(.success):not(.error) i {
  background: rgba(218,111,13,.22);
  color: #fbbf24;
  box-shadow: 0 0 0 4px rgba(218,111,13,.1);
}

#lp-toast-text {
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.95);
  padding-right: .2rem;
  overflow-wrap: anywhere;
}

/* ── Mobile : slide depuis le bas, centré ── */
@media (max-width: 640px) {
  #lp-toast {
    top: auto;
    bottom: 5rem;
    right: auto;
    left: 50%;
    width: min(19rem, calc(100vw - 1.5rem));
    max-width: calc(100vw - 1.5rem);
    padding: .65rem .85rem .65rem .65rem;
    transform: translate(-50%, 1rem) scale(.97);
    transform-origin: center;
    border-radius: 1rem;
  }
  #lp-toast.show {
    transform: translate(-50%, 0) scale(1);
  }
}

/* ── Main layout ── */
.profile-main {
  min-height: calc(100vh - 34px);
  padding: 1.5rem 1rem 3rem;
  background: var(--bg);
}
.profile-container {
  max-width: 1200px; margin: 0 auto;
  animation: fadeUp .45s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── State cards (loading / guest) ── */
.profile-state-card {
  max-width: 420px; margin: 4rem auto; text-align: center;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 3rem 2rem; box-shadow: var(--shadow);
}
.profile-state-icon {
  width: 72px; height: 72px; margin: 0 auto 1.25rem;
  background: var(--primary-lt); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; color: var(--primary);
}
.profile-state-card h1 { font-size: 1.25rem; font-weight: 700; color: var(--text); margin: 0 0 .75rem; }
.profile-state-card p  { font-size: .9rem; color: var(--muted); margin: 0 0 1.5rem; line-height: 1.6; }
.profile-state-actions { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; }
.profile-primary-link,
.profile-secondary-link {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .65rem 1.25rem; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600; text-decoration: none;
  transition: all var(--transition);
}
.profile-primary-link  { background: var(--primary); color: #fff; }
.profile-primary-link:hover  { background: var(--primary-dk); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(218,111,13,.3); }
.profile-secondary-link { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.profile-secondary-link:hover { background: var(--primary-lt); color: var(--primary); border-color: var(--primary); }

/* ── Profile header card ── */
.profile-header-card {
  background: var(--surface); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}
.profile-cover {
  height: 172px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 40%, #0f3460 70%, var(--primary) 130%);
}
.profile-cover::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.profile-cover::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(to top, var(--surface), transparent);
}
.profile-cover-accent {
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(218,111,13,.25) 0%, transparent 70%);
  pointer-events: none;
}

.profile-info {
  display: flex; align-items: flex-end; flex-wrap: wrap;
  padding: 0 1.5rem 1.1rem; margin-top: -72px;
  position: relative; z-index: 2; gap: 1.25rem;
}

/* ── Avatar ── */
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar {
  width: 136px; height: 136px; border-radius: 50%;
  border: 5px solid var(--surface); object-fit: cover;
  box-shadow: 0 8px 28px rgba(0,24,48,.22);
}
.profile-avatar-initials {
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, #f59e0b 100%);
  color: #fff; letter-spacing: 0;
}
.profile-edit-avatar {
  position: absolute; bottom: 4px; right: 4px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: white;
  border: 3px solid var(--surface); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; transition: background var(--transition), transform var(--transition);
}
.profile-edit-avatar:hover { background: var(--primary-dk); transform: scale(1.12); }
.profile-remove-avatar {
  position: absolute; bottom: 4px; left: 4px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--danger); color: white;
  border: 3px solid var(--surface); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; overflow: hidden; white-space: nowrap;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
}
.profile-remove-avatar:hover { background: #b91c1c; transform: scale(1.12); }
.profile-remove-avatar:disabled { opacity: .8; cursor: wait; transform: none; }

/* ── Profile details ── */
.profile-details { padding-bottom: .5rem; flex: 1; min-width: 0; }
.profile-name {
  font-size: 1.5rem; font-weight: 800; color: var(--text);
  margin: 0; letter-spacing: 0;
}
.profile-email { color: var(--muted); font-size: .875rem; margin: .25rem 0; }
.profile-badges { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .5rem; margin-top: .5rem; }
.profile-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  min-width: 6.5rem; text-align: center;
  padding: .25rem .65rem; border-radius: 9999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.profile-badge.verified   { background: #d1fae5; color: #047857; }
.profile-badge.unverified { background: #fee2e2; color: #b91c1c; }
.profile-badge.premium    { background: var(--primary-lt); color: var(--primary); }
.profile-badge.professional { background: #dbeafe; color: #1d4ed8; }

.profile-avatar-message { font-size: .8rem; margin-top: .5rem; }

/* ── Header actions (verify + logout + delete) ── */
.profile-header-actions {
  display: flex; flex-direction: column; gap: .5rem;
  padding-bottom: .5rem; flex-shrink: 0;
}
.profile-secondary-btn,
.profile-danger-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 600; cursor: pointer; border: none;
  font-family: 'Poppins', sans-serif;
  transition: all var(--transition);
}
.profile-secondary-btn { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.profile-secondary-btn:hover { background: var(--primary-lt); color: var(--primary); border-color: var(--primary); }
.profile-professional-toggle {
  justify-content: center;
  background: #eef6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.profile-professional-toggle.active {
  background: #dbeafe;
  color: #1e40af;
  border-color: #60a5fa;
}
.profile-professional-toggle:disabled { opacity: .75; cursor: wait; }

/* ── Segmented control (Perso / Pro) ── */
.segmented-control {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
  opacity: .55;
  pointer-events: none;
  user-select: none;
}
.segmented-option {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem .9rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: not-allowed;
  transition: background var(--transition), color var(--transition);
}
.segmented-option:first-child {
  border-right: 1px solid var(--border);
}
.segmented-option.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.segmented-dev-badge {
  display: none;
  align-items: center;
  gap: .35rem;
  margin-top: .35rem;
  padding: .2rem .55rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

html.is-dev .segmented-dev-badge {
  display: inline-flex;
}

/* ── Section inactive (en développement) ── */
.section-dev-inactive {
  position: relative;
  opacity: .55;
  pointer-events: none;
  user-select: none;
}

html:not(.is-dev) .section-dev-inactive {
  opacity: 1;
  pointer-events: auto;
  user-select: auto;
}

.section-inactive-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: rgba(245,244,241,.45);
  pointer-events: none;
}

html.is-dev .section-inactive-overlay {
  display: flex;
}

.section-inactive-badge {
  display: none;
  align-items: center;
  gap: .4rem;
  padding: .45rem .9rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  box-shadow: 0 4px 14px rgba(146,64,14,.15);
}

html.is-dev .section-inactive-badge {
  display: inline-flex;
}
.profile-danger-btn { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.profile-danger-btn:hover { background: #fee2e2; }
.profile-action-message { font-size: .8rem; margin-top: .25rem; }

/* ── Stats row ── */
.profile-stats-row {
  display: flex; align-items: center; justify-content: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(to right, #fafafa, var(--primary-lt) 50%, #fafafa);
  border-top: 1px solid var(--border);
}
.profile-stat-item { display: flex; flex-direction: column; align-items: center; flex: 1; }
.profile-stat-value { font-size: 1.25rem; font-weight: 800; color: var(--text); }
.profile-stat-text  { font-size: .9rem; }
.profile-stat-label { font-size: .75rem; color: var(--muted); margin-top: .15rem; text-transform: uppercase; letter-spacing: .04em; }
.profile-stat-divider { width: 1px; height: 32px; background: var(--border); }

/* ── Content grid ── */
.profile-content-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem;
}
@media (min-width: 980px) {
  .profile-content-grid { grid-template-columns: 320px minmax(0, 1fr); }
}

.profile-sidebar-left { display: flex; flex-direction: column; gap: 1.25rem; }
.profile-main-content  { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }

/* ── Cards ── */
.profile-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
  min-width: 0;
}
.profile-card:hover { box-shadow: var(--shadow); }

.profile-card-title {
  font-size: .875rem; font-weight: 700; color: var(--text);
  margin: 0 0 1.25rem; display: flex; align-items: center; gap: .5rem;
  text-transform: uppercase; letter-spacing: .06em;
}
.profile-card-title i {
  width: 28px; height: 28px; border-radius: .4rem;
  background: var(--primary-lt); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
}

/* ── Solde card ── */
.solde-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 55%, #0f3460 100%);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; align-items: flex-start; gap: 1rem;
  box-shadow: 0 8px 30px rgba(0,24,48,.28);
}
.solde-card::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(218,111,13,.28) 0%, transparent 70%);
  pointer-events: none;
}
.solde-card::after {
  content: ''; position: absolute; bottom: -20px; left: 20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.05) 0%, transparent 70%);
  pointer-events: none;
}
.solde-icon {
  width: 54px; height: 54px; border-radius: .75rem;
  background: rgba(218,111,13,.2); border: 1px solid rgba(218,111,13,.3);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.solde-icon i { font-size: 1.4rem; color: #fbbf24; }
.solde-content { flex: 1; min-width: 0; position: relative; z-index: 1; }
.solde-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
  margin-bottom: .75rem;
}
.solde-label { font-size: .7rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .25rem; }
.solde-currency-control {
  display: flex; flex-direction: column; gap: .25rem; width: min(100%, 180px);
  color: rgba(255,255,255,.58); font-size: .66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.solde-currency-control select {
  width: 100%; height: 34px; border: 1px solid rgba(255,255,255,.18);
  border-radius: .55rem; background: rgba(255,255,255,.1); color: #fff;
  padding: 0 .55rem; font: inherit; text-transform: none; letter-spacing: 0;
  outline: none; cursor: pointer;
}
.solde-currency-control select option { color: #111827; background: #fff; }
.solde-amount { font-size: 2.2rem; font-weight: 800; color: #fff; line-height: 1; margin-bottom: .5rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.solde-amount-value { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: .3rem; min-width: 0; }
.solde-unit   { font-size: .95rem; font-weight: 500; color: rgba(255,255,255,.5); margin-left: .2rem; }
.solde-balance-toggle {
  width: 28px; height: 28px; border: none;
  border-radius: 0; background: transparent; color: rgba(255,255,255,.78);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background var(--transition), transform var(--transition), border-color var(--transition);
  font-size: .85rem;
}
.solde-balance-toggle:hover { background: transparent; color: #fff; transform: translateY(-1px); }
.solde-actions {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem; margin: .85rem 0 0;
}
.solde-action-btn {
  min-height: 38px; border: 1px solid var(--border);
  border-radius: .65rem; background: var(--bg); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  font-size: .72rem; font-weight: 700; cursor: pointer;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}
.solde-action-btn:hover { background: var(--primary-lt); border-color: #f1d2b2; color: var(--primary-dk); transform: translateY(-1px); }
.solde-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, rgba(255,255,255,.04) 0%, transparent 60%); }

/* Balance section refinements */
.balance-card {
  padding: 1.15rem;
}
.balance-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.balance-card .profile-card-title {
  margin-bottom: 1rem;
}
.balance-panel.solde-card {
  display: block;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(145deg, #001830 0%, #0a2442 56%, #12385f 100%);
  box-shadow: 0 10px 28px rgba(0,24,48,.24);
}
.balance-panel.solde-card::before,
.balance-panel.solde-card::after {
  display: none;
}
.balance-panel .solde-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .85rem;
  min-width: 0;
}
.balance-panel-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
}
.balance-panel .solde-icon {
  width: 42px;
  height: 42px;
  border-radius: .75rem;
  background: rgba(218,111,13,.18);
  border: 1px solid rgba(218,111,13,.32);
}
.balance-panel .solde-icon i {
  font-size: 1rem;
}
.balance-panel .solde-label {
  font-size: .68rem;
  margin-bottom: .1rem;
}
.balance-caption {
  font-size: .82rem;
  font-weight: 700;
  color: rgba(255,255,255,.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.balance-panel .solde-amount {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2rem;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  margin-bottom: 0;
}
.balance-panel .solde-amount-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .3rem;
  min-width: 0;
  font-size: 1.85rem;
  font-weight: 850;
}
#soldeMoneyAmount {
  min-width: 0;
  overflow-wrap: anywhere;
}
.balance-panel .solde-unit {
  font-size: .86rem;
  font-weight: 650;
  color: rgba(255,255,255,.58);
  margin-left: .1rem;
}
.balance-panel .solde-balance-toggle {
  width: 2rem;
  height: 2rem;
  border-radius: .5rem;
  font-size: .78rem;
  transition: color var(--transition), transform var(--transition);
}
.balance-panel .solde-currency-control {
  display: grid;
  grid-template-columns: 1fr;
  gap: .3rem;
  width: 100%;
}
.balance-panel .solde-currency-control select {
  min-height: 38px;
  border-radius: .7rem;
  padding: 0 .75rem;
}
.balance-panel .solde-currency-control select:focus {
  border-color: rgba(218,111,13,.65);
  box-shadow: 0 0 0 3px rgba(218,111,13,.18);
}
.balance-qr-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: .85rem;
  min-width: 0;
  margin-top: .85rem;
  padding: .9rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: linear-gradient(180deg, #fff 0%, #fff8f1 100%);
  box-shadow: 0 8px 20px rgba(13,23,42,.06);
}
.balance-qr-copy {
  min-width: 0;
}
.balance-qr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .68rem;
  font-weight: 800;
  color: var(--primary-dk);
  letter-spacing: 0;
}
.balance-qr-copy h3 {
  margin: .28rem 0 .15rem;
  font-size: .95rem;
  line-height: 1.2;
  color: var(--text);
}
.balance-qr-copy p {
  margin: 0 0 .45rem;
  font-size: .76rem;
  line-height: 1.35;
  color: var(--muted);
}
.balance-qr-user-id {
  display: block;
  max-width: 100%;
  padding: .38rem .48rem;
  border: 1px solid rgba(218,111,13,.18);
  border-radius: .55rem;
  background: rgba(255,255,255,.78);
  color: var(--navy);
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.balance-qr-box {
  position: relative;
  width: 104px;
  aspect-ratio: 1;
  padding: .45rem;
  border: 1px solid #e4e8f0;
  border-radius: .9rem;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.03);
}
.balance-qr-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: .45rem;
  object-fit: contain;
}
.balance-qr-placeholder {
  position: absolute;
  inset: .45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(218,111,13,.35);
  border-radius: .55rem;
  background: #fffaf5;
  color: var(--primary);
  font-size: 2rem;
}
.balance-card .solde-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin: .85rem 0 0;
}
.balance-card .solde-action-btn {
  min-height: 40px;
  border-radius: .75rem;
  background: #fff;
  padding: 0 .45rem;
  min-width: 0;
  white-space: nowrap;
  font-size: .72rem;
  font-weight: 750;
}

.transfer-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.transfer-modal.hidden {
  display: none !important;
}
.transfer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 24, 48, .62);
  backdrop-filter: blur(8px);
}
.transfer-dialog {
  position: relative;
  width: min(100%, 480px);
  max-height: min(720px, calc(100vh - 2rem));
  overflow: auto;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 1.1rem;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0,24,48,.28);
  padding: 1.2rem;
}
.transfer-close-btn {
  position: absolute;
  top: .85rem;
  right: .85rem;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: #fff;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.transfer-close-btn:hover {
  background: var(--bg);
  transform: translateY(-1px);
}
.transfer-dialog-head {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding-right: 2.55rem;
}
.transfer-dialog-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--primary-lt);
  color: var(--primary);
  font-size: 1rem;
}
.transfer-dialog-head h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--text);
}
.transfer-dialog-head p {
  margin: .25rem 0 0;
  font-size: .86rem;
  line-height: 1.45;
  color: var(--muted);
}
.transfer-form {
  display: grid;
  gap: .85rem;
  margin-top: 1rem;
}
.transfer-step {
  display: grid;
  gap: .7rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: #fff;
  padding: .9rem;
}
.transfer-step-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text);
}
.transfer-step-title span {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--navy);
  color: #fff;
  font-size: .74rem;
  font-weight: 800;
}
.transfer-step-title strong {
  font-size: .9rem;
}
.transfer-field {
  display: grid;
  gap: .35rem;
  min-width: 0;
}
.transfer-field > span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
}
.transfer-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: .8rem;
  background: #fff;
  padding: 0 .85rem;
  color: var(--text);
  font-size: .9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.transfer-field input:focus {
  border-color: rgba(218,111,13,.72);
  box-shadow: 0 0 0 3px rgba(218,111,13,.16);
}
.transfer-actions-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}
.transfer-secondary-btn,
.transfer-submit-btn,
.transfer-scan-stop {
  min-height: 42px;
  border: none;
  border-radius: .8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font-size: .84rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), opacity var(--transition);
}
.transfer-secondary-btn {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.transfer-submit-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(218,111,13,.24);
}
.transfer-scan-stop {
  width: 100%;
  background: #fff;
  color: var(--danger);
  border: 1px solid rgba(239,68,68,.18);
}
.transfer-secondary-btn:hover,
.transfer-submit-btn:hover,
.transfer-scan-stop:hover {
  transform: translateY(-1px);
}
.transfer-secondary-btn:disabled,
.transfer-submit-btn:disabled,
.transfer-scan-stop:disabled {
  opacity: .58;
  cursor: not-allowed;
  transform: none;
}
.transfer-scanner {
  display: grid;
  gap: .6rem;
}
.transfer-scanner-camera {
  position: relative;
  overflow: hidden;
  border-radius: .9rem;
  background: #0f172a;
}
.transfer-scanner video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #0f172a;
  object-fit: cover;
}
.transfer-scanner-frame {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 1rem;
  box-shadow: 0 0 0 999px rgba(0,24,48,.28);
  pointer-events: none;
}
.transfer-scanner-frame::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(251,191,36,.95), transparent);
  box-shadow: 0 0 14px rgba(251,191,36,.65);
  animation: transferScanLine 1.7s ease-in-out infinite;
}
.transfer-scanner-frame span {
  position: absolute;
  width: 2rem;
  height: 2rem;
  border-color: #fbbf24;
  border-style: solid;
}
.transfer-scanner-frame span:nth-child(1) {
  top: -.1rem;
  left: -.1rem;
  border-width: 4px 0 0 4px;
  border-top-left-radius: .9rem;
}
.transfer-scanner-frame span:nth-child(2) {
  top: -.1rem;
  right: -.1rem;
  border-width: 4px 4px 0 0;
  border-top-right-radius: .9rem;
}
.transfer-scanner-frame span:nth-child(3) {
  bottom: -.1rem;
  right: -.1rem;
  border-width: 0 4px 4px 0;
  border-bottom-right-radius: .9rem;
}
.transfer-scanner-frame span:nth-child(4) {
  bottom: -.1rem;
  left: -.1rem;
  border-width: 0 0 4px 4px;
  border-bottom-left-radius: .9rem;
}
@keyframes transferScanLine {
  0%, 100% { transform: translateY(-3.1rem); opacity: .45; }
  50% { transform: translateY(3.1rem); opacity: 1; }
}
.transfer-recipient-result {
  border: 1px solid rgba(16,185,129,.22);
  border-radius: .85rem;
  background: rgba(16,185,129,.08);
  padding: .75rem;
  color: #065f46;
  font-size: .84rem;
  line-height: 1.45;
}
.transfer-recipient-result.error {
  border-color: rgba(239,68,68,.22);
  background: rgba(239,68,68,.08);
  color: #991b1b;
}
.transfer-recipient-result strong,
.transfer-recipient-result code {
  overflow-wrap: anywhere;
}
.transfer-money-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
}
.transfer-money-input strong {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: .8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .75rem;
  background: var(--bg);
  color: var(--primary-dk);
  font-size: .82rem;
}
.transfer-message {
  min-height: 1.2rem;
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4;
}
.transfer-message.success {
  color: var(--success);
}
.transfer-message.error {
  color: var(--danger);
}

.transactions-list { display: flex; flex-direction: column; gap: .75rem; }
.transaction-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%;
  padding: 1rem 1.15rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition);
  box-shadow: 0 2px 8px rgba(0,24,48,.04);
}
.transaction-item:active {
  transform: translateY(0);
}
.transaction-item:hover,
.transaction-item:focus-visible {
  border-color: rgba(218,111,13,.4);
  background: #fff;
  box-shadow: 0 12px 28px rgba(0,24,48,.1);
  outline: none;
  transform: translateY(-2px);
}
.transaction-main { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.transaction-main-copy { min-width: 0; display: block; }
.transaction-icon {
  width: 44px; height: 44px; border-radius: .75rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-lt) 0%, #fef3c7 100%);
  color: var(--primary); flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(218,111,13,.15);
}
.transaction-title { display: block; font-size: .9rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transaction-date { display: block; margin-top: .2rem; font-size: .72rem; color: var(--muted); font-weight: 500; }
.transaction-amount { font-size: .95rem; font-weight: 800; color: var(--text); white-space: nowrap; letter-spacing: 0; }
.transaction-amount.positive { color: var(--success); }
.transaction-amount.negative { color: var(--danger); }
.transaction-side {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-left: auto;
  flex-shrink: 0;
}
.transaction-open-indicator {
  width: 30px;
  height: 30px;
  border-radius: .7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: #94a3b8;
  font-size: .75rem;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.transaction-item:hover .transaction-open-indicator,
.transaction-item:focus-visible .transaction-open-indicator {
  background: var(--primary-lt);
  color: var(--primary);
  transform: translateX(2px);
}

@media (max-width: 520px) {
  .transaction-item {
    flex-direction: column;
    align-items: flex-start;
    gap: .65rem;
    padding: .85rem;
  }
  .transaction-main { width: 100%; }
  .transaction-side {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }
  .transaction-amount {
    align-self: flex-end;
    font-size: .88rem;
  }
  .transaction-icon { width: 38px; height: 38px; }
}

  .transaction-receipt-modal {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(.75rem, 2vw, 1.5rem);
    animation: fadeIn .2s ease;
  }
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  .transaction-receipt-modal.hidden {
    display: none !important;
  }
  .transaction-receipt-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,24,48,.7);
    backdrop-filter: blur(10px);
  }
  .transaction-receipt-dialog {
    position: relative;
    width: min(100%, 520px);
    height: min(780px, calc(100dvh - 2rem));
    max-height: calc(100vh - 2rem);
    border-radius: 1.25rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 32px 90px rgba(0,24,48,.35);
    animation: slideUp .3s ease;
  }
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .transaction-receipt-frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #f0f4f8;
    color-scheme: light;
  }
  @media (max-width: 520px) {
    .transaction-receipt-dialog {
      width: 100%;
      height: 100dvh;
      max-height: 100vh;
      border-radius: 0;
    }
    .transaction-receipt-modal {
      padding: 0;
      align-items: stretch;
    }
  }

/* ── Info list ── */
.profile-info-list { display: flex; flex-direction: column; gap: .5rem; }
.info-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .75rem; border-radius: var(--radius-sm);
  transition: background var(--transition); cursor: default;
}
.info-item:hover { background: var(--bg); }
.info-item > i {
  width: 34px; height: 34px; border-radius: .4rem;
  background: var(--primary-lt); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; flex-shrink: 0;
}
.info-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.info-label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.info-value { font-size: .875rem; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-edit {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: .25rem; border-radius: .25rem; transition: color var(--transition), background var(--transition);
}
.info-edit:hover { color: var(--primary); background: var(--primary-lt); }

/* ── Referral section ── */
.referral-section { display: flex; flex-direction: column; gap: 1rem; }
.referral-hero {
  position: relative; overflow: hidden; padding: 1.2rem;
  border-radius: var(--radius); border: 1px solid #f1d2b2;
  background: linear-gradient(140deg, #fff8f0 0%, #fff 55%, #fff4e8 100%);
}
.referral-hero::after {
  content: ''; position: absolute; top: -32px; right: -24px;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(218,111,13,.14) 0%, transparent 72%);
  pointer-events: none;
}
.referral-eyebrow {
  display: inline-flex; align-items: center; padding: .3rem .65rem;
  border-radius: 9999px; background: rgba(218,111,13,.1); color: var(--primary-dk);
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  margin-bottom: .6rem;
}
.referral-text { font-size: .875rem; line-height: 1.65; color: #4b5563; margin: 0; }
.referral-hero-badge {
  display: inline-flex; align-items: center; gap: .6rem;
  margin-top: .85rem; padding: .7rem .9rem;
  border-radius: .75rem; background: var(--surface); border: 1px solid #f1d2b2;
  box-shadow: 0 6px 20px rgba(218,111,13,.08);
  font-size: .83rem; font-weight: 600; color: var(--text);
}
.referral-hero-badge i {
  width: 28px; height: 28px; border-radius: .5rem; display: inline-flex;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #f59e0b 100%); color: #fff; flex-shrink: 0;
}
.referral-stats { display: grid; grid-template-columns: 1fr; gap: .65rem; }
.referral-stat {
  display: flex; flex-direction: row; align-items: center; gap: .75rem; padding: .85rem .9rem;
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,24,48,.18);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-lt) 100%);
  min-width: 0;
}
.referral-stat-icon {
  width: 34px; height: 34px; border-radius: .6rem;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.referral-stat-icon i { font-size: .95rem; color: #fbbf24; }
.referral-stat-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.referral-stat-value { font-size: 1.35rem; font-weight: 800; color: #fff; line-height: 1; }
.referral-stat-label { font-size: .66rem; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .03em; margin-top: .25rem; overflow-wrap: anywhere; }

/* ── Referral code card ── */
.referral-code-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, #0f3460 100%);
  box-shadow: 0 12px 36px rgba(0,24,48,.28);
  position: relative;
}
.referral-code-card::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(218,111,13,.22) 0%, transparent 70%);
  pointer-events: none;
}
.referral-code-card::after {
  content: '';
  position: absolute; bottom: -20px; left: 10px;
  width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.04) 0%, transparent 70%);
  pointer-events: none;
}

.referral-code-card-header {
  display: flex; align-items: center; gap: .85rem;
  padding: 1.1rem 1.25rem .85rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative; z-index: 1;
}
.referral-code-card-icon {
  width: 38px; height: 38px; border-radius: .6rem; flex-shrink: 0;
  background: rgba(218,111,13,.22); border: 1px solid rgba(218,111,13,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: .95rem; color: #fbbf24;
}
.referral-code-card-label {
  margin: 0; font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.95);
  text-transform: uppercase; letter-spacing: .07em;
}
.referral-code-card-hint {
  margin: .2rem 0 0; font-size: .72rem; color: rgba(255,255,255,.45);
}

.referral-code-card-body {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.25rem 1.25rem;
  position: relative; z-index: 1;
}
.referral-code-value {
  font-size: clamp(1rem, 2.1vw, 1.3rem); font-weight: 900; letter-spacing: .08em;
  color: #ffffff; text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(218,111,13,.3);
  overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; word-break: break-word;
  flex: 1;
}
.copy-code-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.7rem; height: 2.7rem; padding: 0;
  background: linear-gradient(135deg, var(--primary) 0%, #f59e0b 100%);
  color: white; border: none; border-radius: .65rem; cursor: pointer; flex-shrink: 0;
  font-family: 'Poppins', sans-serif; font-size: .95rem; font-weight: 700;
  box-shadow: 0 6px 20px rgba(218,111,13,.35);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.copy-code-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(218,111,13,.45);
  background: linear-gradient(135deg, var(--primary-dk) 0%, #e89009 100%);
}
.copy-code-btn i { pointer-events: none; }

/* ── Settings forms ── */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 900px) { .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.profile-settings-form { display: flex; flex-direction: column; gap: .875rem; }
.auth-field { display: flex; flex-direction: column; gap: .35rem; }
.auth-label {
  font-size: .75rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
}
.auth-input {
  width: 100%; padding: .7rem 1rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: .9rem; color: var(--text);
  font-family: 'Poppins', sans-serif; background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition); outline: none;
}
.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(218,111,13,.12);
}
.auth-submit {
  display: inline-flex; align-items: center; gap: .4rem; justify-content: center;
  padding: .7rem 1.25rem; border-radius: var(--radius-sm); border: none; cursor: pointer;
  background: var(--primary); color: white; font-weight: 700; font-size: .875rem;
  font-family: 'Poppins', sans-serif; transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(218,111,13,.25);
}
.auth-submit:hover { background: var(--primary-dk); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(218,111,13,.3); }
.auth-link {
  font-size: .82rem; color: var(--primary); text-decoration: none; display: inline-block; margin-top: -.25rem;
}
.auth-link:hover { text-decoration: underline; }
.auth-alert {
  padding: .65rem .9rem; border-radius: var(--radius-sm); font-size: .82rem; font-weight: 500;
  border-left: 3px solid var(--primary); background: var(--primary-lt); color: var(--primary-dk);
}
.auth-alert.hidden { display: none; }
.input-with-btn { display: flex; align-items: center; gap: .5rem; }
.input-with-btn .auth-input { flex: 1; }
.edit-input-btn {
  width: 42px; height: 42px; background: var(--primary); color: white; border: none;
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background var(--transition), transform var(--transition);
}
.edit-input-btn:hover { background: var(--primary-dk); transform: scale(1.05); }
.edit-input-btn i { font-size: .875rem; }
.profile-reset-link { margin-top: .25rem; }

/* ── Orders section ── */
.orders-list { display: flex; flex-direction: column; gap: .75rem; }
.order-item {
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--border);
  transition: background var(--transition);
  color: inherit; text-decoration: none;
}
.order-item:hover { background: var(--primary-lt); border-color: #f1d2b2; }
.order-id {
  font-size: .7rem; font-weight: 700; color: var(--primary);
  writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg);
  background: var(--primary-lt); padding: .3rem .4rem; border-radius: .25rem;
}
.order-info { flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.order-product { display: flex; align-items: center; gap: .75rem; }
.order-product-img { width: 50px; height: 50px; border-radius: .5rem; object-fit: cover; }
.order-details { display: flex; flex-direction: column; }
.order-name { font-size: .875rem; font-weight: 600; color: var(--text); }
.order-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.order-date { font-size: .78rem; color: var(--muted); }
.order-status {
  font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 9999px;
  letter-spacing: .03em;
}
.order-status.delivered  { background: #d1fae5; color: #047857; }
.order-status.pending    { background: #fef3c7; color: #b45309; }
.order-status.processing { background: #dbeafe; color: #1d4ed8; }
.order-status.cancelled  { background: #fee2e2; color: #b91c1c; }
.order-total { font-size: .875rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.orders-view-all {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  margin-top: .25rem; padding: .7rem 1rem; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; text-decoration: none;
  font-size: .875rem; font-weight: 700; transition: background var(--transition), transform var(--transition);
}
.orders-view-all:hover { background: var(--primary-dk); transform: translateY(-1px); }
.transactions-view-all { width: 100%; margin-top: .85rem; }

/* ── Empty state ── */
.empty-profile-section {
  text-align: center; padding: 2rem 1rem;
}
.empty-profile-section i { font-size: 2.5rem; color: var(--muted); opacity: .4; margin-bottom: .75rem; display: block; }
.empty-profile-section p { font-size: .875rem; color: var(--muted); margin: 0 0 1rem; }
.empty-profile-section a {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.25rem; border-radius: var(--radius-sm);
  background: var(--primary); color: white; font-size: .875rem; font-weight: 600;
  text-decoration: none; transition: all var(--transition);
}
.empty-profile-section a:hover { background: var(--primary-dk); transform: translateY(-1px); }

/* ── Avatar crop modal ── */
.avatar-cropper-modal {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(.75rem, 2vw, 1.5rem);
  overflow-y: auto;
}
.avatar-cropper-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,24,48,.72); backdrop-filter: blur(8px);
}
.avatar-cropper-dialog {
  position: relative;
  width: min(100%, 42rem);
  max-height: calc(100vh - clamp(1.5rem, 4vw, 3rem));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 1rem;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: clamp(1rem, 2vw, 1.5rem); box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeUp .3s ease;
}
.avatar-cropper-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem;
}
.avatar-cropper-header h2 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--text); }
.avatar-cropper-header p  { margin: .3rem 0 0; font-size: .85rem; color: var(--muted); line-height: 1.5; }
.avatar-cropper-close {
  width: 36px; height: 36px; border: none; border-radius: .6rem; background: var(--bg);
  color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background var(--transition);
}
.avatar-cropper-close:hover { background: #e5e7eb; }
.avatar-cropper-stage {
  position: relative;
  width: min(100%, 28rem, 52vh);
  aspect-ratio: 1/1; border-radius: var(--radius);
  overflow: hidden; touch-action: none; user-select: none;
  background: repeating-conic-gradient(#edf2f7 0% 25%, transparent 0% 50%) 0 0 / 24px 24px;
  margin: 0 auto;
}
.avatar-cropper-image {
  position: absolute; top: 50%; left: 50%; max-width: none;
  transform: translate(-50%, -50%); will-change: transform; cursor: grab;
}
.avatar-cropper-stage.dragging .avatar-cropper-image { cursor: grabbing; }
.avatar-cropper-mask { position: absolute; inset: 0; pointer-events: none; background: rgba(15,23,42,.18); }
.avatar-cropper-frame {
  position: absolute; inset: 0; border: 2px solid rgba(255,255,255,.95);
  border-radius: var(--radius); box-shadow: 0 0 0 999px rgba(15,23,42,.26); pointer-events: none;
}
.avatar-cropper-controls { display: grid; gap: .65rem; }
.avatar-cropper-zoom-label {
  display: flex; flex-direction: column; gap: .5rem; font-size: .8rem; font-weight: 600; color: var(--muted);
}
.avatar-cropper-zoom-label input { width: 100%; accent-color: var(--primary); }
.avatar-cropper-hint { margin: 0; font-size: .8rem; color: var(--muted); }
.avatar-cropper-actions { display: flex; justify-content: flex-end; gap: .75rem; }
.avatar-cropper-secondary,
.avatar-cropper-primary {
  min-height: 2.6rem; border-radius: var(--radius-sm); padding: .65rem 1rem; border: none;
  font-family: 'Poppins', sans-serif; font-size: .875rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.avatar-cropper-secondary { background: var(--bg); color: var(--text); }
.avatar-cropper-secondary:hover { background: #e5e7eb; }
.avatar-cropper-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #f59e0b 100%); color: #fff;
  display: inline-flex; align-items: center; gap: .4rem;
  box-shadow: 0 8px 22px rgba(218,111,13,.25);
}
.avatar-cropper-primary:hover { background: linear-gradient(135deg, var(--primary-dk) 0%, #e89009 100%); transform: translateY(-1px); }

/* ── Popup ── */
.popup {
  display: none; position: fixed; inset: 0;
  background: rgba(0,24,48,.65); z-index: 1000;
  align-items: center; justify-content: center; padding: 1rem;
  backdrop-filter: blur(4px);
}
.popup.show { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.popup-container {
  background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 420px;
  max-height: 85vh; overflow-y: auto; padding: 1.5rem; position: relative;
  box-shadow: var(--shadow-lg); animation: fadeUp .25s ease;
}
.popup-close {
  position: absolute; top: .75rem; right: .75rem; background: none; border: none;
  font-size: 1.4rem; color: var(--muted); cursor: pointer; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  transition: background var(--transition), color var(--transition);
}
.popup-close:hover { background: #f3f4f6; color: var(--danger); }
.popup-title {
  font-size: 1.1rem; font-weight: 700; color: var(--text); margin: 0 0 1.25rem;
  display: flex; align-items: center; gap: .5rem;
}
.popup-title i { color: var(--primary); }
.earn-points-list { display: flex; flex-direction: column; gap: .65rem; }
.earn-point-item {
  display: flex; align-items: center; gap: .9rem; padding: .9rem;
  background: var(--bg); border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.earn-point-item:hover { background: var(--primary-lt); }
.earn-point-icon {
  width: 44px; height: 44px; border-radius: .65rem;
  background: var(--primary-lt); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.earn-point-info { flex: 1; display: flex; flex-direction: column; }
.earn-point-title { font-size: .9rem; font-weight: 700; color: var(--text); }
.earn-point-desc  { font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.earn-point-reward { font-size: .8rem; font-weight: 700; color: var(--success); margin-top: .25rem; }

/* ── Nav: header icons ── */
.header-cart-icon {
  position: relative; display: flex; align-items: center; color: var(--navy);
  text-decoration: none; padding: .5rem; transition: color var(--transition);
  font-family: 'Poppins', sans-serif;
}
.header-cart-icon:hover { color: var(--primary); }
.header-cart-icon i { font-size: 1.5rem; }
.header-icon-text {
  display: none; font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  margin-left: 5px; color: var(--navy);
}
@media (min-width: 640px) { .header-icon-text { display: inline; } }
.header-profile-btn {
  background: none; border: none; padding: .5rem; margin: 0; cursor: pointer;
  color: var(--navy); display: flex; align-items: center; justify-content: center;
  transition: color var(--transition); font-family: 'Poppins', sans-serif; text-decoration: none;
}
.header-profile-btn:hover,
.header-profile-btn.active { color: var(--primary); }
.header-profile-btn i { font-size: 1.4rem; }
#cart-count-badge {
  position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px;
  background: var(--primary); border-radius: 9999px; border: 2px solid white;
  display: none; align-items: center; justify-content: center; color: white;
  font-size: 10px; font-weight: 700;
}

/* ── Desktop nav ── */
.desktop-nav { display: none; flex: 1; justify-content: center; }
.desktop-nav-list { display: flex; list-style: none; margin: 0; padding: 0; align-items: center; gap: .2rem; }
.desktop-nav-link {
  display: flex; align-items: center; gap: .35rem; padding: .45rem .75rem;
  text-decoration: none; color: var(--navy); font-weight: 600; font-size: .875rem;
  border-radius: .5rem; transition: all var(--transition);
}
.desktop-nav-link:hover { background: var(--primary-lt); color: var(--primary); }
.desktop-nav-link .fa-chevron-down { font-size: .6rem; margin-left: .15rem; }
.desktop-nav-list .has-dropdown { position: relative; }
.desktop-nav-list .has-dropdown > .dropdown-menu {
  display: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%); background: var(--surface); list-style: none;
  margin: .3rem 0 0; padding: .4rem 0; box-shadow: var(--shadow-lg); border-radius: var(--radius);
  min-width: 190px; z-index: 100; border: 1px solid var(--border);
}
.desktop-nav-list .has-dropdown:hover > .dropdown-menu { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: .55rem; padding: .55rem 1rem;
  text-decoration: none; color: var(--navy); font-size: .85rem; font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.dropdown-item:hover { background: var(--primary-lt); color: var(--primary); }
@media (min-width: 1024px) { .desktop-nav { display: flex; } }

/* ── Hamburger / mobile menu ── */
.hamburger-btn {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  color: #001830; padding: 0.5rem; display: flex; align-items: center; justify-content: center; position: relative;
}
.hamburger-btn:hover { color: #da6f0d; }
.hamburger-btn .header-icon-text {
  display: none; font-family: 'Poppins', sans-serif; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.5px; margin-left: 6px; color: #001830;
}
@media (min-width: 640px) {
  .hamburger-btn .header-icon-text { display: inline; }
}
.hamburger-btn { display: flex; }
@media (min-width: 1024px) { .hamburger-btn { display: none; } }

.mobile-menu {
  position: fixed; top: 0; left: 0; width: min(300px, 88vw); height: 100%;
  background-color: rgba(0,0,0,0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  z-index: var(--wafrica-mobile-menu-z-index, 10030); display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start;
  padding-top: calc(36px + 64px); opacity: 0; visibility: hidden; transform: translateX(-100%);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease; overflow-y: auto;
}
.mobile-menu.active { opacity: 1; visibility: visible; transform: translateX(0); }
.mobile-menu ul { list-style-type: none; padding: 0; width: 100%; }
.mobile-menu li { border-bottom: 1px solid rgba(255,255,255,0.1); }
.mobile-menu a {
  display: flex; align-items: center; gap: 0.75rem; color: white; text-decoration: none;
  font-size: 1.1rem; font-weight: 500; padding: 1rem 1.5rem; text-align: left;
  transition: background-color 0.2s ease; width: 100%; box-sizing: border-box;
}
.mobile-menu a:hover { background-color: rgba(255,255,255,0.1); }
.mobile-menu a.menu-active, .mobile-menu a.menu-active i { color: #da6f0d !important; }
.mobile-menu .has-dropdown { position: relative; }
.mobile-menu .has-dropdown > a { justify-content: flex-start; cursor: pointer; }
.mobile-menu .mobile-dropdown-arrow { font-size: 0.75rem; margin-left: auto; transition: transform 0.3s ease; display: inline-block; }
.mobile-menu .has-dropdown.open > a .mobile-dropdown-arrow { transform: rotate(180deg); }
.mobile-menu .has-dropdown > .dropdown-menu {
  max-height: 0;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  list-style: none;
  padding: 0;
  margin: 0;
  transition: max-height 0.3s ease;
}
.mobile-menu .has-dropdown.open > .dropdown-menu {
  max-height: 500px;
  display: block;
}
.mobile-menu .has-dropdown > .dropdown-menu li { border-bottom: 1px solid rgba(255,255,255,0.1); padding: 0; margin: 0; }
.mobile-menu .has-dropdown > .dropdown-menu li a { padding-left: 2.5rem !important; font-size: 1rem !important; padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; display: block !important; }
.mobile-menu-version {
  margin-top: auto;
  padding: 1.5rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
  width: 100%;
}

/* ── User dropdown ── */

/* ── Back to top ── */
#backToTop {
  position: fixed; bottom: 1.75rem; right: 1.75rem;
  background: var(--primary); color: white; border: none; border-radius: 50%;
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 16px rgba(218,111,13,.35);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .3s ease, visibility .3s ease, transform .3s ease, background .2s;
  z-index: 1000;
}
#backToTop:hover { background: var(--primary-dk); transform: translateY(-2px); }
#backToTop.show { opacity: 1; visibility: visible; transform: translateY(0); }

/* ── Footer ── */
footer { background: var(--navy) !important; }

/* ── Responsive tweaks ── */
@media (max-width: 640px) {
  .profile-info {
    flex-direction: column; align-items: center; text-align: center; margin-top: -56px;
  }
  .profile-avatar { width: 108px; height: 108px; }
  .profile-name   { font-size: 1.25rem; }
  .profile-details { padding-bottom: 0; }
  .profile-badges { justify-content: center; }
  .profile-header-actions { align-items: center; flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .solde-actions { grid-template-columns: 1fr; }
  .solde-card { flex-direction: column; }
  .solde-card-head { width: 100%; flex-direction: column; }
  .solde-currency-control { width: 100%; }
  .balance-card { padding: 1rem; }
  .balance-panel.solde-card { padding: 1rem; }
  .balance-qr-card {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
  .balance-qr-eyebrow {
    justify-content: center;
  }
  .balance-qr-user-id {
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .balance-qr-box {
    width: min(150px, 58vw);
    margin: 0 auto;
  }
  .transfer-modal {
    align-items: flex-end;
    padding: .65rem;
  }
  .transfer-dialog {
    width: 100%;
    max-height: calc(100vh - 1.3rem);
    border-radius: 1rem;
    padding: 1rem;
  }
  .transfer-dialog-head {
    padding-right: 2.25rem;
  }
  .transfer-actions-row {
    grid-template-columns: 1fr;
  }
  .order-item { flex-direction: column; align-items: flex-start; }
  .order-id   { writing-mode: horizontal-tb; transform: none; }
  .order-meta { flex-direction: column; align-items: flex-start; gap: .25rem; }
  .referral-stats { grid-template-columns: 1fr; }
  .referral-link-box { flex-direction: column; }
  .referral-input, .copy-btn { width: 100%; }
  .avatar-cropper-dialog {
    width: 100%;
    max-height: calc(100vh - 1.5rem);
    gap: .9rem;
  }
  .avatar-cropper-header {
    flex-direction: column;
    align-items: stretch;
  }
  .avatar-cropper-close { align-self: flex-end; }
  .avatar-cropper-actions { flex-direction: column-reverse; }
  .avatar-cropper-secondary,
  .avatar-cropper-primary { width: 100%; justify-content: center; }
}

@media (max-width: 520px) {
  .profile-header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .profile-secondary-btn,
  .profile-danger-btn {
    width: 100%;
    justify-content: center;
  }
  .transaction-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .transaction-amount {
    align-self: flex-end;
  }
}

@media (max-width: 420px) {
  .profile-main { padding: 1.25rem .75rem 2rem; }
  .profile-card  { padding: 1.1rem; }
  .balance-card .solde-actions { grid-template-columns: 1fr; }
  .balance-panel .solde-amount { grid-template-columns: minmax(0, 1fr) 1.75rem; }
  .balance-panel .solde-amount-value { font-size: 1.55rem; }
  .balance-panel .solde-balance-toggle { width: 1.75rem; height: 1.75rem; }
  .referral-code-display { flex-wrap: nowrap; }
  .copy-code-btn { width: 2.5rem; height: 2.5rem; }
  .avatar-cropper-modal { padding: .75rem; }
  .avatar-cropper-dialog { max-height: calc(100vh - 1.5rem); }
}

/* ── Utility ── */
.hidden { display: none !important; }


