/* =====================================================================
   Crypto Trade — bibliothèque de composants (components.css)
   ---------------------------------------------------------------------
   CSS pur, mobile-first, n'utilise QUE les variables de tokens.css.
   Convention : bloc `.composant`, élément `.composant__partie`,
   variante `.composant--variante`, état `.is-etat` / attributs ARIA.
   Chaque composant est documenté dans docs/design/DESIGN-GUIDE.md.
   ===================================================================== */

/* ---------------------------------------------------------------------
   0. Reset minimal
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-variant-numeric: lining-nums tabular-nums; /* règle n° 1 des chiffres : partout */
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
h1 { font-size: var(--text-lg); }
h2 { font-size: var(--text-md); }
h3 { font-size: var(--text-base); }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--color-link); text-underline-offset: 2px; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
::selection { background: var(--color-primary-soft); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------------------------------------------------------------------
   1. Utilitaires (volontairement peu nombreux)
   --------------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: lining-nums tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 0.8125rem; }
.text-secondary { color: var(--color-text-secondary); }
.text-small { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-center { text-align: center; }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack--sm { gap: var(--space-2); }
.stack--lg { gap: var(--space-6); }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.cluster--between { justify-content: space-between; }
.divider { height: 1px; background: var(--color-border); border: 0; margin: 0; }
.hero-amount {
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-hero);
  line-height: 1.1; letter-spacing: -0.02em; overflow-wrap: anywhere;
}
.hero-amount small { font-size: 0.5em; font-weight: 600; color: var(--color-text-secondary); margin-left: 0.15em; }
.screen-title { font-size: var(--text-lg); }
.section-title { font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); }

/* ---------------------------------------------------------------------
   2. Coquilles de mise en page
   --------------------------------------------------------------------- */
/* App client : colonne de 480 px max, centrée sur desktop, barre d'onglets en bas. */
.app-shell {
  position: relative; margin: 0 auto; max-width: var(--app-max-width); min-height: 100dvh;
  background: var(--color-bg); display: flex; flex-direction: column;
}
@media (min-width: 520px) { .app-shell { border-inline: 1px solid var(--color-border); } }
.app-shell__main {
  flex: 1; padding: var(--space-4) var(--app-gutter);
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + var(--space-6));
}
.app-shell__main--no-nav { padding-bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px)); }
.screen { display: flex; flex-direction: column; gap: var(--space-5); }

/* Back-office : grille barre latérale + contenu, fluide ≥ 1024 px, empilée en dessous. */
.admin-shell { display: grid; grid-template-columns: 1fr; min-height: 100dvh; background: var(--color-bg); }
.admin-shell__sidebar {
  background: var(--color-bg); border-bottom: 1px solid var(--color-border);
  padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4);
}
.admin-shell__content { padding: var(--space-5); min-width: 0; font-size: var(--text-sm); }
.admin-shell__content h1 { font-size: var(--text-xl); }
@media (min-width: 1024px) {
  .admin-shell { grid-template-columns: var(--admin-sidebar-w) 1fr; }
  .admin-shell__sidebar { position: sticky; top: 0; height: 100dvh; border-bottom: 0; border-right: 1px solid var(--color-border); overflow-y: auto; }
  .admin-shell__content { padding: var(--space-6) var(--space-8); }
}
.admin-brand { font-family: var(--font-display); font-weight: 700; font-size: var(--text-md); display: flex; align-items: center; gap: var(--space-2); }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav__link {
  display: flex; align-items: center; gap: var(--space-3); min-height: 40px; padding: 0 var(--space-3);
  border-radius: var(--radius-md); color: var(--color-text-secondary); text-decoration: none; font-weight: 500;
}
.admin-nav__link:hover { background: var(--color-surface-2); color: var(--color-text); }
.admin-nav__link.is-active { background: var(--color-primary-soft); color: var(--color-primary-soft-text); font-weight: 600; }
.admin-nav__count { margin-left: auto; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.admin-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.admin-grid--2 { grid-template-columns: 1fr; }
@media (min-width: 1200px) { .admin-grid--2 { grid-template-columns: 2fr 1fr; } }
/* Panneau latéral de cas (retrait, KYC, alerte) */
.side-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--color-surface);
  border-left: 1px solid var(--color-border); box-shadow: var(--shadow-lg); z-index: var(--z-sheet);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform var(--dur-slow) var(--ease-standard);
}
.side-panel.is-open { transform: none; }
.side-panel__head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border); }
.side-panel__body { flex: 1; overflow-y: auto; padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-5); }
.side-panel__foot { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-border); display: flex; gap: var(--space-2); justify-content: flex-end; flex-wrap: wrap; }

