:root {
  --purple: #7B2FBE;
  --purple-dark: #5A1F8E;
  --purple-light: #A855F7;
  --purple-faint: #F3E8FF;
  --green: #10B981;
  --orange: #F59E0B;
  --red: #EF4444;
  --black: #0D0D0D;
  --gray: #6B7280;
  --light-gray: #F9FAFB;
  --border: #E5E7EB;
  --white: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--light-gray);
  color: var(--black);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
}

/* Empêche le zoom iOS/Android au focus sur les champs */
input, select, textarea { font-size: 16px !important; font-family: inherit; }

.screen { display: none; flex-direction: column; height: 100vh; overflow: hidden; }
.screen.active { display: flex; }

h1, h2, h3 { font-weight: 800; }

/* ─── Purple Header ─── */
.purple-header {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  padding: 16px 20px 20px;
  color: white; flex-shrink: 0;
}
.header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.header-brand { font-size: 22px; font-weight: 800; color: white; }
.header-logo  { height: 36px; width: auto; filter: brightness(0) invert(1); }
.header-actions { display: flex; gap: 8px; }
.header-icon-btn {
  background: rgba(255,255,255,0.15); border: none; border-radius: 10px;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  color: white; cursor: pointer; font-size: 18px;
}
.balance-card {
  background: rgba(255,255,255,0.12); border-radius: 14px; padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.2);
}
.balance-label { font-size: 11px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.balance-amount { font-size: 26px; font-weight: 800; color: white; line-height: 1; }
.balance-sub { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* ─── Quick Actions ─── */
.quick-actions { display: flex; gap: 10px; padding: 14px 16px; background: white; flex-shrink: 0; }
.btn-action-primary {
  flex: 1; background: var(--purple); color: white; border: none; border-radius: 12px;
  padding: 13px; font-size: 14px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-action-outline {
  flex: 1; background: white; color: var(--purple); border: 1.5px solid var(--purple);
  border-radius: 12px; padding: 13px; font-size: 14px;
  font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ─── Devenir Vendeur ─── */
.become-vendor-card {
  margin: 0 16px 12px; background: #FFFBEB; border: 1px solid #FCD34D; border-radius: 12px;
  padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; flex-shrink: 0;
}
.bv-icon { font-size: 20px; }
.bv-title { font-size: 13px; font-weight: 700; color: #92400E; }
.bv-sub { font-size: 12px; color: #B45309; margin-top: 2px; }
.bv-close { background: none; border: none; color: #B45309; cursor: pointer; font-size: 18px; padding: 0; margin-left: auto; flex-shrink: 0; line-height: 1; }

/* ─── Étapes de complétion (2/3 mot de passe, 3/3 installation) ─── */
.onboard-card {
  margin: 0 16px 12px; border-radius: 12px; padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 10px; flex-shrink: 0; cursor: pointer;
}
.oc-icon { font-size: 20px; }
.oc-title { font-size: 13px; font-weight: 700; }
.oc-sub { font-size: 12px; margin-top: 2px; }
.oc-close { background: none; border: none; cursor: pointer; font-size: 18px; padding: 0; margin-left: auto; flex-shrink: 0; line-height: 1; }
.onboard-card.oc-blue { background: #EFF6FF; border: 1px solid #93C5FD; }
.onboard-card.oc-blue .oc-title { color: #1E40AF; }
.onboard-card.oc-blue .oc-sub   { color: #2563EB; }
.onboard-card.oc-blue .oc-close { color: #2563EB; }
.onboard-card.oc-teal { background: #ECFDF5; border: 1px solid #6EE7B7; }
.onboard-card.oc-teal .oc-title { color: #065F46; }
.onboard-card.oc-teal .oc-sub   { color: #059669; }
.onboard-card.oc-teal .oc-close { color: #059669; }
.onboard-card.oc-purple { background: var(--purple-faint); border: 1px solid var(--purple-light); }
.onboard-card.oc-purple .oc-title { color: var(--purple-dark); }
.onboard-card.oc-purple .oc-sub   { color: var(--purple); }

/* ─── Carte vendeur trouvé (recherche destinataire) ─── */
.vendor-found-card {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--purple-faint); border: 1px solid var(--purple-light);
}
.vendor-found-card.certified {
  border: 2px solid #16A34A;
  box-shadow: 0 0 0 1px rgba(22,163,74,.12);
}
.certified-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #DCFCE7; color: #15803D; border-radius: 20px;
  padding: 2px 9px; font-size: 11px; font-weight: 700; margin-top: 3px;
}

/* ─── Filter Chips ─── */
.filter-chips-wrap {
  overflow-x: auto; padding: 10px 16px; background: white; display: flex; gap: 8px;
  scrollbar-width: none; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.filter-chips-wrap::-webkit-scrollbar { display: none; }
.chip-filter {
  flex-shrink: 0; padding: 6px 14px; border-radius: 100px; border: 1px solid var(--border);
  background: var(--light-gray); font-size: 12px;
  font-weight: 500; color: var(--gray); cursor: pointer; white-space: nowrap;
}
.chip-filter.active { background: var(--purple-faint); border-color: var(--purple); color: var(--purple); font-weight: 600; }

/* ─── Transaction List ─── */
.tx-list { flex: 1; overflow-y: auto; padding: 12px 16px; }
.tx-card { background: white; border-radius: 12px; border: 1px solid var(--border); padding: 14px; margin-bottom: 10px; cursor: pointer; }
.tx-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tx-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--purple-faint); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 20px; }
.tx-info { flex: 1; min-width: 0; }
.tx-product-name { font-size: 14px; font-weight: 600; color: var(--black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-ref { font-size: 11px; color: var(--gray); margin-top: 2px; }
.tx-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.tx-amount { font-size: 14px; font-weight: 700; color: var(--black); white-space: nowrap; }
.tx-card-bottom { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }

/* ─── Status Chips ─── */
.status-chip { padding: 3px 10px; border-radius: 100px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.chip-pending    { background: rgba(107,114,128,0.1); color: var(--gray); }
.chip-in_progress { background: rgba(245,158,11,0.1); color: var(--orange); }
.chip-delivered   { background: rgba(16,185,129,0.1); color: var(--green); }
.chip-seller_validated { background: rgba(123,47,190,0.1); color: var(--purple); }
.chip-driver_arrived   { background: rgba(123,47,190,0.1); color: var(--purple); }
.chip-cancelled        { background: rgba(239,68,68,0.1); color: var(--red); }
.chip-dispute          { background: rgba(239,68,68,0.1); color: var(--red); }
.chip-client_absent    { background: rgba(217,119,6,0.1); color: #D97706; }
.chip-product_refused  { background: rgba(239,68,68,0.1); color: var(--red); }

/* ─── Role Badge ─── */
.role-badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 100px; }
.role-buyer  { background: #EFF6FF; color: #3B82F6; }
.role-seller { background: var(--purple-faint); color: var(--purple); }

/* ─── Bottom Nav ─── */
.bottom-nav {
  background: white; border-top: 1px solid var(--border);
  padding: 6px 0; display: flex; flex-shrink: 0;
  padding-bottom: env(safe-area-inset-bottom, 6px);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 5px 0; background: none; border: none; cursor: pointer;
  color: var(--gray); font-size: 10px; font-weight: 500;
}
.nav-item.active { color: var(--purple); }
.nav-icon { font-size: 22px; }

/* ─── App Bar ─── */
.app-bar {
  background: white; border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.app-bar-back { background: none; border: none; cursor: pointer; color: var(--black); font-size: 22px; padding: 2px 0; line-height: 1; }
.app-bar-title { font-size: 16px; font-weight: 700; color: var(--black); flex: 1; }

/* ─── Buttons ─── */
.btn-primary {
  width: 100%; background: var(--purple); color: white; border: none;
  border-radius: 12px; padding: 16px;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn-primary:disabled { background: var(--border); color: var(--gray); cursor: not-allowed; }
.btn-primary.green  { background: var(--green); }
.btn-primary.orange { background: var(--orange); }
.btn-primary.red    { background: var(--red); }
.btn-outline-red {
  width: 100%; background: white; color: var(--red); border: 1.5px solid var(--red);
  border-radius: 12px; padding: 14px; font-size: 14px;
  font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-outline-purple {
  width: 100%; background: white; color: var(--purple); border: 1.5px solid var(--purple);
  border-radius: 12px; padding: 14px; font-size: 14px;
  font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-text      { background: none; border: none; color: var(--purple); font-size: 14px; font-weight: 500; cursor: pointer; padding: 8px 0; }
.btn-text-gray { background: none; border: none; color: var(--gray);   font-size: 14px; font-weight: 500; cursor: pointer; padding: 8px 0; }

/* ─── Inputs ─── */
.input-label { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; display: block; }
.input-field {
  width: 100%; background: var(--light-gray); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px;
  font-size: 16px; color: var(--black); outline: none;
}
.input-field:focus { border-color: var(--purple); background: white; }
.input-prefix-wrap { display: flex; align-items: stretch; }
.input-prefix {
  background: var(--light-gray); border: 1.5px solid var(--border); border-right: none;
  border-radius: 12px 0 0 12px; padding: 14px 12px; font-size: 14px; font-weight: 600;
  color: var(--black); white-space: nowrap; display: flex; align-items: center;
}
.input-prefix + .input-field { border-radius: 0 12px 12px 0; flex: 1; }
.input-suffix-wrap { position: relative; }
.input-suffix-wrap .input-field { padding-right: 48px; }
.input-suffix-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--gray); font-size: 16px; }
.select-field {
  width: 100%; background: var(--light-gray); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px; font-size: 14px;
  color: var(--black); outline: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
.select-field:focus { border-color: var(--purple); background-color: white; }
.textarea-field {
  width: 100%; background: var(--light-gray); border: 1.5px solid var(--border);
  border-radius: 12px; padding: 14px; font-size: 14px;
  color: var(--black); outline: none; resize: none; min-height: 90px;
}
.textarea-field:focus { border-color: var(--purple); background: white; }

/* ─── Auth ─── */
.auth-container {
  flex: 1;
  padding: 32px 24px;
  background: white; overflow-y: auto;
}
.auth-brand    { font-size: 28px; font-weight: 900; color: var(--purple); letter-spacing: -0.5px; margin-bottom: 20px; }
.auth-title    { font-size: 30px; font-weight: 800; color: var(--black); margin-bottom: 6px; }
.auth-subtitle { font-size: 14px; color: var(--gray); margin-bottom: 32px; }

/* ─── OTP ─── */
.otp-pins { display: flex; gap: 12px; justify-content: center; }
.otp-pin {
  width: 64px; height: 72px; background: var(--light-gray); border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 26px; font-weight: 800; text-align: center; color: var(--black); outline: none;
}
.otp-pin:focus { border-color: var(--purple); background: white; }

/* ─── Banners ─── */
.error-banner { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; padding: 12px; color: var(--red); font-size: 13px; }
.info-banner { border-radius: 12px; padding: 12px 14px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.info-banner.purple { background: var(--purple-faint); border: 1px solid rgba(168,85,247,0.3); color: var(--purple); }
.info-banner.orange { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.3); color: var(--orange); }
.info-banner.red    { background: rgba(239,68,68,0.08);  border: 1px solid rgba(239,68,68,0.3);  color: var(--red); }
.info-banner.green  { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.3); color: var(--green); }

/* ─── Cards ─── */
.card { background: white; border-radius: 14px; border: 1px solid var(--border); overflow: hidden; }
.card-row { display: flex; align-items: center; padding: 14px 16px; gap: 12px; }
.card-row + .card-row { border-top: 1px solid var(--border); }
.card-row-icon  { font-size: 18px; color: var(--purple); flex-shrink: 0; width: 20px; text-align: center; }
.card-row-label { font-size: 11px; color: var(--gray); margin-bottom: 2px; }
.card-row-value { font-size: 14px; font-weight: 600; color: var(--black); }
.section-title  { font-size: 13px; font-weight: 700; color: var(--gray); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 10px; }

/* ─── Timeline ─── */
.timeline { display: flex; flex-direction: column; }
.timeline-step { display: flex; gap: 12px; }
.timeline-step:not(:last-child) { padding-bottom: 16px; }
.timeline-dot-col { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 14px; }
.timeline-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--purple); flex-shrink: 0; }
.timeline-dot.pending { background: var(--border); }
.timeline-dot.done    { background: var(--green); }
.timeline-line { width: 2px; flex: 1; background: var(--border); margin: 2px auto; min-height: 16px; }
.timeline-line.done { background: var(--green); }
.timeline-text  { flex: 1; }
.timeline-label { font-size: 13px; font-weight: 600; color: var(--black); }
.timeline-label.pending { color: var(--gray); font-weight: 400; }
.timeline-time  { font-size: 11px; color: var(--gray); margin-top: 2px; }

/* ─── Seller Steps ─── */
.seller-steps { display: flex; gap: 6px; }
.seller-step-item { flex: 1; }
.seller-step-bar { height: 4px; border-radius: 2px; background: var(--border); margin-bottom: 4px; }
.seller-step-bar.done, .seller-step-bar.active { background: var(--purple); }
.seller-step-label { font-size: 10px; text-align: center; color: var(--gray); font-weight: 400; }
.seller-step-label.active { color: var(--purple); font-weight: 700; }

/* ─── Product Card (Tracking) ─── */
.product-card {
  background: var(--purple-faint); border: 1px solid rgba(168,85,247,0.3); border-radius: 12px;
  padding: 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.product-card-icon { width: 48px; height: 48px; background: var(--purple); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; color: white; }
.product-card-name   { font-size: 16px; font-weight: 700; color: var(--black); }
.product-card-amount { font-size: 14px; font-weight: 600; color: var(--purple); margin-top: 3px; }

/* ─── Financial Summary ─── */
.fin-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }
.fin-row-label { font-size: 13px; color: var(--gray); }
.fin-row-value { font-size: 13px; font-weight: 600; color: var(--black); }
.fin-row.bold .fin-row-label { color: var(--black); font-weight: 700; }
.fin-row.bold .fin-row-value { color: var(--purple); font-weight: 800; }

/* ─── Info Row (Tracking) ─── */
.info-row { display: flex; align-items: flex-start; gap: 8px; padding-bottom: 10px; font-size: 13px; }
.info-row-icon  { color: var(--gray); font-size: 16px; flex-shrink: 0; width: 16px; }
.info-row-label { color: var(--gray); }
.info-row-value { font-weight: 600; color: var(--black); }

/* ─── Bottom Sheet ─── */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: none; }
.overlay.open { display: block; }
.bottom-sheet {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: white; border-radius: 20px 20px 0 0;
  padding: 20px 24px; z-index: 201; max-height: 85vh; overflow-y: auto;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
.bottom-sheet-handle { width: 40px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 16px; }

/* ─── Page Content ─── */
.page-content { flex: 1; overflow-y: auto; padding: 20px 16px 32px; }

/* ─── Operator Buttons ─── */
.operator-group { display: flex; gap: 8px; }
.operator-btn {
  flex: 1; background: var(--light-gray); border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 6px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; min-height: 56px;
}
.operator-btn.active { background: white; border-color: var(--purple); border-width: 2px; box-shadow: 0 0 0 3px rgba(123,47,190,0.12); }
.op-logo { width: 100%; max-height: 36px; object-fit: contain; display: block; }
.op-emoji { font-size: 20px; }

/* ─── Cost Row ─── */
.cost-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 13px; }
.cost-row-label { color: var(--gray); }
.cost-row-value { color: var(--black); font-weight: 600; }
.cost-row.bold .cost-row-label { color: var(--black); font-weight: 700; }
.cost-row.bold .cost-row-value { color: var(--purple); font-weight: 800; }

/* ─── Support ─── */
.ticket-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; }
.ticket-subject { font-size: 14px; font-weight: 600; }
.ticket-preview { font-size: 12px; color: var(--gray); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-badge { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 11px; font-weight: 600; }
.badge-open   { background: var(--purple-faint); color: var(--purple); }
.badge-closed { background: var(--light-gray); color: var(--gray); }

/* ─── Chat ─── */
.chat-bubble { max-width: 75%; padding: 10px 14px; border-radius: 16px; font-size: 13px; line-height: 1.5; }
.chat-bubble.mine   { background: var(--purple); color: white; border-bottom-right-radius: 4px; align-self: flex-end; margin-left: auto; }
.chat-bubble.theirs { background: var(--light-gray); color: var(--black); border-bottom-left-radius: 4px; }
.chat-time { font-size: 10px; opacity: 0.65; margin-top: 4px; }

/* ─── Step Wizard ─── */
.step-title    { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; color: var(--black); margin-bottom: 4px; }
.step-subtitle { font-size: 13px; color: var(--gray); line-height: 1.4; }

/* ─── Livreur Chip ─── */
.livreur-chip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: white; cursor: pointer; }
.livreur-chip.selected { border-color: var(--purple); background: var(--purple-faint); }
.livreur-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--gray); flex-shrink: 0; }
.livreur-chip.selected .livreur-avatar { background: var(--purple); color: white; }
.livreur-name  { font-size: 13px; font-weight: 600; color: var(--black); }
.livreur-chip.selected .livreur-name { color: var(--purple); }
.livreur-phone-text { font-size: 11px; color: var(--gray); }

/* ─── Live indicator (timeline) ─── */
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--green);
  background: rgba(16,185,129,0.1); border-radius: 100px;
  padding: 2px 8px; margin-left: 8px; vertical-align: middle;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  display: inline-block;
  animation: livepulse 1.4s ease-in-out infinite;
}
@keyframes livepulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.65); }
}

/* ─── Spinner ─── */
.spinner { width: 20px; height: 20px; border: 2px solid rgba(123,47,190,0.2); border-top-color: var(--purple); border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
.spinner.white { border-color: rgba(255,255,255,0.3); border-top-color: white; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-center { display: flex; align-items: center; justify-content: center; padding: 60px 0; }

/* ─── Empty ─── */
.empty-state { text-align: center; padding: 60px 32px; color: var(--gray); }
.empty-state-icon  { font-size: 48px; margin-bottom: 16px; }
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--black); margin-bottom: 8px; }

/* ─── Toast ─── */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: rgba(13,13,13,0.9); color: white; padding: 10px 20px; border-radius: 8px;
  font-size: 13px; z-index: 500; opacity: 0; pointer-events: none; transition: opacity 0.25s;
  max-width: 340px; text-align: center;
}
.toast.show { opacity: 1; }

/* ─── Map ─── */
#leaflet-map { height: 220px; border-radius: 12px; }
#live-tracking-map { width: 100%; flex: 1; min-height: 300px; }

/* ─── Misc ─── */
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.mt-8  { margin-top: 8px;  } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px;  } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; } .text-center { text-align: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center  { display: flex; align-items: center; justify-content: center; }

/* ─── OTP top bar (back button row) ─── */
.safe-top-bar {
  padding: 12px 16px;
  background: white;
}

/* ─── Safe area : uniquement en mode PWA installée ─── */
@media (display-mode: standalone) {
  .purple-header { padding-top: calc(env(safe-area-inset-top, 0px) + 16px); }
  .app-bar       { padding-top: calc(env(safe-area-inset-top, 0px) + 12px); }
  .auth-container { padding-top: calc(env(safe-area-inset-top, 0px) + 32px); }
  .safe-top-bar  { padding-top: calc(env(safe-area-inset-top, 0px) + 12px); }
}