/* =============================================================
   CHIRIKI — Design System
   Vanilla CSS · no build step · mobile-first app shell
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --brand-50:  #E7FBF4;
  --brand-100: #C8F5E6;
  --brand-200: #95ECD1;
  --brand-300: #5CDDB8;
  --brand-400: #28C99D;
  --brand-500: #0FB489;
  --brand-600: #0C9B76;
  --brand-700: #0A7C60;
  --brand-800: #0A6450;
  --brand-900: #094E40;

  --brand: var(--brand-500);
  --grad-brand: linear-gradient(135deg, #13C08C 0%, #0AA6AE 100%);
  --grad-brand-soft: linear-gradient(135deg, #E9FBF4 0%, #E5F7FA 100%);
  --grad-hero: radial-gradient(1200px 600px at 80% -10%, rgba(13,166,174,.18), transparent 60%),
               radial-gradient(900px 500px at -10% 10%, rgba(19,192,140,.16), transparent 55%);
  --grad-dark: linear-gradient(165deg, #0C1322 0%, #0E1A2B 100%);

  /* Accents */
  --violet: #7C5CFC;   /* CHIRIKIMAX premium */
  --violet-soft: #EFEBFF;
  --amber: #F59E0B;    /* Express */
  --amber-soft: #FEF3DC;
  --sky: #2F8BFF;
  --sky-soft: #E5F0FF;

  /* Neutrals */
  --ink: #0C1322;
  --ink-2: #1B2435;
  --slate-900: #0F172A;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50:  #F8FAFC;

  --muted: #6B7787;
  --line: #E8ECF2;
  --line-2: #EEF1F6;
  --bg: #F5F7FB;
  --card: #FFFFFF;

  /* Semantic */
  --success: #0FB489;
  --success-soft: #E7FBF4;
  --warning: #F59E0B;
  --warning-soft: #FEF3DC;
  --danger: #EF4444;
  --danger-soft: #FDE8E8;
  --info: #2F8BFF;
  --info-soft: #E5F0FF;

  /* Radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadow */
  --sh-xs: 0 1px 2px rgba(16,24,40,.06);
  --sh-sm: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --sh-md: 0 6px 16px -6px rgba(16,24,40,.12), 0 4px 8px -4px rgba(16,24,40,.06);
  --sh-lg: 0 18px 40px -12px rgba(16,24,40,.18), 0 8px 16px -8px rgba(16,24,40,.08);
  --sh-brand: 0 12px 28px -8px rgba(15,180,137,.45);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);

  --container: 1160px;
  --sidebar-w: 264px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 { font-family: var(--font-display); margin: 0; line-height: 1.15; color: var(--ink); letter-spacing: -.02em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-200); color: var(--ink); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--slate-400); background-clip: content-box; }

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-content: center; gap: 22px;
  background: var(--grad-dark);
  transition: opacity .5s var(--ease), visibility .5s;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash__logo { display: flex; align-items: center; gap: 12px; color: #fff; }
.splash .brandmark { width: 52px; height: 52px; color: var(--brand-400); animation: floaty 2.4s var(--ease) infinite; }
.splash .brandmark__type { font-family: var(--font-display); font-weight: 800; font-size: 30px; letter-spacing: -.04em; }
.splash__bar { width: 180px; height: 4px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.splash__bar span { display: block; height: 100%; width: 40%; border-radius: 99px; background: var(--brand-400); animation: load 1.1s var(--ease) infinite; }
@keyframes load { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---------- Brandmark ---------- */
.brandmark { display: inline-flex; align-items: center; gap: 10px; }
.brandmark svg { width: 1em; height: 1em; }
.brandlogo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.brandlogo .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad-brand); color: #fff; display: grid; place-content: center; box-shadow: var(--sh-brand); }
.brandlogo .mark svg { width: 20px; height: 20px; }
.brandlogo .name { font-size: 21px; }
.brandlogo .name b { color: var(--brand-600); }
.brandlogo--light { color: #fff; }

/* =============================================================
   Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 11px 18px; border-radius: var(--r-sm);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s;
  white-space: nowrap; user-select: none; line-height: 1.2;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: var(--sh-brand); }
.btn--primary:hover { box-shadow: 0 16px 34px -8px rgba(15,180,137,.55); transform: translateY(-1px); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; transform: translateY(-1px); }
.btn--ghost { background: var(--slate-100); color: var(--ink); }
.btn--ghost:hover { background: var(--slate-200); }
.btn--outline { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--outline:hover { box-shadow: inset 0 0 0 1.5px var(--slate-300); background: var(--slate-50); }
.btn--white { background: #fff; color: var(--brand-700); box-shadow: var(--sh-md); }
.btn--white:hover { transform: translateY(-1px); box-shadow: var(--sh-lg); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #DC2626; }
.btn--violet { background: var(--violet); color: #fff; box-shadow: 0 12px 28px -8px rgba(124,92,252,.45); }
.btn--link { padding: 0; background: none; color: var(--brand-600); font-weight: 600; }
.btn--link:hover { color: var(--brand-700); text-decoration: underline; }
.btn--lg { padding: 14px 24px; font-size: 16px; border-radius: var(--r-md); }
.btn--sm { padding: 8px 13px; font-size: 13.5px; border-radius: 10px; }
.btn--icon { padding: 10px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* =============================================================
   Forms
   ============================================================= */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .label { font-size: 13.5px; font-weight: 600; color: var(--slate-700); font-family: var(--font-display); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s; font-size: 15px;
}
.input::placeholder, .textarea::placeholder { color: var(--slate-400); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 4px var(--brand-50); }
.textarea { resize: vertical; min-height: 96px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .ig-icon { position: absolute; left: 13px; color: var(--slate-400); display: grid; place-content: center; pointer-events: none; }
.input-group .ig-icon svg { width: 18px; height: 18px; }
.input-group .input { padding-left: 42px; }
.input-group .suffix { position: absolute; right: 14px; color: var(--muted); font-size: 14px; font-weight: 600; }

/* selectable cards (radio) */
.choice-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.choice {
  position: relative; display: flex; gap: 13px; align-items: center; min-width: 0;
  padding: 15px 46px 15px 16px; border-radius: var(--r-md); border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; transition: all .15s var(--ease);
}
.choice:hover { border-color: var(--brand-300); background: var(--brand-50); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .choice__ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-content: center; background: var(--slate-100); color: var(--slate-600); }
.choice .choice__ico svg { width: 22px; height: 22px; }
.choice .choice__body { flex: 1; min-width: 0; }
.choice .choice__title { font-weight: 700; font-family: var(--font-display); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.choice .choice__desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.choice .choice__meta { margin-left: auto; text-align: right; font-weight: 700; font-family: var(--font-display); color: var(--ink); white-space: nowrap; }
.choice .choice__check { position: absolute; top: 50%; transform: translateY(-50%); right: 14px; width: 20px; height: 20px; border-radius: 99px; border: 2px solid var(--slate-300); display: grid; place-content: center; transition: all .15s; }
.choice .choice__check svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.choice input:checked ~ .choice__check { background: var(--brand-500); border-color: var(--brand-500); }
.choice input:checked ~ .choice__check svg { opacity: 1; }
.choice:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-50); }
.choice:has(input:checked) .choice__ico { background: var(--brand-500); color: #fff; }
.choice--violet:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); box-shadow: 0 0 0 3px var(--violet-soft); }
.choice--violet:has(input:checked) .choice__ico { background: var(--violet); }
.choice--violet:has(input:checked) .choice__check { background: var(--violet); border-color: var(--violet); }

/* toggle */
.toggle { position: relative; display: inline-flex; width: 46px; height: 27px; flex: none; }
.toggle input { position: absolute; opacity: 0; }
.toggle .track { position: absolute; inset: 0; background: var(--slate-300); border-radius: 99px; transition: background .2s; }
.toggle .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; background: #fff; border-radius: 99px; transition: transform .2s var(--ease); box-shadow: var(--sh-sm); }
.toggle input:checked + .track { background: var(--brand-500); }
.toggle input:checked + .track::after { transform: translateX(19px); }

/* photo capture slots */
.photo-slot { display: block; cursor: pointer; }
.photo-slot__inner { border: 1.5px dashed var(--slate-300); border-radius: 14px; height: 132px; display: grid; place-content: center; overflow: hidden; background: var(--slate-50); transition: border-color .15s; }
.photo-slot:hover .photo-slot__inner { border-color: var(--brand-400); background: var(--brand-50); }
.photo-slot__inner img { width: 100%; height: 100%; object-fit: cover; }
.photo-ph { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--slate-500); font-size: 13px; font-weight: 600; }
.photo-ph svg { width: 26px; height: 26px; }
.photo-grid img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }

