/* =============================================
   SoftFil  Design System 2026
   Modern iOS-inspired, borderless, airy
   ============================================= */

:root {
  --primary:        #ff6900;
  --primary-end:    #ff8a3d;
  --primary-rgb:    255,105,0;
  --primary-end-rgb: 255,138,61;
  --primary-gradient: linear-gradient(135deg, var(--primary), var(--primary-end));
  --primary-gradient-90: linear-gradient(90deg, var(--primary), var(--primary-end));
  --primary-dim:    rgba(var(--primary-rgb),.08);
  --primary-light:  rgba(var(--primary-rgb),.15);
  --primary-shadow: 0 4px 14px rgba(var(--primary-rgb),.25);
  --bg:       #f5f5f7;
  --surface:  #ffffff;
  --border:   rgba(0,0,0,.06);
  --divider:  rgba(0,0,0,.08);
  --text:     #1d1d1f;
  --text-2:   #86868b;
  --text-3:   #aeaeb2;
  --nav-h:    68px;
  --bottom-nav-space: calc(92px + env(safe-area-inset-bottom));
  --r:        20px;
  --r-sm:     14px;
  --r-xs:     10px;
  --r-pill:   999px;
  --shadow:     0 1px 8px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --shadow-lg:  0 8px 30px rgba(0,0,0,.08);
  --ease:       cubic-bezier(.4,0,.2,1);
  /* Semantic status colors */
  --success:    #34c759;
  --success-bg: rgba(52,199,89,.09);
  --danger:     #ff3b30;
  --danger-bg:  rgba(255,59,48,.08);
  --warning:    #ff9500;
  --warning-bg: rgba(255,149,0,.09);
  --info:       #007aff;
  --info-bg:    rgba(0,122,255,.08);
}

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

/* Prevent iOS zoom on focus for inputs with small font-size */
@supports (-webkit-touch-callout: none) {
  input, select, textarea { font-size: 16px !important; }
}

/* ── Page Navigation Progress Bar ── */
#npb {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--primary, #ff6900);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--primary, #ff6900);
  transition: width .18s ease, opacity .25s ease;
}
#npb.npb--on { opacity: 1; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

/* Page fade-in on load */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
#app {
  animation: pageFadeIn .28s var(--ease) both;
}

#app {
  min-height: 100%;
  padding-bottom: var(--bottom-nav-space);
}

.container {
  max-width: 600px;
  margin: 0 auto;
  /* add 10px extra padding per request */
  padding: 18px 30px 18px;
}

/* =============================================
   PAGE HEADER  iOS 2026 — frosted glass, fluid
   ============================================= */

.page-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(245,245,247,.72);
  -webkit-backdrop-filter: saturate(200%) blur(28px);
  backdrop-filter: saturate(200%) blur(28px);
  border-bottom: .5px solid transparent;
  transition: border-color .35s var(--ease),
              box-shadow .35s var(--ease),
              background .35s var(--ease);
}

.ph-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 10px 20px 0;
}

.ph-title-row {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: 52px;
}

.ph-left  { grid-column: 1; grid-row: 1; display:flex; align-items:center; justify-content:flex-start; z-index: 2; }
.ph-right { grid-column: 3; grid-row: 1; display:flex; align-items:center; justify-content:flex-end;   z-index: 2; }

/* --- header nav buttons — iOS 2026 borderless style --- */
.ph-left .btn,
.ph-right .btn {
  width: 38px; height: 38px;
  padding: 0;
  border-radius: 50%;
  font-weight: 600;
  border: none;
  transition: background .2s var(--ease), transform .12s, opacity .12s;
}

.btn-back {
  background: transparent;
  color: var(--primary);
  box-shadow: none;
  border: none;
}
.btn-back i { font-size: 18px; }
.btn-back:active { background: var(--primary-dim); }

.btn-add {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(var(--primary-rgb),.3);
  border: none;
}
.btn-add i { font-size: 15px; }
.btn-add:active { transform: scale(.92); }

.ph-title {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  text-align: center;
  max-width: calc(100% - 110px);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
  pointer-events: none;
}

/* filter row — CSS grid collapse trick */
.ph-filters-wrap {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .35s var(--ease),
              padding .35s var(--ease),
              opacity .25s var(--ease);
  padding-bottom: 10px;
}

.ph-filters-inner { overflow: hidden; min-height: 0; }

.ph-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 6px;
}

/* --- condensed state (scroll > 60px) --- */
.page-header.condensed {
  border-bottom-color: rgba(0,0,0,.08);
  box-shadow: 0 1px 12px rgba(0,0,0,.04);
  background: rgba(245,245,247,.92);
}

/* title stays 28px — no size reduction on scroll */

.page-header.condensed .ph-filters-wrap {
  grid-template-rows: 0fr;
  padding-bottom: 0;
  opacity: 0;
}

.page-header.condensed .ph-inner { padding-bottom: 4px; }

/* =============================================
   BUTTONS  unified system
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .12s, opacity .12s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.96); opacity: .85; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--primary-shadow);
}

.btn-ghost {
  background: var(--bg);
  color: var(--text-2);
  box-shadow: none;
  border: 1px solid var(--divider);
}

.btn.icon-btn {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--r-pill);
  font-size: 14px;
  color: var(--text-2);
  background: var(--surface);
  box-shadow: none;
  border: 1px solid rgba(0,0,0,.09);
}

/* Remove blue tap / focus highlight on touch devices for all buttons
   Keep focus-visible for keyboard users to preserve accessibility */
.btn, .btn * {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
.btn:focus { outline: none; }
.btn:focus:not(:focus-visible) { outline: none; }

/* orphaned .ph-add-btn removed — template uses .btn .btn-primary .btn-add */

/* =============================================
   SEARCH INPUT
   ============================================= */

.search-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrap::before {
  content: '\f002';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 14px;
  color: var(--text-3);
  font-size: 13px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.09);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  box-shadow: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.search-input::placeholder { color: var(--text-3); }

/* =============================================
   FILTER PILLS
   ============================================= */

.filter-pills {
  display: flex;
  gap: 8px;
  padding: 8px 0 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-pills::-webkit-scrollbar { display: none; }

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.09);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.filter-pill:active { transform: scale(.96); }
.filter-pill:hover {
  background: var(--primary-dim);
  border-color: rgba(var(--primary-rgb),.25);
  color: var(--primary);
}
.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.filter-pill i { font-size: 11px; }

/* =============================================
   PRODUCT LIST  iOS grouped style
   ============================================= */

.products-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 10;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  transition: background .12s;
  position: relative;
}

.product-row:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 0;
  height: .5px;
  background: var(--divider);
}

.product-row:active { background: rgba(0,0,0,.02); }

.product-row.low-stock { background: rgba(var(--primary-rgb),.03); }

.product-main { flex: 1; min-width: 0; }

.product-info strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-info .subtitle {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtitle-row { margin-top: 6px; }

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.stock-badge i { font-size: 9px; }

/* --- empty stock (rupture) pill --- */
.stock-empty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff3b30, #ff5c4d);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.stock-empty i { font-size: 10px; }

/* Price badge (visual, rounded) */
.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--primary);
  box-shadow: none;
}

/* Stock pill for normal stock */
.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--primary);
}