/* ---------------------------------------------------------------------
   3. Barre d'application et navigation basse
   --------------------------------------------------------------------- */
.app-bar {
  position: sticky; top: 0; z-index: var(--z-app-bar);
  display: grid; grid-template-columns: var(--tap-min) 1fr var(--tap-min); align-items: center;
  min-height: var(--app-bar-h); padding: 0 var(--space-1); padding-top: env(safe-area-inset-top, 0px);
  background: var(--color-bg); border-bottom: 1px solid transparent;
}
.app-bar.is-scrolled { background: var(--color-surface); border-color: var(--color-border); }
.app-bar__title { grid-column: 2; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: var(--text-base); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-bar__back, .app-bar__action {
  display: inline-grid; place-items: center; width: var(--tap-min); height: var(--tap-min);
  border-radius: var(--radius-full); color: var(--color-text);
}
.app-bar__back:hover, .app-bar__action:hover { background: var(--color-surface-2); }
.app-bar__action { grid-column: 3; }

.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--app-max-width);
  z-index: var(--z-bottom-nav); display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--color-surface); border-top: 1px solid var(--color-border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--bottom-nav-h); color: var(--color-text-secondary); text-decoration: none;
  font-size: var(--text-xs); font-weight: 500;
}
.bottom-nav__icon { width: 24px; height: 24px; }
.bottom-nav__item.is-active { color: var(--color-primary); font-weight: 600; }
.bottom-nav__item:focus-visible { box-shadow: inset var(--focus-ring); border-radius: 0; }

/* ---------------------------------------------------------------------
   4. Boutons
   --------------------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--control-h); padding: 0 var(--space-5); border-radius: var(--radius-md);
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-base); line-height: 1.2; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap; user-select: none;
  transition: background-color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast), opacity var(--dur-fast);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn--primary:hover { background: var(--color-primary-hover); }
.btn--primary:active { background: var(--color-primary-pressed); }
.btn--secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); }
.btn--secondary:hover { background: var(--color-surface-2); border-color: var(--color-border-strong); }
.btn--ghost { background: transparent; color: var(--color-primary); }
.btn--ghost:hover { background: var(--color-primary-soft); }
.btn--danger { background: var(--color-danger); color: var(--color-text-on-color); }
.btn--danger:hover { filter: brightness(0.95); }
.btn--danger-ghost { background: transparent; color: var(--color-danger-text); }
.btn--danger-ghost:hover { background: var(--color-danger-soft); }
.btn--accent { background: var(--color-accent); color: var(--color-on-accent); }
.btn--accent:hover { background: var(--color-accent-pressed); }
.btn--sm { min-height: var(--control-h-sm); padding: 0 var(--space-3); font-size: var(--text-sm); }
.btn--lg { min-height: var(--control-h-lg); font-size: var(--text-md); border-radius: var(--radius-lg); }
.btn--block { display: flex; width: 100%; }
.btn--icon { width: var(--control-h); padding: 0; border-radius: var(--radius-full); }
.btn--icon.btn--sm { width: var(--control-h-sm); }
/* État de chargement : le libellé devient transparent, un anneau tourne au centre ; le bouton garde sa largeur. */
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--color-on-primary) transparent var(--color-on-primary) var(--color-on-primary);
  animation: spin 0.8s linear infinite;
}
.btn--secondary.is-loading::after, .btn--ghost.is-loading::after { border-color: var(--color-primary) transparent var(--color-primary) var(--color-primary); }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; gap: var(--space-3); }
.btn-row > .btn { flex: 1; }