/* =============================================================
   Badges & pills
   ============================================================= */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--r-pill); font-family: var(--font-display);
  background: var(--slate-100); color: var(--slate-600); white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge .dot { width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.badge--success { background: var(--success-soft); color: var(--brand-700); }
.badge--warning { background: var(--warning-soft); color: #B45309; }
.badge--danger  { background: var(--danger-soft); color: #B91C1C; }
.badge--info    { background: var(--info-soft); color: #1D4ED8; }
.badge--violet  { background: var(--violet-soft); color: #5B3FD6; }
.badge--neutral { background: var(--slate-100); color: var(--slate-600); }
.badge--ink     { background: var(--ink); color: #fff; }
.badge--outline { background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--slate-600); }

.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: var(--slate-100); color: var(--slate-600); }

/* =============================================================
   Cards
   ============================================================= */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh-sm); border: 1px solid var(--line-2); }
.card--pad { padding: 22px; }
.card--hover { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card__title { font-size: 16px; font-weight: 700; font-family: var(--font-display); }
.card__sub { font-size: 13px; color: var(--muted); }

/* =============================================================
   Utilities
   ============================================================= */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 22px; }
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.center { display: flex; align-items: center; justify-content: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-12 { gap: 12px; } .gap-14 { gap: 14px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 13.5px; }
.text-xs { font-size: 12px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.notif-row { padding: 12px; border-radius: 12px; transition: background .15s; }
.notif-row:hover { background: var(--slate-50); }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; } .fw-800 { font-weight: 800; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.hide { display: none !important; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.grid { display: grid; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; color: var(--brand-600); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--brand-500); }

/* =============================================================
   LANDING
   ============================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(14px); background: rgba(255,255,255,.78);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: var(--sh-xs); }
.site-header .inner { height: 70px; display: flex; align-items: center; gap: 24px; }
.site-nav { display: flex; align-items: center; gap: 28px; margin-left: 8px; }
.site-nav a { font-size: 15px; font-weight: 500; color: var(--slate-600); transition: color .15s; }
.site-nav a:hover { color: var(--ink); }
.site-header .actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.burger { display: none; }

.hero { position: relative; background: var(--grad-hero); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(var(--slate-200) 1px, transparent 1px); background-size: 22px 22px; opacity: .35; -webkit-mask-image: radial-gradient(700px 400px at 50% 0, #000, transparent 75%); mask-image: radial-gradient(700px 400px at 50% 0, #000, transparent 75%); }
.hero .inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; padding: 70px 22px 80px; }
.hero h1 { font-size: clamp(38px, 5.2vw, 60px); font-weight: 800; line-height: 1.04; }
.hero h1 .grad { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 18.5px; color: var(--slate-600); margin-top: 20px; max-width: 540px; }
.hero .cta-row { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero .trust { display: flex; align-items: center; gap: 22px; margin-top: 34px; flex-wrap: wrap; }
.hero .trust .stars { color: var(--amber); display: flex; gap: 2px; }
.hero .trust .stars svg { width: 16px; height: 16px; fill: currentColor; }
.hero .avatars { display: flex; }
.hero .avatars span { width: 34px; height: 34px; border-radius: 99px; border: 2.5px solid #fff; margin-left: -10px; display: grid; place-content: center; font-size: 12px; font-weight: 700; color: #fff; font-family: var(--font-display); }
.hero .avatars span:first-child { margin-left: 0; }

.pill-banner { display: inline-flex; align-items: center; gap: 9px; padding: 7px 8px 7px 14px; border-radius: 99px; background: #fff; box-shadow: var(--sh-sm); font-size: 13.5px; font-weight: 600; color: var(--slate-600); margin-bottom: 22px; }
.pill-banner .new { background: var(--brand-50); color: var(--brand-700); padding: 3px 9px; border-radius: 99px; font-size: 12px; }

/* Hero visual: phone mock */
.phone {
  position: relative; width: 300px; margin: 0 auto; aspect-ratio: 300 / 610;
  background: #0C1322; border-radius: 42px; padding: 10px;
  box-shadow: 0 40px 80px -20px rgba(12,19,34,.5), 0 0 0 2px rgba(255,255,255,.06) inset;
}
.phone__screen { position: relative; width: 100%; height: 100%; background: var(--bg); border-radius: 33px; overflow: hidden; }
.phone__notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 120px; height: 26px; background: #0C1322; border-radius: 0 0 16px 16px; z-index: 3; }
.phone__bar { padding: 30px 18px 12px; background: var(--grad-brand); color: #fff; }
.phone__bar .h { font-family: var(--font-display); font-weight: 800; font-size: 19px; }
.phone__bar .s { font-size: 12.5px; opacity: .9; }
.phone__body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.float-card { position: absolute; background: #fff; border-radius: 16px; box-shadow: var(--sh-lg); padding: 12px 14px; display: flex; align-items: center; gap: 11px; animation: floaty 4s var(--ease) infinite; }
.float-card .fc-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-content: center; color: #fff; flex: none; }
.float-card .fc-ico svg { width: 20px; height: 20px; }
.float-card .t { font-size: 13px; font-weight: 700; font-family: var(--font-display); }
.float-card .s { font-size: 11.5px; color: var(--muted); }
.fc-1 { top: 30px; left: -36px; animation-delay: 0s; }
.fc-2 { bottom: 90px; right: -44px; animation-delay: 1.2s; }

.logos { padding: 30px 0 6px; }
.logos .lbl { text-align: center; font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-400); margin-bottom: 18px; }
.logos .strip { display: flex; align-items: center; justify-content: center; gap: 44px; flex-wrap: wrap; opacity: .65; }
.logos .strip span { font-family: var(--font-display); font-weight: 800; font-size: 19px; color: var(--slate-500); letter-spacing: -.02em; }

.section { padding: 84px 0; }
.section--tint { background: linear-gradient(180deg, #fff 0%, var(--slate-50) 100%); }
.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; }
.section-head p { font-size: 17.5px; color: var(--slate-600); margin-top: 14px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.step { position: relative; padding: 26px 22px; background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line-2); box-shadow: var(--sh-sm); }
.step .num { position: absolute; top: 22px; right: 22px; font-family: var(--font-display); font-weight: 800; font-size: 42px; color: var(--slate-100); line-height: 1; }
.step .ico { width: 50px; height: 50px; border-radius: 14px; background: var(--grad-brand-soft); color: var(--brand-600); display: grid; place-content: center; margin-bottom: 16px; }
.step .ico svg { width: 26px; height: 26px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--slate-600); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { padding: 26px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line-2); box-shadow: var(--sh-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.feature .ico { width: 48px; height: 48px; border-radius: 13px; display: grid; place-content: center; margin-bottom: 16px; color: #fff; }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 17px; margin-bottom: 7px; }
.feature p { font-size: 14.5px; color: var(--slate-600); }

.persona-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.persona { position: relative; overflow: hidden; padding: 30px; border-radius: var(--r-xl); color: #fff; min-height: 280px; display: flex; flex-direction: column; box-shadow: var(--sh-lg); transition: transform .2s var(--ease); }
.persona:hover { transform: translateY(-4px); }
.persona::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; border-radius: 99px; background: rgba(255,255,255,.12); }
.persona .p-ico { width: 54px; height: 54px; border-radius: 15px; background: rgba(255,255,255,.18); display: grid; place-content: center; margin-bottom: 18px; backdrop-filter: blur(4px); }
.persona .p-ico svg { width: 28px; height: 28px; }
.persona h3 { color: #fff; font-size: 22px; }
.persona p { font-size: 14.5px; opacity: .92; margin-top: 10px; flex: 1; position: relative; z-index: 1; }
.persona ul { display: flex; flex-direction: column; gap: 7px; margin: 16px 0 20px; position: relative; z-index: 1; }
.persona ul li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; opacity: .95; }
.persona ul li svg { width: 16px; height: 16px; flex: none; }
.persona .btn { position: relative; z-index: 1; margin-top: auto; }
.persona--sender { background: linear-gradient(155deg, #13C08C, #0A9C8C); }
.persona--carrier { background: linear-gradient(155deg, #2F6BFF, #1E3A8A); }
.persona--admin { background: linear-gradient(155deg, #303A4D, #0C1322); }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; padding: 30px 26px; border-radius: var(--r-xl); background: #fff; border: 1.5px solid var(--line); box-shadow: var(--sh-sm); }
.price-card.feat { border-color: var(--brand-400); box-shadow: var(--sh-lg); position: relative; }
.price-card.feat::before { content: 'Le plus choisi'; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--grad-brand); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 99px; font-family: var(--font-display); box-shadow: var(--sh-brand); }
.price-card .pc-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.price-card .pc-price { font-family: var(--font-display); font-weight: 800; font-size: 40px; margin: 12px 0 4px; letter-spacing: -.03em; }
.price-card .pc-price small { font-size: 16px; color: var(--muted); font-weight: 600; }
.price-card .pc-desc { font-size: 14px; color: var(--muted); min-height: 42px; }
.price-card ul { display: flex; flex-direction: column; gap: 11px; margin: 22px 0; flex: 1; }
.price-card ul li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--slate-700); }
.price-card ul li svg { width: 18px; height: 18px; color: var(--brand-500); flex: none; margin-top: 1px; }

.cta-band { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 56px; background: var(--grad-dark); color: #fff; text-align: center; }
.cta-band::before { content: ''; position: absolute; inset: 0; background: var(--grad-hero); opacity: .6; }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; font-size: clamp(28px, 3.4vw, 38px); }
.cta-band p { color: rgba(255,255,255,.82); font-size: 17px; margin: 14px auto 0; max-width: 540px; }

.site-footer { background: var(--ink); color: var(--slate-400); padding: 60px 0 30px; }
.site-footer .grid-foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-footer h5 { color: #fff; font-size: 14px; margin-bottom: 16px; letter-spacing: .02em; }
.site-footer a { display: block; font-size: 14px; padding: 5px 0; color: var(--slate-400); transition: color .15s; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 13px; flex-wrap: wrap; gap: 12px; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-strip .s { text-align: center; }
.stat-strip .s b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 38px; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.03em; }
.stat-strip .s span { font-size: 14px; color: var(--slate-600); }

/* =============================================================
   AUTH / role select
   ============================================================= */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside { position: relative; overflow: hidden; background: var(--grad-dark); color: #fff; padding: 54px; display: flex; flex-direction: column; }
.auth-aside::before { content: ''; position: absolute; inset: 0; background: var(--grad-hero); opacity: .7; }
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside .quote { margin-top: auto; }
.auth-aside .quote p { font-family: var(--font-display); font-size: 24px; font-weight: 600; line-height: 1.4; }
.auth-aside .feat-list { display: flex; flex-direction: column; gap: 16px; margin-top: 40px; }
.auth-aside .feat-list .it { display: flex; gap: 14px; align-items: flex-start; }
.auth-aside .feat-list .it .ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.12); display: grid; place-content: center; flex: none; }
.auth-aside .feat-list .it .ic svg { width: 22px; height: 22px; }
.auth-aside .feat-list .it b { display: block; font-family: var(--font-display); font-size: 15px; }
.auth-aside .feat-list .it span { font-size: 13.5px; opacity: .82; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 54px; max-width: 560px; margin: 0 auto; width: 100%; }
.auth-main h1 { font-size: 30px; }
.role-cards { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.role-card { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--r-md); border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: all .15s var(--ease); text-align: left; }
.role-card:hover { border-color: var(--brand-400); box-shadow: var(--sh-md); transform: translateY(-2px); }
.role-card .rc-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-content: center; color: #fff; flex: none; }
.role-card .rc-ico svg { width: 26px; height: 26px; }
.role-card .rc-body { flex: 1; }
.role-card .rc-body b { font-family: var(--font-display); font-size: 16.5px; display: block; }
.role-card .rc-body span { font-size: 13.5px; color: var(--muted); }
.role-card .rc-arrow { color: var(--slate-300); transition: transform .15s, color .15s; }
.role-card:hover .rc-arrow { color: var(--brand-500); transform: translateX(3px); }

/* =============================================================
   APP SHELL (authenticated)
   ============================================================= */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; background: var(--bg); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--grad-dark); color: #fff; padding: 20px 16px; display: flex; flex-direction: column; gap: 6px; }
.sidebar .brandlogo { color: #fff; padding: 6px 8px 18px; }
.sidebar .brandlogo .name { color: #fff; }
.sidebar .nav-group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.4); font-weight: 700; padding: 16px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px; color: rgba(255,255,255,.72); font-weight: 500; font-size: 14.5px; transition: all .15s var(--ease); cursor: pointer; position: relative; }
.nav-item svg { width: 20px; height: 20px; flex: none; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.12); color: #fff; }
.nav-item.active::before { content: ''; position: absolute; left: -16px; top: 50%; transform: translateY(-50%); width: 4px; height: 22px; background: var(--brand-400); border-radius: 0 4px 4px 0; }
.nav-item .count { margin-left: auto; background: var(--brand-500); color: #fff; font-size: 11.5px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-content: center; }
.sidebar .side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.side-user { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 12px; transition: background .15s; }
.side-user:hover { background: rgba(255,255,255,.06); }
.side-user .su-body { flex: 1; min-width: 0; }
.side-user .su-body b { font-size: 13.5px; font-family: var(--font-display); display: block; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .su-body span { font-size: 12px; color: rgba(255,255,255,.55); }

.app-main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; height: 68px; background: rgba(245,247,251,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 26px; }
.topbar .page-title { font-family: var(--font-display); font-weight: 800; font-size: 21px; }
.topbar .page-sub { font-size: 13px; color: var(--muted); }
.topbar .tb-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tb-search { position: relative; display: flex; align-items: center; }
.tb-search svg { position: absolute; left: 12px; width: 17px; height: 17px; color: var(--slate-400); }
.tb-search input { padding: 9px 14px 9px 36px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: #fff; width: 230px; font-size: 14px; }
.tb-search input:focus { outline: none; border-color: var(--brand-300); box-shadow: 0 0 0 4px var(--brand-50); }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 11px; background: #fff; border: 1.5px solid var(--line); display: grid; place-content: center; color: var(--slate-600); transition: all .15s; }
.icon-btn:hover { border-color: var(--slate-300); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .ping { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; background: var(--danger); border-radius: 99px; border: 2px solid #fff; }

.tb-user { display: flex; align-items: center; gap: 9px; padding: 4px 13px 4px 4px; border: 1.5px solid var(--line); border-radius: var(--r-pill); background: #fff; transition: border-color .15s, box-shadow .15s; }
.tb-user:hover { border-color: var(--slate-300); box-shadow: var(--sh-xs); }
.tb-user-name { font-size: 13.5px; font-weight: 600; font-family: var(--font-display); color: var(--ink); }
@media (max-width: 860px) { .tb-user-name { display: none; } .tb-user { padding: 4px; } }

.role-switch { display: flex; align-items: center; gap: 4px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 3px; }
.role-switch button { font-size: 12.5px; font-weight: 600; font-family: var(--font-display); padding: 6px 12px; border-radius: 99px; color: var(--slate-500); display: flex; align-items: center; gap: 6px; transition: all .15s; }
.role-switch button svg { width: 14px; height: 14px; }
.role-switch button.active { background: var(--ink); color: #fff; }

.page { padding: 26px; max-width: 1200px; width: 100%; margin: 0 auto; }
/* Never let a long unbreakable string (email, pasted text…) blow out a narrow layout. */
.page, .auth-main, .modal, .toast { overflow-wrap: break-word; }
.page--narrow { max-width: 820px; }

/* avatar */
.avatar { border-radius: 99px; display: grid; place-content: center; font-family: var(--font-display); font-weight: 700; color: #fff; flex: none; }
.avatar--sm { width: 32px; height: 32px; font-size: 12.5px; }
.avatar--md { width: 40px; height: 40px; font-size: 14px; }
.avatar--lg { width: 52px; height: 52px; font-size: 18px; }

/* =============================================================
   Dashboard widgets
   ============================================================= */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: #fff; border-radius: var(--r-lg); padding: 20px; border: 1px solid var(--line-2); box-shadow: var(--sh-sm); }
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; }
/* Cadran cliquable (drill-down) : curseur, survol, état sélectionné. */
.kpi--btn { cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s; }
.kpi--btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(15,23,42,.10); border-color: var(--brand-300); }
.kpi--btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-100); }
.kpi--btn.active { border-color: var(--brand-500); box-shadow: 0 0 0 2px var(--brand-500); }
/* Flèche d'affordance (drill-down) en haut à droite d'un cadran cliquable. */
.kpi-go { color: var(--slate-400); display: inline-flex; transition: color .15s; }
.kpi-go svg { width: 18px; height: 18px; }
.kpi--btn:hover .kpi-go, .stat-link:hover .kpi-go { color: var(--brand-500); }
/* Carte-stat cliquable hors .kpi (ex. Relais/Lockers sur la Vue d'ensemble). */
.stat-link { cursor: pointer; }
.stat-link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-100); }
/* Colonne mise en avant par un drill-down financier. */
.tbl .tx-hl { background: var(--brand-50); }
.tbl thead th.tx-hl { color: var(--brand-700); }
/* Légende de période sous une grille de cadrans (ex. « Évolution sur les 30 derniers jours »). */
.trend-legend { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.trend-legend svg { width: 15px; height: 15px; color: var(--slate-400); flex: none; }
/* icon chip — self-contained so it renders correctly anywhere, not only inside .kpi.
   Inline width/height/background/border-radius on individual usages still override these. */
.kpi-ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-content: center; color: #fff; }
.kpi-ico svg { width: 21px; height: 21px; }
.kpi-ico.center svg { width: 30px; height: 30px; }
.kpi .kpi-val { font-family: var(--font-display); font-weight: 800; font-size: 30px; margin-top: 14px; letter-spacing: -.02em; }
.kpi .kpi-lbl { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.kpi .kpi-trend { font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 99px; }
.kpi .kpi-trend svg { width: 13px; height: 13px; }
.kpi .kpi-trend.up { background: var(--success-soft); color: var(--brand-700); }
.kpi .kpi-trend.down { background: var(--danger-soft); color: #B91C1C; }

/* minmax(0,…) lets tracks shrink below content size so children with their own
   horizontal scroll (e.g. .rec-rail) scroll instead of stretching the page. */
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 20px; }

/* shipment card */
.ship-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--sh-sm); transition: transform .15s var(--ease), box-shadow .15s; cursor: pointer; }
.ship-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--line); }
.ship-card .sc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ship-card .sc-code { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.ship-card .sc-meta { font-size: 12.5px; color: var(--muted); }

/* route line */
.route { display: flex; align-items: stretch; gap: 12px; }
.route .rl-track { display: flex; flex-direction: column; align-items: center; padding-top: 5px; }
.route .rl-track .pt { width: 11px; height: 11px; border-radius: 99px; border: 2.5px solid var(--brand-500); background: #fff; flex: none; }
.route .rl-track .pt.end { border-color: var(--ink); }
.route .rl-track .line { width: 2px; flex: 1; background: repeating-linear-gradient(var(--slate-300) 0 4px, transparent 4px 8px); margin: 3px 0; min-height: 16px; }
.route .rl-body { display: flex; flex-direction: column; gap: 14px; flex: 1; min-width: 0; }
.route .rl-body .stop b { font-family: var(--font-display); font-size: 14.5px; display: block; }
.route .rl-body .stop span { font-size: 12.5px; color: var(--muted); }

/* progress tracker (vertical timeline) */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 14px; }
.tl-item .tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-item .tl-dot { width: 30px; height: 30px; border-radius: 99px; display: grid; place-content: center; background: var(--slate-100); color: var(--slate-400); flex: none; border: 2px solid var(--slate-200); transition: all .2s; }
.tl-item .tl-dot svg { width: 15px; height: 15px; }
.tl-item .tl-line { width: 2px; flex: 1; background: var(--slate-200); min-height: 22px; }
.tl-item .tl-body { padding-bottom: 22px; }
.tl-item .tl-body b { font-family: var(--font-display); font-size: 14.5px; display: block; }
.tl-item .tl-body span { font-size: 12.5px; color: var(--muted); }
.tl-item.done .tl-dot { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.tl-item.done .tl-line { background: var(--brand-400); }
.tl-item.current .tl-dot { background: #fff; color: var(--brand-600); border-color: var(--brand-500); box-shadow: 0 0 0 4px var(--brand-50); animation: pulse 1.8s infinite; }
.tl-item.current .tl-body b { color: var(--brand-700); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px var(--brand-50); } 50% { box-shadow: 0 0 0 7px var(--brand-50); } }

/* stepper (wizard) */
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 30px; }
.stepper .st { display: flex; align-items: center; gap: 10px; flex: 1; }
.stepper .st:last-child { flex: none; }
.stepper .st .bub { width: 34px; height: 34px; border-radius: 99px; display: grid; place-content: center; background: #fff; border: 2px solid var(--line); color: var(--slate-400); font-weight: 700; font-family: var(--font-display); font-size: 14px; flex: none; transition: all .2s; }
.stepper .st .bub svg { width: 16px; height: 16px; }
.stepper .st .lbl { font-size: 13px; font-weight: 600; color: var(--slate-400); font-family: var(--font-display); white-space: nowrap; }
.stepper .st .bar { flex: 1; height: 2px; background: var(--line); border-radius: 99px; }
.stepper .st.done .bub { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.stepper .st.active .bub { border-color: var(--brand-500); color: var(--brand-600); box-shadow: 0 0 0 4px var(--brand-50); }
.stepper .st.active .lbl, .stepper .st.done .lbl { color: var(--ink); }
.stepper .st.done .bar { background: var(--brand-400); }

/* tables */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; font-family: var(--font-display); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--slate-500); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr { transition: background .12s; cursor: pointer; }
table.tbl tbody tr:hover { background: var(--slate-50); }
table.tbl tbody tr:last-child td { border-bottom: none; }
.cell-strong { font-weight: 700; font-family: var(--font-display); }
.cell-sub { font-size: 12.5px; color: var(--muted); }

/* segmented control / tabs */
.segmented { display: inline-flex; background: var(--slate-100); border-radius: var(--r-pill); padding: 4px; gap: 2px; }
.segmented button { font-size: 13.5px; font-weight: 600; font-family: var(--font-display); padding: 8px 16px; border-radius: 99px; color: var(--slate-500); transition: all .15s; white-space: nowrap; }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: var(--sh-sm); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs button { padding: 12px 16px; font-size: 14.5px; font-weight: 600; font-family: var(--font-display); color: var(--slate-500); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .15s; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--brand-700); border-color: var(--brand-500); }

/* QR */
.qr { display: inline-block; padding: 16px; background: #fff; border-radius: var(--r-md); box-shadow: var(--sh-md); }
.qr svg { display: block; }
.qr-ticket { background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-md); border: 1px solid var(--line-2); }
.qr-ticket .qt-top { background: var(--grad-brand); padding: 20px; color: #fff; text-align: center; }
.qr-ticket .qt-body { padding: 24px; text-align: center; position: relative; }
.qr-ticket .qt-body::before, .qr-ticket .qt-body::after { content: ''; position: absolute; top: -11px; width: 22px; height: 22px; border-radius: 99px; background: var(--bg); }
.qr-ticket .qt-body::before { left: -11px; } .qr-ticket .qt-body::after { right: -11px; }

/* map (stylized SVG route) */
.map-card { position: relative; border-radius: var(--r-md); overflow: hidden; background: linear-gradient(160deg, #EAF6F2, #E6F0F7); border: 1px solid var(--line-2); }
.map-card svg { display: block; width: 100%; height: auto; }

/* empty state */
.empty { text-align: center; padding: 50px 24px; }
.empty .em-ico { width: 72px; height: 72px; border-radius: 50%; background: var(--slate-100); display: grid; place-content: center; margin: 0 auto 18px; color: var(--slate-400); }
.empty .em-ico svg { width: 34px; height: 34px; }
.empty h3 { font-size: 18px; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 360px; margin: 0 auto 18px; }

/* mini bar chart */
.barchart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; }
.barchart .bc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.barchart .bc .bar { width: 100%; max-width: 38px; border-radius: 7px 7px 3px 3px; background: var(--grad-brand); transition: height .6s var(--ease); position: relative; }
.barchart .bc .bar:hover { filter: brightness(1.06); }
.barchart .bc .lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* donut */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut-wrap .legend { flex: 1 1 160px; min-width: 0; }
.donut { position: relative; width: 140px; height: 140px; flex: none; }
.donut .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .center b { font-family: var(--font-display); font-weight: 800; font-size: 26px; }
.donut .center span { font-size: 11.5px; color: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 10px; }
.legend .lg { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.legend .lg .sw { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.legend .lg .v { margin-left: auto; font-weight: 700; font-family: var(--font-display); }

/* wallet card */
.wallet-card { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 24px; background: var(--grad-dark); color: #fff; box-shadow: var(--sh-lg); }
.wallet-card::after { content: ''; position: absolute; right: -50px; top: -50px; width: 200px; height: 200px; border-radius: 99px; background: var(--grad-hero); }
.wallet-card .wc-lbl { font-size: 13px; opacity: .75; position: relative; }
.wallet-card .wc-bal { font-family: var(--font-display); font-weight: 800; font-size: 38px; margin-top: 6px; position: relative; }

/* messages */
.msg-thread { display: flex; flex-direction: column; gap: 10px; padding: 6px; }
.msg { max-width: 75%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; }
.msg .meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.msg.them { background: var(--slate-100); border-bottom-left-radius: 5px; align-self: flex-start; }
.msg.me { background: var(--brand-500); color: #fff; border-bottom-right-radius: 5px; align-self: flex-end; }
.msg.me .meta { color: rgba(255,255,255,.75); }

/* =============================================================
   Toast & Modal
   ============================================================= */
.toast-host { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 9000; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; padding: 13px 18px; border-radius: var(--r-pill); box-shadow: var(--sh-lg); font-size: 14px; font-weight: 500; pointer-events: auto; animation: toastIn .35s var(--ease); }
.toast .t-ico { width: 22px; height: 22px; border-radius: 99px; display: grid; place-content: center; flex: none; }
.toast .t-ico svg { width: 14px; height: 14px; }
.toast.success .t-ico { background: var(--brand-500); }
.toast.error .t-ico { background: var(--danger); }
.toast.info .t-ico { background: var(--sky); }
.toast.leaving { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.96); } }

.modal-host { position: fixed; inset: 0; z-index: 8000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-host.open { display: flex; }
.modal-host .backdrop { position: absolute; inset: 0; background: rgba(12,19,34,.5); backdrop-filter: blur(3px); animation: fade .25s; }
.modal { position: relative; background: #fff; border-radius: var(--r-xl); width: 100%; max-width: 480px; box-shadow: var(--sh-lg); animation: modalIn .3s var(--ease); max-height: 90vh; overflow: auto; }
.modal--lg { max-width: 640px; }
.modal__head { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-2); }
.modal__head h3 { font-size: 18px; }
.modal__body { padding: 24px; }
.modal__foot { padding: 18px 24px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line-2); }
@keyframes fade { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.97); } }

/* view transition */
.view-enter { animation: viewIn .35s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

/* bottom nav (mobile app) */
.bottom-nav { display: none; }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 980px) {
  .hero .inner { grid-template-columns: 1fr; gap: 36px; text-align: center; padding-top: 44px; }
  .hero .lead { margin-inline: auto; }
  .hero .cta-row, .hero .trust { justify-content: center; }
  .hero-visual { display: none; }
  .steps, .feature-grid, .persona-grid, .pricing-grid, .stat-strip, .site-footer .grid-foot { grid-template-columns: 1fr 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}
/* Sidebar is still shown here but the content column is narrow — relax the dense app grids
   so 4‑col KPIs / 3‑col card grids never overflow on small laptops & large tablets. */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-header .actions .btn--ghost { display: none; }
  .burger { display: grid; place-content: center; width: 42px; height: 42px; border-radius: 11px; border: 1.5px solid var(--line); background: #fff; }
  .burger svg { width: 20px; height: 20px; }

  /* App becomes mobile */
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  /* Full-width tablet: collapse the asymmetric splits and tighten 3-col grids so cards never cramp. */
  .grid-2-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .app-main { padding-bottom: 78px; }
  .topbar { padding: 0 16px; height: 60px; }
  .topbar .tb-search, .role-switch .rs-label { display: none; }
  .role-switch button span { display: none; }
  .role-switch button { padding: 7px; }
  .page { padding: 16px; }

  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom-nav .bn-item { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--slate-400); padding: 4px 6px; border-radius: 10px; transition: color .15s; flex: 1 1 0; min-width: 0; text-align: center; line-height: 1.1; }
  .bottom-nav .bn-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .bottom-nav .bn-item svg { width: 22px; height: 22px; flex: none; }
  .bottom-nav .bn-item.active { color: var(--brand-600); }
  .bottom-nav .bn-item .fab { width: 50px; height: 50px; margin-top: -22px; border-radius: 99px; background: var(--grad-brand); color: #fff; display: grid; place-content: center; box-shadow: var(--sh-brand); }
  .bottom-nav .bn-item .fab svg { width: 26px; height: 26px; }
}
@media (max-width: 620px) {
  .steps, .feature-grid, .persona-grid, .pricing-grid, .grid-2, .grid-3, .grid-2-1, .grid-1-2, .stat-strip { grid-template-columns: minmax(0, 1fr); }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi .kpi-val { font-size: 25px; }
  .section { padding: 56px 0; }
  .cta-band { padding: 38px 24px; }
  .auth-main { padding: 32px 22px; }
  .modal { max-width: 100%; }
  .stepper .st .lbl { display: none; }
  .site-footer .grid-foot { grid-template-columns: 1fr 1fr; }
}

/* =============================================================
   Responsive tables (cards) + scrollable controls — mobile
   ============================================================= */
@media (max-width: 760px) {
  /* Segmented filters become horizontally scrollable instead of overflowing */
  .segmented { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented button { white-space: nowrap; }

  /* Tables turn into stacked cards (label above value) */
  .table-wrap { overflow: visible; }
  table.tbl { display: block; }
  table.tbl thead { display: none; }
  table.tbl tbody { display: block; }
  table.tbl tr { display: block; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; box-shadow: var(--sh-xs); }
  table.tbl tbody tr:hover { background: #fff; }
  table.tbl td { display: block; border: none; padding: 7px 0; text-align: left; white-space: normal; }
  table.tbl td:not(:last-child) { border-bottom: 1px solid var(--line-2); }
  table.tbl td::before { content: attr(data-label); display: block; font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--slate-500); margin-bottom: 3px; }
  table.tbl td[data-label=""]::before, table.tbl td:not([data-label])::before { display: none; }
  table.tbl td .row { justify-content: flex-start; }

  /* A touch more breathing room on phones */
  .card--pad { padding: 18px; }
  .kpi { padding: 16px; }
  .topbar .page-title { font-size: 18px; }
  h1 { font-size: 22px; }
  .hide-mobile { display: none !important; }
}

@media (max-width: 400px) {
  .kpi .kpi-val { font-size: 22px; }
  .page { padding: 14px; }
}

/* =============================================================
   Recommandations (v3) — match ring, rails, hero
   ============================================================= */
.match-ring { position: relative; display: inline-grid; place-content: center; flex: none; }
.match-ring svg { display: block; }
.match-ring .mr-val { position: absolute; inset: 0; display: grid; place-content: center; font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: -.02em; }
.match-ring .mr-val small { font-size: 8px; font-weight: 700; opacity: .8; }

.rec-hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 24px 26px; background: var(--grad-dark); color: #fff; box-shadow: var(--sh-lg); }
.rec-hero::before { content: ''; position: absolute; inset: 0; background: var(--grad-hero); opacity: .75; }
.rec-hero > * { position: relative; z-index: 1; }
.rec-hero .rh-stats { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 16px; }
.rec-hero .rh-stats .s b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; }
.rec-hero .rh-stats .s span { font-size: 13px; opacity: .82; }

/* Trip section header */
.trip-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; flex-wrap: wrap; }
.trip-head .th-route { font-family: var(--font-display); font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.trip-head .th-meta { font-size: 13px; color: var(--muted); }

/* Horizontal rail of recommendation cards */
.rec-rail { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.rec-rail::-webkit-scrollbar { height: 8px; }
.rec-rail::-webkit-scrollbar-thumb { background: var(--slate-200); border-radius: 99px; }
.rec-card { flex: 0 0 304px; scroll-snap-align: start; }
@media (max-width: 560px) { .rec-card { flex-basis: 86%; } }
.rec-card .rec-top { display: flex; align-items: center; gap: 12px; }
.rec-card .rec-earn { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--brand-600); letter-spacing: -.02em; }

/* =============================================================
   3.3 — Compléments
   ============================================================= */
/* La carte d'envoi est désormais un <div role="link"> navigable au clavier. */
.ship-card:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-100), var(--sh-md); }
[data-mission]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-100), var(--sh-md); }
/* Le bouton « Plus » de la barre d'onglets mobile (élément <button> neutre). */
.bottom-nav button.bn-item { background: none; border: none; font: inherit; cursor: pointer; position: relative; }
.bn-item .bn-dot { position: absolute; top: 2px; right: 22%; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px #fff; }