.stock-pill,
.stock-pill:link,
.stock-pill:visited {
  text-decoration: none;
}

.stock-pill:hover {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  text-decoration: none;
}

/* Offer pill — compact indicator on product list */
.offre-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(48,209,88,.1);
  color: #2e7d32;
  border: 1px solid rgba(48,209,88,.2);
  font-size: 11px;
  font-weight: 700;
}

/* Smaller inline variant used next to price on product rows */
.offre-pill--inline {
  font-size: 9px;
  padding: 2px 7px;
  gap: 3px;
  vertical-align: middle;
  margin-left: 6px;
}

.product-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* =============================================
   CARDS & LISTS (generic)
   ============================================= */

.card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* Form helpers (product form) */
.card--wide { max-width: 760px; margin: 18px auto; }
.card-header { display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid var(--divider); }
.card-title { margin:0; font-size:18px; font-weight:700; color:var(--text); }
/* slightly more breathing room inside cards for forms */
.card-body { padding:20px; }

/* Ensure header action buttons are pill-shaped like the +Ajouter header button */
.card-header .btn { border-radius: 999px; }

.form-row { margin-top:12px; }
.form-label { display:flex; flex-direction:column; gap:6px; }
.label-text { font-size:13px; color:var(--text-2); font-weight:600; }

/* Inputs within card-body get the app form look */
.card-body input, .card-body select, .card-body textarea { width:100%; padding:10px 12px; border-radius: var(--r-sm); border:1px solid var(--divider); background:var(--surface); font-size:16px; color:var(--text); }

.form-actions { display:flex; gap:8px; justify-content:center; margin-top:28px; }

/* make primary action slightly larger on mobile for easier tapping */
.form-actions .btn-primary { padding: 10px 26px; }

.list { list-style: none; padding: 0; margin: 0; }

/* =============================================
   BOTTOM NAVIGATION BAR  (user likes this  kept as-is)
   ============================================= */

.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1100;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
  padding: 0 16px calc(12px + env(safe-area-inset-bottom));
  /* Force permanent compositor layer — prevents iOS Safari from
     discarding the fixed element during heavy page loads */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Ensure Google Maps autocomplete dropdown appears above all overlays */
.pac-container { z-index: 2000 !important; }

.bottom-nav-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 460px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-radius: 999px;
  box-shadow: 0 4px 28px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.06);
  padding: 4px 6px;
  position: relative;
  transform: translateZ(0);
  isolation: isolate;
}

.bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  color: var(--text-3);
  text-decoration: none;
  border-radius: 999px;
  transition: color .22s var(--ease), transform .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.bottom-nav .nav-item:active { transform: scale(.86); }

.bottom-nav .icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 28px;
  border-radius: 14px;
  background: transparent;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.bottom-nav .icon-wrap i {
  font-size: 20px;
  transition: transform .25s var(--ease);
}
.bottom-nav .nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: font-weight .2s;
}

/* Active state — pill highlight on icon + color */
.bottom-nav .nav-item.active { color: var(--primary); }
.bottom-nav .nav-item.active .icon-wrap {
  background: rgba(var(--primary-rgb),.13);
  transform: translateY(-1px);
}
.bottom-nav .nav-item.active .icon-wrap i { transform: scale(1.12); }
.bottom-nav .nav-item.active .nav-label { font-weight: 700; }

/* Center home logo */
.bottom-nav .logo {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: transform .15s var(--ease);
}
.bottom-nav .logo:active { transform: scale(.88); }

.bottom-nav .logo .logo-wrap {
  width: 46px; height: 46px;
  border-radius: var(--r-sm);
  background: var(--primary-gradient);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--primary-shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.bottom-nav .logo.active .logo-wrap {
  box-shadow: 0 6px 20px rgba(var(--primary-rgb),.38);
  transform: scale(1.06);
}
.bottom-nav .logo .logo-wrap img { width: 24px; height: 24px; }

/* =============================================
   HOME DASHBOARD
   ============================================= */

.home { padding-top: 8px; }

/* ── hero greeting ── */
.home-hero {
  background: var(--primary-gradient);
  border-radius: var(--r);
  padding: 22px 20px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(var(--primary-rgb),.25);
}

.home-hero h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
}

.home-hero p {
  font-size: 14px;
  opacity: .85;
  margin: 0;
}

.home-hero-cta {
  flex-shrink: 0;
  background: #fff !important;
  color: var(--primary) !important;
  font-size: 13px !important;
  padding: 10px 16px !important;
  border-radius: var(--r-pill) !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* ── stat cards row ── */
.home-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.home-stat-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.home-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.home-stat-icon--orders  { background: rgba(var(--primary-rgb),.1);  color: var(--primary); }
.home-stat-icon--products { background: rgba(52,199,89,.1); color: #34c759; }
.home-stat-icon--clients { background: rgba(0,122,255,.1);  color: #007aff; }
.home-stat-icon--pending { background: rgba(255,59,48,.1);  color: #ff3b30; }

.home-stat-data { display: flex; flex-direction: column; }
.home-stat-value { font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; }
.home-stat-label { font-size: 12px; color: var(--text-2); margin-top: 2px; font-weight: 500; }

/* Salon KPIs block — 5 cards, compact values, last odd card spans full row */
.home-stats--salon .home-stat-value { font-size: 19px; }
.home-stats--salon .home-stat-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ── quick shortcuts ── */
.home-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.home-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  transition: transform .15s var(--ease), box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}

.home-shortcut:active { transform: scale(.95); }

.home-shortcut-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-dim);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ── alerts strip ── */
.home-alerts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.home-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: transform .12s;
  -webkit-tap-highlight-color: transparent;
}

.home-alert:active { transform: scale(.98); }

.home-alert i:first-child { font-size: 16px; flex-shrink: 0; }
.home-alert span { flex: 1; }
.home-alert i:last-child { font-size: 12px; opacity: .5; }

.home-alert--danger {
  background: rgba(255,59,48,.08);
  color: #ff3b30;
  border: 1px solid rgba(255,59,48,.15);
}

.home-alert--warn {
  background: rgba(255,149,0,.08);
  color: #ff9500;
  border: 1px solid rgba(255,149,0,.15);
}

/* ══════════════════════════════════════
   TOAST MESSAGES (Django messages framework)
   ══════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 76px); /* above bottom nav */
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 480px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  pointer-events: all;
  animation: toast-in .25s ease;
  cursor: pointer;
}
.toast--success {
  background: #1c1c1e;
  color: #fff;
  border-left: 4px solid #34c759;
}
.toast--error {
  background: #1c1c1e;
  color: #fff;
  border-left: 4px solid #ff3b30;
}
.toast--warning {
  background: #1c1c1e;
  color: #fff;
  border-left: 4px solid #ff9500;
}
.toast--info {
  background: #1c1c1e;
  color: #fff;
  border-left: 4px solid #007aff;
}
.toast-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast--success .toast-icon { color: #34c759; }
.toast--error   .toast-icon { color: #ff3b30; }
.toast--warning .toast-icon { color: #ff9500; }
.toast--info    .toast-icon { color: #007aff; }
.toast-text { flex: 1; }
.toast-close {
  font-size: 11px;
  opacity: .45;
  flex-shrink: 0;
  margin-top: 2px;
}
.toast--out {
  animation: toast-out .25s ease forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(8px); }
}

/* ── recent section ── */
.home-recent { margin-bottom: 20px; }

.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.home-section-head h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.home-section-head h2 i {
  color: var(--primary);
  margin-right: 6px;
}

.home-see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.home-see-all i { margin-left: 4px; font-size: 11px; }

/* =============================================
   WIZARD  multi-step order flow  iOS 2026
   ============================================= */

/* --- progress bar --- */
.wiz-progress {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 20px 24px 14px;
}

.wiz-step-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-3);
  flex-shrink: 0;
  transition: all .35s var(--ease);
  position: relative;
}

.wiz-step-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 12px rgba(var(--primary-rgb),.35);
  transform: scale(1.15);
}