/* ---------------------------------------------------------------------
   5. Champs de formulaire
   --------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field__label { font-weight: 600; font-size: var(--text-sm); }
.field__help { font-size: var(--text-sm); color: var(--color-text-secondary); }
.field__error { display: none; font-size: var(--text-sm); color: var(--color-danger-text); font-weight: 500; }
.field.is-invalid .field__error { display: block; }
.field.is-invalid .field__help { display: none; }
.input, .select, .textarea {
  width: 100%; min-height: var(--control-h); padding: 0 var(--space-4);
  background: var(--color-surface); color: var(--color-text);
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.textarea { padding: var(--space-3) var(--space-4); min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--color-text-muted); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { border-color: var(--color-primary); box-shadow: var(--focus-ring); }
.field.is-invalid .input, .field.is-invalid .select, .input[aria-invalid="true"] { border-color: var(--color-danger); }
.field.is-invalid .input:focus-visible { box-shadow: var(--focus-ring-danger); }
.input:disabled, .select:disabled { background: var(--color-surface-2); color: var(--color-text-muted); cursor: not-allowed; }
.input--mono { font-family: var(--font-mono); font-size: var(--text-sm); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: var(--space-10); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group__addon {
  display: inline-flex; align-items: center; padding: 0 var(--space-4); background: var(--color-surface-2);
  border: 1px solid var(--color-border-strong); border-left: 0; border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--color-text-secondary); font-weight: 600; white-space: nowrap;
}
.input-group__addon--start { border-left: 1px solid var(--color-border-strong); border-right: 0; border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group__addon--start + .input { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.checkbox { display: flex; align-items: flex-start; gap: var(--space-3); min-height: var(--tap-min); padding: var(--space-2) 0; cursor: pointer; }
.checkbox input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--color-primary); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; width: 48px; height: 28px; flex: none; }
.switch input { appearance: none; width: 100%; height: 100%; margin: 0; border-radius: var(--radius-full); background: var(--color-border-strong); cursor: pointer; transition: background var(--dur-base); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #FFF; box-shadow: var(--shadow-sm); transition: transform var(--dur-base) var(--ease-standard); }
.switch input:checked { background: var(--color-primary); }
.switch input:checked::after { transform: translateX(20px); }

/* Segment Acheter / Vendre */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; background: var(--color-surface-2); border-radius: var(--radius-md); }
.segmented__btn { min-height: 40px; border-radius: var(--radius-sm); font-family: var(--font-display); font-weight: 600; color: var(--color-text-secondary); transition: background var(--dur-fast), color var(--dur-fast); }
.segmented__btn.is-active, .segmented__btn[aria-selected="true"] { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------------
   6. Saisie de montant (écran 1 du flux Acheter/Vendre)
   --------------------------------------------------------------------- */
.amount-input { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.amount-input:focus-within { border-color: var(--color-primary); box-shadow: var(--focus-ring); }
.amount-input__label { font-size: var(--text-sm); color: var(--color-text-secondary); font-weight: 600; }
.amount-input__row { display: flex; align-items: center; gap: var(--space-3); }
.amount-input__value {
  flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; padding: 0;
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-hero); line-height: 1.1; letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums; color: var(--color-text);
}
.amount-input__value:focus-visible { box-shadow: none; outline: none; }
.amount-input__value::placeholder { color: var(--color-text-muted); }
.amount-input__currency { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); color: var(--color-text-secondary); flex: none; }
.amount-input__toggle {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--color-surface-2); color: var(--color-primary); flex: none;
}
.amount-input__toggle:hover { background: var(--color-primary-soft); }
.amount-input__converted { font-size: var(--text-base); color: var(--color-text-secondary); }
.amount-input__converted strong { color: var(--color-text); font-weight: 600; }
.amount-input.is-invalid { border-color: var(--color-danger); }
.amount-input__error { display: none; font-size: var(--text-sm); color: var(--color-danger-text); font-weight: 500; }
.amount-input.is-invalid .amount-input__error { display: block; }
/* Puces de montants rapides et filtres */
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--app-gutter)); padding-inline: var(--app-gutter); }
.chips--scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: var(--space-1); min-height: 40px; padding: 0 var(--space-4);
  border-radius: var(--radius-full); background: var(--color-surface-2); color: var(--color-text);
  font-weight: 600; font-size: var(--text-sm); border: 1px solid transparent; white-space: nowrap; flex: none;
}
.chip:hover { border-color: var(--color-border-strong); }
.chip.is-selected, .chip[aria-pressed="true"] { background: var(--color-primary-soft); color: var(--color-primary-soft-text); border-color: var(--color-primary); }
.chip:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------------------------------------------------------------
   7. Cartes, clé/valeur, listes
   --------------------------------------------------------------------- */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.card--flat { border: 0; background: var(--color-surface-2); }
.card--primary { background: var(--color-primary); color: var(--color-on-primary); border-color: var(--color-primary); }
.card--primary .text-secondary, .card--primary .hero-amount small { color: inherit; opacity: 0.8; }
.card--clickable { cursor: pointer; transition: border-color var(--dur-fast), transform var(--dur-fast); text-decoration: none; color: inherit; }
.card--clickable:hover { border-color: var(--color-border-strong); }
.card__title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: var(--text-md); }
.card__title .badge { margin-left: auto; }
.card--dense { padding: var(--space-3) var(--space-4); gap: var(--space-2); }

