/* =========================================================
   LE JARDIN DORÉ — POS Premium
   Thème sombre gastronomique, accents dorés
   ========================================================= */

:root {
  /* Palette : noir chaud profond, texte net, or affirmé */
  --bg: #121110;
  --bg-soft: #161513;
  --panel: #1A1917;
  --card: #211F1C;
  --card-2: #282622;
  --hover: #312E29;
  --line: rgba(212, 175, 106, .24);
  --line-2: rgba(255, 250, 240, .075);
  --text: #F4F0E8;
  --text-2: #C9C2B5;
  --muted: #918A7D;

  --accent: #D4AF6A;
  --accent-2: #A88545;
  --accent-soft: rgba(212, 175, 106, .14);
  --accent-glow: rgba(212, 175, 106, .32);
  --accent-ink: #1D1608;
  --grad: linear-gradient(135deg, #EDD39B 0%, #D4AF6A 50%, #B08A4A 100%);

  --green: #7CC9A0;
  --green-soft: rgba(124, 201, 160, .13);
  --red: #E5826F;
  --red-soft: rgba(229, 130, 111, .13);
  --orange: #E6AE66;
  --orange-soft: rgba(230, 174, 102, .13);
  --blue: #8DB4E8;
  --blue-soft: rgba(141, 180, 232, .13);

  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 24px 50px -24px rgba(0, 0, 0, .75);
  --font-display: Arial, Helvetica, sans-serif;
  --font: Arial, Helvetica, sans-serif;
  --mono: Arial, Helvetica, sans-serif;
}

/* Variantes d'accent (Paramètres > Apparence) */
:root[data-accent="champagne"] { --accent:#E4D5B7; --accent-2:#B09D78; --accent-soft:rgba(228,213,183,.13); --accent-glow:rgba(228,213,183,.28); --grad:linear-gradient(135deg,#F5EBD6 0%,#E1D0AE 50%,#B9A57F 100%); }
:root[data-accent="bordeaux"]  { --accent:#D8848E; --accent-2:#94404D; --accent-soft:rgba(216,132,142,.14); --accent-glow:rgba(216,132,142,.3); --accent-ink:#2A0E14; --grad:linear-gradient(135deg,#ECA9B0 0%,#CF6F7B 50%,#9E3F4D 100%); }
:root[data-accent="emeraude"]  { --accent:#7FCBA5; --accent-2:#3E8A66; --accent-soft:rgba(127,203,165,.13); --accent-glow:rgba(127,203,165,.3); --accent-ink:#0A1E14; --grad:linear-gradient(135deg,#B5E6CC 0%,#79C59F 50%,#3E8A66 100%); }
:root[data-accent="saphir"]    { --accent:#8FB3EA; --accent-2:#4566A3; --accent-soft:rgba(143,179,234,.13); --accent-glow:rgba(143,179,234,.3); --accent-ink:#0B1528; --grad:linear-gradient(135deg,#C6D9F7 0%,#86AAE4 50%,#4566A3 100%); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  font-size: 14px;
}
input, textarea, select { user-select: text; -webkit-user-select: text; font: inherit; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
img { display: block; }
svg.lucide { width: 20px; height: 20px; stroke-width: 1.7; flex-shrink: 0; }

/* Barres de défilement fines, invisibles tant que la zone n'est pas survolée */
* { scrollbar-width: thin; scrollbar-color: transparent transparent; }
*:hover { scrollbar-color: rgba(255, 245, 225, .16) transparent; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; border-radius: 99px; }
*:hover::-webkit-scrollbar-thumb { background: rgba(255, 245, 225, .16); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 245, 225, .3); }

.muted { color: var(--muted); }
.gold { color: var(--accent); }
.green { color: var(--green); }
.red { color: var(--red); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.display { font-family: var(--font-display); }
.eyebrow {
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
}
.divider-orn { display:flex; align-items:center; gap:12px; color: var(--accent); opacity:.8; }
.divider-orn::before, .divider-orn::after { content:''; height:1px; flex:1; background: linear-gradient(90deg, transparent, var(--line), transparent); }

/* =========================================================
   BOUTONS & CHAMPS
   ========================================================= */
.btn {
  height: 48px; padding: 0 20px; border-radius: var(--radius-sm);
  background: var(--card-2); border: 1px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 650; font-size: 14px; color: var(--text);
  transition: transform .12s ease, background .2s, border-color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(.97); }
.btn svg.lucide { width: 18px; height: 18px; }
.btn-gold {
  background: var(--grad); color: var(--accent-ink); border-color: transparent;
  box-shadow: 0 10px 28px -12px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-gold:hover { background: var(--grad); filter: brightness(1.06); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-danger { background: var(--red-soft); border-color: rgba(234,122,102,.25); color: var(--red); }
.btn-danger:hover { background: rgba(234,122,102,.2); }
.btn-success { background: var(--green-soft); border-color: rgba(111,203,159,.25); color: var(--green); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.btn-lg { height: 62px; font-size: 15.5px; border-radius: 16px; padding: 0 24px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn-icon {
  width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center;
  background: var(--card-2); border: 1px solid var(--line-2); color: var(--text-2);
  transition: background .2s, transform .12s;
}
.btn-icon:hover { background: var(--hover); color: var(--text); }
.btn-icon:active { transform: scale(.94); }
.btn-icon svg.lucide { width: 18px; height: 18px; }
.btn-icon.danger:hover { color: var(--red); background: var(--red-soft); }

.field { display: flex; flex-direction: column; gap: 8px; }
.field > label { font-size: 12px; font-weight: 650; color: var(--text-2); letter-spacing: .02em; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 50px; background: var(--bg-soft);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 0 16px; color: var(--text); font-size: 15px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.textarea { height: auto; min-height: 96px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.select option { background: var(--panel); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-icon { position: relative; }
.input-icon svg.lucide { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 19px; height: 19px; pointer-events: none; }
.input-icon .input { padding-left: 48px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }

.switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--hover); border: 1px solid var(--line-2); transition: .25s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: var(--text-2); transition: .25s cubic-bezier(.3,.8,.3,1.2); }
.switch input:checked + span { background: var(--grad); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(22px); background: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 38px; padding: 0 15px; border-radius: 99px; background: var(--card-2);
  border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 7px;
}
.chip.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  background: var(--card-2); color: var(--text-2);
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.nodot::before { display: none; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.gold { background: var(--accent-soft); color: var(--accent); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }

/* =========================================================
   LOGIN
   ========================================================= */
.login {
  display: grid; grid-template-columns: minmax(340px, 36%) 1fr auto;
  height: 100vh; background: var(--bg);
}
.login-hero {
  position: relative; overflow: hidden; padding: 46px 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: #1A1917 center / cover no-repeat;
  isolation: isolate;
}
.login-hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(26,25,23,.55) 0%, rgba(26,25,23,.25) 35%, rgba(26,25,23,.92) 100%),
    linear-gradient(90deg, transparent 70%, rgba(26,25,23,1) 100%);
}
.login-hero::after {
  content: ''; position: absolute; inset: 22px; border: 1px solid rgba(201,174,124,0.143);
  border-radius: 26px; pointer-events: none;
}
.hero-top { display: flex; align-items: center; gap: 18px; }
.brand-mark {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--accent); color: var(--accent); position: relative;
  font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: .04em;
  background: rgba(26,25,23,.55); backdrop-filter: blur(6px);
}
.brand-mark::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; border: 1px solid rgba(201,174,124,0.195); }
.brand-name { font-family: var(--font-display); font-size: 24px; font-weight: 700; font-weight: 600; line-height: 1; }
.brand-sub { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin-top: 7px; }
.hero-clock { font-family: var(--font-display); font-size: clamp(60px, 7vw, 96px); font-weight: 400; letter-spacing: -.04em; line-height: .9; letter-spacing: -.02em; }
.hero-clock small { font-size: .38em; color: var(--accent); margin-left: 6px; }
.hero-date { font-size: 15px; color: var(--text-2); margin-top: 12px; text-transform: capitalize; letter-spacing: .04em; }
.hero-quote { font-family: var(--font-display); font-style: italic; font-size: 17px; line-height: 1.35; color: var(--text); max-width: 380px; }
.hero-status { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 12.5px; color: var(--text-2); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(111,203,159,.6); animation: live 3.5s ease-in-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(111,203,159,.55); } 70% { box-shadow: 0 0 0 10px rgba(111,203,159,0); } 100% { box-shadow: 0 0 0 0 rgba(111,203,159,0); } }

.login-users {
  padding: 60px 56px 36px; overflow: auto; display: flex; flex-direction: column;
  background: radial-gradient(1200px 500px at 20% -10%, rgba(201,174,124,0.046), transparent 60%);
}
.login-title { font-family: var(--font-display); font-size: clamp(30px, 3.2vw, 42px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; margin: 14px 0 10px; }
.login-title em { color: var(--accent); font-style: italic; }
.login-lead { color: var(--muted); font-size: 15px; margin-bottom: 38px; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 18px; }
.user-card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-2); border-radius: 24px; padding: 28px 16px 22px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), border-color .25s, box-shadow .25s;
  position: relative; overflow: hidden;
}
.user-card:hover { transform: translateY(-3px); border-color: var(--line); }
.user-card:active { transform: scale(.97); }
.user-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 24px 50px -24px var(--accent-glow); }
.user-card.active::before { content: ''; position: absolute; top: 14px; right: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.user-name { font-weight: 700; font-size: 15.5px; }
.user-role { font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin-top: 4px; }
.login-foot { margin-top: auto; padding-top: 36px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

.avatar {
  --c1: #D8B470; --c2: #8A6230;
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  font-family: var(--font-display); font-size: 26px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 0 0 4px var(--card), 0 0 0 5px rgba(201,174,124,0.227), 0 18px 30px -12px rgba(0,0,0,.6);
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.avatar.sm { width: 40px; height: 40px; font-size: 16px; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px rgba(201,174,124,0.195); }
.avatar.md { width: 56px; height: 56px; font-size: 21px; }
.avatar.xl { width: 104px; height: 104px; font-size: 38px; }

.pin-panel {
  width: 0; overflow: hidden; background: var(--panel); border-left: 1px solid var(--line);
  transition: width .5s cubic-bezier(.2,.85,.25,1); position: relative;
}
.login.has-user .pin-panel { width: 440px; }
.pin-inner {
  width: 440px; height: 100%; padding: 40px 44px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative;
  background: radial-gradient(500px 300px at 50% 0%, rgba(201,174,124,0.058), transparent 70%);
}
.pin-close { position: absolute; top: 22px; right: 22px; }
.pin-hello { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-top: 20px; }
.pin-role { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-top: 6px; }
.pin-label { color: var(--muted); font-size: 13px; margin: 28px 0 16px; }
.pin-dots { display: flex; gap: 20px; margin-bottom: 34px; height: 18px; align-items: center; }
.pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--accent); transition: .2s; }
.pin-dot.filled { background: var(--grad); border-color: transparent; transform: scale(1.1); box-shadow: 0 0 14px var(--accent-glow); }
.pin-dots.error .pin-dot { border-color: var(--red); background: var(--red); }
.shake { animation: shake .45s; }
@keyframes shake { 10%,90% { transform: translateX(-2px); } 20%,80% { transform: translateX(4px); } 30%,50%,70% { transform: translateX(-8px); } 40%,60% { transform: translateX(8px); } }

.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; }
.key {
  height: 74px; border-radius: 20px; font-size: 27px; font-weight: 500;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-2); display: grid; place-items: center;
  transition: transform .1s, background .15s, border-color .15s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.key:hover { border-color: var(--line); }
.key:active, .key.pressed { transform: scale(.94); background: var(--hover); border-color: var(--accent); }
.key.fn { font-size: 14px; font-weight: 700; color: var(--muted); letter-spacing: .08em; }
.key svg.lucide { width: 24px; height: 24px; }
.keypad.compact .key { height: 60px; font-size: 22px; border-radius: 16px; }
.pin-submit { margin-top: 22px; }
.pin-hint { margin-top: 18px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.pin-hint svg.lucide { width: 14px; height: 14px; }

/* =========================================================
   SHELL
   ========================================================= */
.shell { display: grid; grid-template-columns: 96px 1fr; height: 100vh; }
.sidebar {
  background: var(--panel); border-right: 1px solid var(--line-2);
  display: flex; flex-direction: column; align-items: center; padding: 18px 0 16px; gap: 10px; min-height: 0;
}
.sidebar .brand-mark { width: 52px; height: 52px; font-size: 20px; margin-bottom: 10px; flex-shrink: 0; }
.nav { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 0 10px; overflow-y: auto; flex: 1; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 11px 2px;
  border-radius: 15px; color: var(--muted); font-size: 10.5px; font-weight: 650; letter-spacing: .02em;
  position: relative; transition: color .2s, background .2s; text-align: center;
}
.nav-item svg.lucide { width: 22px; height: 22px; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.025); }
.nav-item.active { color: var(--accent-ink); background: var(--grad); box-shadow: 0 10px 22px -12px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35); }
.nav-item.active::before { content: ''; position: absolute; left: -10px; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.side-user { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-2); width: 64px; }
.main { min-width: 0; height: 100vh; overflow: hidden; position: relative; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; animation: viewIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* =========================================================
   POS / VENTE
   ========================================================= */
.pos { display: grid; grid-template-columns: 1fr 420px; height: 100%; }
.pos-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.tables-bar {
  padding: 16px 24px 16px; border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--panel), var(--bg));
}
.tables-head { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.tables-head h2 { font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 4px; display: inline-block; }
.legend .l-free { background: var(--card-2); border: 1px solid var(--line); }
.legend .l-busy { background: var(--accent-soft); border: 1px solid var(--accent); }
.legend .l-sel { background: var(--grad); }
.zone-tabs { display: inline-flex; background: var(--card); padding: 4px; border-radius: 12px; gap: 2px; border: 1px solid var(--line-2); }
.zone-tab { height: 32px; padding: 0 13px; border-radius: 9px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.zone-tab.active { background: var(--hover); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.status-tabs .zone-tab { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; white-space: nowrap; }
.status-tabs .zone-tab svg.lucide { width: 15px; height: 15px; }
.zone-tab .cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--card-2); color: var(--muted); }
.zone-tab.active .cnt { background: var(--accent-soft); color: var(--accent); }
.zone-tab .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.sw-free { background: var(--card-2); border: 1px solid var(--line); }
.sw-busy { background: var(--accent-soft); border: 1px solid var(--accent); }
.zone-select { width: 170px; height: 48px; background-color: var(--card); font-size: 13px; font-weight: 600; padding-left: 14px; background-position: calc(100% - 22px) 21px, calc(100% - 16px) 21px; }
.zone-select:disabled { opacity: .4; }
.tables-empty { flex: 0 0 auto; height: 90px; padding: 0 22px; display: flex; align-items: center; gap: 10px; border: 1px dashed var(--line-2); border-radius: 18px; color: var(--muted); font-size: 13px; }
.tables-empty svg.lucide { width: 18px; height: 18px; }
.pos-clock { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.pos-clock .time { font-family: var(--font-display); font-size: 21px; font-weight: 700; font-weight: 500; line-height: 1; }
.pos-clock .date { font-size: 11px; color: var(--muted); text-transform: capitalize; }

.tables-row { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 6px; scroll-behavior: smooth; }
.tables-wrap { position: relative; }
/* Table « Nouveau » hors de vue : pastille dorée au bord de la rangée (clic = défile jusqu’à elle) */
.new-hint {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; display: flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: 18px; background: var(--grad); color: var(--accent-ink);
  font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 8px 20px -6px rgba(0, 0, 0, .75);
  animation: hintBlink 1.2s ease-in-out infinite;
}
.new-hint[hidden] { display: none; }
.new-hint.left { left: 4px; }
.new-hint.right { right: 4px; }
.new-hint b { font-weight: 800; }
.new-hint svg.lucide { width: 16px; height: 16px; }
.new-hint .nh-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-ink); }
.new-hint:active { transform: translateY(-50%) scale(.95); }
.table-chip {
  flex: 0 0 auto; width: 128px; height: 92px; border-radius: 18px; position: relative; overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--line-2);
  display: flex; flex-direction: column; justify-content: space-between; padding: 12px 14px; text-align: left;
  transition: transform .15s, box-shadow .25s, border-color .2s, background .2s;
}
.table-chip:active { transform: scale(.95); }
.table-chip:hover { border-color: rgba(255, 250, 240, .16); background: var(--card); }
.t-num { font-family: var(--font-display); font-size: 25px; font-weight: 700; line-height: .9; color: var(--text-2); }
.t-meta { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; font-weight: 600; white-space: nowrap; }
.t-meta svg.lucide { width: 13px; height: 13px; }
.t-meta .dot-free { width: 7px; height: 7px; border-radius: 50%; background: var(--green); opacity: .8; }
.t-amount { font-size: 13.5px; font-weight: 800; letter-spacing: -.01em; color: var(--text); }