.wiz-step-dot.done {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.wiz-step-line {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--divider);
  transition: background .35s var(--ease);
}

.wiz-step-line.done { background: var(--primary); }

/* --- panels --- */
.wiz-panels {
  position: relative;
  overflow: hidden;
}

.wiz-panel {
  display: none;
  animation: wizFadeIn .35s var(--ease);
  padding-bottom: 32px;
}

.wiz-panel.active { display: block; }

@keyframes wizFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- step titles --- */
.wiz-step-header {
  background: var(--primary-gradient);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 20px;
  color: #fff;
  box-shadow: 0 4px 18px rgba(var(--primary-rgb),.15);
}

.wiz-step-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: #fff;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
}

.wiz-step-title i { margin-right: 9px; font-size: 18px; }

.wiz-step-sub {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  margin: 0;
  padding-left: 0;
}

/* --- client picker --- */
.wiz-client-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.wiz-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow);
  transition: all .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.wiz-tab.active {
  background: var(--primary-dim);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.wiz-tab:active { transform: scale(.97); }

/* --- edit-mode client banner --- */
.wiz-current-client-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--primary-dim);
  border: 1.5px solid var(--primary);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.wiz-current-client-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.wiz-current-client-info strong { display: block; font-size: 15px; }

.wiz-client-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow);
  transition: all .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.wiz-client-card:not(:last-child) { margin-bottom: 10px; }

.wiz-client-card.selected {
  background: var(--primary-dim);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.wiz-client-card:active { transform: scale(.98); }

.wiz-client-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.wiz-client-info { flex: 1; min-width: 0; }
.wiz-client-info strong { display: block; font-size: 15px; }
.wiz-client-info .subtitle { font-size: 13px; color: var(--text-2); }

.wiz-client-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s var(--ease);
  color: transparent;
  font-size: 11px;
}

.wiz-client-card.selected .wiz-client-check {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* --- product picker (card style) --- */
.wiz-card-list { display: flex; flex-direction: column; gap: 10px; }

.wiz-product-row {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .2s var(--ease), border-left .2s;
  border-left: 4px solid transparent;
}

.wiz-product-row.has-qty {
  border-left-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.wiz-product-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 0;
}

.wiz-product-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 14px;
}

.wiz-product-info { flex: 1; min-width: 0; }
.wiz-product-info strong { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }

.wiz-product-pills {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* Ensure pills don't grow and keep layout stable when product title wraps */
.wiz-product-pills .stock-pill,
.wiz-product-pills .offre-pill,
.wiz-product-pills .price-badge {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px; /* prevent pills from pushing layout */
}

/* gift tag — inline below qty ctrl */
.wiz-qty-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.wiz-gift-tag {
  display: none;
  animation: wizFadeIn .25s var(--ease);
}
.wiz-gift-tag.visible { display: block; }
.wiz-gift-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-dim);
  border: 1px solid rgba(var(--primary-rgb),.15);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.wiz-gift-badge i { font-size: 9px; }

.wiz-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg);
  border-radius: var(--r-sm);
  border: 1.5px solid var(--divider);
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.has-qty .wiz-qty-ctrl {
  border-color: rgba(var(--primary-rgb),.25);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.06);
}

.wiz-qty-btn {
  width: 42px; height: 42px;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background .12s, transform .1s;
}

.wiz-qty-btn:active { background: var(--primary-dim); transform: scale(.92); }

.wiz-qty-val {
  width: 38px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  border: none;
  background: transparent;
  -moz-appearance: textfield;
  -webkit-appearance: none;
}

.wiz-qty-val::-webkit-inner-spin-button,
.wiz-qty-val::-webkit-outer-spin-button { -webkit-appearance: none; }

/* --- payment method cards --- */
.wiz-pay-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow);
  transition: all .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.wiz-pay-option:not(:last-child) { margin-bottom: 10px; }

.wiz-pay-option.selected {
  background: var(--primary-dim);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.wiz-pay-option:active { transform: scale(.98); }

.wiz-pay-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.wiz-pay-label {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
}

.wiz-pay-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s var(--ease);
  color: transparent;
  font-size: 11px;
}

.wiz-pay-option.selected .wiz-pay-check {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* --- recap (now uses .commande-receipt styles from detail page) --- */
/* (kept for backward compat but no longer primary) */
.wiz-recap-section {
  background: var(--surface);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.wiz-recap-section h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 10px;
}

.wiz-recap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 15px;
}

.wiz-recap-row:not(:last-child) {
  border-bottom: .5px solid var(--divider);
}

.wiz-recap-row .label { color: var(--text); font-weight: 500; }
.wiz-recap-row .value { color: var(--text-2); text-align: right; }

.wiz-recap-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--primary-gradient);
  border-radius: var(--r);
  margin-top: 12px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(var(--primary-rgb),.25);
}

.wiz-recap-total .label { font-size: 16px; font-weight: 600; }
.wiz-recap-total .value { font-size: 22px; font-weight: 800; }

/* --- success --- */
.wiz-success {
  text-align: center;
  padding: 40px 20px;
}

.wiz-success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34c759, #30d158);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 20px rgba(52,199,89,.3);
  animation: wizPop .5s var(--ease);
}

@keyframes wizPop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.wiz-success h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.wiz-success p { color: var(--text-2); font-size: 15px; margin-bottom: 24px; }

/* --- sticky control bar (top): progress + prev/next + total --- */
.wiz-control-bar {
  position: sticky;
  top: 68px; /* fallback — overridden by JS with actual header height */
  z-index: 150;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 0 8px;
  background: rgba(245,245,247,.82);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid rgba(0,0,0,.06);
  margin-bottom: 4px;
  max-width: 100%;
}

/* control bar is now a single flex row */
.wiz-control-bar .wiz-progress {
  flex: 1;
  padding: 0;
}

/* total block — between step header and product list */
.wiz-total-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  background: var(--surface);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.wiz-total-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.wiz-total-label i { color: var(--primary); font-size: 13px; }
.wiz-total-value {
  font-size: 22px;
  font-weight: 900;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.4px;
}

/* prev / next icon buttons */
.wiz-ctrl-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: transform .15s var(--ease), opacity .15s var(--ease);
}
.wiz-ctrl-btn:active { transform: scale(.9); }

.wiz-ctrl-btn--prev {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.wiz-ctrl-btn--next {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--primary-shadow);
  font-size: 15px;
}