.kv { display: grid; grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-4); align-items: baseline; }
.kv dt { color: var(--color-text-secondary); font-size: var(--text-sm); }
.kv dd { text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.kv dd.mono { font-weight: 400; }
.kv--total dt, .kv--total dd { padding-top: var(--space-3); border-top: 1px solid var(--color-border); font-weight: 700; color: var(--color-text); font-size: var(--text-base); }
.kv--stacked { grid-template-columns: 1fr; gap: var(--space-1); }
.kv--stacked dd { text-align: left; }
.kv--stacked dt:not(:first-child) { margin-top: var(--space-3); }

.list { display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.list-item {
  display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: var(--space-3) var(--space-4);
  color: inherit; text-decoration: none; width: 100%; text-align: left; background: var(--color-surface);
}
.list-item + .list-item { border-top: 1px solid var(--color-border); }
.list-item:hover { background: var(--color-surface-2); }
.list-item__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--color-surface-2); flex: none; font-weight: 700; font-size: var(--text-sm); }
.list-item__icon--in { background: var(--color-success-soft); color: var(--color-success-text); }
.list-item__icon--out { background: var(--color-surface-2); color: var(--color-text-secondary); }
.list-item__icon--pending { background: var(--color-accent-soft); color: var(--color-accent-text); }
.list-item__icon--danger { background: var(--color-danger-soft); color: var(--color-danger-text); }
.list-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-item__title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item__meta { font-size: var(--text-sm); color: var(--color-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item__end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.list-item__amount { font-weight: 700; font-family: var(--font-display); }
.list-item__amount.is-in { color: var(--color-success-text); }
.list-item__amount.is-out { color: var(--color-text); }
.list-item__chevron { color: var(--color-text-muted); flex: none; }

/* ---------------------------------------------------------------------
   8. Badges, score de risque, références et hash
   --------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 var(--space-2);
  border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 600; white-space: nowrap; line-height: 1;
  background: var(--color-surface-2); color: var(--color-text-secondary);
}
.badge--pending { background: var(--color-accent-soft); color: var(--color-accent-text); }
.badge--success { background: var(--color-success-soft); color: var(--color-success-text); }
.badge--danger { background: var(--color-danger-soft); color: var(--color-danger-text); }
.badge--info { background: var(--color-info-soft); color: var(--color-info-text); }
.badge--neutral { background: var(--color-surface-2); color: var(--color-text-secondary); }
.badge--primary { background: var(--color-primary-soft); color: var(--color-primary-soft-text); }
.badge--warning { background: var(--color-warning-soft); color: var(--color-warning-text); }
.badge--dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.badge--pending.badge--dot::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.badge--lg { min-height: 32px; padding: 0 var(--space-3); font-size: var(--text-sm); }

.risk { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--text-xs); letter-spacing: var(--tracking-caps); text-transform: uppercase; padding: 2px var(--space-2); border-radius: var(--radius-sm); border: 1px solid transparent; }
/* Fond -soft, texte -text, contour atténué (dérivé de la teinte) : lisible sans agressivité, en clair comme en sombre. */
.risk--low { background: var(--color-success-soft); color: var(--color-success-text); border-color: color-mix(in srgb, var(--color-risk-low) 30%, transparent); }
.risk--medium { background: var(--color-warning-soft); color: var(--color-warning-text); border-color: color-mix(in srgb, var(--color-risk-medium) 30%, transparent); }
.risk--high { background: var(--color-danger-soft); color: var(--color-danger-text); border-color: color-mix(in srgb, var(--color-risk-high) 30%, transparent); }
.risk--severe { background: color-mix(in srgb, var(--color-risk-severe) 14%, transparent); color: var(--color-risk-severe); border-color: color-mix(in srgb, var(--color-risk-severe) 35%, transparent); }
.risk__score { font-family: var(--font-mono); font-weight: 500; }

.ref { font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.02em; background: var(--color-surface-2); padding: 2px 6px; border-radius: var(--radius-sm); }
.hash { display: inline-flex; align-items: center; gap: var(--space-2); max-width: 100%; font-family: var(--font-mono); font-size: 0.8125rem; }
.hash__text { display: inline-flex; min-width: 0; }
.hash__start { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hash__end { white-space: nowrap; }
.hash__copy, .hash__link { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); color: var(--color-primary); flex: none; }
.hash__copy:hover, .hash__link:hover { background: var(--color-primary-soft); }
.rate { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); align-items: baseline; font-size: var(--text-sm); color: var(--color-text-secondary); }
.rate strong { color: var(--color-text); font-weight: 600; }

/* ---------------------------------------------------------------------
   9. Timeline d'état (ordre, retrait)
   --------------------------------------------------------------------- */
.timeline { display: flex; flex-direction: column; --tl-dot: 14px; --tl-gap: 12px; }
.timeline__step { position: relative; display: grid; grid-template-columns: var(--tl-dot) 1fr; column-gap: var(--tl-gap); padding-bottom: var(--space-5); }
.timeline__step:last-child { padding-bottom: 0; }
.timeline__dot { position: relative; width: var(--tl-dot); height: var(--tl-dot); margin-top: 5px; border-radius: 50%; border: 2px solid var(--color-border-strong); background: var(--color-surface); z-index: 1; }
.timeline__step:not(:last-child)::before { content: ""; position: absolute; left: calc(var(--tl-dot) / 2 - 1px); top: calc(var(--tl-dot) + 5px); bottom: 0; width: 2px; background: var(--color-border); }
.timeline__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.timeline__title { font-weight: 600; }
.timeline__meta { font-size: var(--text-sm); color: var(--color-text-secondary); overflow-wrap: anywhere; }
.timeline__time { font-size: var(--text-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.timeline__step.is-done .timeline__dot { background: var(--color-success); border-color: var(--color-success); }
.timeline__step.is-done::before { background: var(--color-success); }
.timeline__step.is-current .timeline__dot { background: var(--color-accent); border-color: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-soft); animation: pulse 1.6s ease-in-out infinite; }
.timeline__step.is-current .timeline__title { color: var(--color-text); }
.timeline__step.is-upcoming .timeline__title, .timeline__step.is-upcoming .timeline__meta { color: var(--color-text-muted); }
.timeline__step.is-failed .timeline__dot { background: var(--color-danger); border-color: var(--color-danger); }
.timeline__step.is-failed .timeline__title { color: var(--color-danger-text); }

/* ---------------------------------------------------------------------
   10. Anneau de compte à rebours (récap figé, 30 s)
   Pilotage : style="--progress: 0.63" (1 = plein, 0 = vide).
   SVG attendu : <circle pathLength="100"> × 2 (track + bar), viewBox 0 0 40 40, r=17.
   Modificateurs : .is-urgent (< 10 s, sable) et .is-expired (prix à actualiser).
   --------------------------------------------------------------------- */
.countdown-ring { --progress: 1; --ring-size: 40px; position: relative; display: inline-grid; place-items: center; width: var(--ring-size); height: var(--ring-size); flex: none; color: currentColor; }
.countdown-ring__svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.countdown-ring__track { fill: none; stroke: currentColor; opacity: 0.25; stroke-width: 3; }
.countdown-ring__bar { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--progress) * 100); transition: stroke-dashoffset 1s linear, stroke var(--dur-base); }
.countdown-ring__label { font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm); font-variant-numeric: tabular-nums; line-height: 1; }
.countdown-ring.is-urgent { color: var(--color-accent); }
.countdown-ring.is-urgent .countdown-ring__label { animation: pulse 1s ease-in-out infinite; }
.countdown-ring.is-expired .countdown-ring__bar { stroke-dashoffset: 100; }
.countdown-ring.is-expired .countdown-ring__label { font-size: var(--text-xs); }
/* CTA de confirmation : bouton primaire pleine largeur avec l'anneau à gauche. */
.confirm-cta { justify-content: flex-start; padding-left: var(--space-3); gap: var(--space-3); }
.confirm-cta .confirm-cta__label { flex: 1; text-align: center; padding-right: calc(var(--ring-size, 40px) + var(--space-3)); }
.confirm-cta.is-expired { background: var(--color-accent); color: var(--color-on-accent); }
.confirm-cta.is-expired:hover { background: var(--color-accent-pressed); }
.confirm-cta--standalone { --ring-size: 56px; }

