/* ===================================================================
 * RiLoPos Backoffice - modern desktop UI
 * Dense pro layout, SVG icons, subtle motion. No emoji crutch in chrome.
 * =================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

:root {
  /* Base surface */
  --bg-app:       #16161a;
  --bg-desktop:   #1a1a1f;
  --bg-window:    #232328;
  --bg-titlebar:  #2c2c32;
  --bg-sidebar:   #1d1d22;
  --bg-input:     #1a1a1e;
  --bg-input-h:   #20202a;
  --bg-row-hover: rgba(255,255,255,0.035);
  --bg-row-active:rgba(91, 138, 247, 0.16);
  --bg-elev:      #2a2a30;

  /* Borders */
  --bd-window:   rgba(255,255,255,0.08);
  --bd-strong:   rgba(255,255,255,0.14);
  --bd-inset:    rgba(0,0,0,0.45);
  --bd-divider:  rgba(255,255,255,0.06);

  /* Text */
  --text:        #ececf1;
  --text-muted:  #9b9bab;
  --text-faint:  #6a6a78;

  /* Accent palette - one cool blue + chromatic helpers */
  --accent:        #5b8af7;
  --accent-2:      #4a78e0;
  --accent-soft:   rgba(91, 138, 247, 0.16);
  --accent-faint:  rgba(91, 138, 247, 0.07);
  --green:         #34c77a;
  --yellow:        #f5c349;
  --orange:        #f59e3b;
  --red:           #ef4f4f;
  --pink:          #ec4899;
  --purple:        #a78bfa;

  /* Shadows - tuned, not flashy */
  --sh-window:  0 18px 50px -12px rgba(0,0,0,0.65), 0 4px 14px -4px rgba(0,0,0,0.45);
  --sh-focus:   0 22px 60px -14px rgba(0,0,0,0.75), 0 6px 18px -4px rgba(0,0,0,0.50), 0 0 0 1px rgba(91,138,247,0.30);
  --sh-card:    0 1px 0 rgba(255,255,255,0.03) inset, 0 1px 2px rgba(0,0,0,0.20);
  --sh-button:  0 1px 0 rgba(255,255,255,0.05) inset, 0 -1px 0 rgba(0,0,0,0.20) inset;
  --sh-dropdown:0 16px 40px -8px rgba(0,0,0,0.65), 0 4px 12px -4px rgba(0,0,0,0.40);

  --r-window: 10px;
  --r-input:  6px;
  --r-button: 6px;
  --r-pill:   999px;

  --titlebar-h: 34px;
  --menubar-h:  28px;
  --statusbar-h:24px;

  /* Motion */
  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:   cubic-bezier(0.4, 0, 1, 1);
  --ease-spring: cubic-bezier(0.34, 1.42, 0.64, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text",
               "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  background: var(--bg-app);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  overflow: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--accent-soft); }

/* SVG icon defaults - inherit from current color */
svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }

/* =================================================================
   Auth pages (login / signup)
   ================================================================= */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 60% 50% at 20% 10%, rgba(91,138,247,0.10), transparent 65%),
    radial-gradient(ellipse 50% 50% at 85% 90%, rgba(167,139,250,0.08), transparent 65%),
    var(--bg-app);
  overflow-y: auto;
}

/* Login shell: 2 colonnes (aside + form) sur desktop, 1 col sur mobile */
.auth-shell {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  width: 100%; max-width: 980px;
  background: var(--bg-window);
  border: 1px solid var(--bd-strong);
  border-radius: 16px;
  box-shadow: var(--sh-window);
  overflow: hidden;
  animation: cardIn .35s var(--ease-spring);
  min-height: 540px;
}
.auth-aside {
  background:
    radial-gradient(ellipse at top right, rgba(167,139,250,0.18), transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(91,138,247,0.18), transparent 55%),
    linear-gradient(135deg, #1d1d22 0%, #14141a 100%);
  color: var(--text);
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.auth-aside::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.20));
  pointer-events: none;
}
.auth-aside-inner { position: relative; display: flex; flex-direction: column; height: 100%; gap: 18px; }
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
}
.auth-brand svg { color: var(--accent); }
.auth-tag {
  font-size: 26px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.20;
  margin: 12px 0 6px; color: var(--text);
}
.auth-bullets {
  list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 14px;
}
.auth-bullets li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--text-muted); line-height: 1.50;
}
.auth-bullets li strong { color: var(--text); font-weight: 600; }
.auth-bullets .dot {
  width: 6px; height: 6px; border-radius: 50%; margin-top: 7px;
  background: var(--accent); flex-shrink: 0;
  box-shadow: 0 0 12px rgba(91,138,247,0.50);
}
.auth-foot {
  margin-top: auto;
  font-size: 11px; color: var(--text-faint);
  display: flex; gap: 6px; font-family: ui-monospace, "SF Mono", Consolas, monospace;
}
.auth-foot .dot-sep { color: var(--text-faint); }

/* Main form area */
.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 36px;
}
.auth-form { width: 100%; max-width: 340px; }
.auth-form-head { margin-bottom: 22px; }
.auth-form h1 { margin: 0 0 4px; font-size: 22px; font-weight: 600; letter-spacing: -0.022em; }
.auth-form .muted { color: var(--text-muted); font-size: 13px; margin: 0; }

.auth-meta {
  display: flex; justify-content: center; align-items: center; gap: 6px;
  margin-top: 18px; font-size: 13px; color: var(--text-muted);
}
.auth-langs {
  display: flex; justify-content: center; gap: 14px; margin-top: 22px;
  padding-top: 16px; border-top: 1px solid var(--bd-divider);
}
.auth-langs a {
  font-size: 11.5px; color: var(--text-faint); text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600;
}
.auth-langs a:hover { color: var(--text-muted); }
.auth-langs a.cur { color: var(--accent); }

/* Password show/hide */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 38px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: none; background: transparent;
  color: var(--text-muted); cursor: pointer; padding: 0; border-radius: 4px;
}
.pw-toggle:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* Legacy single-card style (used by signup wizard) */
.auth-card {
  background: var(--bg-window);
  border: 1px solid var(--bd-strong);
  border-radius: 14px;
  box-shadow: var(--sh-window);
  padding: 32px 36px;
  width: 100%; max-width: 460px;
  animation: cardIn .35s var(--ease-spring);
}
.auth-card-wide { max-width: 620px; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.auth-card h1 {
  margin: 0 0 6px;
  /* Couleur explicite : sans elle, le titre herite du `body { color }` d'une CSS
     d'OS (98.css / XP.css / 7.css) chargee pour l'apercu de theme -> texte
     sombre sur carte sombre = titre invisible. */
  color: var(--text);
  font-size: 22px; font-weight: 600; letter-spacing: -0.022em;
}
.auth-card .subtitle { color: var(--text-muted); margin: 0 0 22px; font-size: 13px; line-height: 1.55; }

.step-label {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin: 0 0 4px; font-weight: 600;
}

.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px;
  text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 400;
  color: var(--text); cursor: pointer;
}
.checkbox-row input { width: auto; margin-top: 3px; }
.muted-sm { font-size: 11.5px; color: var(--text-muted); margin: 4px 0 0; }
.mono-input { font-family: ui-monospace, "SF Mono", Consolas, monospace; text-transform: uppercase; letter-spacing: 0.04em; }