/* --- unified bottom dock (fixed card) --- */
.wiz-dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 60px);
  max-width: 540px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px);
  z-index: 200;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: 0 -4px 24px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  overflow: hidden;
}

/* total section inside dock — merged into single row with nav */
.wiz-dock-total {
  display: none; /* total is now inline with nav */
}

/* nav section inside dock */
.wiz-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.wiz-nav .btn { flex: 1; justify-content: center; padding: 10px 12px; font-size: 14px; border-radius: var(--r-sm); }

/* inline total inside nav */
.wiz-nav-total {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-right: 4px;
  flex-shrink: 0;
}
.wiz-nav-total .label { font-size: 10px; font-weight: 600; color: var(--text-3); line-height: 1; }
.wiz-nav-total .value {
  font-size: 17px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

/* --- client search in wizard --- */
.wiz-search {
  position: relative;
  margin-bottom: 12px;
}

.wiz-search input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 38px;
  border-radius: var(--r-pill);
  border: 1px solid var(--divider);
  background: var(--surface);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
}

.wiz-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.wiz-search::before {
  content: '\f002';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 13px;
  pointer-events: none;
}

/* inline new client form toggle */
.wiz-new-client-form {
  background: var(--surface);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.wiz-new-client-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wiz-new-client-form .form-row { margin-top: 12px; }

.wiz-new-client-form input,
.wiz-new-client-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--divider);
  background: var(--bg);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.wiz-new-client-form input:focus,
.wiz-new-client-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* product search in wizard */
.wiz-product-search {
  position: relative;
  margin-bottom: 16px;
}

.wiz-product-search input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 42px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--divider);
  background: var(--surface);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
  transition: border-color .2s, box-shadow .2s;
}

.wiz-product-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light), 0 2px 8px rgba(0,0,0,.03);
}

.wiz-product-search::before {
  content: '\f002';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 13px;
  pointer-events: none;
}

/* legacy — kept for reference, replaced by .wiz-nav-total */

/* =============================================
   PRODUITS PAGE — action cards + gamme blocks
   ============================================= */

/* Action buttons row */
.produits-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.produits-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform .12s var(--ease), box-shadow .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.produits-action-card:active {
  transform: scale(.97);
  box-shadow: var(--shadow-lg);
}
.produits-action-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}
.produits-action-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.produits-action-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.produits-action-text span {
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Gamme block */
.gamme-block {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.gamme-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
}
.gamme-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}
.gamme-icon {
  color: var(--primary);
  font-size: 14px;
  flex-shrink: 0;
}
.gamme-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gamme-count {
  font-size: 11px;
  color: var(--text-2);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  flex-shrink: 0;
}
.gamme-header-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.gamme-header-actions .icon-btn {
  font-size: 12px;
}

/* Product rows inside gamme */
.gamme-products {
  padding: 0;
}
.gamme-product-row {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  gap: 12px;
  border-bottom: 1px solid var(--divider);
  transition: background .1s;
}
.gamme-product-row:last-child {
  border-bottom: none;
}
.gamme-product--warn {
  border-left: 4px solid var(--primary);
}
.gamme-product--danger {
  border-left: 4px solid #ff3b30;
}
.gamme-product-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.gamme-product-ref {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gamme-product-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}
.gamme-product-center {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.gamme-stock-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: .2px;
}
.gamme-stock-badge i {
  margin-right: 3px;
  font-size: 9px;
}
.gamme-stock--ok {
  background: #e8f5e9;
  color: #2e7d32;
}
.gamme-stock--warn {
  background: #fff3e0;
  color: #e65100;
}
.gamme-stock--danger {
  background: #ffebee;
  color: #c62828;
}
.gamme-stock-reserved {
  font-size: 10px;
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
}
.gamme-product-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.gamme-product-actions .icon-btn {
  font-size: 12px;
  width: 28px; height: 28px;
}
.gamme-empty {
  color: var(--text-2);
  text-align: center;
  padding: 16px;
  font-size: 13px;
  margin: 0;
}

/* Wizard gamme blocks */
.wiz-gamme-block {
  margin-bottom: 16px;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.05), 0 0 0 1px rgba(0,0,0,.03);
}
.wiz-gamme-block .gamme-header {
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.05) 0%, rgba(var(--primary-end-rgb),.02) 100%);
  border-radius: 0;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(var(--primary-rgb),.08);
}
.wiz-gamme-block .gamme-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--primary);
}
.wiz-gamme-block .gamme-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.2px;
}
.wiz-gamme-block .gamme-products {
  border-radius: 0;
  background: var(--surface);
}

/* Reset the old card-style wiz-product-row when inside gamme blocks */
.wiz-gamme-block .wiz-product-row {
  flex-direction: row;
  align-items: center;
  padding: 14px 18px;
  gap: 12px;
  border-radius: 0;
  box-shadow: none;
  border-left: 3px solid transparent;
  background: transparent;
  transition: all .2s var(--ease);
}
.wiz-gamme-block .wiz-product-row:last-child {
  border-bottom: none;
}
.wiz-gamme-block .wiz-product-row.has-qty {
  background: linear-gradient(90deg, rgba(var(--primary-rgb),.06) 0%, rgba(var(--primary-rgb),.015) 100%);
  border-left: 3px solid var(--primary);
}
.wiz-gamme-block .wiz-product-row .gamme-product-left {
  flex: 1 1 0;
  min-width: 0;
}
.wiz-gamme-block .wiz-product-row .gamme-product-center {
  flex: 0 0 auto;
}
.wiz-gamme-block .wiz-product-row .wiz-qty-wrap {
  flex: 0 0 auto;
}
.wiz-gamme-block .gamme-product-ref {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
}
.wiz-gamme-block .gamme-product-price {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Offer pill badges in gamme header ── */
.offre-pill--count {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary) !important;
}
.wiz-offer-remaining-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb),.12);
  color: var(--primary);
  letter-spacing: .2px;
  animation: wizFadeIn .25s var(--ease);
}

/* ── Gift controls (full-size selector style) ── */
.wiz-gift-inline {
  animation: wizFadeIn .25s var(--ease);
  margin-top: 6px;
}
.wiz-qty-ctrl--gift {
  border-color: var(--primary) !important;
  background: var(--primary-dim);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb),.10);
}
.wiz-gi-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  flex-shrink: 0;
  color: var(--primary);
  font-size: 13px;
  border-right: 1px solid rgba(var(--primary-rgb),.15);
}
.wiz-qty-ctrl--gift .wiz-qty-btn {
  color: var(--primary);
}
.wiz-qty-ctrl--gift .wiz-qty-btn:active {
  background: rgba(var(--primary-rgb),.15);
}
.wiz-gi-val {
  width: 38px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
}

/* Receipt gamme blocks (commande detail + recap) */
.receipt-gamme-block {
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(0,0,0,.04);
}
.receipt-gamme-block:last-child {
  margin-bottom: 0;
}
.receipt-gamme-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--divider);
  letter-spacing: -.1px;
}
.receipt-gamme-header i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--primary);
  flex-shrink: 0;
}
.receipt-gamme-header--manual i {
  background: var(--primary-dim);
  color: var(--primary);
}
.receipt-gamme-block .receipt-line {
  padding: 8px 0;
  font-size: 14px;
}