/* ---------------------------------------------------------------------
   11. Squelettes, états vides, progression
   --------------------------------------------------------------------- */
.skeleton { position: relative; overflow: hidden; background: var(--color-skeleton-base); border-radius: var(--radius-sm); color: transparent !important; pointer-events: none; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--color-skeleton-shine), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton--text { height: 1em; width: 100%; }
.skeleton--text.is-short { width: 55%; }
.skeleton--title { height: 1.5em; width: 60%; }
.skeleton--circle { width: 40px; height: 40px; border-radius: 50%; }
.skeleton--block { height: 96px; border-radius: var(--radius-lg); }
.skeleton--amount { height: 2.4em; width: 70%; border-radius: var(--radius-md); }
@media (prefers-reduced-motion: reduce) { .skeleton::after { animation: none; } }

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-8) var(--space-4); }
.empty-state__art { width: 96px; height: 96px; border-radius: var(--radius-xl); display: grid; place-items: center; background: var(--color-primary-soft); color: var(--color-primary-soft-text); }
.empty-state__art svg { width: 44px; height: 44px; }
.empty-state__title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-md); }
.empty-state__text { color: var(--color-text-secondary); max-width: 30ch; }
.empty-state .btn { margin-top: var(--space-2); }

.progress { height: 8px; border-radius: var(--radius-full); background: var(--color-surface-2); overflow: hidden; }
.progress__bar { height: 100%; width: 0; border-radius: inherit; background: var(--color-primary); transition: width var(--dur-slow) var(--ease-standard); }
.progress.is-warning .progress__bar { background: var(--color-warning); }
.progress.is-danger .progress__bar { background: var(--color-danger); }