.btn-lg { padding: 9px 18px; font-size: 13.5px; }

/* Signup step 3 success */
.signup-success { text-align: center; padding: 16px 0; }
.success-check {
  width: 72px; height: 72px; margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #2bb169);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(52,199,122,0.30);
  animation: successPop .5s var(--ease-spring);
}
@keyframes successPop {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}
.modules-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em;
  color: var(--text-muted); margin: 22px 0 12px; font-weight: 700;
}
.modules-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  font-size: 12px;
}
.module-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--bd-divider);
  border-radius: 8px;
}
.module-chip .chip-icon { font-size: 14px; }
.module-chip .chip-label { flex: 1; font-weight: 500; color: var(--text); font-size: 12px; }
.module-chip .chip-soon {
  font-size: 9px; padding: 2px 6px;
  background: rgba(245,195,73,0.20); color: var(--yellow);
  border-radius: 8px; font-weight: 700; letter-spacing: 0.04em;
}

/* Responsive auth */
@media (max-width: 760px) {
  .auth-shell { grid-template-columns: 1fr; min-height: auto; }
  .auth-aside { padding: 28px; }
  .auth-aside-inner { gap: 12px; }
  .auth-tag { font-size: 20px; }
  .auth-bullets { display: none; }
  .auth-main { padding: 28px 24px; }
  .auth-card { padding: 26px 22px; }
  .row { grid-template-columns: 1fr; }
  .modules-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .auth-wrap { padding: 12px; }
  .auth-card { padding: 20px 16px; border-radius: 10px; }
  .auth-aside { display: none; }
  .auth-shell { border-radius: 12px; }
}

/* =================================================================
   Form controls
   ================================================================= */
label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin: 14px 0 5px;
}

input, select, textarea {
  width: 100%; padding: 7px 10px;
  background: var(--bg-input);
  border: 1px solid var(--bd-inset);
  border-radius: var(--r-input);
  color: var(--text); font: inherit; font-size: 13px;
  transition: border-color .14s var(--ease-out), box-shadow .14s var(--ease-out), background .14s;
  box-shadow: 0 1px 0 rgba(255,255,255,0.025) inset;
}
input:hover, select:hover, textarea:hover { background: var(--bg-input-h); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-input-h);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
/* Cases à cocher / radios : taille fixe + aucune anim/transition/backdrop.
   !important pour neutraliser les règles `input` des thèmes (width:100%,
   backdrop-filter, transition) qui provoquaient un flicker (grossit/rétrécit). */
input[type="checkbox"], input[type="radio"] {
  width: 16px !important; height: 16px !important;
  min-width: 16px !important; min-height: 16px !important;
  flex: 0 0 auto !important; padding: 0 !important; margin: 0 6px 0 0;
  box-shadow: none !important; background: none !important;
  -webkit-appearance: auto !important; appearance: auto !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  transition: none !important; animation: none !important; transform: none !important;
  accent-color: var(--accent); vertical-align: middle; border-radius: 0;
}
input[type="color"] { padding: 2px; height: 32px; cursor: pointer; }
input.error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239,79,79,0.15); }
input[readonly] { background: rgba(0,0,0,0.18); color: var(--text-muted); cursor: not-allowed; }

select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%239b9bab' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 26px;
  -webkit-appearance: none; appearance: none;
}
/* Les <option> du popup natif sont rendus par l'OS sur fond BLANC : sans couleur
   explicite ils héritent du `--text` clair des thèmes → texte clair sur blanc =
   illisible (bug dropdown TVA hors thème RiLoPOS Default). On force un contraste
   sûr, identique quel que soit le thème actif. */
select option, select optgroup {
  color: #16161a;
  background-color: #ffffff;
}

textarea { resize: vertical; min-height: 60px; }

/* =================================================================
   Buttons
   ================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-button);
  border: 1px solid var(--bd-strong);
  background: linear-gradient(180deg, #3a3a42 0%, #2f2f36 100%);
  color: var(--text);
  font: inherit; font-weight: 500; font-size: 12.5px;
  cursor: pointer;
  transition: filter .1s var(--ease-out), transform .08s, background .12s;
  box-shadow: var(--sh-button);
  user-select: none;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(0.5px); filter: brightness(0.93); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; }
.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  border-color: rgba(0,0,0,0.35);
}
.btn-danger {
  background: linear-gradient(180deg, #f25555 0%, #cf3a3a 100%);
  color: #fff;
  border-color: rgba(0,0,0,0.35);
}
.btn-ghost {
  background: transparent;
  border-color: var(--bd-divider);
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg-row-hover); color: var(--text); border-color: var(--bd-strong); }
.btn-block { width: 100%; }
.btn-sm { padding: 4px 9px; font-size: 11.5px; gap: 4px; }
.btn-icon { padding: 5px 7px; min-width: 0; }
.btn svg { width: 14px; height: 14px; }
.btn-sm svg { width: 12px; height: 12px; }

.err-msg, .ok-msg, .info-msg {
  font-size: 12.5px; padding: 9px 12px; border-radius: 7px; margin-bottom: 12px;
  display: flex; align-items: flex-start; gap: 8px;
}
/* Texte = var(--text) (toujours contrasté : clair sur thème sombre, sombre sur
   thème clair) ; la couleur sémantique passe par le fond teinté + une bordure
   gauche colorée. Avant : texte clair en dur → illisible sur les thèmes clairs. */
.err-msg {
  color: var(--text);
  background: rgba(239, 79, 79, 0.12);
  border: 1px solid rgba(239, 79, 79, 0.30);
  border-left: 3px solid #ef4f4f;
}
.ok-msg {
  color: var(--text);
  background: rgba(52, 199, 122, 0.12);
  border: 1px solid rgba(52, 199, 122, 0.30);
  border-left: 3px solid #34c77a;
}
.info-msg {
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid rgba(91,138,247,0.25);
  border-left: 3px solid var(--accent);
}

.link { color: var(--accent); text-decoration: none; cursor: pointer; }
.link:hover { text-decoration: underline; }

/* =================================================================
   Modal / overlay
   ================================================================= */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  /* Marge de sécurité : sans elle, une carte à 92vh colle aux bords. */
  padding: 16px;
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  animation: fadeIn .18s var(--ease-out);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lang-popup, .modal-card {
  background: var(--bg-window); border: 1px solid var(--bd-strong); border-radius: 12px;
  padding: 24px; box-shadow: var(--sh-window);
  animation: modalIn .25s var(--ease-spring);
  /* Un formulaire long (fiche client : contact, consentements, TVA,
     facturation électronique, fidélité) dépassait l'écran par le haut ET par
     le bas, sans rien pour faire défiler : les boutons Enregistrer/Annuler
     étaient hors d'atteinte et la fiche ne pouvait pas être validée. La carte
     est donc bornée à la fenêtre et défile à l'intérieur.
     `min-width` bornée à la largeur disponible : 340px fixes débordaient
     latéralement sur un écran étroit. Une carte qui fixe elle-même sa hauteur
     garde la sienne (style inline prioritaire). */
  min-width: min(340px, 100%);
  max-width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.lang-popup h2, .modal-card h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.lang-popup .subtitle, .modal-card .subtitle { color: var(--text-muted); font-size: 12px; margin-bottom: 16px; }
.lang-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.lang-btn {
  display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--bg-input);
  border: 1px solid var(--bd-strong); border-radius: 8px; color: var(--text);
  cursor: pointer; font: inherit; font-weight: 500; font-size: 13px;
  transition: all .15s var(--ease-out);
}
.lang-btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.lang-btn .flag { font-size: 20px; }