/* offered line — clean sub-line */
.receipt-line--offered {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 6px 0;
  margin: 0;
  border-bottom: none;
  font-size: 13px;
  color: var(--text-2);
  gap: 8px;
}
.receipt-line--offered:last-child { border-bottom: none; }
.receipt-line--offered + .receipt-line { border-top: none; }
.receipt-line--manual {
  background: transparent;
}
.receipt-offert-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  line-height: 1;
  letter-spacing: .2px;
}
.receipt-offert-badge i { font-size: 9px; }
.receipt-offert-badge--manual {
  color: var(--primary);
  background: var(--primary-dim);
  border: 1px solid rgba(var(--primary-rgb),.15);
}

/* =============================================
   ENTITY LIST — unified cards for products/clients
   ============================================= */

.entity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding-bottom: 0;
  contain: layout style;
}

.entity-card {
  display: block;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform .12s var(--ease), box-shadow .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.entity-card--link { cursor: pointer; }
.entity-card--link:active,
.entity-card:active { transform: scale(.98); box-shadow: var(--shadow-lg); }

/* subtle left accent for stock states */
.entity-card--warn  { border-left: 5px solid var(--primary); }
.entity-card--danger { border-left: 5px solid #ff3b30; }

.entity-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 0;
}

.entity-ref {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.client-detail-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  border: 3px solid rgba(255,255,255,.35);
}

.entity-card-body {
  padding: 10px 16px 0;
}

.entity-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entity-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.entity-pills {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.entity-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 14px;
}

.entity-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* danger status variant (for rupture) */
.order-status--danger {
  background: #ffebee;
  color: #c62828;
}

/* warning status variant (modified after payment) */
.order-status--warning {
  background: #fff3e0;
  color: #e65100;
}

/* retrieved status variant */
.order-status--retrieved {
  background: #e3f2fd;
  color: #1565c0;
}

/* =============================================
   COMMANDES LIST — order cards
   ============================================= */

.order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding-bottom: 0;
}

.order-card {
  display: block;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform .12s var(--ease), box-shadow .18s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.order-card:active {
  transform: scale(.98);
  box-shadow: var(--shadow-lg);
}

/* top row */
.order-card-top {
  padding: 10px 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-by {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  white-space: nowrap;
}

.order-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 14px 0;
}

.order-numero {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
}

.order-status--pending {
  background: #fff3e0;
  color: #e65100;
}

.order-status--done {
  background: #e8f5e9;
  color: #2e7d32;
}

.order-status--gratuite {
  background: var(--primary-dim);
  color: var(--primary);
}

/* body */
.order-card-body {
  padding: 8px 14px 0;
}

.order-client {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-client-info {
  flex: 1;
  min-width: 0;
}

.order-client-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
  letter-spacing: .3px;
}

.order-client-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.order-meta {
  font-size: 12px;
  color: var(--text-2);
}

/* footer row */
.order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px 10px;
}

.order-date {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.order-total {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.4px;
}

.order-total--gratuite {
  font-size: 13px;
  font-weight: 700;
}

/* =============================================
   COMMANDE DETAIL — receipt style
   ============================================= */

.commande-receipt {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 16px;
}

.receipt-header {
  background: var(--primary-gradient);
  padding: 32px 24px 28px;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.receipt-header::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}

.receipt-header::after {
  content: '';
  position: absolute;
  bottom: -30px; left: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}

.receipt-header-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 4px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.receipt-header-numero {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.4px;
}

.receipt-header .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.2);
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}
.receipt-header .status-badge--success { background: rgba(52,199,89,.25); }
.receipt-header .status-badge--danger  { background: rgba(255,59,48,.25); }
.receipt-header .status-badge--warning { background: rgba(255,204,0,.3); color: #fff; }
.receipt-header .status-badge--gratuite { background: rgba(var(--primary-rgb),.3); }
.receipt-header .status-badge--retrieved { background: rgba(33,150,243,.3); }

.receipt-header-meta {
  font-size: 11px;
  color: rgba(255,255,255,.7);
  margin-top: 2px;
}

/* Client card inside receipt */
.detail-client-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--r-sm);
  margin-bottom: 20px;
  border: 1px solid var(--divider);
}

.detail-client-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .5px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb),.18);
}

.detail-client-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.detail-client-info strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.detail-client-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.detail-client-contact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-dim);
  text-decoration: none;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}

.detail-client-contact:active {
  background: var(--primary-light);
}

.detail-client-contact i {
  font-size: 10px;
}

/* Payment chip row */
.detail-pay-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}

.detail-pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  background: var(--success-bg);
  color: var(--success);
  flex: 1;
  min-width: 0;
}

.detail-pay-chip i { font-size: 13px; }

.detail-pay-chip--due {
  background: var(--danger-bg);
  color: var(--danger);
}

.detail-pay-chip--over {
  background: var(--warning-bg);
  color: var(--warning);
}

/* Timeline card — payment history */
.detail-timeline-card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  margin-top: 16px;
  overflow: hidden;
}

.detail-timeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--divider);
}

.detail-timeline-header i {
  color: var(--primary);
  font-size: 14px;
}

.detail-timeline-body {
  padding: 8px 20px 16px;
  position: relative;
}

.detail-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  position: relative;
}

.detail-timeline-item:not(:last-child) {
  border-bottom: none;
}

.detail-timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 18px;
  top: 48px;
  bottom: 0;
  width: 2px;
  background: var(--divider);
}

.detail-timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--primary);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.detail-timeline-content {
  flex: 1;
  min-width: 0;
}

.detail-timeline-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.detail-timeline-amount--refund {
  color: #e53935;
}

.detail-timeline-dot--refund {
  background: #ffebee;
  color: #e53935;
}

.detail-timeline-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.detail-timeline-note {
  font-size: 12px;
  color: var(--text-2);
  font-style: italic;
  margin-top: 2px;
}

.receipt-body { padding: 24px 24px 20px; }

.receipt-section { margin-bottom: 24px; }
.receipt-section:last-child { margin-bottom: 0; }
.receipt-section h3 {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: .5px solid var(--divider);
  font-size: 14px;
  gap: 8px;
}

.receipt-line:last-child { border-bottom: none; }
.receipt-line > span:last-child { white-space: nowrap; flex-shrink: 0; }