/* ---------------------------------------------------------------------
   12. Messages : alertes inline, bandeaux, toasts
   --------------------------------------------------------------------- */
.alert { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 1px solid transparent; font-size: var(--text-sm); }
.alert__icon { width: 20px; height: 20px; margin-top: 1px; }
.alert__title { font-weight: 700; margin-bottom: 2px; font-size: var(--text-base); }
.alert__body a { color: inherit; font-weight: 600; }
.alert--info { background: var(--color-info-soft); color: var(--color-info-text); border-color: color-mix(in srgb, var(--color-info) 30%, transparent); }
.alert--warning { background: var(--color-warning-soft); color: var(--color-warning-text); border-color: color-mix(in srgb, var(--color-warning) 35%, transparent); }
.alert--danger { background: var(--color-danger-soft); color: var(--color-danger-text); border-color: color-mix(in srgb, var(--color-danger) 30%, transparent); }
.alert--success { background: var(--color-success-soft); color: var(--color-success-text); border-color: color-mix(in srgb, var(--color-success) 30%, transparent); }
.alert--security { background: var(--color-surface-2); color: var(--color-text); border-color: var(--color-border); }
.alert .alert__actions { grid-column: 2; display: flex; gap: var(--space-2); margin-top: var(--space-2); }

.banner { position: sticky; top: 0; z-index: var(--z-banner); display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-4); font-size: var(--text-sm); font-weight: 500; min-height: 40px; }
.banner__text { flex: 1; }
.banner__action { font-weight: 700; color: inherit; text-decoration: underline; text-underline-offset: 2px; min-height: 32px; display: inline-flex; align-items: center; }
.banner--incident { background: var(--color-warning-soft); color: var(--color-warning-text); }
.banner--network { background: var(--color-surface-inverse); color: var(--color-on-inverse); }
.banner--danger { background: var(--color-danger-soft); color: var(--color-danger-text); }
.banner--info { background: var(--color-info-soft); color: var(--color-info-text); }

.toast-region { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + var(--space-3)); width: calc(100% - 2 * var(--app-gutter)); max-width: calc(var(--app-max-width) - 2 * var(--app-gutter)); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--space-2); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--color-surface-inverse); color: var(--color-on-inverse); box-shadow: var(--shadow-lg); font-size: var(--text-sm); font-weight: 500; border-left: 4px solid transparent; animation: toast-in var(--dur-base) var(--ease-out); }
.toast--success { border-left-color: var(--color-success); }
.toast--danger { border-left-color: var(--color-danger); }
.toast--info { border-left-color: var(--color-info); }
.toast--pending, .toast--warning { border-left-color: var(--color-accent); }
/* Variante desktop (back-office, sans navigation basse) : coin inférieur droit. */
.toast-region--corner { left: auto; right: var(--space-5); bottom: var(--space-5); transform: none; width: auto; max-width: min(420px, calc(100vw - 2 * var(--space-4))); }
.toast__text { flex: 1; }
.toast__action { color: inherit; font-weight: 700; text-decoration: underline; min-height: 32px; padding: 0 var(--space-1); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------------
   13. Feuille basse (bottom sheet)
   --------------------------------------------------------------------- */
.sheet-backdrop { position: fixed; inset: 0; background: var(--color-overlay); z-index: var(--z-sheet); opacity: 0; pointer-events: none; transition: opacity var(--dur-slow); }
.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: 100%; max-width: var(--app-max-width); max-height: 90dvh; display: flex; flex-direction: column; background: var(--color-surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: var(--shadow-sheet); z-index: calc(var(--z-sheet) + 1); padding-bottom: env(safe-area-inset-bottom, 0px); transition: transform var(--dur-slow) var(--ease-standard); }
.sheet.is-open { transform: translate(-50%, 0); }
.sheet__handle { width: 40px; height: 4px; border-radius: var(--radius-full); background: var(--color-border-strong); margin: var(--space-3) auto 0; opacity: 0.6; }
.sheet__title { padding: var(--space-4) var(--space-5) var(--space-2); font-size: var(--text-lg); }
.sheet__body { padding: 0 var(--space-5) var(--space-5); overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-4); }
.sheet__actions { padding: var(--space-3) var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); border-top: 1px solid var(--color-border); }
/* Variante statique (démo / documentation) : .sheet--inline n'est pas fixée. */
.sheet--inline { position: relative; left: auto; bottom: auto; transform: none; max-width: none; box-shadow: var(--shadow-md); border: 1px solid var(--color-border); border-bottom: 0; }