/* En cours : surface ambrée pleine, liseré doré, montant mis en avant */
.table-chip.busy {
  background:
    radial-gradient(140px 80px at 100% 0%, rgba(212, 175, 106, .30), transparent 70%),
    linear-gradient(165deg, #3A2E1B 0%, #282015 100%);
  border-color: rgba(212, 175, 106, .55);
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 230, 180, .08);
}
.table-chip.busy::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); }
.table-chip.busy .t-num { color: var(--accent); }
.table-chip.busy .t-meta { color: #D9CBB0; }
.table-chip.busy::after {
  content: ''; position: absolute; top: 13px; right: 12px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(212, 175, 106, .2);
}
/* Attente longue : liseré et pastille rouges */
.table-chip.busy.late { border-color: rgba(229, 130, 111, .6); background: radial-gradient(140px 80px at 100% 0%, rgba(229, 130, 111, .22), transparent 70%), linear-gradient(165deg, #3A2420 0%, #281A16 100%); }
.table-chip.busy.late::before { background: linear-gradient(90deg, #F0A08E, var(--red)); }
.table-chip.busy.late::after { background: var(--red); box-shadow: 0 0 0 3px rgba(229, 130, 111, .22); }
.table-chip.busy.late .t-num { color: #F0B3A6; }
/* Nouveauté envoyée par une serveuse, pas encore ouverte sur ce poste : halo doré qui pulse */
.table-chip.busy.is-new { border-color: var(--accent); animation: newBlink 1.2s ease-in-out infinite; }   /* seule la bordure clignote : la table ne grossit pas */
@keyframes newBlink { 0%, 100% { border-color: var(--accent); } 50% { border-color: rgba(212, 175, 106, .12); } }
@keyframes hintBlink { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }
/* Addition demandée par la serveuse : liseré et étiquette verts (à encaisser), visibles sur tous les postes */
.table-chip.busy.bill-req { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-soft), 0 12px 26px -16px rgba(0, 0, 0, .9); }
.table-chip.busy.bill-req::before { background: linear-gradient(90deg, #A8E6C6, var(--green)); }
.table-chip.busy.bill-req::after { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.table-chip.busy.bill-req.selected { border-color: transparent; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--green), 0 16px 34px -14px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.45); }
.req-tag {
  font-family: var(--font); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-left: 6px;
  padding: 2px 6px; border-radius: 6px; vertical-align: middle; background: var(--green); color: #0E2A1C;
}
/* Nombre d'articles de la nouvelle commande (confirmés en attente + pas encore confirmés) */
.new-tag {
  font-family: var(--font); font-size: 11px; font-weight: 800; margin-left: 6px; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; display: inline-grid; place-items: center; vertical-align: middle; font-variant-numeric: tabular-nums;
  background: var(--accent); color: var(--accent-ink);
}
.table-chip.selected .new-tag { background: var(--accent-ink); color: var(--accent); }

/* Sélectionnée : or plein + anneau */
.table-chip.selected {
  background: var(--grad); color: var(--accent-ink); border-color: transparent;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent), 0 16px 34px -14px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.45);
  transform: translateY(-2px);
}
.table-chip.selected::before { background: rgba(29, 22, 8, .25); }
.table-chip.selected .t-num, .table-chip.selected .t-amount { color: var(--accent-ink); }
.table-chip.selected .t-meta { color: rgba(29, 22, 8, .72); }
.table-chip.selected::after { background: var(--accent-ink); box-shadow: none; }
.table-chip.selected .dot-free { background: var(--accent-ink); }
.table-chip.extra .t-num { font-family: var(--font); font-size: 14px; font-weight: 700; line-height: 1.15; }
/* Menu déroulant premium */
.dd { position: relative; flex-shrink: 0; }
.dd-btn {
  width: 100%; height: 50px; padding: 0 12px 0 8px; border-radius: 14px; display: flex; align-items: center; gap: 10px; text-align: left;
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); transition: border-color .2s, box-shadow .2s;
}
.dd-btn:hover, .dd.open .dd-btn { border-color: var(--line); }
.dd.open .dd-btn { box-shadow: 0 0 0 4px var(--accent-soft); }
.dd-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); }
.dd-ico svg.lucide { width: 17px; height: 17px; }
.dd-ico .sw { width: 11px; height: 11px; border-radius: 3px; }
.dd-lbl { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.dd-lbl small { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.dd-lbl b { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd .cnt { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--accent-soft); color: var(--accent); }
.dd-chev { width: 16px !important; height: 16px !important; color: var(--muted); transition: transform .25s; }
.dd.open .dd-chev { transform: rotate(180deg); color: var(--accent); }
.dd-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 100%; z-index: 60; padding: 6px;
  display: flex; flex-direction: column; gap: 2px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .85);
  opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top; pointer-events: none; transition: opacity .18s, transform .18s;
}
.dd.open .dd-menu { opacity: 1; transform: none; pointer-events: auto; }
.dd-opt { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 7px; border-radius: 11px; font-size: 13.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: background .15s, color .15s; }
.dd-opt:hover { background: var(--card-2); color: var(--text); }
.dd-opt .dd-ico { width: 30px; height: 30px; background: var(--card-2); color: var(--text-2); }
.dd-opt-lbl { flex: 1; text-align: left; }
.dd-opt .cnt { background: var(--card-2); color: var(--muted); }
.dd-check { width: 15px !important; height: 15px !important; color: var(--accent); opacity: 0; }
.dd-opt.active { color: var(--text); background: var(--accent-soft); }
.dd-opt.active .dd-ico { background: var(--grad); color: var(--accent-ink); }
.dd-opt.active .dd-check { opacity: 1; }
.dd.disabled { opacity: .4; pointer-events: none; }

/* Onglets d'action de l'en-tête vente */
.head-acts { display: flex; gap: 8px; margin-left: auto; }
.head-act {
  height: 50px; padding: 0 14px; border-radius: 14px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  background: var(--card); border: 1px solid var(--line-2); font-size: 13px; font-weight: 700; color: var(--text-2);
  transition: border-color .2s, color .2s, background .2s, transform .12s;
}
.head-act:hover { border-color: var(--line); color: var(--text); background: var(--card-2); }
.head-act:active { transform: scale(.96); }
.head-act svg.lucide { width: 18px; height: 18px; color: var(--accent); }
.head-act .cnt { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--card-2); color: var(--muted); }
.head-act.warn .cnt { background: var(--orange-soft); color: var(--orange); }
.head-act.gold { background: var(--grad); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 22px -14px var(--accent-glow); }
.head-act.gold svg.lucide { color: var(--accent-ink); }
.head-act.cash { border-color: var(--line); background: linear-gradient(160deg, #2C2416, var(--card)); }
.head-cash { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.head-cash small { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.head-cash b { font-size: 14px; color: var(--accent); font-weight: 800; }
.tables-head .pos-clock { margin-left: 4px; }

/* Encart crédit dans l'encaissement */
.credit-box { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; margin-bottom: 14px; background: var(--orange-soft); border: 1px solid rgba(230, 174, 102, .35); }
.credit-box svg.lucide { color: var(--orange); flex-shrink: 0; margin-top: 2px; }
.credit-box div { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--text-2); }
.credit-box b { color: var(--text); font-size: 14px; }
.credit-box .btn svg.lucide { color: inherit; margin: 0; }
.credit-box.ok { background: var(--accent-soft); border-color: var(--line); }
.credit-box.ok svg.lucide { color: var(--accent); }

/* Passage : vente directe, toujours en tête de la liste */
.table-chip.passage { width: 136px; }
.table-chip.passage:not(.busy):not(.selected) {
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg, rgba(212, 175, 106, .05) 0 8px, transparent 8px 16px),
    linear-gradient(160deg, var(--card-2), var(--card));
}
.table-chip.passage .t-num { font-family: var(--font); font-size: 13.5px; font-weight: 800; letter-spacing: .05em; padding-right: 30px; text-transform: uppercase; color: var(--text); line-height: 1.2; }
.table-chip.passage .t-meta { color: var(--accent); }
.passage-ico {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--grad); color: var(--accent-ink);
  box-shadow: 0 6px 14px -6px var(--accent-glow);
}
.passage-ico svg.lucide { width: 14px; height: 14px; stroke-width: 2.4; }
.table-chip.passage.busy::after { display: none; }
.table-chip.passage.selected .passage-ico { background: var(--accent-ink); color: var(--accent); }
.table-chip.passage.selected .t-num { color: var(--accent-ink); }
.table-chip.passage.selected .t-meta { color: rgba(29, 22, 8, .72); }
.tables-sep { flex: 0 0 auto; width: 1px; align-self: stretch; margin: 10px 4px; background: linear-gradient(180deg, transparent, var(--line), transparent); }

/* Factures séparées sur une même table */
.table-group { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; margin-right: 6px; }
.table-group.multi { padding: 4px; border-radius: 22px; border: 1px dashed var(--line); background: rgba(255, 248, 235, .015); }
/* Bouton « + » : médaillon doré, anneau en dégradé, intérieur sombre satiné */
.split-add {
  width: 34px; height: 34px; border-radius: 50%; margin-left: -25px; position: relative; z-index: 2; flex-shrink: 0;
  display: grid; place-items: center; color: var(--accent);
  border: 1.5px solid transparent;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 248, 235, .09), transparent 60%) padding-box,
    linear-gradient(160deg, var(--card-2), var(--panel)) padding-box,
    var(--grad) border-box;
  box-shadow: 0 0 0 3px var(--bg), 0 8px 18px -8px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, color .2s, background .25s;
}
.split-add svg.lucide { width: 15px; height: 15px; stroke-width: 2.4; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.split-add:hover {
  color: var(--accent-ink);
  background: var(--grad) padding-box, var(--grad) border-box;
  box-shadow: 0 0 0 3px var(--bg), 0 10px 22px -8px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.split-add:hover svg.lucide { transform: rotate(90deg); }
.split-add:active { transform: scale(.88); }
.bill-tag {
  font-family: var(--font); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; margin-left: 6px;
  padding: 2px 6px; border-radius: 6px; vertical-align: middle; background: var(--accent-soft); color: var(--accent);
}
.table-chip.selected .bill-tag { background: rgba(0, 0, 0, .12); color: var(--accent-ink); }
.table-chip.other {
  border: 1.5px dashed rgba(201,174,124,0.293); background: transparent; color: var(--accent);
  align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 13px;
}
.table-chip.other svg.lucide { width: 24px; height: 24px; }
.table-chip.other:hover { background: var(--accent-soft); }
.tables-bar.attention { animation: attention .8s; }
@keyframes attention { 0%,100% { box-shadow: none; } 30% { box-shadow: inset 0 0 0 2px var(--accent); } }

.catalog-bar { display: flex; gap: 14px; padding: 18px 24px 8px; align-items: center; }
.catalog-bar .input-icon { flex: 0 0 300px; }
.catalog-bar .input { height: 48px; background: var(--card); }
.cats { display: flex; gap: 8px; overflow-x: auto; flex: 1; scrollbar-width: none; padding: 2px; }
.cats::-webkit-scrollbar { display: none; }
.cat-pill {
  height: 46px; padding: 0 18px; border-radius: 99px; background: var(--card);
  border: 1px solid var(--line-2); white-space: nowrap; display: flex; align-items: center; gap: 8px;
  font-weight: 650; font-size: 13.5px; color: var(--text-2); transition: .2s; flex-shrink: 0;
}
.cat-pill svg.lucide { width: 17px; height: 17px; }
.cat-pill .count { font-size: 11px; color: var(--muted); font-weight: 700; }
.cat-pill.active { background: var(--grad); border-color: transparent; color: var(--accent-ink); box-shadow: 0 8px 20px -12px var(--accent-glow); }
.cat-pill.active .count { color: var(--accent-ink); opacity: .65; }

.products {
  flex: 1; overflow-y: auto; padding: 12px 24px 28px; min-height: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); grid-auto-rows: max-content; gap: 16px; align-content: start;
}
.product {
  background: var(--card); border-radius: 20px; overflow: hidden; border: 1px solid var(--line-2);
  text-align: left; position: relative; transition: transform .15s, border-color .2s, box-shadow .25s;
  display: block; width: 100%;
}
.product:hover { border-color: var(--line); box-shadow: 0 22px 40px -22px rgba(0,0,0,.95); transform: translateY(-3px); }
.product:active { transform: scale(.96); }
.product.flash { animation: flash .45s; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 50% { box-shadow: 0 0 0 4px var(--accent-glow); } 100% { box-shadow: 0 0 0 0 transparent; } }
.p-img { aspect-ratio: 4 / 3; width: 100%; flex-shrink: 0; background: linear-gradient(135deg, #2D2A25, #24221E); position: relative; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.p-img img { filter: brightness(.95) saturate(1.02); }
.product:hover .p-img img { transform: scale(1.05); filter: brightness(1.02) saturate(1.05); }
.p-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(26,25,23,.65)); pointer-events: none; }
.p-img.noimg img { display: none; }
.p-img.noimg::before { content: attr(data-emoji); position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; }
.p-price {
  position: absolute; left: 10px; bottom: 9px; z-index: 1; font-weight: 700; font-size: 13.5px;
  background: rgba(26,25,23,.72); backdrop-filter: blur(8px); color: var(--accent);
  padding: 5px 10px; border-radius: 9px; border: 1px solid rgba(201,174,124,0.163);
}
.p-body { padding: 12px 14px 14px; }
.p-name { font-weight: 700; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.p-cat { font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: .04em; }
.p-qty {
  position: absolute; top: 10px; right: 10px; z-index: 2; min-width: 32px; height: 32px; padding: 0 9px;
  border-radius: 99px; background: var(--grad); color: var(--accent-ink); font-weight: 700; font-size: 14px;
  display: grid; place-items: center; box-shadow: 0 6px 16px -4px rgba(0,0,0,.6);
  animation: pop .3s cubic-bezier(.2,1.6,.4,1);
}
.product.off { opacity: .38; pointer-events: none; filter: grayscale(.8); }
.p-off { position: absolute; top: 10px; left: 10px; z-index: 2; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; }
.empty-products { grid-column: 1 / -1; padding: 80px 0; text-align: center; color: var(--muted); }

/* Ticket */
.ticket { background: var(--panel); border-left: 1px solid var(--line-2); display: flex; flex-direction: column; height: 100%; min-height: 0; min-width: 0; overflow: hidden; }
.tables-head h2, .zone-tab { white-space: nowrap; }
.ticket-head { padding: 20px 22px 16px; border-bottom: 1px dashed var(--line); }
.th-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.th-title { font-family: var(--font-display); font-size: 30px; letter-spacing: -.01em; font-weight: 700; line-height: 1; }
.th-sub { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.th-sub svg.lucide { width: 13px; height: 13px; }
.th-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 16px; }
.th-box { background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; padding: 9px 12px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.th-box svg.lucide { color: var(--accent); width: 18px; height: 18px; }
.th-box .lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.th-box .val { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.covers-ctrl { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.covers-ctrl button { width: 28px; height: 28px; border-radius: 8px; background: var(--hover); display: grid; place-items: center; }
.covers-ctrl button svg.lucide { width: 14px; height: 14px; }

.t-cli { overflow: hidden; text-overflow: ellipsis; max-width: 52px; display: inline-block; vertical-align: bottom; }
/* Bloc client du ticket */
.th-client { cursor: pointer; transition: border-color .2s, background .2s; }
.th-client:hover { border-color: var(--line); background: var(--card-2); }
.th-client.has-client { border-color: var(--line); }
.th-client .val .muted { font-weight: 600; }
.client-list { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.client-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-soft); cursor: pointer; transition: border-color .15s, background .15s; }
.client-row:hover { border-color: var(--line); background: var(--card); }
.client-row.active { border-color: var(--accent); background: var(--accent-soft); }
/* Suggestions automatiques (nom / téléphone) */
.ac-list { display: none; flex-direction: column; gap: 4px; margin-top: 8px; padding: 6px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); animation: fade .15s; }
.ac-list.open { display: flex; }
.ac-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; transition: background .15s; }
.ac-item:hover, .ac-item:focus-visible { background: var(--card-2); outline: none; }
.ac-name { display: block; font-weight: 700; font-size: 14px; }
.ac-phone { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ac-item mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 1px; }
.ac-go { width: 15px !important; height: 15px !important; color: var(--muted); }
.cd-hint:not(:empty) { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 11px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--text-2); font-size: 13px; }
.cd-hint svg.lucide { width: 16px; height: 16px; color: var(--accent); }
td mark, .cell-title mark { background: var(--accent-soft); color: var(--accent); border-radius: 3px; }
.client-av.sm { width: 34px; height: 34px; font-size: 12px; }
.client-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--grad); color: var(--accent-ink); font-weight: 800; font-size: 14px; }