/* receipt line helpers */
.receipt-line-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text);
}
.receipt-line-icon { color: var(--primary); font-size: 12px; }
.receipt-line-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.receipt-line-link:active { opacity: .7; }
.receipt-line-value {
  text-align: right;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

/* utility classes */
.receipt-price { font-weight: 600; }
.receipt-price--discount { font-weight: 600; color: #e53935; }
.receipt-price--zero { font-weight: 600; color: var(--text-3); }
.receipt-unit-price { font-size: 12px; color: var(--text-2); margin-left: 6px; }

/* empty state */
.empty-state-text {
  color: var(--text-2);
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
}

/* offre row */
.offre-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.offre-input {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  border: 1px solid var(--divider);
  font-size: 14px;
  text-align: center;
}
.offre-arrow {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
}
.offre-label {
  color: var(--text-2);
  font-size: 12px;
  white-space: nowrap;
}
.offre-remove {
  width: 32px;
  height: 32px;
  font-size: 13px;
  color: #ff3b30;
}

/* client orders section */
.client-orders-section {
  margin-top: 24px;
}

/* btn danger */
.btn-danger {
  background: #ff3b30;
  color: #fff;
  box-shadow: 0 4px 14px rgba(255,59,48,.25);
}

.btn-success {
  background: #34c759;
  color: #fff;
  box-shadow: 0 4px 14px rgba(52,199,89,.25);
}

.receipt-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: linear-gradient(100deg, rgba(var(--primary-rgb),.07) 0%, rgba(var(--primary-rgb),.02) 100%);
  border-radius: var(--r-sm);
  margin-top: 12px;
  border: 1.5px solid rgba(var(--primary-rgb),.18);
}

.receipt-total .label { font-size: 15px; font-weight: 600; color: var(--text-2); }
.receipt-total .value { font-size: 28px; font-weight: 900; color: var(--primary); letter-spacing: -.6px; }

.receipt-actions {
  padding: 0 24px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.receipt-actions .btn {
  justify-content: center;
  font-size: 15px;
  padding: 15px 20px;
  min-height: 52px;
  text-decoration: none;
}
.receipt-actions-row { display: flex; gap: 10px; width: 100%; }
.receipt-actions-row .btn,
.receipt-actions-row form { flex: 1; }
.receipt-actions-row form { display: flex; }
.receipt-actions-row form .btn { flex: 1; }
.receipt-actions-full { display: flex; width: 100%; }
.receipt-actions-full form { flex: 1; display: flex; }
.receipt-actions-full form .btn { flex: 1; padding: 14px; font-size: 15px; }

/* =============================================
   PROFILE PAGE
   ============================================= */

.profil-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--primary-gradient);
  border-radius: var(--r);
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb),.18);
}

.profil-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  border: 3px solid rgba(255,255,255,.35);
  flex-shrink: 0;
}

.profil-hero-info h1 {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 2px;
}

.profil-username,
.profil-email {
  color: rgba(255,255,255,.8);
  font-size: 13px;
  margin: 2px 0;
}

.profil-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* shortcuts */
.profil-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.profil-shortcut-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  transition: transform .15s, box-shadow .15s;
}
.profil-shortcut-card:active { transform: scale(.98); }

.profil-shortcut-card--admin {
  border: 1.5px solid rgba(255,59,48,.2);
}

.profil-shortcut-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.profil-shortcut-arrow {
  margin-left: auto;
  color: var(--text-3);
  font-size: 13px;
}

/* client list in profile */
.profil-client-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profil-client-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: var(--r);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: transform .15s;
}
.profil-client-card:active { transform: scale(.98); }

.profil-client-info {
  flex: 1;
  min-width: 0;
}
.profil-client-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.profil-client-meta {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profil-section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  padding-left: 2px;
}

/* =============================================
   AUTH PAGES (login / password)
   ============================================= */

.auth-body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff5ec 0%, #ffe0c2 50%, #ffd1a3 100%);
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
}

.auth-wrapper {
  width: 100%;
  max-width: 400px;
}

.auth-card {
  background: var(--card, #fff);
  border-radius: 20px;
  padding: 36px 28px 32px;
  box-shadow: 0 8px 40px rgba(var(--primary-rgb),.12), 0 2px 8px rgba(0,0,0,.04);
  width: 100%;
  max-width: 420px;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb),.2);
}
.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-logo-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: var(--primary-gradient, linear-gradient(135deg, #ff6900, #ff8c33));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb),.25);
}

.auth-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text, #1a1a2e);
  margin: 0 0 4px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-2, #8e8e93);
  margin: 0;
}

.auth-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff5f5;
  color: #ff3b30;
  border: 1px solid rgba(255,59,48,.15);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--divider);
  background: var(--surface);
  font-size: 15px;
  color: var(--text);
  box-sizing: border-box;
}

.auth-password-wrap {
  position: relative;
}
.auth-password-wrap input {
  width: 100%;
  padding-right: 44px;
  box-sizing: border-box;
}
.auth-toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-3, #c7c7cc);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}
.auth-toggle-pw:hover { color: var(--primary, #ff6900); }

.auth-submit {
  margin-top: 6px;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
}

.auth-footer {
  text-align: center;
  color: var(--text-3, #c7c7cc);
  font-size: 12px;
  margin-top: 20px;
}

.auth-success-icon {
  font-size: 56px;
  color: #34c759;
}

.field-error {
  display: block;
  color: #ff3b30;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}


/* =============================================
   SALON — Banners, cards & management
   ============================================= */

/* ── home page salon banner ── */
.home-salon {
  margin-bottom: 16px;
}

.salon-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border: 1.5px solid rgba(var(--primary-rgb),.12);
  position: relative;
  overflow: hidden;
}

.salon-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-gradient);
  border-radius: 4px 0 0 4px;
}

.salon-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-dim);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.salon-banner-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.salon-banner-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--primary);
}

.salon-banner-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.salon-banner-dates {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.salon-banner-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34c759;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(52,199,89,.4);
  animation: salonPulse 2s ease-in-out infinite;
}

@keyframes salonPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,199,89,.4); }
  50% { box-shadow: 0 0 0 6px rgba(52,199,89,0); }
}

/* ── profil page salon management ── */
.salon-current-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border: 1.5px solid rgba(52,199,89,.2);
  position: relative;
}

.salon-current-indicator {
  width: 4px;
  align-self: stretch;
  background: linear-gradient(180deg, #34c759, #30d158);
  border-radius: 4px;
  flex-shrink: 0;
}

.salon-current-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.salon-current-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #34c759;
}

.salon-current-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.salon-current-dates {
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.salon-current-icon {
  color: #34c759;
  font-size: 20px;
  flex-shrink: 0;
}

/* no-salon empty-state */
.salon-empty-state {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px dashed var(--divider);
  border-radius: var(--r);
  padding: 18px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 600;
}
.salon-empty-state i { font-size: 20px; }

/* switch salon card */
.salon-switch-card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 10px;
}

.salon-switch-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--divider);
}
.salon-switch-header i { color: var(--primary); font-size: 14px; }

.salon-switch-form {
  padding: 16px 18px 18px;
}

.salon-select-wrap {
  position: relative;
  margin-bottom: 10px;
}

.salon-select {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--divider);
  background: var(--bg);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.salon-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.1);
}

.salon-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 12px;
  pointer-events: none;
}

.salon-switch-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--r-xs);
  background: #fff8e6;
  color: #b8860b;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(184,134,11,.12);
}
.salon-switch-warning i { font-size: 13px; flex-shrink: 0; }

.salon-switch-actions {
  display: flex;
  gap: 8px;
}

.salon-switch-btn {
  flex: 1;
  padding: 12px !important;
  font-size: 14px !important;
  justify-content: center;
}

.salon-create-btn {
  flex-shrink: 0;
  padding: 12px 16px !important;
  font-size: 14px !important;
  white-space: nowrap;
  text-decoration: none;
}

/* ── order card salon tag ── */
.order-footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.order-salon-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-salon-tag i { font-size: 10px; }