/* ---------------------------------------------------------------------
   14. Stepper (en-tête 3 étapes), picker d'opérateur
   --------------------------------------------------------------------- */
.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--space-2); }
.stepper__step { display: flex; flex-direction: column; gap: var(--space-2); font-size: var(--text-xs); font-weight: 600; color: var(--color-text-muted); }
.stepper__bar { height: 4px; border-radius: var(--radius-full); background: var(--color-border); }
.stepper__label { display: flex; align-items: center; gap: var(--space-1); }
.stepper__num { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--color-border); color: var(--color-text-secondary); font-size: 11px; }
.stepper__step.is-done { color: var(--color-text-secondary); }
.stepper__step.is-done .stepper__bar, .stepper__step.is-done .stepper__num { background: var(--color-success); color: var(--color-text-on-color); }
.stepper__step.is-current { color: var(--color-text); }
.stepper__step.is-current .stepper__bar, .stepper__step.is-current .stepper__num { background: var(--color-primary); color: var(--color-on-primary); }

.operator-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.operator { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-height: 72px; padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text); text-align: left; overflow: hidden; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.operator::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--op-color, var(--color-border-strong)); }
.operator--wave { --op-color: var(--color-op-wave); }
.operator--om { --op-color: var(--color-op-om); }
.operator--free { --op-color: var(--color-op-free); }
.operator__mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--op-color); color: #FFF; font-family: var(--font-display); font-weight: 800; font-size: 13px; }
.operator--om .operator__mark { color: #141A24; }
.operator__name { font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm); line-height: 1.2; }
.operator__hint { font-size: var(--text-xs); color: var(--color-text-secondary); }
.operator.is-selected, .operator[aria-checked="true"] { border-color: var(--color-primary); box-shadow: inset 0 0 0 1px var(--color-primary); background: var(--color-primary-soft); }
.operator:disabled { opacity: 0.5; cursor: not-allowed; }
.operator.is-down::after { content: "Indisponible"; position: absolute; top: var(--space-2); right: var(--space-2); font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: var(--radius-sm); background: var(--color-danger-soft); color: var(--color-danger-text); }

/* ---------------------------------------------------------------------
   15. Clavier PIN et saisie OTP
   --------------------------------------------------------------------- */
.pin-dots { display: flex; justify-content: center; gap: var(--space-4); padding: var(--space-4) 0; }
.pin-dots__dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--color-border-strong); background: transparent; transition: background var(--dur-fast), border-color var(--dur-fast); }
.pin-dots__dot.is-filled { background: var(--color-primary); border-color: var(--color-primary); }
.pin-dots.is-error .pin-dots__dot { border-color: var(--color-danger); }
.pin-dots.is-error .pin-dots__dot.is-filled { background: var(--color-danger); }
.pin-dots.is-error { animation: shake var(--dur-slow) var(--ease-standard); }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .pin-dots.is-error, .otp-input.is-invalid { animation: none; } }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); width: 100%; max-width: 320px; margin: 0 auto; }
.pin-pad__key { min-height: 64px; border-radius: var(--radius-lg); background: var(--color-surface); border: 1px solid var(--color-border); font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl); color: var(--color-text); transition: background var(--dur-fast); }
.pin-pad__key:active { background: var(--color-primary-soft); }
.pin-pad__key--ghost { background: transparent; border-color: transparent; font-size: var(--text-sm); font-family: var(--font-body); font-weight: 600; color: var(--color-primary); }
.pin-pad__key:disabled { opacity: 0.4; cursor: not-allowed; }

.otp-input { display: flex; justify-content: center; gap: var(--space-2); }
.otp-input__cell { width: 44px; height: 56px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); color: var(--color-text); caret-color: var(--color-primary); padding: 0; }
.otp-input__cell:focus-visible { border-color: var(--color-primary); box-shadow: var(--focus-ring); }
.otp-input.is-invalid .otp-input__cell { border-color: var(--color-danger); }
.otp-input.is-invalid { animation: shake var(--dur-slow) var(--ease-standard); }
@media (max-width: 359px) { .otp-input__cell { width: 40px; height: 52px; } }