.ticket-lines { flex: 1; overflow-y: auto; padding: 10px 14px; min-height: 0; }
.t-line {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 10px; border-radius: 14px;
  align-items: center; transition: background .2s; position: relative; animation: lineIn .3s ease;
}
@keyframes lineIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.t-line + .t-line { border-top: 1px solid var(--line-2); }
.t-line:hover { background: rgba(255,255,255,.02); }
.l-main { min-width: 0; cursor: pointer; }
.l-name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.l-name .sent-ico { color: var(--green); display: inline-flex; }
.l-name .sent-ico svg.lucide { width: 14px; height: 14px; }
.l-name .new-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); flex-shrink: 0; }
.l-name .conf-ico { color: #f59e0b; display: inline-flex; }   /* confirmé par la serveuse, en attente de la caisse */
.l-name .conf-ico svg.lucide { width: 14px; height: 14px; }
.l-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.l-note { font-size: 12px; color: var(--accent); margin-top: 4px; font-style: italic; display: flex; align-items: center; gap: 5px; }
.l-note svg.lucide { width: 12px; height: 12px; }
.l-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.l-total { font-weight: 700; font-size: 14px; }
.qty-ctrl { display: flex; align-items: center; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; }
.qty-ctrl button { width: 36px; height: 34px; display: grid; place-items: center; color: var(--text-2); border-radius: 11px; }
.qty-ctrl button:active { background: var(--hover); }
.qty-ctrl button svg.lucide { width: 15px; height: 15px; }
.qty-ctrl span { min-width: 26px; text-align: center; font-weight: 700; font-size: 14px; }
.ticket-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; color: var(--muted); gap: 14px; }
.ticket-empty .ring { width: 96px; height: 96px; border-radius: 50%; border: 1px dashed var(--line); display: grid; place-items: center; color: var(--accent); background: radial-gradient(circle, var(--accent-soft), transparent 70%); }
.ticket-empty .ring svg.lucide { width: 38px; height: 38px; stroke-width: 1.3; }
.ticket-empty h4 { font-family: var(--font-display); font-size: 19px; color: var(--text); font-weight: 600; }
.ticket-empty p { font-size: 13px; max-width: 260px; line-height: 1.5; }