/* ── receipt header salon badge ── */
.receipt-salon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.15);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-top: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.receipt-salon-badge i { font-size: 11px; opacity: .8; }

.receipt-salon-dates {
  font-size: 10px;
  opacity: .7;
  margin-left: 2px;
}

.receipt-cancel-motif {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(255,59,48,.2);
  font-size: 12px;
  color: #fff;
  margin-top: 6px;
  max-width: 90%;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.receipt-cancel-motif i { font-size: 11px; opacity: .8; flex-shrink: 0; margin-top: 1px; }

/* ── salon form page ── */
.salon-form-hero {
  text-align: center;
  padding: 24px 16px 8px;
}

.salon-form-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.14), rgba(var(--primary-rgb),.06));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb),.1);
}

.salon-form-hero-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}

.salon-form-hero-sub {
  font-size: 14px;
  color: var(--text-2);
  margin: 0;
}

/* activate checkbox */
.salon-form-activate {
  margin-top: 20px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--r-sm);
  border: 1px solid var(--divider);
}

.salon-activate-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.salon-activate-label input[type="checkbox"] {
  display: none;
}

.salon-activate-check {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--divider);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s var(--ease);
}

.salon-activate-check::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 12px;
  color: transparent;
  transition: color .2s;
}

.salon-activate-label input:checked ~ .salon-activate-check {
  background: var(--primary);
  border-color: var(--primary);
}

.salon-activate-label input:checked ~ .salon-activate-check::after {
  color: #fff;
}

.salon-activate-label input:disabled ~ .salon-activate-check {
  background: #e8f5e9;
  border-color: #34c759;
  opacity: .8;
}

.salon-activate-label input:disabled ~ .salon-activate-check::after {
  color: #34c759;
}

/* ── salon list (profil page) ── */
.salon-list-card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 10px;
}

.salon-list-body {
  display: flex;
  flex-direction: column;
}

.salon-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--divider);
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.salon-list-item:last-child { border-bottom: none; }
.salon-list-item:active { background: var(--bg); }

.salon-list-item--active {
  background: rgba(52,199,89,.04);
}

.salon-list-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.salon-list-item-name {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.salon-list-item-dates {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

.salon-list-item-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(52,199,89,.12);
  color: #2e7d32;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.salon-list-item-arrow {
  color: var(--text-3);
  font-size: 12px;
  flex-shrink: 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* ── Tablet (768px+) ── */
@media (min-width: 768px) {
  .container { max-width: 700px; padding: 24px 32px; }
  .ph-inner { max-width: 700px; }

  /* Home stats — 4 columns on tablet */
  .home-stats { grid-template-columns: repeat(4, 1fr); }
  /* Salon KPIs — last odd card centered (cols 2-3) on tablet */
  .home-stats--salon .home-stat-card:last-child:nth-child(odd) { grid-column: 2 / 4; }

  /* Order list — 2 columns on tablet */
  .order-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Client list — 2 columns */
  .entity-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Payment card fields side-by-side */
  .pay-methods { gap: 10px; }
  .pay-method { padding: 14px 10px; }

  /* Profil shortcuts 2 columns */
  .profil-shortcut-card { padding: 16px 18px; }
}

/* ── Large tablet / small desktop (1024px+) ── */
@media (min-width: 1024px) {
  .container { max-width: 800px; padding: 28px 40px; }
  .ph-inner { max-width: 800px; }

  /* Wider receipt */
  .commande-receipt { max-width: 700px; margin-left: auto; margin-right: auto; }
  .pay-card { max-width: 700px; margin-left: auto; margin-right: auto; }
  .detail-timeline-card { max-width: 700px; margin-left: auto; margin-right: auto; }
}

/* ── Small screens (≤520px) ── */
@media (max-width: 520px) {
  .home-hero { flex-direction: column; text-align: center; }
  .home-hero-cta { width: 100%; text-align: center; }
  .home-shortcuts { grid-template-columns: repeat(2, 1fr); }

  /* Salon banner — tighter on small screens */
  .salon-banner { padding: 14px 14px 14px 18px; gap: 12px; }
  .salon-banner-icon { width: 38px; height: 38px; font-size: 16px; border-radius: 10px; }
  .salon-banner-name { font-size: 15px; }

  /* Salon management — stack buttons */
  .salon-switch-actions { flex-direction: column; }
  .salon-switch-btn, .salon-create-btn { width: 100%; text-align: center; justify-content: center; }

  /* Produits action cards — stack vertically */
  .produits-actions { grid-template-columns: 1fr; gap: 10px; margin-bottom: 18px; }
  .produits-action-card { padding: 12px 14px; gap: 12px; }
  .produits-action-icon { width: 36px; height: 36px; font-size: 15px; border-radius: 10px; }
  .produits-action-text strong { font-size: 13px; }

  /* Gamme header — compact */
  .gamme-header { padding: 10px 12px; flex-wrap: wrap; gap: 6px; }
  .gamme-header-left { gap: 6px; }
  .gamme-title { font-size: 13px; }
  .gamme-count { font-size: 10px; padding: 2px 6px; }

  /* Product rows — stack vertically */
  .gamme-product-row {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 6px;
  }
  .gamme-product-left {
    flex: 1 1 auto;
    min-width: 0;
  }
  .gamme-product-center {
    flex: 0 0 auto;
    margin-left: auto;
  }
  .gamme-product-actions {
    flex: 0 0 auto;
  }
  .gamme-product-ref { font-size: 12px; }
  .gamme-product-price { font-size: 11px; }
  .gamme-stock-badge { font-size: 10px; padding: 2px 6px; }
  .gamme-stock-reserved { font-size: 9px; }

  /* Wizard product rows — compact */
  .wiz-gamme-block .wiz-product-row { padding: 10px 12px; gap: 8px; }
  .wiz-qty-ctrl { gap: 0; }
  .wiz-qty-btn { width: 36px; height: 36px; font-size: 16px; }
  .wiz-qty-val { width: 32px; font-size: 14px; }
  .wiz-gi-icon-wrap { width: 26px; font-size: 11px; }

  /* Receipt detail — compact on small screens */
  .receipt-header { padding: 24px 18px 22px; }
  .receipt-header-icon { width: 50px; height: 50px; font-size: 20px; }
  .receipt-header-numero { font-size: 19px; }
  .receipt-body { padding: 18px; }
  .detail-client-card { gap: 12px; padding: 14px; }
  .detail-client-avatar { width: 42px; height: 42px; font-size: 14px; }
  .detail-client-contacts { gap: 4px; }
  .detail-pay-chip { padding: 6px 12px; font-size: 12px; }
  .receipt-total { padding: 14px 16px; }
  .receipt-total .value { font-size: 22px; }
  .receipt-actions { padding: 0 18px 18px; }

  /* Order card — compact */
  .order-client-avatar { width: 28px; height: 28px; font-size: 10px; }
  .order-total { font-size: 15px; }
}

@media (max-width: 480px) {
  .ph-title { font-size: 24px; }
  .bottom-nav { padding: 0 12px calc(10px + env(safe-area-inset-bottom)); }
  .bottom-nav-inner { max-width: 100%; }
  .bottom-nav .nav-label { font-size: 9px; }
  .bottom-nav .icon-wrap i { font-size: 21px; }
  .bottom-nav .icon-wrap { width: 38px; height: 26px; }
  .bottom-nav .logo .logo-wrap { width: 42px; height: 42px; border-radius: var(--r-xs); }
  .bottom-nav .logo .logo-wrap img { width: 22px; height: 22px; }
  .product-info .subtitle { white-space: normal; }
  /* add 10px extra padding on small screens as well */
  .container { padding: 18px 26px 18px; }
  /* wizard control bar — compact dots on mobile */
  .wiz-step-dot { width: 26px; height: 26px; font-size: 11px; border-width: 2px; }
  .wiz-step-dot.active { transform: scale(1.1); }
  .wiz-step-line { height: 2px; }
  .wiz-ctrl-btn { width: 36px; height: 36px; font-size: 14px; }
  .wiz-top-total #wiz-live-total { font-size: 13px; }

  /* Produits — further compact on very small screens */
  .gamme-product-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 12px;
  }
  .gamme-product-left { flex-direction: row; gap: 8px; align-items: baseline; }
  .gamme-product-center { margin-left: 0; }
  .gamme-product-actions { align-self: flex-end; margin-top: -20px; }

  /* Wizard product rows — keep ref/price stacked (column), never side-by-side */
  .wiz-gamme-block .gamme-product-left { flex-direction: column; gap: 2px; align-items: flex-start; }
  .wiz-gamme-block .wiz-product-row { padding: 10px 10px; gap: 6px; }
  .wiz-qty-btn { width: 34px; height: 34px; font-size: 15px; }
  .wiz-qty-val { width: 30px; font-size: 13px; }
}


/* =============================================
   WIZARD — Remise & Manual Offers step
   ============================================= */

.wiz-section-block {
  background: var(--surface);
  border-radius: var(--r);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--divider);
}