/* ---------------------------------------------------------------------
   16. Back-office : tuiles de statistiques et tableaux denses
   --------------------------------------------------------------------- */
.stat-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); min-width: 0; }
.stat__label { font-size: var(--text-xs); font-weight: 500; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-text-secondary); }
.stat__value { font-family: var(--font-display); font-weight: 700; font-size: var(--text-2xl); letter-spacing: var(--tracking-tight); line-height: 1.1; overflow-wrap: anywhere; }
.stat__value small { font-size: 0.6em; color: var(--color-text-secondary); font-weight: 600; }
.stat__delta { font-size: var(--text-sm); font-weight: 400; color: var(--color-text-secondary); }
.stat__delta.is-up { color: var(--color-success-text); }
.stat__delta.is-down { color: var(--color-danger-text); }
.stat.is-alert { border-color: color-mix(in srgb, var(--color-danger) 55%, var(--color-border)); }
.stat.is-alert .stat__value { color: var(--color-danger-text); }
.stat.is-warning { border-color: color-mix(in srgb, var(--color-warning) 55%, var(--color-border)); }

.table-wrap { overflow-x: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.table th, .table td { text-align: left; padding: var(--space-3) var(--space-3); border-bottom: 1px solid var(--color-border); vertical-align: middle; white-space: nowrap; }
.table th { position: sticky; top: 0; background: var(--color-surface-2); color: var(--color-text-secondary); font-size: var(--text-xs); font-weight: 600; letter-spacing: var(--tracking-caps); text-transform: uppercase; z-index: 1; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--color-surface-2); }
.table tr.is-selected td { background: var(--color-primary-soft); }
.table tr.is-clickable { cursor: pointer; }
.table .num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.wrap { white-space: normal; max-width: 36ch; }
.table--dense th, .table--dense td { padding: var(--space-2) var(--space-3); }
.table__actions { display: flex; gap: var(--space-1); justify-content: flex-end; }
.table__empty td { text-align: center; color: var(--color-text-secondary); padding: var(--space-8); white-space: normal; }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-3); }
.filters .input, .filters .select { width: auto; min-height: var(--control-h-sm); min-width: 160px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-3); font-size: var(--text-sm); color: var(--color-text-secondary); }

/* Journal d'audit / événements : liste compacte horodatée */
.log { display: flex; flex-direction: column; font-size: var(--text-sm); }
.log__row { display: grid; grid-template-columns: 9ch 1fr; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px dashed var(--color-border); }
.log__time { color: var(--color-text-muted); font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: var(--text-xs); padding-top: 2px; }
.log__actor { font-weight: 600; }

/* Double validation (4 yeux) */
.approvals { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.approvals__seat { display: inline-flex; align-items: center; gap: 6px; padding: 4px var(--space-2); border-radius: var(--radius-full); border: 1px dashed var(--color-border-strong); color: var(--color-text-secondary); }
.approvals__seat.is-done { border-style: solid; border-color: var(--color-success); color: var(--color-success-text); background: var(--color-success-soft); }

/* ---------------------------------------------------------------------
   17. Divers : avatar, pastille d'état de service, bloc de code
   --------------------------------------------------------------------- */
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-primary-soft); color: var(--color-primary-soft-text); font-family: var(--font-display); font-weight: 700; flex: none; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--color-text-muted); flex: none; }
.status-dot--up { background: var(--color-success); }
.status-dot--degraded { background: var(--color-warning); }
.status-dot--down { background: var(--color-danger); }
.code-block { font-family: var(--font-mono); font-size: var(--text-xs); background: var(--color-surface-2); border-radius: var(--radius-md); padding: var(--space-3); overflow-x: auto; white-space: pre; }
.pill-tabs { display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; }
.pill-tabs::-webkit-scrollbar { display: none; }
.accordion { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.accordion summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: var(--tap-min); padding: var(--space-3) var(--space-4); font-weight: 600; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-text-secondary); }
.accordion[open] summary::after { content: "−"; }
.accordion__body { padding: 0 var(--space-4) var(--space-4); font-size: var(--text-sm); color: var(--color-text-secondary); }

/* ---------------------------------------------------------------------
   18. Impression (reçu)
   --------------------------------------------------------------------- */
@media print {
  .bottom-nav, .app-bar, .toast-region, .banner, .sheet-backdrop, .sheet { display: none !important; }
  .app-shell { max-width: none; border: 0; }
  .card { break-inside: avoid; }
}