.ticket-foot { padding: 14px 22px 20px; border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--card), var(--panel)); }
.sum-row { display: flex; justify-content: space-between; color: var(--text-2); font-size: 13px; padding: 3px 0; }
.sum-row.disc { color: var(--green); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.sum-total .lbl { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.sum-total .val { font-family: var(--font-display); font-size: 33px; letter-spacing: -.02em; font-weight: 700; color: var(--accent); line-height: 1; }
.t-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 14px 0 10px; }
.t-act {
  height: 60px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  font-size: 11px; font-weight: 650; color: var(--text-2); transition: .15s;
}
.t-act:hover { color: var(--text); background: var(--card-2); }
.t-act:active { transform: scale(.95); }
.t-act svg.lucide { width: 19px; height: 19px; }
.t-act.danger:hover { color: var(--red); }
.t-act[disabled] { opacity: .35; pointer-events: none; }
.t-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; }
.t-main .btn-lg { flex-direction: column; gap: 2px; height: 66px; }
.t-main .btn-lg small { font-size: 11px; font-weight: 700; opacity: .7; letter-spacing: .04em; }
.btn-pay { flex-direction: row !important; justify-content: space-between !important; padding: 0 22px !important; }
.btn-pay .amt { font-family: var(--font-display); font-size: 19px; font-weight: 700; }

/* =========================================================
   PAGES DE GESTION
   ========================================================= */
.page { height: 100%; overflow-y: auto; padding: 32px 36px 48px; background: radial-gradient(1000px 420px at 85% -10%, rgba(201,174,124,0.039), transparent 60%); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-size: 38px; letter-spacing: -.02em; font-weight: 700; line-height: 1; margin-top: 10px; }
.page-sub { color: var(--muted); margin-top: 10px; font-size: 14px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.date-range { display: flex; align-items: center; gap: 8px; }
.date-range .input { width: 150px; height: 40px; padding: 0 10px; font-size: 13px; }
.date-range-sep { color: var(--muted); font-size: 13px; }

/* Indicateur de session de caisse en cours (page Caisse) */
.session-indicator {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 8px 14px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--line-2);
  color: var(--text-2); font-size: 12.5px;
}
.session-indicator svg.lucide { width: 14px; height: 14px; color: var(--accent); }
.session-indicator b { color: var(--text); font-weight: 700; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpi {
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 20px 22px; position: relative; overflow: hidden;
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 650; letter-spacing: .04em; }
.kpi-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.kpi-ico svg.lucide { width: 19px; height: 19px; }
.kpi-ico.green { background: var(--green-soft); color: var(--green); }
.kpi-ico.red { background: var(--red-soft); color: var(--red); }
.kpi-ico.blue { background: var(--blue-soft); color: var(--blue); }
.kpi-ico.orange { background: var(--orange-soft); color: var(--orange); }
.kpi-value { font-family: var(--font-display); font-size: 29px; font-weight: 700; margin-top: 12px; line-height: 1; letter-spacing: -.01em; }
.kpi-value small { font-family: var(--font); font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.kpi-foot { font-size: 12px; color: var(--muted); margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.kpi-foot svg.lucide { width: 14px; height: 14px; }
.kpi.featured { background: radial-gradient(260px 160px at 100% 0%, rgba(201,174,124,0.163), transparent 70%), linear-gradient(160deg, #2E2A23, #25231F); border-color: rgba(201,174,124,0.227); }
.kpi.featured .kpi-value { color: var(--accent); }

/* Cartes KPI premium pour la caisse */
.caisse-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 22px; }
.kpi-card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--line);
  box-shadow: 0 20px 45px -20px rgba(0,0,0,.6);
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .2s;
}
.kpi-card:hover::before { opacity: 1; }
.kpi-card.kpi-gold::before { background: var(--accent); }
.kpi-card.kpi-blue::before { background: var(--blue); }
.kpi-card.kpi-red::before { background: var(--red); }
.kpi-card.kpi-featured::before { background: var(--accent); }
.kpi-card.kpi-card-payments {
  grid-column: span 2;
}
@media (max-width: 900px) {
  .kpi-card.kpi-card-payments {
    grid-column: span 1;
  }
}
.kpi-card.kpi-featured {
  background: radial-gradient(280px 180px at 100% 0%, rgba(201,174,124,0.18), transparent 70%),
              linear-gradient(160deg, #2E2A23, #25231F);
  border-color: rgba(201,174,124,0.25);
  box-shadow: 0 0 0 1px rgba(201,174,124,0.12), 0 24px 50px -24px rgba(201,174,124,0.15);
}

/* Design ticket premium en haut de chaque carte */
.ticket-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1;
}
.ticket-notch {
  width: 20px;
  height: 20px;
  background: var(--bg);
  border-radius: 50%;
  position: absolute;
  top: -10px;
  border: 2px solid var(--line-2);
}
.ticket-notch-left { left: -10px; }
.ticket-notch-right { right: -10px; }
.ticket-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 0 10px;
}
.kpi-card.kpi-featured .ticket-line {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.kpi-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(201,174,124,0.2);
  margin-top: 12px;
}
.kpi-card.kpi-blue .kpi-icon { background: var(--blue-soft); color: var(--blue); border-color: rgba(141,180,232,0.2); }
.kpi-card.kpi-red .kpi-icon { background: var(--red-soft); color: var(--red); border-color: rgba(229,130,111,0.2); }
.kpi-card.kpi-featured .kpi-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 8px 20px -8px rgba(201,174,124,0.5);
}
.kpi-icon svg.lucide { width: 26px; height: 26px; }
.kpi-content { flex: 1; min-width: 0; margin-top: 12px; }
.kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.kpi-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--text);
}
.kpi-card.kpi-featured .kpi-value { color: var(--accent); }
.kpi-foot {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-foot svg.lucide { width: 13px; height: 13px; }

/* Liste des paiements dans la carte */
.payment-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.payment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-radius: 10px;
  border: 1px solid var(--line-2);
  gap: 12px;
}
.payment-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.payment-icon svg.lucide { width: 16px; height: 16px; }
.payment-icon.has-logo { padding: 0; overflow: hidden; background: #fff; border: 1px solid var(--line-2); }
.payment-icon.has-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.payment-method {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 600;
  flex: 1;
}
.payment-amount {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
}

/* Formulaire de billetage pour la clôture de caisse */
.billets-grid {
  padding: 20px 0;
}
.billets-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.billets-row {
  display: grid;
  grid-template-columns: 76px 90px 120px 1fr;
  gap: 16px;
  align-items: center;
  padding: 10px 16px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border-radius: 14px;
  border: 1px solid var(--line-2);
  transition: border-color .15s, transform .15s;
}
.billets-row:has(.billets-input:focus) {
  border-color: var(--accent);
  transform: translateX(2px);
}
.billets-visual {
  width: 76px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
}
.billets-row-coin .billets-visual { width: 44px; margin: 0 auto; }
.billets-visual img { width: 100%; height: 100%; object-fit: contain; }
.billets-row-coin .billets-visual img { width: 44px; height: 44px; }
.billets-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-display);
}
.billets-input {
  height: 42px;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--text);
}
.billets-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.billets-total {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--green);
  text-align: right;
}

/* Pied de page de clôture de caisse */
.cloture-footer {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cloture-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 18px;
  background: radial-gradient(260px 140px at 100% 0%, rgba(201,174,124,0.12), transparent 70%), linear-gradient(160deg, #2E2A23, #221F1A);
  border-radius: 16px;
  border: 1px solid rgba(201,174,124,0.2);
  box-shadow: 0 0 0 1px rgba(201,174,124,0.08), 0 20px 40px -24px rgba(0,0,0,.6);
}
.cloture-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  background: rgba(0,0,0,.18);
  border-radius: 12px;
  border: 1px solid var(--line-2);
  position: relative;
}
.cloture-stat:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 4px, transparent 4px 8px);
}
.cloture-stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cloture-stat-value {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
}
.cloture-stat-value.green {
  color: var(--green);
}
.cloture-stat-value.red {
  color: var(--red);
}
.cloture-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.cloture-actions .btn {
  min-width: 160px;
}

.card { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 22px 24px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 16px; font-weight: 750; display: flex; align-items: center; gap: 10px; }
.card-title svg.lucide { color: var(--accent); width: 19px; height: 19px; }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-21 { grid-template-columns: 2fr 1fr; }
.grid-12 { grid-template-columns: 1fr 2fr; }
.mb { margin-bottom: 18px; }

.toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .input-icon { width: 320px; }
.toolbar .input { height: 46px; background: var(--card); }

.tabs { display: inline-flex; background: var(--card); padding: 5px; border-radius: 15px; gap: 4px; border: 1px solid var(--line-2); }
.tab { height: 40px; padding: 0 18px; border-radius: 11px; font-weight: 650; font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; transition: .2s; }
.tab svg.lucide { width: 17px; height: 17px; }
.tab.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
.tab.active svg.lucide { color: var(--accent); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-weight: 700; white-space: nowrap; }
.table td { padding: 14px; border-bottom: 1px solid var(--line-2); font-size: 14px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(255,255,255,.018); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .strong { font-weight: 700; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* Gestion des familles (catégories) d'articles */
.cat-manage-list { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; }
.cat-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 12px; }
.cat-row-info { flex: 1; min-width: 0; }
.icon-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.icon-opt { aspect-ratio: 1; display: grid; place-items: center; background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 10px; color: var(--muted); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.icon-opt:hover { color: var(--text); border-color: var(--line); }
.icon-opt.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.icon-opt svg.lucide { width: 18px; height: 18px; }
.thumb { width: 52px; height: 52px; border-radius: 13px; overflow: hidden; background: var(--card-2); position: relative; flex-shrink: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.noimg img { display: none; }
.thumb.noimg::before { content: attr(data-emoji); position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; }
.cell-flex { display: flex; align-items: center; gap: 14px; }
.cell-title { font-weight: 700; }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }

.level { width: 140px; height: 8px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.level > i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.level.warn > i { background: var(--orange); }
.level.crit > i { background: var(--red); }

/* Graphiques */
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 240px; padding-top: 24px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; height: 100%; min-width: 0; position: relative; }
.bar-fill {
  width: 100%; max-width: 40px; border-radius: 10px 10px 4px 4px; min-height: 4px; position: relative;
  background: linear-gradient(180deg, var(--accent), rgba(201,174,124,0.163));
  transition: height .8s cubic-bezier(.2,.8,.2,1); transform-origin: bottom; animation: grow .9s cubic-bezier(.2,.8,.2,1);
}
.bar-fill.dim { background: linear-gradient(180deg, rgba(201,174,124,0.227), rgba(201,174,124,0.052)); }
.bar:hover .bar-fill { filter: brightness(1.2); }
.bar-val { position: absolute; top: -22px; font-size: 10.5px; font-weight: 700; color: var(--text-2); white-space: nowrap; opacity: 0; transition: .2s; }
.bar:hover .bar-val { opacity: 1; }
.bar-label { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.donut-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.donut { width: 170px; height: 170px; border-radius: 50%; position: relative; flex-shrink: 0; }
.donut::after { content: ''; position: absolute; inset: 24px; border-radius: 50%; background: var(--card); }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; text-align: center; }
.donut-center b { font-family: var(--font-display); font-size: 24px; display: block; line-height: 1; }
.donut-center span { font-size: 11px; color: var(--muted); }
.legend-list { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 160px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-item b { margin-left: auto; font-weight: 750; }
.legend-item span.pct { color: var(--muted); font-size: 12px; width: 40px; text-align: right; }

.rank-list { display: flex; flex-direction: column; gap: 14px; }
.rank { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; align-items: center; }
.rank-n { font-family: var(--font-display); font-size: 16px; color: var(--accent); font-weight: 600; }
.rank-name { font-weight: 650; font-size: 13.5px; }
.rank-bar { height: 5px; border-radius: 99px; background: var(--hover); margin-top: 7px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.rank-val { font-weight: 750; font-size: 13px; text-align: right; }
.rank-val small { display: block; color: var(--muted); font-weight: 600; font-size: 11px; }

/* Cartes utilisateurs */
.users-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.ucard { background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--line-2); border-radius: 24px; padding: 26px 22px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; position: relative; }
.ucard .avatar { margin-bottom: 12px; }
.ucard-name { font-size: 17px; font-weight: 750; }
.ucard-meta { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 14px; padding: 14px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.ucard-meta div { font-size: 11px; color: var(--muted); }
.ucard-meta b { display: block; color: var(--text); font-size: 13px; margin-top: 4px; }
.ucard-actions { display: flex; gap: 8px; width: 100%; }
.ucard-actions .btn { flex: 1; }
.ucard .status { position: absolute; top: 18px; right: 18px; }
.ucard.inactive { opacity: .55; }

/* Paramètres */
.settings-list { display: flex; flex-direction: column; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.set-row:last-child { border-bottom: 0; }
.set-row .t { font-weight: 700; font-size: 14px; }
.set-row .d { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.set-row .ctrl { width: 220px; flex-shrink: 0; display: flex; justify-content: flex-end; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; color: var(--text-2); }
.swatch i { width: 54px; height: 54px; border-radius: 16px; display: block; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); transition: .2s; }
.swatch.active i { border-color: var(--text); transform: scale(1.06); }
.tables-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

/* Permissions utilisateur (modale d'édition) */
.perm-section { grid-column: 1 / -1; margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.perm-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.perm-body { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.perm-group { background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px 16px; }
.perm-group-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 14px; }
.perm-chk { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-2); cursor: pointer; padding: 4px 0; }
.perm-chk input { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.perm-chk-off { opacity: .4; }
.perm-chk-off input { cursor: not-allowed; }
.tadmin { background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tadmin b { font-family: var(--font-display); font-size: 22px; }
.tadmin span { font-size: 11px; color: var(--muted); display: block; }

/* Caisse */
.cash-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-bottom: 18px; }
.fund-card { background: radial-gradient(400px 220px at 0% 0%, rgba(201,174,124,0.13), transparent 70%), linear-gradient(160deg, #2C2821, #24221E); border: 1px solid rgba(201,174,124,0.195); border-radius: 24px; padding: 28px 30px; position: relative; overflow: hidden; }
.fund-card .big { font-family: var(--font-display); font-size: 44px; letter-spacing: -.02em; font-weight: 600; color: var(--accent); line-height: 1; margin: 14px 0 8px; }
.fund-card::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 200px; height: 200px; border-radius: 50%; border: 1px solid rgba(201,174,124,0.117); box-shadow: 0 0 0 30px rgba(201,174,124,0.019), 0 0 0 60px rgba(201,174,124,0.013); }
.flow { display: flex; flex-direction: column; gap: 10px; }
.flow-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line-2); font-size: 13.5px; }
.flow-row b { font-size: 15px; }
.flow-row.total { background: var(--accent-soft); border-color: var(--line); }
.flow-row.total b { color: var(--accent); font-family: var(--font-display); font-size: 21px; }

/* Entreprise */
.company-layout { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
.logo-drop { display: flex; align-items: center; gap: 18px; padding: 18px; border: 1px dashed var(--line); border-radius: 18px; background: var(--bg-soft); }
.sticky { position: sticky; top: 0; }

/* =========================================================
   MODALES & TOASTS
   ========================================================= */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,4,3,.72); backdrop-filter: blur(10px);
  display: grid; place-items: center; z-index: 100; animation: fade .2s ease; padding: 20px;
}
.modal-backdrop.closing { animation: fadeOut .18s ease forwards; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
.modal {
  background: var(--panel); border: 1px solid var(--line); border-radius: 28px;
  width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.04);
  animation: pop .32s cubic-bezier(.2,1.2,.3,1); overflow: hidden;
}
.modal.lg { width: min(860px, 100%); }
.modal.xl { width: min(1040px, 100%); }
.modal.sm { width: min(440px, 100%); }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
.modal-head { padding: 24px 28px 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 1px solid var(--line-2); }
.modal-title { font-family: var(--font-display); font-size: 25px; font-weight: 700; line-height: 1.05; }
.modal-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.modal-body { padding: 24px 28px; overflow-y: auto; }
.modal-foot { padding: 18px 28px 22px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; background: var(--bg-soft); }
.modal-foot .spacer { flex: 1; }

.confirm-ico { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: var(--accent-soft); color: var(--accent); }
.confirm-ico.danger { background: var(--red-soft); color: var(--red); }
.confirm-ico svg.lucide { width: 30px; height: 30px; }

#toast-root { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(30,27,22,.96); border: 1px solid var(--line); backdrop-filter: blur(12px);
  padding: 13px 20px 13px 14px; border-radius: 16px; display: flex; align-items: center; gap: 12px;
  font-weight: 650; font-size: 14px; box-shadow: var(--shadow); animation: toastIn .35s cubic-bezier(.2,1.3,.3,1);
}
.toast .ti { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.toast.err .ti { background: var(--red-soft); color: var(--red); }
.toast.info .ti { background: var(--accent-soft); color: var(--accent); }
.toast .ti svg.lucide { width: 17px; height: 17px; }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }


/* Paiement */
.pay-grid { display: grid; grid-template-columns: 1fr 340px; gap: 26px; }
.pay-due { background: radial-gradient(300px 160px at 0% 0%, rgba(201,174,124,0.13), transparent 70%), var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; margin-bottom: 18px; }
.pay-due .lbl { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pay-due .val { font-family: var(--font-display); font-size: 40px; letter-spacing: -.02em; font-weight: 600; color: var(--accent); line-height: 1; margin-top: 8px; }
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.method { height: 74px; border-radius: 16px; background: var(--card); border: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; padding: 0 16px; font-weight: 700; font-size: 14px; text-align: left; transition: .15s; }
.method .mi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--hover); color: var(--text-2); }
.method small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.method.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.method[disabled] { opacity: .4; pointer-events: none; }
.prep-choices { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
/* Bons cuisine / bar : gros caractères, lisibles de loin en cuisine */
.receipt.prep-ticket { font-size: 16px; }
.receipt.prep-ticket .rc-row { font-size: 16px; }
.receipt.prep-ticket .rc-small { font-size: 14px; color: #1E1A14; }
.receipt.prep-ticket .rc-title { font-size: 15px; letter-spacing: .12em; }
.receipt .prep-title { font-size: 22px !important; font-weight: 900; letter-spacing: .06em !important; margin-bottom: 10px; }
.receipt .prep-line { font-size: 22px; font-weight: 800; line-height: 1.25; margin-top: 6px; }
.receipt.prep-ticket .rc-item-note { font-size: 17px; font-weight: 700; color: #1E1A14; padding-left: 14px; margin-top: 2px; }
.receipt .prep-cmd { display: flex; flex-direction: column; margin-bottom: 4px; }
.receipt .prep-cmd b { font-size: 18px; letter-spacing: .1em; }
.receipt .prep-cmd span { font-size: 14px; color: #1E1A14; }
.receipt .prep-line .prep-dest { flex: none; font-size: 14px; font-weight: 700; color: #1E1A14; }
.method.active .mi { background: var(--grad); color: var(--accent-ink); }
.methods-3 { grid-template-columns: repeat(3, 1fr); }
.methods-3 .method { height: 70px; padding: 0 12px; gap: 10px; font-size: 13px; }
.methods-3 .method small { font-size: 10.5px; }
.mi.has-logo, .pay-ico.has-logo { padding: 0; overflow: hidden; background: #fff; }
.mi.has-logo img, .pay-ico img { width: 100%; height: 100%; object-fit: cover; display: block; }
.method.active .mi.has-logo { background: #fff; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--accent); }
.pay-ico { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; flex-shrink: 0; color: var(--text-2); background: var(--hover); }
.pay-ico svg.lucide { width: 13px; height: 13px; }
.pay-inline { display: inline-flex; align-items: center; gap: 10px; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick button { height: 48px; border-radius: 12px; background: var(--card); border: 1px solid var(--line-2); font-weight: 700; font-size: 13px; }
.quick button:active { transform: scale(.96); background: var(--hover); }
.pay-screen { background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 18px; padding: 16px 18px; margin-bottom: 14px; }
.pay-screen .r { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; font-size: 13px; color: var(--muted); }
.pay-screen .r b { font-family: var(--font-display); font-size: 23px; color: var(--text); font-weight: 600; }
.pay-screen .r.change b { color: var(--green); }
.pay-screen .r.miss b { color: var(--red); }

/* Ticket de caisse (papier) */
.receipt-stage { display: flex; justify-content: center; padding: 10px 0; background: radial-gradient(circle at 50% 40%, rgba(201,174,124,0.052), transparent 60%); }
.receipt {
  width: 330px; background: #EFEADF; color: #1E1A14; font-family: var(--mono); font-size: 12.5px; line-height: 1.45;
  padding: 26px 22px 34px; position: relative; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%;
}
.receipt .rc-center { text-align: center; }
.receipt .rc-logo { width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid #1E1A14; display: grid; place-items: center; margin: 0 auto 8px; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.receipt .rc-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: .02em; }
.receipt .rc-small { font-size: 11px; color: #5b5346; }
.receipt .rc-sep { border-top: 1px dashed #8a8170; margin: 10px 0; }
.receipt .rc-row { display: flex; justify-content: space-between; gap: 8px; }
.receipt .rc-row span:first-child { flex: 1; }
.receipt .rc-item-note { font-size: 11px; color: #6b6253; padding-left: 10px; }
.receipt .rc-total { font-size: 17px; font-weight: 700; }
.receipt .rc-title { text-align: center; font-weight: 700; letter-spacing: .2em; font-size: 12px; margin: 4px 0; }

/* Ticket de fermeture de caisse : rubriques titrées, montants alignés à points de conduite, totaux encadrés */
.receipt.cl-ticket { color: #000; font-size: 12.5px; line-height: 1.4; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cl-ticket .cl-brand { text-align: center; padding-bottom: 10px; }
.cl-ticket .cl-brand .rc-logo { border-color: #000; }
.cl-ticket .cl-brand .rc-name { font-size: 20px; text-transform: uppercase; letter-spacing: .06em; }
.cl-ticket .cl-slogan { font-style: italic; font-size: 11.5px; margin: 2px 0 4px; }
.cl-ticket .rc-small { color: #000; font-size: 11px; }
.cl-ticket .cl-band { margin: 6px -4px 10px; padding: 8px 6px; background: #000; color: #fff; text-align: center; font-weight: 900; font-size: 15px; letter-spacing: .22em; }
.cl-ticket .cl-meta { padding-bottom: 6px; border-bottom: 2px solid #000; margin-bottom: 4px; }
.cl-ticket .cl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 14px 0 6px; padding: 4px 0;
  border-top: 2px solid #000; border-bottom: 1px solid #000; }
.cl-ticket .cl-head span { font-weight: 900; font-size: 12.5px; letter-spacing: .1em; }
.cl-ticket .cl-head small { font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.cl-ticket .cl-row { display: flex; align-items: baseline; gap: 4px; padding: 1.5px 0; }
.cl-ticket .cl-row > span { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.cl-ticket .cl-row > i { flex: 1 1 12px; min-width: 12px; border-bottom: 1px dotted #000; transform: translateY(-3px); }
.cl-ticket .cl-row > b { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-ticket .cl-row em { font-style: normal; font-size: 11px; }
.cl-ticket .cl-row.strong { font-weight: 900; font-size: 13.5px; }
.cl-ticket .cl-row.strong > b { font-weight: 900; }
.cl-ticket .cl-row.small { font-size: 11.5px; }
.cl-ticket .cl-q { display: inline-block; min-width: 24px; font-weight: 900; }
.cl-ticket .cl-sub { display: flex; justify-content: space-between; margin: 8px 0 2px; font-weight: 800; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; text-decoration: underline; }
.cl-ticket .cl-sub span { text-decoration: none; }
.cl-ticket .cl-total { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 6px 0 4px; padding: 6px 8px; border: 2px solid #000; }
.cl-ticket .cl-total span { font-weight: 900; font-size: 12px; letter-spacing: .08em; }
.cl-ticket .cl-total b { font-weight: 900; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-ticket .cl-total.thin { border-width: 1px; padding: 4px 8px; }
.cl-ticket .cl-total.thin b { font-size: 13.5px; }
.cl-ticket .cl-none { font-style: italic; font-size: 11.5px; padding: 2px 0; }
.cl-ticket .cl-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; padding-top: 10px; border-top: 2px solid #000; }
.cl-ticket .cl-sign div { text-align: center; font-size: 11px; font-weight: 700; }
.cl-ticket .cl-sign i { display: block; height: 42px; border-bottom: 1px solid #000; margin-bottom: 4px; }
.cl-ticket .cl-foot { margin-top: 12px; text-align: center; font-size: 10.5px; }

/* Chiffres alignés pour les montants en police d'affichage */
.sum-total .val, .btn-pay .amt, .kpi-value, .pay-due .val, .pay-screen b, .fund-card .big,
.flow-row.total b, .donut-center b, .rank-n, .th-title, .t-num, .pos-clock .time, .display, .modal-title {
  font-variant-numeric: lining-nums; font-feature-settings: 'lnum' 1;
}

/* Print */
#print-area { display: none; }
@media print {
  @page { margin: 0; }   /* format du papier : celui du pilote de l'imprimante (rouleau 80 mm) */
  html, body { height: auto; overflow: visible; background: #fff; }
  #app, #modal-root, #toast-root { display: none !important; }
  #print-area { display: block; }
  #print-area .receipt { box-shadow: none; -webkit-mask: none; mask: none; width: 100%; }
  #print-area .prep-ticket + .prep-ticket { break-before: page; }   /* un bon par ticket (coupe entre cuisine et bar) */
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
.pos-clock .date { white-space: nowrap; }
.tables-head { flex-wrap: wrap; row-gap: 10px; }
@media (max-width: 1800px) {
  .tables-head h2, .tables-head .pos-clock { display: none; }
}
@media (max-width: 1500px) {
  .head-act:not(.cash) > span:not(.cnt) { display: none; }
  .head-act { padding: 0 12px; }
}
@media (max-width: 1380px) {
  #dd-status { width: 150px !important; }
  #dd-zone { width: 150px !important; }
  .dd-btn .dd-lbl small, .head-cash small { display: none; }
  .dd-btn > .cnt { display: none; }
  .tables-head { gap: 10px; }
}
@media (max-width: 1700px) {
  .pos-clock .date { display: none; }
}
@media (max-width: 1440px) {
  .tables-head h2 { display: none; }
  .zone-select { width: 150px; }
}
@media (max-width: 1280px) {
  .pos-clock { display: none; }
}
@media (max-width: 1280px) {
  .pos { grid-template-columns: 1fr 370px; }
  .btn-pay { padding: 0 16px !important; }
  .btn-pay svg.lucide { display: none; }
  .btn-pay .amt { font-size: 22px; }
  .th-box { padding: 9px 10px; gap: 8px; }
  .th-box > svg.lucide { display: none; }
  .ticket-head, .ticket-foot { padding-left: 18px; padding-right: 18px; }
  .catalog-bar .input-icon { flex-basis: 230px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1080px) {
  .login { grid-template-columns: 1fr auto; }
  .login-hero { display: none; }
  .grid-2, .grid-21, .grid-12, .cash-hero, .company-layout { grid-template-columns: 1fr; }
  .catalog-bar { flex-direction: column; align-items: stretch; }
  .catalog-bar .input-icon { flex-basis: auto; }
  .pay-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 76px 1fr; }
  .nav-item span { display: none; }
  .pos { grid-template-columns: 1fr 330px; }
  .login.has-user .login-users { display: none; }
  .login.has-user .pin-panel, .pin-inner { width: 100vw; max-width: 100vw; }
  .login.has-user { grid-template-columns: 1fr; }
  .page { padding: 22px 18px 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* =========================================================
   Barre fixe (raccourcis de la vente sur toutes les pages)
   ========================================================= */
.topbar {
  flex-shrink: 0; height: 70px; padding: 0 24px; display: flex; align-items: center; gap: 16px;
  background: var(--panel); border-bottom: 1px solid var(--line-2); position: relative; z-index: 5;
}
.topbar .head-acts { margin-left: auto; }
.tb-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tb-time { display: flex; flex-direction: column; line-height: 1.15; }
.tb-time b { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.tb-time span { font-size: 11px; color: var(--muted); text-transform: capitalize; white-space: nowrap; }
.tb-sep { width: 1px; height: 34px; background: var(--line-2); }
.tb-page { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.tb-page small { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 700; white-space: nowrap; }
.tb-page b { font-size: 16px; font-weight: 800; white-space: nowrap; }
.head-act.active { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.topbar .head-act { height: 46px; }
@media (max-width: 1500px) { .tb-page { display: none; } .tb-sep { display: none; } }
@media (max-width: 1180px) { .tb-time span { display: none; } }

/* =========================================================
   Encaissement : comptant (vert) / crédit (rouge)
   ========================================================= */
.btn-cash { background: linear-gradient(135deg, #8BD8AE, #4FA97A); color: #06200F; border-color: transparent; box-shadow: 0 12px 26px -14px rgba(79, 169, 122, .7), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-cash:hover { background: linear-gradient(135deg, #8BD8AE, #4FA97A); filter: brightness(1.06); }
.btn-credit { background: linear-gradient(135deg, #F09A88, #C8513F); color: #fff; border-color: transparent; box-shadow: 0 12px 26px -14px rgba(200, 81, 63, .7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-credit:hover { background: linear-gradient(135deg, #F09A88, #C8513F); filter: brightness(1.06); }
.btn-credit[disabled], .btn-cash[disabled] { opacity: .45; }
.quick .q-credit { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--red); border-color: rgba(229, 130, 111, .3); background: var(--red-soft); }
.quick .q-credit svg.lucide { width: 15px; height: 15px; }
.credit-box:not(.ok) { background: var(--red-soft); border-color: rgba(229, 130, 111, .35); }
.credit-box:not(.ok) > svg.lucide { color: var(--red); }

/* =========================================================
   Crédits classés par client
   ========================================================= */
.cr-list { display: flex; flex-direction: column; gap: 12px; }
.cr-client { background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; transition: border-color .2s; }
.cr-client.open { border-color: var(--line); }
.cr-head {
  display: grid; grid-template-columns: minmax(220px, 1.6fr) 1fr 1fr 1fr 1.1fr auto; gap: 16px; align-items: center;
  padding: 14px 18px; cursor: pointer; transition: background .15s;
}
.cr-head:hover { background: rgba(255, 250, 240, .02); }
.cr-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cr-stat.num { text-align: right; }
.cr-stat small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.cr-stat b { font-size: 15px; font-weight: 800; white-space: nowrap; }
.cr-stat span { font-size: 11.5px; }
.cr-due { color: var(--accent); font-size: 18px !important; }
.cr-chev svg.lucide { transition: transform .25s; }
.cr-client.open .cr-chev svg.lucide { transform: rotate(180deg); }
.cr-body { display: none; padding: 0 12px 10px; border-top: 1px dashed var(--line); background: var(--bg-soft); }
.cr-client.open .cr-body { display: block; }
@media (max-width: 1280px) {
  .cr-head { grid-template-columns: minmax(180px, 1.4fr) .8fr 1fr 1fr auto; }
  .cr-head .cr-stat:nth-child(3) { display: none; }
}

/* =========================================================
   Panneau latéral (détail crédit client)
   ========================================================= */
.modal-backdrop.drawer { place-items: stretch end; padding: 0; }
.modal.drawer {
  width: min(640px, 100vw); height: 100vh; max-height: 100vh; border-radius: 26px 0 0 26px;
  border-right: 0; animation: drawerIn .35s cubic-bezier(.2, .9, .25, 1);
}
.modal-backdrop.drawer.closing .modal.drawer { animation: drawerOut .2s ease forwards; }
@keyframes drawerIn { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drawerOut { to { transform: translateX(60px); opacity: 0; } }
.modal.drawer .modal-head .modal-title { font-size: 22px; }
.modal.drawer .modal-body { flex: 1; background: var(--bg-soft); }
.dr-info { display: flex; gap: 18px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; margin-bottom: 16px; }
.dr-info span { display: inline-flex; align-items: center; gap: 7px; }
.dr-info svg.lucide { width: 15px; height: 15px; color: var(--accent); }
.dr-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.dr-sum > div { background: var(--card); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.dr-sum small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.dr-sum b { font-size: 17px; font-weight: 800; }
.dr-sum .due { background: var(--accent-soft); border-color: var(--line); }
.dr-sum .due b { color: var(--accent); }

.inv { background: var(--card); border: 1px solid var(--line-2); border-radius: 18px; margin-bottom: 14px; overflow: hidden; }
.inv.open { border-color: var(--line); }
.inv.cancelled { opacity: .7; }
.inv.cancelled .inv-lines { text-decoration: line-through; text-decoration-color: rgba(229, 130, 111, .6); }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px dashed var(--line-2); }
.inv-num { font-weight: 800; font-size: 15px; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.inv-due { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.inv-due small { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.inv-due b { font-size: 18px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.inv.done .inv-due b { color: var(--green); }
.inv.cancelled .inv-due b { color: var(--red); }
.inv-lines { padding: 10px 16px; display: flex; flex-direction: column; gap: 6px; }
.inv-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.inv-line em { display: block; font-size: 11.5px; color: var(--accent); margin-top: 2px; }
.inv-total { font-weight: 800; padding-top: 8px; margin-top: 2px; border-top: 1px solid var(--line-2); }
.inv-pays { padding: 10px 16px 12px; background: rgba(255, 250, 240, .015); border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.inv-pay { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-2); }
.inv-cancel { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 9px 12px; border-radius: 10px; background: var(--red-soft); color: var(--red); font-size: 12.5px; font-weight: 600; }
.inv-cancel svg.lucide { width: 15px; height: 15px; }
.inv-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 16px 14px; flex-wrap: wrap; }

/* =========================================================
   Fiche article : image importée, marge, suivi de stock
   ========================================================= */
.art-form { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: start; }
.img-drop {
  position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; cursor: pointer;
  border: 1.5px dashed var(--line); background: var(--bg-soft); transition: border-color .2s, background .2s;
}
.img-drop:hover, .img-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.img-prev { position: absolute; inset: 0; background: center / cover no-repeat; }
.img-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: var(--muted); font-size: 12px; padding: 12px; }
.img-empty b { color: var(--text); font-size: 13.5px; }
.img-empty svg.lucide { width: 30px; height: 30px; color: var(--accent); margin-bottom: 4px; }
.img-drop.has-img { border-style: solid; border-color: var(--line-2); }
.img-drop.has-img .img-empty { display: none; }
.img-meta { font-size: 11.5px; color: var(--text-2); margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 16px; }
.img-meta svg.lucide { width: 14px; height: 14px; color: var(--accent); }
.img-acts { display: flex; gap: 8px; margin-top: 10px; }
.margin-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); padding: 10px 14px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line-2); }
.margin-line:empty { display: none; }
.margin-line svg.lucide { width: 16px; height: 16px; color: var(--accent); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .art-form { grid-template-columns: 1fr; } }

/* Stock sur la carte article (caisse) */
.p-stock { position: absolute; right: 10px; bottom: 9px; z-index: 1; font-size: 10.5px; font-weight: 800; padding: 4px 8px; border-radius: 8px; background: rgba(18, 17, 16, .78); color: var(--green); backdrop-filter: blur(8px); }
.p-stock.low { color: var(--orange); }

/* Règlements annulés dans le détail crédit */
.inv-pay .pay-x { display: inline-flex; align-items: center; gap: 8px; }
.inv-pay.cancelled { color: var(--muted); }
.inv-pay.cancelled .pay-x { color: var(--red); font-size: 11.5px; }
.btn-icon.sm { width: 30px; height: 30px; border-radius: 9px; }
.btn-icon.sm svg.lucide { width: 14px; height: 14px; }

/* Confirmations SweetAlert2, habillées façon « carte » premium de l'application */
.swal-premium {
  border-radius: 22px !important;
  border: 1px solid var(--line-2) !important;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.65), 0 0 0 1px rgba(201,174,124,.08) !important;
  font-family: var(--font) !important;
}
.swal-premium .swal2-title { font-family: var(--font-display) !important; font-weight: 700 !important; }
.swal-premium .swal2-html-container { color: var(--text-2) !important; font-size: 14px !important; line-height: 1.6 !important; }
.swal-premium .swal2-actions { gap: 10px !important; }
.swal-premium .swal2-confirm, .swal-premium .swal2-cancel {
  border-radius: 12px !important; font-weight: 700 !important; font-size: 13.5px !important;
  padding: 11px 22px !important; box-shadow: none !important; transition: transform .15s, opacity .15s;
}
.swal-premium .swal2-confirm:hover, .swal-premium .swal2-cancel:hover { transform: translateY(-1px); }
.swal-cancel-btn { color: var(--text-2) !important; border: 1px solid var(--line-2) !important; }
.swal-premium .swal2-icon.swal2-warning { border-color: var(--red) !important; color: var(--red) !important; }

/* Ticket annulé dans la liste des tickets payés */
.table tr.row-cancelled { opacity: .55; }
.table tr.row-cancelled td.strong, .table tr.row-cancelled .num.strong { text-decoration: line-through; }

/* Récapitulatif du billetage compté, affiché dans le détail d'archive */
.billets-recap { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.billets-recap-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 16px 12px; background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 14px;
  transition: border-color .15s, transform .15s;
}
.billets-recap-item:hover { border-color: var(--line); transform: translateY(-2px); }
.billets-recap-item .billets-visual { width: 72px; height: 40px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.3)); }
.billets-recap-item .billets-recap-coin { width: 44px; height: 44px; }
.billets-recap-item .billets-recap-coin img { width: 44px; height: 44px; }
.billets-recap-label { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; }
.billets-recap-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.billets-recap-total { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--accent); }

/* =========================================================
   Cloche « Commandes en direct » (postes de caisse)
   ========================================================= */
.tb-bell { position: relative; }
.tb-bell.on { animation: attention 1.2s ease 2; }
.tb-badge {
  position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  display: grid; place-items: center; background: var(--red); color: #fff; font-size: 9.5px; font-weight: 800; line-height: 1;
}
.live-list { display: flex; flex-direction: column; gap: 8px; }
.live-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 14px; text-align: left;
  background: var(--card); border: 1px solid var(--line-2); transition: .15s;
}
.live-row:hover { border-color: var(--accent); }
.live-row.done { opacity: .55; cursor: default; }
.live-row.done:hover { border-color: var(--line-2); }
.live-row .lr-time { flex: none; width: 42px; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.live-row .lr-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.live-row .lr-ico.bill { background: var(--green-soft); color: var(--green); }
.live-row .lr-ico svg.lucide { width: 17px; height: 17px; }
.live-row .lr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.live-row .lr-body b { font-size: 14px; color: var(--text); }
.live-row .lr-body small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-row .lr-tag { flex: none; display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; font-weight: 800; color: var(--accent); }
.live-row .lr-tag em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.live-empty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 40px 10px; color: var(--muted); font-weight: 600; }
.live-empty svg.lucide { width: 18px; height: 18px; }


/* Demande d'addition ---------------------------------------------------------
   Serveuse : « Demander l'addition » remplace « Encaisser » (même gabarit), puis état « Addition demandée ».
   Caisse : bandeau sobre dans le ticket (avec impression de la note) et liseré vert sur « Encaisser ». */
.bill-req-banner {
  display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 8px 8px 8px 12px; border-radius: 12px;
  background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .30); border-left: 3px solid #22c55e;
}
.bill-req-banner > svg.lucide { flex: none; width: 18px; height: 18px; color: #22c55e; }
.bill-req-banner > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.bill-req-banner b { font-size: 13px; font-weight: 750; color: var(--text); }
.bill-req-banner small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bill-req-banner .brb-print {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px;
  font-size: 12px; font-weight: 700; color: #22c55e; background: transparent; border: 1px solid rgba(34, 197, 94, .45); transition: .15s;
}
.bill-req-banner .brb-print:hover { background: rgba(34, 197, 94, .12); }
.bill-req-banner .brb-print svg.lucide { width: 15px; height: 15px; }

.t-main .btn-pay.req { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(34, 197, 94, .55), 0 4px 16px rgba(34, 197, 94, .3) !important; }

/* Même gabarit que les deux boutons voisins : libellé sur une ligne, détail en dessous (rien ne déborde) */
.t-main .btn-req {
  height: 58px; min-width: 0; padding: 0 14px; border-radius: 12px; border: 0;
  color: #fff; background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 16px rgba(245, 158, 11, .28);
}
.t-main .btn-req:hover { filter: brightness(1.05); }
.t-main .btn-req[disabled] { background: rgba(255, 255, 255, .06); color: var(--muted); box-shadow: none; }
.t-main .btn-req .br-main { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; min-width: 0; font-size: 14px; font-weight: 800; }
.t-main .btn-req .br-main > span { min-width: 0; line-height: 1.15; text-align: left; white-space: normal; }   /* passe à la ligne plutôt que d'être coupé */
.t-main .btn-req .br-main svg.lucide { flex: none; width: 17px; height: 17px; }
.t-main .btn-req small { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.t-main .btn-req.done { color: #22c55e; background: rgba(34, 197, 94, .10); border: 1.5px solid rgba(34, 197, 94, .5); box-shadow: none; }
.t-main .btn-req.done small { color: var(--text-2); opacity: 1; }
.t-main .btn-req.done:hover { background: rgba(34, 197, 94, .16); filter: none; }

/* Bons archivés d'une commande (réimpression) */
.bon-list { display: flex; flex-direction: column; gap: 8px; }
.bon-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); }
.bon-row .bon-no { flex: none; width: 70px; display: flex; flex-direction: column; }
.bon-row .bon-no b { font-size: 16px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.bon-row .bon-no small { font-size: 11px; color: var(--muted); font-weight: 600; }
.bon-row .bon-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bon-row .bon-body b { font-size: 13.5px; color: var(--text); }
.bon-row .bon-body small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bon-row .bon-acts { flex: none; display: flex; gap: 6px; }
.bon-row .bon-acts .btn { height: 34px; padding: 0 10px; gap: 6px; font-size: 12px; }
.bon-row .bon-acts .btn[disabled] { opacity: .35; pointer-events: none; }
.bon-row .bon-acts svg.lucide { width: 15px; height: 15px; }
@media (max-width: 760px) { .bon-row { flex-wrap: wrap; } .bon-row .bon-acts { width: 100%; } .bon-row .bon-acts .btn { flex: 1; } }

/* Ticket : repère de chaque envoi (« Commande 1 · Bon n° 9 ») et des articles pas encore envoyés */
.t-group { display: flex; align-items: center; gap: 7px; margin: 10px 4px 4px; padding-bottom: 5px; border-bottom: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); }
.t-group:first-child { margin-top: 2px; }
.t-group b { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.t-group small { margin-left: auto; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.t-group svg.lucide { width: 14px; height: 14px; color: var(--accent); }
.t-group.new b { color: var(--accent); }
.t-group .tg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Ticket encaissé : aperçu à gauche, détail de la commande et bons à droite */
.receipt-split { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; }
.receipt-split .receipt-stage { padding: 0; }
.sale-detail { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sale-detail .sd-title { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.sale-detail .sd-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.sale-detail .sd-row span { color: var(--text-2); }
.sale-detail .sd-row b { color: var(--text); font-weight: 700; text-align: right; }
.sale-detail .sd-count { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.sale-detail .sd-none { font-size: 12.5px; color: var(--muted); padding: 10px 0; }
.sale-detail .bon-row { flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; }
.sale-detail .bon-row .bon-acts { width: 100%; }
.sale-detail .bon-row .bon-acts .btn { flex: 1; }
.sale-detail .sd-all { margin-top: 10px; width: 100%; justify-content: center; }
.sale-detail .live-empty { padding: 18px 0; justify-content: flex-start; }
@media (max-width: 900px) { .receipt-split { grid-template-columns: 1fr; } .receipt-split .receipt-stage { justify-content: center; } }

/* Articles : barre de filtres (recherche + préparation, puis catégories) et colonne « Préparation » */
.art-filters {
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; padding: 14px 16px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 16px;
}
.af-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.af-search { flex: 1 1 280px; max-width: 460px; }
.af-search .input { height: 42px; padding-right: 40px; }
.af-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; color: var(--muted); background: transparent; border: 0;
}
.af-clear:hover { color: var(--text); background: var(--hover); }
.af-clear[hidden] { display: none; }
.input-icon .af-clear svg.lucide { position: static; transform: none; width: 16px; height: 16px; pointer-events: none; }
.af-prep { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.af-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Contrôle segmenté : un seul choix, groupé dans une même pastille */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line-2); }
.seg-btn {
  height: 34px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; white-space: nowrap; transition: .15s;
}
.seg-btn svg.lucide { width: 15px; height: 15px; opacity: .8; }
.seg-btn:hover { color: var(--text); background: var(--hover); }
.seg-btn .seg-n { font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg-btn.active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.seg-btn.active .seg-n { color: var(--accent); }

.af-bottom { display: flex; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.af-cats { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.af-cats .cat-pill { flex: none; }
.af-result { flex: none; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.af-result b { color: var(--text); font-weight: 800; }
.af-reset {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 8px;
  font-size: 12px; font-weight: 700; color: var(--accent); background: transparent; border: 1px solid var(--line-2);
}
.af-reset:hover { border-color: var(--accent); background: var(--accent-soft); }
.af-reset svg.lucide { width: 14px; height: 14px; }

.prep-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.badge.purple { background: rgba(168, 85, 247, .14); color: #c084fc; }

@media (max-width: 900px) {
  .af-search { max-width: none; flex-basis: 100%; }
  .af-prep { margin-left: 0; width: 100%; }
  .af-prep .af-label { display: none; }
  .seg { width: 100%; }
  .seg-btn { flex: 1; justify-content: center; padding: 0 6px; }
  .af-bottom { flex-direction: column; align-items: stretch; gap: 10px; }
  .af-cats { width: 100%; }
  .af-result { justify-content: space-between; }
}
@media (max-width: 560px) {
  .art-filters { padding: 12px; }
  .seg-btn { gap: 4px; padding: 0 4px; font-size: 12px; }
  .seg-btn svg.lucide { display: none; }   /* téléphone : libellé + nombre suffisent, les 4 choix tiennent sur une ligne */
}

/* Ligne « Bons à imprimer » sous le plan de salle : un envoi par carte, disparaît une fois le bon imprimé */
.prep-queue { flex: none; display: flex; align-items: center; gap: 14px; padding: 10px 24px; border-bottom: 1px solid var(--line-2); background: rgba(245, 158, 11, .05); }
.prep-queue[hidden] { display: none; }
.pq-head { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pq-title { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #f59e0b; white-space: nowrap; }
.pq-title svg.lucide { width: 15px; height: 15px; }
.pq-title b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; background: #f59e0b; color: #1D1608; font-size: 11px; letter-spacing: 0; }
.pq-all { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: #f59e0b; background: transparent; border: 1px solid rgba(245, 158, 11, .45); }
.pq-all:hover { background: rgba(245, 158, 11, .12); }
.pq-all svg.lucide { width: 14px; height: 14px; }
.pq-row { flex: 1; min-width: 0; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; padding: 2px 0; }
.pq-card { flex: none; display: flex; align-items: stretch; border-radius: 12px; background: var(--card); border: 1px solid rgba(245, 158, 11, .35); overflow: hidden; animation: lineIn .3s ease; }
.pq-card.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pq-info { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 7px 12px; text-align: left; background: transparent; border: 0; color: inherit; max-width: 260px; }
.pq-info:hover { background: rgba(245, 158, 11, .14); }   /* toute la carte envoie (imprime le bon) */
.pq-info:active { transform: scale(.97); }
.pq-card:hover { border-color: #f59e0b; }
.pq-info b { display: flex; align-items: baseline; gap: 7px; font-size: 13.5px; font-weight: 800; color: var(--text); white-space: nowrap; }
.pq-info b span { font-size: 11px; font-weight: 700; color: #f59e0b; }
.pq-info small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .prep-queue { padding: 10px 14px; gap: 10px; } .pq-head { flex-direction: row; align-items: center; } .prep-queue { flex-wrap: wrap; } .pq-row { flex-basis: 100%; } }
.t-group.confirmed svg.lucide, .t-group.confirmed small { color: #f59e0b; }

/* « Commandes en direct » : filtres et état de chaque commande */
.live-seg { display: flex; margin-bottom: 14px; }
.live-seg .seg-btn { flex: 1; justify-content: center; }
.live-row .lr-ico.wait { background: rgba(245, 158, 11, .14); color: #f59e0b; }
.live-row .lr-tag { gap: 3px; }
.live-row .lr-state { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.live-row .lr-state.wait { background: rgba(245, 158, 11, .16); color: #f59e0b; }
.live-row .lr-state.sent { background: var(--green-soft); color: var(--green); }
.live-row .lr-state.bill { background: var(--green-soft); color: var(--green); }
/* Caisse : « Envoyer » a des commandes confirmées de la table à imprimer (libellé « Commande 2 ») */
.t-main .btn-outline.send-waiting { padding: 0 10px; }   /* même couleur que d'habitude, seul le libellé change */
.t-main .btn-lg small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* En-tête du ticket : serveuse choisie par la caisse (fixée sur la tablette de la serveuse) */
.th-box.th-server.pickable { cursor: pointer; transition: .15s; }
.th-box.th-server.pickable:hover { border-color: var(--accent); }
.th-box.th-server .th-caret { margin-left: auto; width: 15px; height: 15px; opacity: .55; flex: none; }
.th-box.th-server.pending { border-color: rgba(245, 158, 11, .6); background: rgba(245, 158, 11, .08); }
.th-box.th-server.pending .val, .th-box.th-server.pending > svg.lucide:first-child { color: #f59e0b; }
.server-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.sp-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line-2); text-align: left; transition: .15s; }
.sp-user:hover { border-color: var(--accent); }
.sp-user.active { border-color: var(--accent); background: var(--accent-soft); }
.sp-user > svg.lucide { margin-left: auto; color: var(--accent); width: 18px; height: 18px; }
.sp-av { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #1D1608; }
.sp-name { min-width: 0; display: flex; flex-direction: column; }
.sp-name b { font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-name small { font-size: 11.5px; color: var(--muted); }

/* =========================================================
   Abonnement CréITIC : inscription (essai gratuit), alerte des derniers jours, réabonnement
   ========================================================= */
.abo-screen { justify-content: center; }
.abo-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 560px; margin-top: 8px; }
.abo-form .field.full, .abo-form .btn-block { grid-column: 1 / -1; }
.abo-form .btn-block { margin-top: 6px; }
.abo-card { max-width: 560px; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.abo-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.abo-price span { font-size: 13px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
.abo-price b { font-size: 30px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }
.abo-note { font-size: 12px; color: var(--muted); text-align: center; }
.abo-screen > .btn-ghost { max-width: 560px; margin-top: 12px; }
.abo-alert {
  display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 0 0 18px; padding: 12px 14px; border-radius: 14px;
  background: rgba(245, 158, 11, .10); border: 1px solid rgba(245, 158, 11, .45); border-left: 3px solid #f59e0b;
}
.abo-alert > svg.lucide { flex: none; width: 22px; height: 22px; color: #f59e0b; }
.abo-alert > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.abo-alert b { font-size: 13.5px; color: var(--text); }
.abo-alert small { font-size: 12px; color: var(--text-2); }
.abo-alert .btn { flex: none; }
.abo-alert.info { margin: 14px 0 0; background: var(--accent-soft); border-color: var(--accent); border-left-color: var(--accent); }
.abo-alert.info > svg.lucide { color: var(--accent); }
@media (max-width: 600px) { .abo-form { grid-template-columns: 1fr; } .abo-alert { flex-wrap: wrap; } .abo-alert .btn { width: 100%; } }

/* Bons cuisine / bar : sauce et accompagnement bien visibles sous le plat */
.receipt .prep-sauce { margin: 2px 0 4px 18px; padding: 2px 8px; display: inline-block; border: 2px solid #000; font-size: 15px; font-weight: 900; letter-spacing: .04em; color: #000; }
/* Suppléments sur les bons et le ticket : en retrait, sous le plat */
.receipt .prep-line.prep-sup { padding-left: 18px; font-size: 18px; }
.receipt .rc-row.rc-sup { padding-left: 12px; font-size: 11.5px; }