/* Manual offer rows: highlight when has quantity */
.manual-offer-row.has-qty {
  background: rgba(var(--primary-rgb), .06);
  border-left: 3px solid var(--primary);
  border-radius: var(--r-sm);
  padding-left: 8px;
}

/* Type choice cards — step 0 */
.wiz-type-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
.wiz-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 20px 24px;
  background: var(--surface);
  border-radius: var(--r);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .15s var(--ease), background .2s var(--ease);
  box-shadow: var(--shadow);
}
.wiz-type-card:active { transform: scale(.97); }
.wiz-type-card.selected {
  border-color: var(--primary);
  background: linear-gradient(160deg, rgba(var(--primary-rgb),.05) 0%, rgba(255,255,255,1) 60%);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb),.12), var(--shadow-lg);
}
.wiz-type-icon {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.13), rgba(var(--primary-rgb),.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--primary);
  margin-bottom: 16px;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .15s;
}
.wiz-type-card.selected .wiz-type-icon {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: var(--primary-shadow);
  transform: scale(1.06);
}
.wiz-type-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 5px;
  color: var(--text);
}
.wiz-type-card p {
  font-size: 12.5px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.45;
}
@media (max-width: 480px) {
  .wiz-type-choice {
    grid-template-columns: 1fr;
  }
}

/* Question card — ask before showing remise/gratuité step */
.wiz-ask-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 28px;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: 0 2px 16px rgba(0,0,0,.05);
  animation: wizFadeIn .35s var(--ease);
  border: 1px solid rgba(0,0,0,.04);
}
.wiz-ask-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.12), rgba(var(--primary-rgb),.06));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb),.1);
}
.wiz-ask-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 24px;
}
.wiz-ask-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 280px;
}
.wiz-ask-actions .btn {
  justify-content: center;
  padding: 14px;
  font-size: 15px;
  border-radius: var(--r);
}

/* =============================================
   RECEIPT — Payment history & status enhancements
   ============================================= */

.receipt-actions-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.receipt-actions-full {
  width: 100%;
}

.receipt-actions-full .btn-primary {
  width: 100%;
}

/* =============================================
   PAYMENT CARD — commande detail payment form
   ============================================= */

.pay-card {
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  margin-top: 16px;
  overflow: hidden;
}

.pay-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--divider);
}

.pay-card-header i {
  color: var(--primary);
  font-size: 16px;
}

.pay-card form {
  padding: 16px 20px 20px;
}

.pay-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 8px;
}

.pay-methods {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.pay-method {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--divider);
  background: var(--bg);
  cursor: pointer;
  transition: all .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.pay-method:active { transform: scale(.97); }

.pay-method.selected {
  border-color: var(--primary);
  background: var(--primary-dim);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.08);
}

.pay-method-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--primary);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.pay-method-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

.pay-method-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: transparent;
  transition: all .2s var(--ease);
}

.pay-method.selected .pay-method-check {
  background: var(--primary);
  color: #fff;
}

.pay-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.pay-field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--divider);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  background: var(--bg);
  box-sizing: border-box;
}

.pay-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.1);
}

.pay-field input[type="text"] {
  font-weight: 400;
  font-size: 14px;
}

.pay-submit {
  width: 100%;
  padding: 14px !important;
  font-size: 15px !important;
}

/* Payment history items in receipt */
.pay-history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--divider);
}

.pay-history-item:last-child { border-bottom: none; }

.pay-history-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.pay-history-info { flex: 1; min-width: 0; }

.pay-history-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.pay-history-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.pay-history-note {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
  font-style: italic;
}

.pay-history-delete {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: 6px;
  font-size: 13px;
  border-radius: 6px;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}

.pay-history-delete:hover,
.pay-history-delete:active {
  color: #e53935;
  background: rgba(229,57,53,.08);
}

/* Payment summary lines */
.pay-summary {
  padding: 12px 0 0;
  border-top: 1px solid var(--divider);
  margin-top: 4px;
}

.pay-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 14px;
}

.pay-summary-line--total {
  font-weight: 700;
}

.pay-summary-line--due {
  font-weight: 700;
  color: #e53935;
}

.pay-summary-line--over {
  font-weight: 700;
  color: #2e7d32;
}

@media (max-width: 480px) {
  .pay-fields { grid-template-columns: 1fr; }
  .pay-methods { gap: 6px; }
  .pay-method { padding: 10px 6px; }
  .pay-method-icon { width: 30px; height: 30px; font-size: 14px; }
  .pay-method-name { font-size: 11px; }
}


/* =============================================
   INTL-TEL-INPUT — Integration overrides
   ============================================= */

.iti-wrap {
  width: 100%;
}

/* Make the iti container full-width */
.iti--fullwidth,
.iti {
  width: 100% !important;
  display: block !important;
}

.iti input,
.iti input[type="tel"] {
  width: 100% !important;
  padding: 10px 12px 10px 90px !important;
  border-radius: var(--r-sm, 8px);
  border: 1px solid var(--divider, #eee);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
}

.iti input:focus {
  outline: none;
  border-color: var(--primary, #ff6900);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}

.iti__selected-dial-code {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1a1a2e);
}

.iti__country-list {
  border-radius: var(--r-sm, 8px);
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  max-height: 200px;
  font-size: 14px;
  z-index: 100;
}

.iti__country {
  padding: 8px 12px;
}

.iti__country--highlight {
  background: rgba(var(--primary-rgb), .08);
}