/* Stepper (signup) */
.stepper { display: flex; gap: 4px; margin-bottom: 22px; }
.step { flex: 1; height: 3px; background: rgba(255,255,255,0.08); border-radius: 1.5px; transition: background .25s; }
.step.active { background: var(--accent); }
.step.done { background: var(--green); }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Business type tiles */
.bt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 600px) { .bt-grid { grid-template-columns: repeat(2, 1fr); } }
.bt-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px; background: var(--bg-input); border: 1.5px solid transparent;
  border-radius: 10px; color: var(--text); cursor: pointer; font: inherit; text-align: center;
  transition: all .15s var(--ease-out);
}
.bt-tile:hover { background: var(--bg-input-h); border-color: rgba(91,138,247,0.30); transform: translateY(-1px); }
.bt-tile.sel { border-color: var(--accent); background: var(--accent-soft); }
.bt-tile .icon { font-size: 24px; }
.bt-tile .label { font-size: 12px; font-weight: 500; }

/* =================================================================
   Main MDI layout
   ================================================================= */
.mdi-app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* Top menubar - desktop OS style. Always above MDI windows. */
.menubar {
  height: var(--menubar-h);
  background: linear-gradient(180deg, #2a2a30 0%, #232328 100%);
  border-bottom: 1px solid rgba(0,0,0,0.45);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset;
  display: flex; align-items: center; padding: 0 8px;
  font-size: 12px; user-select: none;
  position: relative; z-index: 100000;
  flex-shrink: 0;
}
.menubar .brand {
  font-weight: 600; font-size: 12.5px; margin: 0 16px 0 4px;
  display: flex; align-items: center; gap: 7px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.menubar .brand svg { color: var(--accent); width: 14px; height: 14px; }
.menu-item {
  padding: 4px 11px; cursor: pointer; border-radius: 4px;
  position: relative; color: var(--text);
  transition: background .1s;
}
.menu-item:hover, .menu-item.open {
  background: var(--accent);
  color: #fff;
}
.menu-dropdown {
  position: absolute; top: 100%; left: -2px; min-width: 230px;
  background: rgba(40,40,46,0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--bd-strong);
  border-radius: 8px; padding: 4px;
  margin-top: 4px;
  box-shadow: var(--sh-dropdown);
  display: none; z-index: 100001;
  animation: dropIn .14s var(--ease-out);
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.menu-item.open .menu-dropdown { display: block; }
.menu-dropdown-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px; font-size: 12.5px;
  cursor: pointer; border-radius: 5px; color: var(--text); text-decoration: none;
}
.menu-dropdown-item:hover { background: var(--accent); color: #fff; }
.menu-dropdown-item svg { width: 14px; height: 14px; color: var(--text-muted); }
.menu-dropdown-item:hover svg { color: #fff; }
.menu-dropdown-shortcut { margin-left: auto; opacity: 0.55; font-size: 11px; font-family: ui-monospace, "SF Mono", Consolas, monospace; }

.menubar .right {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  font-size: 11.5px; color: var(--text-muted); padding-right: 4px;
}
.menubar .user-pill {
  display: flex; align-items: center; gap: 6px; padding: 2px 9px 2px 2px;
  background: rgba(255,255,255,0.05); border-radius: 12px;
  transition: background .12s;
}
.menubar .user-pill:hover { background: rgba(255,255,255,0.08); }
.menubar .user-avatar {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 11px;
}

/* Rapports : onglets segmentés + tableau lisible (CA gros/net) */
.seg { display: inline-flex; background: var(--bg-input, #15151b); border: 1px solid var(--bd-divider, #2a2a33); border-radius: 9px; padding: 2px; gap: 2px; }
.seg-btn { border: none; background: transparent; color: var(--text-muted, #9aa4b2); font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: 7px; cursor: pointer; }
.seg-btn:hover { color: var(--text, #e8ecf3); }
.seg-btn.active { background: var(--accent, #5b8af7); color: #fff; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rep-table thead th { text-align: left; padding: 10px 10px; border-bottom: 2px solid var(--bd-divider, #2a2a33); color: var(--text-muted, #9aa4b2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
.rep-table thead th small { font-weight: 400; opacity: .7; text-transform: none; letter-spacing: 0; }
.rep-table th.num, .rep-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rep-table tbody td { padding: 9px 10px; border-bottom: 1px solid var(--bd-divider, #2a2a33); }
.rep-table tbody tr:hover { background: var(--bg-row-hover, rgba(255,255,255,0.03)); }
.rep-table tfoot td { padding: 11px 10px; border-top: 2px solid var(--bd-divider, #2a2a33); font-weight: 800; }
.rep-bar { background: var(--bg-input, #1a1a1f); border-radius: 4px; height: 10px; overflow: hidden; }
.rep-bar > div { background: linear-gradient(90deg, var(--accent, #5b8af7), var(--accent-2, #7c6df7)); height: 100%; border-radius: 4px; }

/* Ticket de caisse rendu 80mm dans une fenêtre MDI (même modèle que config) */
.ticket-paper {
  width: 300px; flex-shrink: 0; height: fit-content;
  background: #fff; color: #111;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.45;
  padding: 14px 16px; border-radius: 4px; box-shadow: 0 6px 24px rgba(0,0,0,0.35);
}
.ticket-paper img { display: inline-block; }

/* Permissions employé backoffice (cases à cocher par section) */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px 14px; }
.perm-chk { display: flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer; padding: 2px 0; }
.perm-chk input { flex-shrink: 0; }

/* Main area = sidebar + workspace */
.main-area { flex: 1; display: flex; min-height: 0; }

/* =================================================================
   Sidebar
   ================================================================= */
.sidebar {
  width: 222px; background: var(--bg-sidebar);
  border-right: 1px solid rgba(0,0,0,0.45);
  padding: 10px 6px 14px; overflow-y: auto; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 1px;
  min-height: 0;            /* flex child : autorise le scroll interne */
  max-height: 100%;         /* jamais plus haut que .main-area (sinon déborde) */
  overscroll-behavior: contain;
}
.sb-section {
  font-size: 10px; font-weight: 700; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 14px 12px 6px;
}
.sb-section:first-child { padding-top: 4px; }

/* ── Groupes repliables de la sidebar ──────────────────────────────
   L'en-tête se comporte comme une entrée normale ; seul le chevron dit
   qu'elle en cache d'autres. Le corps est réellement retiré du flux
   (display:none) plutôt que masqué : un bouton invisible mais focusable
   piège la navigation au clavier. */
.sb-group { display: flex; flex-direction: column; gap: 1px; }
.sb-group-head {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px;
  background: transparent; border: none; border-radius: 6px;
  color: var(--text); font: inherit; font-size: 12.5px; font-weight: 450;
  cursor: pointer; text-align: left;
  transition: background .12s var(--ease-out), color .12s;
}
.sb-group-head:hover { background: rgba(255,255,255,0.04); }
.sb-group-head svg:first-child { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.sb-group-head:hover svg:first-child { color: var(--accent); }
.sb-group-head span { flex: 1; min-width: 0; }
.sb-caret {
  width: 13px; height: 13px; flex-shrink: 0; color: var(--text-faint);
  transition: transform .16s var(--ease-out);
}
.sb-group.open > .sb-group-head .sb-caret { transform: rotate(90deg); }
/* Groupe fermé contenant la fenêtre au premier plan : une pastille suffit à
   dire « c'est là-dedans » sans avoir à déplier. */
.sb-group.has-active > .sb-group-head { color: var(--accent); font-weight: 600; }
.sb-group.has-active > .sb-group-head svg:first-child { color: var(--accent); }
.sb-group-body { display: none; flex-direction: column; gap: 1px; padding-left: 10px; }
.sb-group.open > .sb-group-body { display: flex; }
/* Filet vertical : rattache visuellement les entrées à leur en-tête. */
.sb-group-body { border-left: 1px solid rgba(255,255,255,0.07); margin-left: 17px; padding-left: 5px; }

.sb-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px;
  background: transparent; border: none; border-radius: 6px;
  color: var(--text); font: inherit; font-size: 12.5px; font-weight: 450;
  cursor: pointer; text-align: left;
  transition: background .12s var(--ease-out), color .12s, transform .08s;
  position: relative;
}
.sb-btn:hover { background: rgba(255,255,255,0.04); }
.sb-btn:active { transform: scale(0.99); }
.sb-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,0.20), 0 2px 4px rgba(91,138,247,0.30);
}
.sb-btn svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.sb-btn:hover svg { color: var(--accent); }
.sb-btn.active svg { color: #fff; }
.sb-btn .badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 700;
  min-width: 18px; text-align: center;
  animation: badgePulse 1.5s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,79,79,0.5); }
  50% { box-shadow: 0 0 0 4px rgba(239,79,79,0); }
}
.sb-btn.active .badge { background: rgba(255,255,255,0.30); animation: none; }

/* =================================================================
   Workspace (canvas for MDI windows)
   ================================================================= */
.workspace {
  flex: 1; position: relative; overflow: hidden;
  background: var(--bg-desktop);
  background-image:
    radial-gradient(ellipse 50% 40% at 0% 0%, rgba(91,138,247,0.03), transparent 60%),
    radial-gradient(ellipse 40% 35% at 100% 100%, rgba(167,139,250,0.025), transparent 60%);
}
.workspace-bg-msg {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--text-faint);
  text-align: center; padding: 20px; pointer-events: none;
}
.workspace-bg-msg svg { width: 64px; height: 64px; opacity: 0.18; margin-bottom: 14px; color: var(--accent); }
.workspace-bg-msg .title { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.workspace-bg-msg .hint { font-size: 12.5px; margin-top: 2px; }

/* =================================================================
   MDI Window
   ================================================================= */
.mdi-window {
  position: absolute; background: var(--bg-window);
  border: 1px solid var(--bd-window);
  border-radius: var(--r-window);
  box-shadow: var(--sh-window);
  display: flex; flex-direction: column;
  min-width: 380px; min-height: 240px; overflow: hidden;
  animation: windowOpen .28s var(--ease-spring);
  transition: box-shadow .25s var(--ease-out), filter .2s;
}
@keyframes windowOpen {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.mdi-window.focused { box-shadow: var(--sh-focus); }
/* Poignée de redimensionnement (coin bas-droit) */
.win-resize {
  position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px;
  cursor: nwse-resize; z-index: 6;
  background: linear-gradient(135deg, transparent 0 45%, var(--bd-window, #555) 45% 55%, transparent 55% 70%, var(--bd-window, #555) 70% 80%, transparent 80%);
  opacity: 0.5;
}
.win-resize:hover { opacity: 0.9; }
.mdi-window:not(.focused) { filter: brightness(0.88) saturate(0.85); }

.window-header {
  display: flex; align-items: center; padding: 0 10px;
  height: var(--titlebar-h);
  background: linear-gradient(180deg, #34343c 0%, #2c2c33 100%);
  border-bottom: 1px solid rgba(0,0,0,0.30);
  cursor: move; user-select: none;
  position: relative;
}
.window-header .title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 12.5px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 60%; letter-spacing: -0.005em;
}
.window-header .title svg { color: var(--accent); width: 14px; height: 14px; }
.mdi-window:not(.focused) .window-header .title { color: var(--text-faint); }
.mdi-window:not(.focused) .window-header .title svg { color: var(--text-faint); }

.window-controls { display: flex; gap: 6px; padding-left: 4px; align-items: center; }
.win-btn {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.40);
  cursor: pointer; padding: 0;
  font-size: 8px; color: rgba(0,0,0,0.55); font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: filter .1s;
}
.win-close { background: linear-gradient(180deg, #ff6358 0%, #e93f33 100%); }
.win-min   { background: linear-gradient(180deg, #ffc341 0%, #f0a920 100%); }
.win-max   { background: linear-gradient(180deg, #5dd565 0%, #2db83f 100%); }
.mdi-window:not(.focused) .win-btn { background: #58585e; }
.window-header:hover .win-btn span { opacity: 1; }
.win-btn span { opacity: 0; transition: opacity .1s; }
.win-btn:hover { filter: brightness(1.10); }

.window-body {
  flex: 1; overflow: auto;
  background: var(--bg-window);
  scroll-behavior: smooth;
}
.window-body.padded { padding: 16px; }

/* Toolbar inside window */
.window-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 8px 10px; background: rgba(0,0,0,0.20);
  border-bottom: 1px solid var(--bd-divider);
  font-size: 12px;
}
.window-toolbar .fkey {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: var(--bg-elev);
  border: 1px solid var(--bd-strong); border-radius: var(--r-button);
  color: var(--text); font-size: 11.5px; font-weight: 500;
  cursor: pointer; transition: all .12s var(--ease-out);
  box-shadow: var(--sh-button);
}
.window-toolbar .fkey:hover:not(:disabled) {
  background: var(--bg-input-h);
  border-color: rgba(91,138,247,0.40);
  transform: translateY(-0.5px);
}
.window-toolbar .fkey:active { transform: translateY(0.5px); }
.window-toolbar .fkey:disabled { opacity: 0.35; cursor: not-allowed; }
.window-toolbar .fkey svg { width: 13px; height: 13px; }
.window-toolbar .fkey kbd {
  font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 10px;
  background: rgba(255,255,255,0.10); padding: 1px 5px; border-radius: 3px;
  border: 1px solid rgba(255,255,255,0.08);
  font-weight: 600;
}
.window-toolbar .fkey-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff; border-color: rgba(0,0,0,0.30);
}
.window-toolbar .fkey-primary kbd { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.10); }
.window-toolbar .separator { width: 1px; height: 22px; background: var(--bd-divider); margin: 0 4px; }

/* Status bar at window bottom */
.window-statusbar {
  height: var(--statusbar-h);
  display: flex; align-items: center; padding: 0 12px;
  background: linear-gradient(180deg, #26262b 0%, #222227 100%);
  border-top: 1px solid var(--bd-divider);
  font-size: 11px; color: var(--text-muted);
  gap: 12px;
  flex-shrink: 0;
}
.window-statusbar .sb-spacer { flex: 1; }
.window-statusbar kbd {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  background: rgba(255,255,255,0.08); padding: 0 5px; border-radius: 3px;
  font-size: 10px; font-weight: 600;
}

/* =================================================================
   Tabs
   ================================================================= */
.tabs {
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--bd-divider);
  background: rgba(0,0,0,0.14);
  padding: 0 4px;
}
.tab {
  padding: 9px 16px; cursor: pointer; user-select: none;
  font-size: 12.5px; font-weight: 500; color: var(--text-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab svg { width: 14px; height: 14px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; padding: 16px; animation: fadeIn .18s var(--ease-out); }
.tab-pane.active { display: block; }

/* =================================================================
   GroupBox
   ================================================================= */
.groupbox {
  border: 1px solid var(--bd-divider);
  border-radius: 8px;
  padding: 14px 14px 12px;
  margin-bottom: 14px;
  position: relative;
  background: rgba(0,0,0,0.10);
}
.groupbox-title {
  position: absolute; top: -8px; left: 12px;
  background: var(--bg-window); padding: 0 7px;
  font-size: 10.5px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  display: inline-flex; align-items: center; gap: 5px;
}
.groupbox-title svg { width: 12px; height: 12px; color: var(--accent); }
.groupbox .gb-row {
  display: grid; grid-template-columns: 140px 1fr; gap: 10px;
  align-items: center; margin-bottom: 9px;
}
.groupbox .gb-row:last-child { margin-bottom: 0; }
.groupbox .gb-row > label {
  margin: 0; text-transform: none; letter-spacing: 0;
  font-size: 12px; color: var(--text-muted); font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}
.groupbox .gb-row > label svg { width: 12px; height: 12px; }

/* =================================================================
   KPI cards (dashboard)
   ================================================================= */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.kpi-card {
  background: linear-gradient(180deg, #2e2e34 0%, #2a2a30 100%);
  border: 1px solid var(--bd-divider);
  border-radius: 9px;
  padding: 13px 15px;
  box-shadow: var(--sh-card);
  position: relative;
  overflow: hidden;
  transition: transform .15s var(--ease-out), border-color .15s;
}
.kpi-card:hover { transform: translateY(-1px); border-color: var(--bd-strong); }
.kpi-card .label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.kpi-card .label svg { width: 12px; height: 12px; color: var(--text-muted); }
.kpi-card .value {
  font-size: 26px; font-weight: 600; margin-top: 4px;
  font-feature-settings: "tnum"; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.kpi-card .sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.kpi-card.accent {
  border-color: rgba(91,138,247,0.30);
  background: linear-gradient(180deg, rgba(91,138,247,0.10) 0%, #2a2a30 100%);
}
.kpi-card.accent .value { color: var(--accent); }
.kpi-card.accent::before {
  content: ""; position: absolute; right: -20px; top: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle, rgba(91,138,247,0.15), transparent 70%);
}

/* Mini bar chart row (used in dashboard payment breakdown) */
.bar-row {
  display: grid; grid-template-columns: 100px 1fr 75px; gap: 12px;
  align-items: center; padding: 7px 0;
  font-size: 12px;
}
.bar-row .bar-label { color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.bar-row .bar-label svg { width: 13px; height: 13px; }
.bar-row .bar-track { height: 8px; background: rgba(255,255,255,0.05); border-radius: 4px; overflow: hidden; }
.bar-row .bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 4px; transition: width .6s var(--ease-out);
}
.bar-row .bar-value {
  font-variant-numeric: tabular-nums; text-align: right;
  color: var(--text); font-weight: 500;
}

/* =================================================================
   Data table (grid)
   ================================================================= */
table.data-grid {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  background: var(--bg-window);
}
table.data-grid thead th {
  background: linear-gradient(180deg, #34343c 0%, #2c2c33 100%);
  padding: 7px 11px; text-align: left;
  font-size: 11px; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(0,0,0,0.30);
  position: sticky; top: 0; z-index: 1;
  white-space: nowrap;
}
table.data-grid tbody td {
  padding: 7px 11px;
  border-bottom: 1px solid var(--bd-divider);
  vertical-align: middle;
}
table.data-grid tbody tr { transition: background .1s; cursor: default; }
table.data-grid tbody tr:hover { background: var(--bg-row-hover); }
table.data-grid tbody tr.selected { background: var(--bg-row-active); }
table.data-grid tbody tr.clickable { cursor: pointer; }
table.data-grid tbody tr.clickable:hover td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
table.data-grid .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data-grid .mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 11.5px; color: var(--text-muted); }

/* =================================================================
   Badge
   ================================================================= */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.03em;
  vertical-align: middle;
}
.badge::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor;
  display: inline-block;
}
.badge.pending   { background: rgba(245,158,59,0.16);  color: var(--orange); }
.badge.approved  { background: rgba(52,199,122,0.16);  color: var(--green); }
.badge.rejected  { background: rgba(239,79,79,0.16);   color: var(--red); }
.badge.suspended { background: rgba(155,155,171,0.16); color: var(--text-muted); }
.badge.info      { background: var(--accent-soft);    color: var(--accent); }
.badge.neutral   { background: rgba(255,255,255,0.07); color: var(--text-muted); }
.badge-plain {
  display: inline-block; padding: 2px 8px; border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: 600;
  background: rgba(255,255,255,0.07); color: var(--text-muted);
}
.badge-plain::before { content: none; }

/* =================================================================
   Empty state
   ================================================================= */
.stub-msg {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 240px; text-align: center; padding: 40px 24px;
}
.stub-msg svg { width: 48px; height: 48px; margin-bottom: 14px; color: var(--text-faint); opacity: 0.5; }
.stub-msg h3 { color: var(--text); margin: 0 0 6px; font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
.stub-msg p { color: var(--text-muted); font-size: 12.5px; max-width: 420px; line-height: 1.55; margin: 0; }
.stub-msg .hint { margin-top: 14px; font-size: 11.5px; color: var(--text-faint); }

/* Skeleton loader */
.skeleton {
  display: inline-block; background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0.04) 100%);
  background-size: 200% 100%;
  animation: skel 1.4s ease-in-out infinite;
  border-radius: 4px;
}
@keyframes skel {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =================================================================
   List rows (for categories, etc.)
   ================================================================= */
.list { display: flex; flex-direction: column; gap: 1px; }
.list-row {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px;
  background: var(--bg-window);
  border-radius: 5px;
  cursor: default;
  transition: background .1s;
}
.list-row.clickable { cursor: pointer; }
.list-row:hover { background: var(--bg-row-hover); }
.list-row.selected { background: var(--bg-row-active); }
.list-row .actions { margin-left: auto; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.list-row:hover .actions { opacity: 1; }

.swatch {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.30);
  display: inline-block; vertical-align: middle;
  flex-shrink: 0;
}

/* =================================================================
   Avatar (used in team and elsewhere)
   ================================================================= */
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 11.5px;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.30);
  letter-spacing: 0;
}
.avatar.sm { width: 22px; height: 22px; font-size: 10.5px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }

/* =================================================================
   Scrollbar OS-style
   ================================================================= */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.10);
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); background-clip: padding-box; border: 3px solid transparent; }
::-webkit-scrollbar-corner { background: transparent; }

/* =================================================================
   Search input
   ================================================================= */
.search-bar { flex: 1; max-width: 280px; display: flex; align-items: center; gap: 4px; position: relative; }
.search-bar input { font-size: 12px; padding: 5px 8px 5px 30px; }
.search-bar::before {
  content: "";
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239b9bab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.35-4.35'/></svg>");
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Filter row */
.filter-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  padding: 9px 12px; background: rgba(0,0,0,0.14);
  border-bottom: 1px solid var(--bd-divider);
}

/* =================================================================
   Toast notification
   ================================================================= */
.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--bg-window); border: 1px solid var(--bd-strong);
  border-radius: 9px; padding: 11px 15px;
  box-shadow: var(--sh-dropdown);
  font-size: 12.5px; color: var(--text);
  display: flex; align-items: center; gap: 9px;
  z-index: 9000;
  animation: toastIn .3s var(--ease-spring);
  min-width: 200px;
}
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast.success { border-color: rgba(52,199,122,0.40); }
.toast.success svg { color: var(--green); }
.toast.error   { border-color: rgba(239,79,79,0.40); }
.toast.error svg { color: var(--red); }
.toast.info    { border-color: rgba(91,138,247,0.40); }
.toast.info svg { color: var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(0.97); } }

/* =================================================================
   Detail header (for product detail, customer detail, etc.)
   ================================================================= */
.detail-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--bd-divider);
  background: linear-gradient(180deg, rgba(91,138,247,0.04), transparent);
}
.detail-head h2 {
  margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 9px;
}
.detail-head h2 svg { color: var(--accent); }
.detail-head .meta {
  color: var(--text-muted); font-size: 11.5px; margin-top: 3px;
  display: flex; align-items: center; gap: 9px;
}

/* Color picker swatch row */
.color-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.color-grid button {
  width: 26px; height: 26px; border-radius: 6px; border: 2px solid transparent;
  cursor: pointer; padding: 0;
  transition: transform .12s;
}
.color-grid button:hover { transform: scale(1.1); }
.color-grid button.sel { border-color: var(--text); box-shadow: 0 0 0 2px var(--accent); }

/* Inline tag list */
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-list .chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; background: var(--bg-elev);
  border: 1px solid var(--bd-divider);
  border-radius: var(--r-pill);
  font-size: 11px; color: var(--text-muted);
}
.tag-list .chip.accent { background: var(--accent-soft); color: var(--accent); border-color: rgba(91,138,247,0.30); }

/* Icon button (round) */
.icon-btn {
  width: 28px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--bd-divider);
  background: var(--bg-elev);
  color: var(--text-muted);
  cursor: pointer; padding: 0;
  transition: all .12s var(--ease-out);
}
.icon-btn:hover { background: var(--bg-input-h); color: var(--text); border-color: var(--bd-strong); }
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn.danger:hover { color: var(--red); border-color: rgba(239,79,79,0.40); }

/* Two-column split (used in detail views) */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 800px) { .split-2 { grid-template-columns: 1fr; } }

/* ─── Shifts calendar (window horaires employés) ─────────── */
.shifts-calendar { table-layout: fixed; }
.shifts-calendar td { vertical-align: top; padding: 4px; min-width: 90px; height: 80px; }
.shifts-calendar th { text-align: center; font-size: 11px; }
.shift-emp-row { display: flex; align-items: center; gap: 8px; }
.shift-cell-empty { cursor: pointer; transition: background .12s; }
.shift-cell-empty:hover { background: var(--accent-soft, rgba(91,138,247,0.08)) !important; }
.shift-cell-empty::after {
  content: "+"; display: block; text-align: center; color: var(--text-faint);
  opacity: 0; font-size: 18px; line-height: 70px;
}
.shift-cell-empty:hover::after { opacity: 0.6; }
.shift-chip {
  padding: 4px 6px; border-radius: 4px; margin-bottom: 3px;
  cursor: pointer; font-size: 11px; line-height: 1.3;
  transition: filter .12s;
}
.shift-chip:hover { filter: brightness(1.15); }
.shift-chip strong { display: block; font-size: 11.5px; }
.shift-chip small { color: var(--text-muted); font-size: 10px; }

/* =================================================================
   Responsive MDI app
   - Mobile : sidebar toggle (hamburger), windows plein ecran
   - Tablet : sidebar etroite avec icones seulement
   ================================================================= */

/* Hamburger toggle - only shows on mobile */
.sb-toggle {
  display: none;
  position: fixed; top: 4px; left: 6px; z-index: 100002;
  width: 32px; height: 24px;
  background: transparent; border: none;
  flex-direction: column; justify-content: center; gap: 4px;
  padding: 0; cursor: pointer;
}
.sb-toggle span {
  height: 2px; width: 18px; background: var(--text);
  border-radius: 2px; transition: transform .2s, opacity .2s;
}
.sb-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sb-toggle.open span:nth-child(2) { opacity: 0; }
.sb-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Tablet (1024px et moins) : sidebar etroite */
@media (max-width: 1024px) {
  .sidebar { width: 184px; }
  .sb-btn { padding: 5px 8px; gap: 8px; font-size: 12px; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .kpi-card .value { font-size: 22px; }
  .mdi-window { min-width: 320px; }
}

/* Phone (768px et moins) : sidebar overlay drawer */
@media (max-width: 768px) {
  .sb-toggle { display: flex; }
  .menubar { padding-left: 44px; }
  .menubar .brand { font-size: 12px; }

  .sidebar {
    position: fixed; top: var(--menubar-h); bottom: 0; left: 0;
    z-index: 100001;
    width: 240px;
    transform: translateX(-100%);
    transition: transform .25s var(--ease-out);
    box-shadow: 4px 0 24px rgba(0,0,0,0.30);
  }
  .sidebar.open { transform: translateX(0); }
  .main-area { position: relative; }

  /* Backdrop pour fermer la sidebar mobile */
  .sb-backdrop {
    display: none;
    position: fixed; inset: var(--menubar-h) 0 0 0;
    background: rgba(0,0,0,0.45);
    z-index: 100000;
    animation: fadeIn .15s var(--ease-out);
  }
  .sb-backdrop.open { display: block; }

  /* Workspace prend tout l ecran sur mobile, MDI windows en plein ecran */
  .workspace { width: 100%; }
  .mdi-window {
    left: 0 !important; top: 0 !important;
    width: 100% !important; height: 100% !important;
    border-radius: 0;
  }
  .mdi-window .window-header { cursor: default; }

  /* Menu dropdown : full width sur mobile */
  .menu-dropdown { min-width: 220px; }

  /* Toolbar compacte */
  .window-toolbar { padding: 6px 8px; gap: 4px; }
  .window-toolbar .fkey { padding: 4px 8px; font-size: 11px; }
  .window-toolbar .fkey kbd { display: none; }  /* gain place */
  .window-toolbar .search-bar { max-width: none; flex: 1 1 100%; order: 99; }

  /* Filtres et tables : scroll horizontal */
  .filter-row { grid-template-columns: 1fr; }
  table.data-grid { font-size: 11.5px; }
  table.data-grid thead th, table.data-grid tbody td { padding: 6px 8px; }
  .window-body { -webkit-overflow-scrolling: touch; }

  /* Detail forms */
  .groupbox .gb-row { grid-template-columns: 1fr; gap: 4px; }
  .groupbox .gb-row > label { font-size: 11px; }
  .row { grid-template-columns: 1fr; }

  /* Modals : presque plein ecran */
  .modal-card, .lang-popup {
    width: calc(100vw - 24px); min-width: 0 !important; max-height: calc(100vh - 40px);
    overflow-y: auto;
  }

  /* User pill : seulement l avatar visible */
  .menubar .right { gap: 6px; }
  .menubar .right > span:first-child { display: none; }
  .user-pill span:last-child { display: none; }

  /* Theme grid : 1 col mobile */
  .theme-grid { grid-template-columns: 1fr; }
}

/* Very small phones */
@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .auth-form { max-width: none; }
  .auth-main { padding: 24px 16px; }
}

/* ─── Status bar (bas de fenêtre) : serveur + version ──────────── */
.bo-statusbar {
  flex: none; height: 26px; display: flex; align-items: center; gap: 16px;
  padding: 0 14px; font-size: 11.5px; color: var(--text-muted);
  background: var(--bg-titlebar, var(--bg-sidebar)); border-top: 1px solid var(--border);
  user-select: none;
}
.bo-statusbar .sb-stat { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.bo-statusbar .sb-stat b { font-weight: 600; color: var(--text); }
.bo-statusbar .sb-right { margin-left: auto; }
.bo-statusbar .sb-node b { color: var(--accent, #2178e7); font-family: "Segoe UI", Consolas, monospace; letter-spacing: 0.2px; }
@media (max-width: 720px) { .bo-statusbar { gap: 10px; overflow-x: auto; } }
.bo-statusbar svg { width: 12px; height: 12px; opacity: 0.7; }
.bo-statusbar .sb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint, #6a6a78); flex: none; transition: background .2s; }
.bo-statusbar .sb-dot.on     { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.18); }
.bo-statusbar .sb-dot.backup { background: #d29922; box-shadow: 0 0 0 3px rgba(210,153,34,0.18); }
.bo-statusbar .sb-dot.off    { background: #f85149; box-shadow: 0 0 0 3px rgba(248,81,73,0.18); }

/* ── Module Store : cartes modules lisibles & responsives ─────────────
   Avant : grille inline « 36px 1fr auto auto » — sur fenêtre étroite le prix
   et le bouton (largeur auto) écrasaient la colonne texte → nom/description
   illisibles. Ici le texte garde toujours sa place ; prix + action passent
   SOUS le texte quand la carte devient étroite. Couleurs avec repli pour
   rester lisibles sur tous les thèmes (y compris rétro). */
.ms-card {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px;
  align-items: center; padding: 14px 16px;
  border: 1px solid var(--bd-divider, rgba(255,255,255,0.10)); border-radius: 12px;
  background: var(--bg-elev, rgba(255,255,255,0.02));
}
.ms-card.on { border-color: rgba(34,197,94,0.45); background: rgba(34,197,94,0.06); }
.ms-card-ico { font-size: 26px; text-align: center; line-height: 1; }
.ms-card-main { min-width: 0; }
.ms-card-name {
  font-weight: 700; font-size: 14.5px; color: var(--text, #ececf1);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.ms-badge {
  background: #16a34a; color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; letter-spacing: .02em;
}
.ms-card-desc {
  font-size: 12.5px; color: var(--text-muted, #9b9bab); line-height: 1.45; margin-top: 4px;
}
.ms-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.ms-price { font-weight: 800; font-size: 15px; color: var(--accent, #5b8af7); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-price small { font-size: 11px; color: var(--text-muted, #9b9bab); font-weight: 500; }
.ms-trial { color: #16a34a; font-size: 11px; font-weight: 700; }
.ms-card .btn { white-space: nowrap; }
/* Carte étroite : le bloc prix/action descend sous le texte, pleine largeur. */
@media (max-width: 560px) {
  .ms-card { grid-template-columns: 40px minmax(0, 1fr); }
  .ms-card-side { grid-column: 1 / -1; flex-direction: row; align-items: center;
    justify-content: space-between; text-align: left; border-top: 1px dashed var(--bd-divider, rgba(255,255,255,0.10)); padding-top: 10px; }
}

/* ── Journal d'activité ──────────────────────────────────────────────────────
   Un journal se lit par journée, pas en flux continu : une ligne d'intercalaire
   sépare les jours, ce qui donne au regard des points d'ancrage et évite de
   relire l'horodatage de chaque ligne pour savoir où l'on est. */
table.data-grid tr.act-day td {
  background: var(--bg-sunken, var(--bg-row-hover));
  color: var(--text-muted);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 7px 10px; position: sticky; top: 0; z-index: 1;
}
table.data-grid tr.act-day:hover td { background: var(--bg-sunken, var(--bg-row-hover)); }
table.data-grid th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.data-grid th.sortable:hover { color: var(--accent); }
table.act-grid tbody td { vertical-align: top; }
/* Les filtres de la barre d'outils : mêmes hauteurs que les boutons, sinon la
   barre part en escalier dès qu'on ajoute un champ. */
.window-toolbar select,
.window-toolbar input[type="date"] {
  height: 26px; padding: 0 6px; font-size: 11.5px;
  border: 1px solid var(--border); border-radius: 5px;
  background: var(--bg-input, var(--bg-surface)); color: var(--text);
}

/* Encadré visé depuis la sidebar (Fiscal → RT / Serveur Fiscal Belge) : un
   halo bref, le temps de dire « c'est ici », puis plus rien. */
@keyframes gb-flash-kf { from { box-shadow: 0 0 0 2px var(--accent); } to { box-shadow: 0 0 0 2px transparent; } }
.gb-flash { animation: gb-flash-kf 1.2s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .gb-flash { animation: none; box-shadow: 0 0 0 2px var(--accent); } }

/* ── Création de compte : étape 1 en trois pages ──────────────────────────
   La carte demandait treize champs d'un coup ; elle dépassait l'écran et il
   fallait faire défiler pour trouver le bouton, sur le tout premier écran que
   voit un nouveau client. Trois pages courtes tiennent sans défilement. */
.su-substep { display: flex; align-items: center; gap: 6px; margin: 0 0 18px; }
.su-substep-dot {
  width: 22px; height: 3px; border-radius: 2px; background: var(--bd-inset);
  transition: background .18s ease;
}
.su-substep-dot.active { background: var(--accent); }
.su-substep-dot.done   { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.su-substep-txt {
  margin-left: auto; font-size: 11.5px; color: var(--text-muted);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}

/* Les pages cachées ne doivent RIEN occuper : un simple display:none via
   [hidden] suffit, mais certaines règles de mise en page le contredisent. */
.su-page[hidden] { display: none !important; }

.su-actions { display: flex; gap: 10px; margin-top: 22px; }
.su-actions .btn { min-height: 44px; }      /* cible tactile */
.su-actions .su-grow { flex: 1; }
.su-actions .btn[hidden] { display: none !important; }

/* Le bornage en hauteur de la carte vit dans signup.php, avec le reste des
   règles propres à cet écran — le dupliquer ici en ferait deux vérités. */
@media (prefers-reduced-motion: reduce) {
  .auth-card { animation: none; }
  .su-substep-dot { transition: none; }
}

/* Permissions superviseur : la ligne entière est cliquable, on le montre. */
.sup-row:hover { background: var(--bg-input); }

/* Pied légal (connexion, inscription) : identité de l'éditeur + liens légaux. */
.legal-foot {
  margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--bd-inset);
  font-size: 11.5px; line-height: 1.5; color: var(--text-muted); text-align: center;
}
.legal-foot-id { display: block; }
.legal-foot-links { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.legal-foot-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal-foot-links a:hover { color: var(--accent); }
.checkbox-row a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.bo-statusbar .sb-legal a { color: inherit; text-decoration: none; }
.bo-statusbar .sb-legal a:hover { color: var(--accent); text-decoration: underline; }

/* ── Fenêtre « panne de l'API » (mdi.js openOutageWindow, assets/outage.js) ── */
.outage-win { padding: 22px 24px 18px; font-size: 14px; line-height: 1.6; color: var(--text-muted); }
.outage-win p { margin: 0 0 12px; }
.outage-head { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; margin-bottom: 14px; }
.outage-head svg { margin-top: 1px; }
.outage-degraded .outage-head svg { color: var(--yellow); }
.outage-major .outage-head svg { color: var(--red); }
.outage-maintenance .outage-head svg, .outage-maintenance_planned .outage-head svg { color: var(--text); }
.outage-win .outage-lead { margin: 0; color: var(--text); font-size: 16px; font-weight: 600; line-height: 1.45; }
.outage-pos {
  display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start;
  padding: 12px 14px; border-radius: 8px;
  background: var(--bg-elev); border: 1px solid var(--bd-window); color: var(--text);
}
.outage-win .outage-pos { color: var(--text); }
.outage-pos svg { margin-top: 3px; color: var(--green); }
.outage-end { font-size: 13px; }
.outage-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.outage-foot a { color: var(--accent); font-size: 13px; }
.outage-foot .btn { min-width: 120px; min-height: 36px; }

/* Demande de migration du commerce (fenêtre MDI « migration », mdi.js) */
.mig-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 16px; padding: 12px 14px;
  border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--bd-window); }
.mig-facts dt { color: var(--text-muted); font-size: 13px; }
.mig-facts dd { margin: 0; color: var(--text); font-weight: 600; }
.mig-win .mig-sub { margin: 0 0 6px; color: var(--text); font-weight: 600; }
.mig-effects { margin: 0 0 14px; padding-left: 20px; }
.mig-effects li + li { margin-top: 4px; }
.mig-remote { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; padding: 12px 14px; border-radius: 8px;
  border: 1px solid var(--bd-window); color: var(--text); cursor: pointer; }
.mig-remote input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.mig-remote small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 12px; }
.mig-win .mig-msg { min-height: 1.4em; margin: 12px 0 0; color: var(--text); }
.mig-actions { display: inline-flex; gap: 10px; }

/* =================================================================
   Assistant « Serveur fiscal belge » (fenêtre Fiscal, mdi-fiscalsetup.js)
   ================================================================= */
.fsw { display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.fsw-head h2 { font-size: 16px; font-weight: 600; margin: 0 0 4px; color: var(--text); }
.fsw-head p { margin: 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.fsw-steps { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; counter-reset: fsw; }
.fsw-steps li { flex: 1; min-width: 0; font-size: 11.5px; color: var(--text-muted); counter-increment: fsw; }
.fsw-steps li::before {
  content: ''; display: block; height: 3px; border-radius: 1.5px; margin-bottom: 6px;
  background: var(--bd-divider); transition: background .2s var(--ease-out);
}
.fsw-steps li span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsw-steps li span::before { content: counter(fsw) '. '; font-variant-numeric: tabular-nums; }
.fsw-steps li.done::before { background: var(--green); }
.fsw-steps li.current::before { background: var(--accent); }
.fsw-steps li.current { color: var(--text); font-weight: 600; }
.fsw-body { display: flex; flex-direction: column; gap: 12px; }
.fsw-body h3 { font-size: 13.5px; font-weight: 600; margin: 0; color: var(--text); }
.fsw-body h3:focus { outline: none; }
.fsw-hint { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.fsw-radio { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-right: 20px; cursor: pointer; }
.fsw-field fieldset, fieldset.fsw-field { border: 0; padding: 0; margin: 0 0 12px; }
fieldset.fsw-field legend { font-weight: 600; margin-bottom: 4px; }
.fsw-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .fsw-choices { grid-template-columns: 1fr; } }
.fsw-choice {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; cursor: pointer;
  border: 1.5px solid var(--bd-divider); border-radius: 8px; background: var(--bg-input); color: var(--text);
  transition: border-color .15s var(--ease-out), background .15s var(--ease-out);
}
.fsw-choice:hover { border-color: var(--bd-inset); }
.fsw-choice.sel { border-color: var(--accent); background: var(--accent-soft); }
.fsw-choice:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.fsw-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fsw-choice b { font-size: 13px; font-weight: 600; }
.fsw-choice small { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.fsw-diagram { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 11px; color: var(--text-muted); white-space: pre; margin-top: 4px; line-height: 1.35; }
.fsw-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fsw-table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 6px 8px; border-bottom: 1px solid var(--bd-divider); white-space: nowrap; }
.fsw-table td { padding: 6px 8px; border-bottom: 1px solid var(--bd-divider); vertical-align: middle; }
.fsw-table input[type="text"], .fsw-table input[type="password"], .fsw-table select { width: 100%; box-sizing: border-box; min-width: 120px; }
.fsw-table .ctr { text-align: center; }
.fsw-table input[type="radio"], .fsw-table input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.fsw-mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 12px; }
.fsw-field { display: grid; grid-template-columns: 180px 1fr; gap: 6px 10px; align-items: center; }
.fsw-field > label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.fsw-field input, .fsw-field select { width: 100%; box-sizing: border-box; }
.fsw-field .fsw-field-err, .fsw-field .fsw-field-hint { grid-column: 2; font-size: 11.5px; }
.fsw-field .fsw-field-hint { color: var(--text-muted); }
@media (max-width: 640px) {
  .fsw-field { grid-template-columns: 1fr; gap: 4px; }
  .fsw-field .fsw-field-err, .fsw-field .fsw-field-hint { grid-column: 1; }
}
.fsw-field-err { color: var(--red); font-size: 11.5px; }
.fsw-invalid { border-color: var(--red) !important; }
.fsw-badge { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 11px; font-weight: 600; border: 1px solid var(--bd-divider); color: var(--text-muted); white-space: nowrap; }
.fsw-badge.main { border-color: var(--accent); color: var(--text); }
.fsw-badge.ok { border-color: var(--green); color: var(--text); }
.fsw-badge.err { border-color: var(--red); color: var(--text); }
.fsw-badge.off { border-style: dashed; }
.fsw-nav { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--bd-divider); flex-wrap: wrap; }
.fsw-nav .grow { flex: 1; }
.fsw-overview .fsw-ov-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.fsw-overview .fsw-ov-head > div { flex: 1; min-width: 220px; }
.fsw-overview .fsw-ov-head b { font-size: 13px; }
.fsw-overview .fsw-ov-head p { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) { .fsw-steps li::before, .fsw-choice { transition: none; } }
