/* ==========================================================================
   StepUp — Shoe store manager · Monochrome
   ========================================================================== */
:root {
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --radius: 22px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
[data-theme="light"] {
  --bg: #ededed;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --panel-2: #f5f5f5;
  --panel-hover: #f2f2f2;
  --border: #e7e7e7;
  --border-strong: #d6d6d6;
  --text: #0a0a0a;
  --muted: #737373;
  --muted-2: #a3a3a3;
  --ink: #0a0a0a;
  --ink-text: #ffffff;
  --hero: #0b0b0b;
  --shoe-bg: #f3f3f3;
  --shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 10px 30px -18px rgba(0, 0, 0, .12);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .3);
  --input: #f7f7f7;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0a0a0a;
  --panel: #141414;
  --panel-solid: #141414;
  --panel-2: #1b1b1b;
  --panel-hover: #202020;
  --border: #242424;
  --border-strong: #333333;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --muted-2: #5f5f5f;
  --ink: #f5f5f5;
  --ink-text: #0a0a0a;
  --hero: #161616;
  --shoe-bg: #1d1d1d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -18px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .9);
  --input: #1a1a1a;
  color-scheme: dark;
}
:root { --primary: var(--ink); --success: var(--text); --warn: var(--accent); --danger: var(--accent); --accent: #f97316; --accent-2: #fb923c; --accent-soft: rgba(249, 115, 22, .12); --accent-text: #c2410c; }
[data-theme="dark"] { --accent-text: #fdba74; --accent-soft: rgba(249, 115, 22, .16); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background .4s var(--ease), color .3s; font-feature-settings: 'cv11', 'ss01'; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--ink); color: var(--ink-text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }

i[data-ico] { display: inline-flex; width: 17px; height: 17px; flex: none; }
i[data-ico] svg { width: 100%; height: 100%; }

/* ---------- Top navigation ---------- */
.topnav { position: sticky; top: 0; z-index: 40; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--ink-text); display: grid; place-items: center; }
.brand-logo svg { width: 21px; height: 21px; }
.brand strong { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }

.nav { position: relative; display: flex; align-items: center; gap: 2px; padding: 5px; background: #0a0a0a; border-radius: 999px; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .45); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
[data-theme="dark"] .nav { background: #1c1c1c; border: 1px solid #2a2a2a; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; color: rgba(255, 255, 255, .62); font-weight: 500; font-size: 13.5px; white-space: nowrap; transition: color .3s; }
.nav a:hover { color: #fff; }
.nav a.active { color: #0a0a0a; }
.nav-indicator { position: absolute; top: 5px; left: 0; height: calc(100% - 10px); width: 0; border-radius: 999px; background: #fff; z-index: 0; transition: transform .5s var(--spring), width .45s var(--spring); }
.nav-count { font-size: 11px; font-weight: 600; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 6px; display: inline-grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; transition: background .3s, color .3s; }
.nav a.active .nav-count { background: #e8e8e8; color: #0a0a0a; }
.nav-count[hidden] { display: none; }
.nav-count.bump { animation: bump .5s var(--spring); }

.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.search-trigger { display: flex; align-items: center; gap: 9px; padding: 8px 8px 8px 14px; min-width: 210px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.search-trigger:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.search-trigger span { flex: 1; text-align: left; }
.search-trigger kbd, .kbd { font-family: inherit; font-size: 11px; padding: 2px 7px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.avatar-me { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #d4d4d4, #737373); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 12px; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--border); }

/* ---------- Page ---------- */
.main { max-width: 1440px; margin: 0 auto; padding: 10px 28px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 22px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.page-head h1 { font-size: 36px; font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
.page-head p { color: var(--muted); margin-top: 6px; }
.page-head p:empty { display: none; }
.head-actions { display: flex; align-items: center; gap: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); font-weight: 500; font-size: 13px; font-variant-numeric: tabular-nums; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); display: inline-block; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink) 40%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

.view { animation: view-in .5s var(--ease) both; }
.view.leaving { animation: view-out .18s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes view-out { to { opacity: 0; transform: translateY(-6px); } }
.stagger > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* ---------- Buttons / inputs ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; font-weight: 500; white-space: nowrap; background: var(--panel); border: 1px solid var(--border); transition: transform .2s var(--spring), box-shadow .25s, background .2s, border-color .2s, opacity .2s; }
.btn:hover { transform: translateY(-1px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn-primary { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.btn-danger { background: var(--panel); color: var(--text); border-color: var(--text); }
.btn-success { background: var(--ink); color: var(--ink-text); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 15px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); border: 1px solid transparent; transition: all .2s var(--spring); flex: none; }
.icon-btn:hover { background: var(--panel); color: var(--text); border-color: var(--border); }
.ripple { position: absolute; border-radius: 50%; transform: scale(0); background: color-mix(in srgb, var(--muted) 35%, transparent); animation: ripple .6s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

.input, select.input, textarea.input { width: 100%; padding: 10px 14px; border-radius: 12px; background: var(--input); border: 1px solid var(--border); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.input:focus { border-color: var(--text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--text) 8%, transparent); background: var(--panel); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
select.input option { background: var(--panel-solid); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 40px; }
.toolbar .input, .toolbar .input-icon .input { border-radius: 999px; background: var(--panel); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); color: var(--muted); font-weight: 500; font-size: 13px; transition: all .25s var(--spring); }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.chip .count { opacity: .55; margin-left: 4px; }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); position: relative; }
.seg button { position: relative; z-index: 1; padding: 6px 13px; border-radius: 999px; font-weight: 500; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; transition: color .25s; font-size: 13px; white-space: nowrap; }
.seg button.active { color: var(--ink-text); }
.seg .seg-pill { position: absolute; top: 4px; bottom: 4px; border-radius: 999px; background: var(--ink); transition: left .4s var(--spring), width .4s var(--spring); }
.seg.full { display: flex; width: 100%; }
.seg.full button { flex: 1; justify-content: center; }
.seg.on-dark { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .1); }
.seg.on-dark button { color: rgba(255, 255, 255, .6); }
.seg.on-dark button.active { color: #0a0a0a; }
.seg.on-dark .seg-pill { background: #fff; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-success { background: var(--panel-2); color: var(--muted); border-color: var(--border); }
.b-warn { background: var(--panel); color: var(--text); border-color: var(--border-strong); }
.b-danger { background: var(--ink); color: var(--ink-text); }
.b-info, .b-primary, .b-muted { background: var(--panel-2); color: var(--muted); }

/* ---------- Cards ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; transition: border-color .3s, transform .4s var(--ease), box-shadow .3s, background .4s; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 6px; }
.card-title { font-weight: 500; font-size: 17px; letter-spacing: -.02em; flex: 1; display: flex; align-items: center; gap: 8px; }
.card-title small { font-weight: 400; color: var(--muted); font-size: 12.5px; letter-spacing: 0; }
.card-sub { color: var(--muted); font-size: 12.5px; padding: 0 22px; }
.card-body { padding: 14px 22px 22px; }
.spotlight::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--text) 4%, transparent), transparent 50%); }
.spotlight:hover::after { opacity: 1; }
.link { color: var(--muted); font-weight: 500; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; transition: color .2s; }
.link:hover { color: var(--text); }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.span-8 { grid-column: span 8; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-7 { grid-column: span 7; } .span-12 { grid-column: span 12; }

.hero { background: var(--hero); color: #fff; border-color: transparent; overflow: hidden; display: grid; grid-template-columns: minmax(260px, 38%) 1fr; min-height: 430px; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px); background-size: 16px 16px; mask-image: radial-gradient(ellipse at 75% 50%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 75% 50%, #000 20%, transparent 75%); pointer-events: none; }
.hero-left { position: relative; padding: 24px 26px; display: flex; flex-direction: column; }
.hero-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.hero-eyebrow .ring { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); display: grid; place-items: center; }
.hero-eyebrow .ring::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse-w 2s infinite; }
@keyframes pulse-w { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); } 50% { box-shadow: 0 0 0 5px transparent; } }
.hero h2 { font-size: 30px; font-weight: 500; letter-spacing: -.035em; line-height: 1.1; margin: 16px 0 12px; }
.hero p { color: rgba(255, 255, 255, .6); font-size: 13.5px; max-width: 340px; }
.hero-big { margin-top: auto; padding-top: 24px; }
.hero-big .num { font-size: 64px; font-weight: 300; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-big .row { margin-top: 10px; }
.hero-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .25); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hero-muted { color: rgba(255, 255, 255, .55); font-size: 12.5px; }
.hero-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.hero-legend b { color: #fff; font-weight: 600; }
.hero-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hero-legend span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hero-right { position: relative; padding: 20px 22px 16px 0; display: flex; flex-direction: column; }
.hero-right .row { justify-content: space-between; }
.hero .chart-wrap { flex: 1; height: auto; min-height: 300px; }
.hero .chart-tip { background: #fff; color: #0a0a0a; border-color: #fff; }
.hero .chart-tip span { color: #737373; }

.chart-wrap { position: relative; height: 290px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-tip { position: absolute; pointer-events: none; padding: 9px 12px; border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 12px; white-space: nowrap; opacity: 0; transform: translate(-50%, calc(-100% - 14px)) scale(.92); transition: opacity .15s, transform .2s var(--spring); z-index: 2; }
.chart-tip.show { opacity: 1; transform: translate(-50%, calc(-100% - 14px)) scale(1); }
.chart-tip b { display: block; font-size: 15px; font-weight: 600; }
.chart-tip span { color: var(--muted); }

/* Liste "À traiter" */
.todo-count { font-size: 12.5px; color: var(--muted); }
.todo-feature { margin: 6px 14px 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--panel-2); }
.todo-feature .due { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.todo-feature h4 { font-size: 16px; font-weight: 600; letter-spacing: -.02em; margin: 10px 0 4px; }
.todo-feature p { color: var(--muted); font-size: 12.5px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0; position: relative; }
.steps::before { content: ''; position: absolute; top: 4px; left: 4px; right: 4px; border-top: 1.5px dashed var(--border-strong); }
.steps div { position: relative; font-size: 11.5px; color: var(--muted); padding-top: 14px; }
.steps div::before { content: ''; position: absolute; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--panel); border: 2px solid var(--muted-2); }
.steps div.done::before { background: var(--ink); border-color: var(--ink); }
.steps div b { display: block; color: var(--text); font-weight: 600; font-size: 12px; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 14px; transition: background .2s, transform .25s var(--ease); cursor: pointer; }
.list-item:hover { background: var(--panel-hover); transform: translateX(3px); }
.list-item .meta { flex: 1; min-width: 0; }
.list-item .meta b { display: block; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .meta small { color: var(--muted); font-size: 12px; }
.list-item .amount { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 11.5px; color: #fff; flex: none; }
.dot-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); flex: none; }
.dot-ico i { width: 15px; height: 15px; }

/* Barres verticales (heures) */
.vbars { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 10px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.vbar .col { width: 100%; max-width: 30px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--border); position: relative; overflow: hidden; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.vbar .fill { width: 100%; height: 0; border-radius: 8px; background: color-mix(in srgb, var(--text) 18%, var(--panel)); transition: height 1.1s var(--spring); position: relative; }
.vbar .fill::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 10px; border-radius: 8px; background: var(--ink); }
.vbar.peak .fill { background: var(--ink); }
.vbar span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vbar:hover .fill { background: color-mix(in srgb, var(--text) 35%, var(--panel)); }
.vbars-legend { display: flex; gap: 16px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.vbars-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vbars-legend i.sw { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* Santé du stock */
.health-bar { display: flex; gap: 3px; height: 10px; margin: 6px 0 12px; }
.health-bar div { border-radius: 4px; width: 0; transition: width 1.2s var(--ease); }
.health-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.health-legend span { display: inline-flex; align-items: center; gap: 6px; }
.health-legend b { color: var(--text); font-weight: 600; }
.health-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.days-pill { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 7px; border: 1px solid var(--border-strong); color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.days-pill.dark { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }

.mini-stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); }
.mini-stats > div { padding: 16px 22px; }
.mini-stats > div + div { border-left: 1px solid var(--border); }
.mini-stats small { font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.mini-stats b { display: block; font-size: 26px; font-weight: 500; letter-spacing: -.035em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: 12px; color: var(--muted); }
.spark { width: 70px; height: 26px; vertical-align: middle; }

.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut { position: relative; width: 168px; height: 168px; flex: none; }
.donut canvas { width: 100%; height: 100%; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.donut-center b { display: block; font-size: 18px; font-weight: 600; letter-spacing: -.03em; }
.donut-center span { font-size: 11.5px; color: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 8px; border-radius: 10px; transition: background .2s; cursor: default; }
.legend-item:hover, .legend-item.hl { background: var(--panel-hover); }
.legend-item .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px var(--border-strong); }
.legend-item span { flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-item b { font-weight: 600; font-variant-numeric: tabular-nums; }

.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 22px 38px 1fr auto; gap: 12px; align-items: center; }
.bar-row .rank { font-size: 12px; color: var(--muted-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-row .mini-shoe { width: 38px; height: 38px; border-radius: 50%; }
.bar-info { min-width: 0; }
.bar-info .t { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 500; margin-bottom: 7px; }
.bar-info .t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 6px; border-radius: 10px; background: var(--panel-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 10px; width: 0; transition: width 1.2s var(--ease); background: var(--ink); }
.bar-row:nth-child(n+2) .bar-fill { background: color-mix(in srgb, var(--text) 55%, var(--panel)); }
.bar-row:nth-child(n+4) .bar-fill { background: color-mix(in srgb, var(--text) 30%, var(--panel)); }
.bar-row .v { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; min-width: 24px; text-align: right; }

/* ---------- Shoe visual (monochrome) ---------- */
.shoe { position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--text) 9%, transparent), transparent 60%), var(--shoe-bg); }
.shoe svg { width: 76%; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .18)); transition: transform .6s var(--spring); }
.mini-shoe { flex: none; border: 1px solid var(--border); }
.mini-shoe svg { width: 86%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .15)); }

/* ---------- Products ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .grow { flex: 1; min-width: 220px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.prod-card { overflow: hidden; cursor: pointer; transform-style: preserve-3d; will-change: transform; transition: transform .25s ease-out, border-color .3s, box-shadow .3s; }
.prod-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.prod-card .shoe { height: 170px; border-radius: 16px; margin: 8px; }
.prod-card:hover .shoe svg { transform: rotate(-9deg) scale(1.08) translateY(-6px); }
.prod-card .tag { position: absolute; top: 18px; left: 18px; z-index: 2; }
.prod-card .tag .badge { background: var(--panel); border-color: var(--border); color: var(--text); }
.prod-card .tag .badge.b-danger { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.prod-card .tag-r { position: absolute; top: 18px; right: 18px; z-index: 2; background: var(--panel); color: var(--text); border: 1px solid var(--border); }
.prod-body { padding: 8px 16px 16px; }
.prod-brand { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 600; }
.prod-name { font-weight: 500; font-size: 16px; letter-spacing: -.02em; margin: 3px 0 10px; }
.prod-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 600; font-size: 18px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.size-dots { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 12px; }
.size-dots span { font-size: 11px; font-weight: 500; min-width: 28px; text-align: center; padding: 3px 4px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.size-dots span.low { color: var(--text); border-color: var(--text); background: var(--panel); }
.size-dots span.out { color: var(--muted-2); text-decoration: line-through; opacity: .6; }
.stock-meter { height: 4px; border-radius: 5px; background: var(--panel-2); overflow: hidden; margin-top: 12px; }
.stock-meter div { height: 100%; border-radius: 5px; transition: width 1s var(--ease); background: var(--ink) !important; }

.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 14px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; background: var(--panel-solid); z-index: 1; }
.table th:first-child { border-top-left-radius: var(--radius); }
.table th:last-child { border-top-right-radius: var(--radius); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; cursor: pointer; }
.table tbody tr:hover { background: var(--panel-hover); }
.table tbody tr.cancelled td { opacity: .45; }
.table tbody tr.cancelled td:first-child { text-decoration: line-through; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.cell-prod { display: flex; align-items: center; gap: 12px; }
.cell-prod .mini-shoe { width: 42px; height: 42px; border-radius: 12px; }
.cell-prod b { display: block; font-weight: 500; }
.cell-prod small { color: var(--muted); }

/* ---------- POS ---------- */
.pos { display: grid; grid-template-columns: 1fr 390px; gap: 18px; align-items: start; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 14px; }
.p-card { padding: 8px; cursor: pointer; transition: transform .3s var(--spring), border-color .2s, box-shadow .3s; user-select: none; }
.p-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.p-card:active { transform: scale(.97); }
.p-card .shoe { height: 116px; border-radius: 14px; }
.p-card:hover .shoe svg { transform: rotate(-11deg) scale(1.1); }
.p-card .pc-body { padding: 10px 6px 4px; }
.p-card .pc-name { font-weight: 500; font-size: 14px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-card .pc-brand { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.p-card .pc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.p-card .pc-foot b { font-size: 15px; font-weight: 600; }
.p-card.oos { opacity: .45; }

.pos-cart { position: sticky; top: 84px; display: flex; flex-direction: column; max-height: calc(100vh - 104px); }
.cart-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 12px; }
.cart-head h3 { flex: 1; font-size: 17px; font-weight: 500; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.cart-count { background: var(--ink); color: var(--ink-text); border-radius: 7px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.cart-count.bump { animation: bump .5s var(--spring); }
.cart-lines { flex: 1; overflow: auto; padding: 0 12px; min-height: 120px; }
.cart-line { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 14px; animation: line-in .45s var(--spring) both; transition: background .2s; }
.cart-line.static { animation: none; }
.cart-line:hover { background: var(--panel-hover); }
.cart-line.removing { animation: line-out .3s ease forwards; }
@keyframes line-in { from { opacity: 0; transform: translateX(30px) scale(.92); } }
@keyframes line-out { to { opacity: 0; transform: translateX(-40px); } }
.cart-line .mini-shoe { width: 44px; height: 44px; border-radius: 12px; }
.cart-line .cl-info b { display: block; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-line .cl-info small { color: var(--muted); font-size: 12px; }
.cart-line .cl-right { text-align: right; }
.cart-line .cl-right b { display: block; font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.qty { display: inline-flex; align-items: center; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; }
.qty button { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); font-weight: 600; transition: all .15s; }
.qty button:hover { background: var(--ink); color: var(--ink-text); }
.qty span { min-width: 22px; text-align: center; font-weight: 600; font-size: 13px; }
.cart-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.cart-empty .big { font-size: 48px; display: block; margin-bottom: 8px; filter: grayscale(1); animation: bob 3s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
.cart-empty b { color: var(--text); font-weight: 500; }
.cart-foot { padding: 14px 20px 20px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.sum-row span { display: inline-flex; align-items: center; gap: 6px; }
.sum-row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 4px; }
.sum-total span { font-weight: 500; }
.sum-total b { font-size: 32px; font-weight: 500; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--ink) var(--p, 0%), var(--border) var(--p, 0%)); outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink); cursor: grab; box-shadow: var(--shadow); transition: transform .2s var(--spring); }
.range::-webkit-slider-thumb:active { transform: scale(1.25); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink); }

.fly { position: fixed; z-index: 999; pointer-events: none; border-radius: 14px; transition: all .75s cubic-bezier(.5, -0.3, .5, 1); box-shadow: var(--shadow-lg); }

.size-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; }
.size-btn { padding: 14px 8px 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--border); text-align: center; transition: all .25s var(--spring); animation: rise .45s var(--spring) both; animation-delay: calc(var(--i) * 30ms); }
.size-btn b { display: block; font-size: 20px; font-weight: 500; letter-spacing: -.03em; }
.size-btn small { font-size: 11px; color: var(--muted); }
.size-btn:hover:not(:disabled) { background: var(--ink); color: var(--ink-text); border-color: var(--ink); transform: translateY(-3px); }
.size-btn:hover:not(:disabled) small { color: inherit; opacity: .7; }
.size-btn.low small { color: var(--text); font-weight: 600; }
.size-btn:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

/* ---------- Stock ---------- */
.stock-layout { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.matrix-wrap { overflow: auto; max-height: calc(100vh - 290px); }
.matrix { border-collapse: separate; border-spacing: 4px; width: 100%; }
.matrix th { font-size: 11px; color: var(--muted); font-weight: 600; padding: 6px; position: sticky; top: 0; background: var(--panel-solid); z-index: 2; }
.matrix th:first-child { left: 0; z-index: 3; text-align: left; }
.matrix td.mp { position: sticky; left: 0; background: var(--panel-solid); z-index: 1; padding: 4px 10px 4px 4px; min-width: 200px; }
.matrix td.mp .cell-prod .mini-shoe { width: 34px; height: 34px; border-radius: 50%; }
.matrix td.mp b { font-size: 13px; }
.mcell { width: 44px; height: 36px; border-radius: 10px; text-align: center; font-weight: 600; font-size: 13px; cursor: pointer; transition: transform .2s var(--spring), box-shadow .2s; position: relative; font-variant-numeric: tabular-nums; }
.mcell:hover { transform: scale(1.15); z-index: 4; box-shadow: var(--shadow-lg); }
.mcell.na { background: transparent; cursor: default; }
.mcell.na:hover { transform: none; box-shadow: none; }
.mcell.flash { animation: flash 1s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 var(--ink); transform: scale(1.3); } 100% { box-shadow: 0 0 0 12px transparent; transform: scale(1); } }
.mtotal { font-weight: 600; text-align: right; padding: 0 8px; font-variant-numeric: tabular-nums; }
.legend-scale { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend-scale span { width: 16px; height: 12px; border-radius: 4px; }

.timeline { display: flex; flex-direction: column; max-height: calc(100vh - 340px); overflow: auto; padding: 0 12px 12px; }
.tl-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 12px; animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms); }
.tl-item:hover { background: var(--panel-hover); }
.tl-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); }
.tl-ico i { width: 15px; height: 15px; }
.tl-item b { font-size: 13px; font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-item small { color: var(--muted); font-size: 11.5px; }
.tl-qty { font-weight: 600; font-variant-numeric: tabular-nums; }

.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.strip .card { padding: 18px 20px; }
.strip small { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.strip b { display: block; font-size: 28px; font-weight: 500; letter-spacing: -.04em; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(10, 10, 10, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .25s ease both; }
.modal-backdrop.closing { animation: fade .2s ease reverse both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--panel-solid); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); animation: pop .45s var(--spring) both; overflow: hidden; }
.modal.lg { width: min(840px, 100%); }
.modal.sm { width: min(420px, 100%); }
.modal-backdrop.closing .modal { animation: pop-out .2s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(12px) scale(.96); } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 8px; }
.modal-head h2 { flex: 1; font-size: 19px; font-weight: 500; letter-spacing: -.025em; }
.modal-body { padding: 14px 22px 20px; overflow: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 20px; border-top: 1px solid var(--border); }
.modal-foot .left { margin-right: auto; }

.edit-layout { display: grid; grid-template-columns: 220px 1fr; gap: 22px; }
.edit-preview .shoe { height: 200px; border-radius: 18px; }
.edit-preview .shoe svg { animation: hover-shoe 4s ease-in-out infinite; }
@keyframes hover-shoe { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--border-strong); transition: transform .2s var(--spring); }
.swatch:hover { transform: scale(1.15); }
.swatch.active { box-shadow: 0 0 0 2px var(--text); transform: scale(1.1); }
.swatch-input { position: relative; overflow: hidden; background: conic-gradient(#000, #fff, #000); }
.swatch-input input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.margin-pill { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.margin-pill b { color: var(--text) !important; font-size: 18px; font-weight: 600; display: block; }
.sizes-editor { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.size-ed { padding: 8px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--border); position: relative; animation: rise .35s var(--spring) both; }
.size-ed .sz { font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.size-ed .sz button { color: var(--muted-2); font-size: 15px; line-height: 1; }
.size-ed .sz button:hover { color: var(--text); }
.size-ed input { width: 100%; padding: 6px 8px; border-radius: 8px; background: var(--panel); border: 1px solid var(--border); outline: none; font-weight: 600; text-align: center; }
.size-ed input:focus { border-color: var(--text); }
.sizes-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.sizes-tools .input { width: 90px; padding: 7px 10px; }

.move-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.move-type { padding: 14px 10px; border-radius: 16px; border: 1px solid var(--border); background: var(--panel); text-align: center; font-weight: 500; transition: all .25s var(--spring); color: var(--muted); }
.move-type i { width: 20px; height: 20px; margin: 0 auto 6px; display: flex; }
.move-type.active { border-color: var(--ink); background: var(--ink); color: var(--ink-text); transform: translateY(-2px); }
.big-stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 20px 0; }
.big-stepper button { width: 50px; height: 50px; border-radius: 50%; background: var(--panel); border: 1px solid var(--border); font-size: 22px; font-weight: 500; transition: all .2s var(--spring); }
.big-stepper button:hover { transform: scale(1.08); background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.big-stepper input { width: 120px; text-align: center; font-size: 46px; font-weight: 300; letter-spacing: -.05em; background: none; border: 0; outline: none; }
.stock-preview { text-align: center; color: var(--muted); }
.stock-preview b { color: var(--text) !important; font-size: 16px; font-weight: 600; }

/* receipt */
.receipt { background: #fff; color: #111; border-radius: 16px; padding: 24px 22px; font-family: 'Courier New', monospace; font-size: 13px; position: relative; border: 1px solid #e5e5e5; }
.receipt h3 { text-align: center; font-size: 20px; font-family: var(--font); font-weight: 600; letter-spacing: -.02em; }
.receipt .c { text-align: center; color: #555; font-size: 12px; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 12px 0; }
.receipt .r { display: flex; justify-content: space-between; gap: 10px; }
.receipt .r.t { font-size: 18px; font-weight: 800; }
.receipt-ok { text-align: center; margin-bottom: 16px; }
.receipt-ok h2 { font-weight: 500 !important; letter-spacing: -.03em; }
.check { width: 70px; height: 70px; margin: 0 auto 12px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow-lg); animation: pop .6s var(--spring) both; }
.check svg { width: 34px; height: 34px; stroke: var(--ink-text); stroke-width: 3; fill: none; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .3s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.cancelled-stamp { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); border: 4px solid #111; color: #111; font-size: 30px; font-weight: 900; padding: 4px 16px; border-radius: 10px; opacity: .7; font-family: var(--font); letter-spacing: .1em; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 420px; padding: 12px 14px; border-radius: 16px; background: var(--ink); color: var(--ink-text); box-shadow: var(--shadow-lg); animation: toast-in .5s var(--spring) both; position: relative; overflow: hidden; }
.toast.out { animation: toast-out .35s ease forwards; }
.toast .t-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--ink-text) 14%, transparent); }
.toast .t-ico i { width: 15px; height: 15px; }
.toast p { flex: 1; font-weight: 500; }
.toast .icon-btn { color: inherit; opacity: .6; }
.toast .icon-btn:hover { background: transparent; border-color: transparent; opacity: 1; }
.toast .t-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: color-mix(in srgb, var(--ink-text) 50%, transparent); animation: t-bar linear forwards; }
@keyframes t-bar { from { width: 100%; } to { width: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(20px) scale(.94); } }

/* ---------- Command palette ---------- */
.palette { width: min(620px, 100%); align-self: start; margin-top: 12vh; }
.palette .modal-body { padding: 0; }
.pal-input { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.pal-input input { flex: 1; background: none; border: 0; outline: none; font-size: 17px; }
.pal-list { max-height: 400px; overflow: auto; padding: 8px; }
.pal-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 600; padding: 10px 12px 6px; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; cursor: pointer; transition: background .12s; }
.pal-item.sel { background: var(--panel-hover); }
.pal-item .mini-shoe { width: 34px; height: 34px; border-radius: 50%; }
.pal-item .pi-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.pal-item .meta { flex: 1; min-width: 0; }
.pal-item .meta b { display: block; font-weight: 500; }
.pal-item .meta small { color: var(--muted); }
.pal-item mark { background: color-mix(in srgb, var(--text) 14%, transparent); color: inherit; border-radius: 3px; }

/* ---------- Misc ---------- */
.skeleton { background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .big { font-size: 42px; display: block; margin-bottom: 10px; filter: grayscale(1); }
.empty h3 { color: var(--text); font-weight: 500; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.mt { margin-top: 16px; }
.hidden { display: none !important; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 500; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--ink-text) 35%, transparent); border-top-color: var(--ink-text); animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .span-8, .span-4, .span-5, .span-7 { grid-column: span 12; }
  .stock-layout { grid-template-columns: 1fr; }
  .search-trigger { min-width: 0; }
  .search-trigger span, .search-trigger kbd { display: none; }
}
@media (max-width: 1060px) {
  .topnav { grid-template-columns: auto 1fr auto; }
  .brand strong { display: none; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .pos { grid-template-columns: 1fr; }
  .pos-cart { position: relative; top: 0; max-height: none; }
  .span-6 { grid-column: span 12; }
  .hero { grid-template-columns: 1fr; }
  .hero-right { padding: 0 18px 16px; }
}
@media (max-width: 760px) {
  .topnav { grid-template-columns: 1fr auto; padding: 10px 14px; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .main { padding: 8px 14px 30px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 28px; }
  .status-pill { display: none; }
  .edit-layout, .form-grid { grid-template-columns: 1fr; }
  .hero-big .num { font-size: 48px; }
}
@media (max-width: 520px) {
  .strip { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  body * { visibility: hidden; }
  .receipt, .receipt * { visibility: visible; }
  .receipt { position: absolute; left: 0; top: 0; width: 80mm; border: 0; }
}

/* Palette graphique (niveaux de gris) */
[data-theme="light"] { --p0: #f97316; --p1: #525252; --p2: #8a8a8a; --p3: #bdbdbd; --p4: #dedede; --p5: #333333; }
[data-theme="dark"] { --p0: #f97316; --p1: #a3a3a3; --p2: #737373; --p3: #4d4d4d; --p4: #333333; --p5: #d4d4d4; }

/* ==========================================================================
   Accent orange
   ========================================================================== */
::selection { background: var(--accent); color: #fff; }
.pulse-dot { background: var(--accent); animation-name: pulse-o; }
@keyframes pulse-o { 0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, .55); } 50% { box-shadow: 0 0 0 6px transparent; } }
.hero-eyebrow .ring::after { background: var(--accent); animation-name: pulse-o; }
.hero-legend span:first-child { color: var(--accent-2); }
.hero-chip { border-color: rgba(249, 115, 22, .55); color: var(--accent-2); }
.num.neg, .mini-stats b.neg, b.neg { color: var(--accent) !important; }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 10px 24px -10px rgba(249, 115, 22, .8); }
#checkout { background: var(--accent); border-color: var(--accent); color: #fff; }
#checkout:hover { box-shadow: 0 14px 30px -12px rgba(249, 115, 22, .9); }
#checkout .kbd { background: rgba(255, 255, 255, .2); border: 0; color: #fff; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.range { background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--border) var(--p, 0%)); }
.range::-webkit-slider-thumb { border-color: var(--accent); }
.link:hover { color: var(--accent); }
#badge-low { background: var(--accent); color: #fff; }
.nav a.active #badge-low { background: var(--accent); color: #fff; }
.b-danger { background: var(--accent); color: #fff; }
.b-warn { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.prod-card .tag .badge.b-danger { background: var(--accent); border-color: var(--accent); color: #fff; }
.prod-card .tag .badge.b-warn { background: var(--panel); color: var(--accent-text); border-color: var(--accent-soft); }
.days-pill.dark { background: var(--accent); border-color: var(--accent); color: #fff; }
.size-dots span.low { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft); }
.size-btn.low small { color: var(--accent-text); }
.vbar.peak .fill, .vbar.peak .fill::before { background: var(--accent); }
.toast .t-bar { background: var(--accent); }
.toast .t-ico { background: var(--accent); color: #fff; }
.steps div.done::before { background: var(--accent); border-color: var(--accent); }
.legend-scale span:first-child { background: var(--accent) !important; }
.legend-scale span:nth-child(2) { box-shadow: inset 0 0 0 1.5px var(--accent) !important; background: var(--accent-soft); }
.tl-ico.pos { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.tl-qty.pos { color: var(--accent-text); }
.cart-count { background: var(--accent); color: #fff; }
.chip.active .count { opacity: .7; }
.check { background: var(--accent); box-shadow: 0 16px 40px -12px rgba(249, 115, 22, .8); }
.check svg { stroke: #fff; }
.move-type.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ==========================================================================
   Coloris & photos
   ========================================================================== */
.shoe.has-photo { background: #fff; }
[data-theme="dark"] .shoe.has-photo { background: #1d1d1d; }
.shoe.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--spring); }
.prod-card:hover .shoe.has-photo img, .p-card:hover .shoe.has-photo img { transform: scale(1.06); }
.shoe.swap { animation: swap .35s var(--ease); }
@keyframes swap { from { opacity: .3; transform: scale(.97); } }
.pc-vis { position: relative; }
.prod-card .pc-vis .shoe { height: 170px; border-radius: 16px; margin: 8px; }
.p-card .pc-vis .shoe { height: 116px; border-radius: 14px; }
.color-dots { display: flex; align-items: center; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.color-dots span { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--panel), 0 0 0 2.5px var(--border-strong); cursor: pointer; transition: transform .2s var(--spring), box-shadow .2s; }
.color-dots span:hover, .color-dots span.on { transform: scale(1.25); box-shadow: 0 0 0 1.5px var(--panel), 0 0 0 3px var(--accent); }
.color-dots span.out { opacity: .35; }
.color-dots em { font-style: normal; font-size: 11px; color: var(--muted); }
.prod-row .color-dots { margin-top: 0; }
.cdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; box-shadow: 0 0 0 1px var(--border-strong); }

.picker { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.picker-vis .shoe { height: 100%; min-height: 280px; border-radius: 20px; }
.color-pick { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.cp { width: 46px; height: 46px; border-radius: 50%; padding: 3px; border: 2px solid transparent; transition: all .25s var(--spring); position: relative; }
.cp span, .cp img { width: 100%; height: 100%; border-radius: 50%; display: block; object-fit: cover; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.cp:hover { transform: scale(1.08); }
.cp.active { border-color: var(--accent); }
.cp.out { opacity: .4; }
.cp.out::after { content: ''; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 2px; background: var(--muted); transform: rotate(45deg); }

.dropzone { position: relative; display: block; border-radius: 18px; overflow: hidden; cursor: pointer; }
.dropzone .shoe { height: 210px; border-radius: 18px; }
.dz-hint { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; font-size: 12.5px; font-weight: 500; color: #fff; background: rgba(10, 10, 10, .55); opacity: 0; transition: opacity .25s; border-radius: 18px; }
.dz-hint i { width: 22px; height: 22px; }
.dropzone:hover .dz-hint, .dropzone.over .dz-hint { opacity: 1; }
.dropzone.over { box-shadow: 0 0 0 3px var(--accent); }
.dropzone:not(.filled)::after { content: 'Ajouter une photo'; position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--muted); background: var(--panel); border: 1px dashed var(--border-strong); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.dz-busy { position: absolute; inset: 0; display: none; place-items: center; background: rgba(10, 10, 10, .45); border-radius: 18px; }
.dropzone.busy .dz-busy { display: grid; }
.dz-busy .spinner { width: 28px; height: 28px; border-width: 3px; border-color: rgba(255, 255, 255, .3); border-top-color: #fff; }

.cw-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.cw-tab { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); font-weight: 500; font-size: 13px; transition: all .2s var(--spring); }
.cw-tab img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.cw-tab .cdot { width: 22px; height: 22px; margin: 0; }
.cw-tab small { font-size: 11px; color: var(--muted); background: var(--panel-2); border-radius: 6px; padding: 0 6px; }
.cw-tab:hover { border-color: var(--border-strong); }
.cw-tab.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cw-tab.add { padding: 6px 12px; color: var(--muted); border-style: dashed; }
.cw-tab.add:hover { color: var(--accent); border-color: var(--accent); }
.cw-panel { padding: 16px; border-radius: 18px; background: var(--panel-2); border: 1px solid var(--border); }
.cw-panel .swatches { margin-top: 12px; }
.cw-panel .size-ed { background: var(--panel); }

/* ==========================================================================
   Comptes
   ========================================================================== */
.date-range .input { width: 150px; border-radius: 999px; background: var(--panel); padding: 8px 12px; }
.acc-hero { min-height: 400px; grid-template-columns: minmax(260px, 40%) 1fr; }
.waterfall { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding: 10px 0 4px; min-height: 320px; }
.wf-col { display: flex; flex-direction: column; min-width: 0; }
.wf-val { font-size: 12.5px; font-weight: 600; text-align: center; color: rgba(255, 255, 255, .85); font-variant-numeric: tabular-nums; white-space: nowrap; margin-bottom: 8px; }
.wf-track { position: relative; flex: 1; }
.wf-bar { position: absolute; left: 8%; right: 8%; height: 0; border-radius: 10px; transition: height 1s var(--ease); background: #fff; }
.wf-bar.in { height: var(--h); }
.wf-zero { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(255, 255, 255, .3); }
.wf-label { font-size: 11.5px; text-align: center; color: rgba(255, 255, 255, .55); margin-top: 10px; line-height: 1.25; }
.w-rev .wf-bar { background: #fff; }
.w-cost .wf-bar { background: rgba(255, 255, 255, .28); }
.w-sub .wf-bar { background: rgba(255, 255, 255, .7); }
.w-exp .wf-bar { background: var(--accent); }
.w-net .wf-bar { background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: 0 0 30px rgba(249, 115, 22, .45); }
.w-neg .wf-bar { background: repeating-linear-gradient(45deg, var(--accent), var(--accent) 6px, #c2410c 6px, #c2410c 12px); }
.w-net .wf-val, .w-neg .wf-val { color: var(--accent-2); }

.cash-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cash-row small { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cash-row b { display: block; font-size: 20px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cash-row span:last-child { font-size: 12px; color: var(--muted); }
.cash-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px; margin-top: 14px; border-radius: 14px; background: var(--ink); color: var(--ink-text); }
.cash-total span { font-weight: 500; }
.cash-total b { font-size: 24px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.cash-total.neg { background: var(--accent); color: #fff; }

.mbars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; height: 260px; }
.mbar { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; cursor: default; }
.mbar-cols { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--border); }
.mb { width: 42%; max-width: 18px; height: 0; border-radius: 6px 6px 2px 2px; transition: height 1s var(--spring); }
.mb.rev { background: var(--ink); }
.mb.exp { background: var(--accent); }
.mbar:hover .mb { filter: brightness(1.15); }
.mb-net { font-size: 10.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; height: 14px; }
.mb-net.neg { color: var(--accent); }
.mb-net.neg::before { content: '−'; }
.mbar > span { font-size: 11px; color: var(--muted); }

.statement { width: 100%; border-collapse: collapse; }
.statement td { padding: 9px 4px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.statement td:last-child { text-align: right; font-weight: 500; white-space: nowrap; }
.statement small { color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.statement tr.minus td { color: var(--muted); }
.statement tr.minus td:first-child { padding-left: 16px; }
.statement tr.sub td { font-weight: 600; }
.statement tr.total td { border-bottom: 0; padding-top: 14px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.statement tr.total td:last-child { color: var(--text); }
.statement tr.total.neg td:last-child { color: var(--accent); }

.amount-input { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 6px 0 22px; }
.amount-input input { width: 240px; text-align: center; font-size: 48px; font-weight: 300; letter-spacing: -.05em; background: none; border: 0; outline: none; border-bottom: 2px solid var(--border); padding-bottom: 4px; transition: border-color .2s; }
.amount-input input:focus { border-color: var(--accent); }
.amount-input span { font-size: 24px; color: var(--muted); }

@media (max-width: 1060px) {
  .picker { grid-template-columns: 1fr; }
  .picker-vis .shoe { min-height: 200px; }
  .acc-hero { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .mbars { gap: 4px; }
  .waterfall { gap: 6px; }
  .wf-val { font-size: 10px; }
}
.amount-input input { -moz-appearance: textfield; appearance: textfield; }
.amount-input input::-webkit-inner-spin-button, .amount-input input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ==========================================================================
   v3 — Connexion, réglages, achats en gros, studio photo
   ========================================================================== */
[hidden] { display: none !important; }
.no-spin { -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums; }
.no-spin::-webkit-inner-spin-button, .no-spin::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.help { font-size: 12px; color: var(--muted); line-height: 1.45; }
.mt2 { margin-top: 26px; }
.accent { color: var(--accent) !important; }
.warn-t { color: var(--accent-text); }
.form-grid.one { grid-template-columns: 1fr; }
button.avatar-me { cursor: pointer; transition: transform .25s var(--spring), box-shadow .2s; }
button.avatar-me:hover { transform: scale(1.06); box-shadow: 0 0 0 2px var(--accent); }
.avatar-me.sm { width: 30px; height: 30px; font-size: 11px; }
a.icon-btn { display: inline-grid; place-items: center; }

/* ---------- Connexion ---------- */
body.locked { overflow: hidden; }
body.locked .topnav, body.locked .main { filter: blur(14px); pointer-events: none; user-select: none; }
.auth { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; overflow: auto;
  background: radial-gradient(1000px 600px at 20% 10%, var(--accent-soft), transparent 60%), color-mix(in srgb, var(--bg) 70%, transparent); animation: fade .35s ease both; }
.auth.out { animation: fade .4s ease reverse both; }
.auth.out .auth-card { animation: pop-out .35s ease both; }
.auth-card { width: min(440px, 100%); background: var(--panel-solid); border: 1px solid var(--border); border-radius: 28px; padding: 30px; box-shadow: var(--shadow-lg); animation: pop .55s var(--spring) both; }
.auth-card:has(.form-grid) { width: min(520px, 100%); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-size: 17px; }
.auth-brand .brand-logo { width: 38px; height: 38px; }
.auth-card h2 { font-size: 28px; font-weight: 500; letter-spacing: -.04em; }
.auth-card > p { margin: 6px 0 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .btn-lg { margin-top: 6px; }
.auth-err { color: var(--accent-text); font-size: 13px; min-height: 18px; font-weight: 500; }
.input-icon.pass .input { padding-right: 44px; }
.input-icon .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.input-icon .eye:hover { background: var(--panel-2); color: var(--text); }
.shake { animation: shake .45s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }

/* ---------- Menu utilisateur ---------- */
.user-menu { position: fixed; z-index: 90; width: 260px; padding: 8px; border-radius: 18px; background: var(--panel-solid); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: menu-in .22s var(--spring) both; transform-origin: top right; }
.user-menu.out { animation: menu-in .18s ease reverse both; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.um-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 12px; }
.um-head b { display: block; font-weight: 600; }
.um-head small { color: var(--muted); font-size: 12px; }
.user-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; text-align: left; color: var(--text); font-weight: 500; }
.user-menu button:hover { background: var(--panel-2); }
.user-menu button.danger:hover { color: var(--accent-text); background: var(--accent-soft); }
.user-menu i svg { width: 16px; height: 16px; }
.user-menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 4px; }

/* ---------- Réglages ---------- */
.settings { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
.set-nav { position: sticky; top: 92px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.set-nav button { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 13px; color: var(--muted); font-weight: 500; text-align: left; transition: background .2s, color .2s; }
.set-nav button:hover { background: var(--panel-2); color: var(--text); }
.set-nav button.active { background: var(--ink); color: var(--ink-text); }
.set-nav button.active i { color: var(--accent); }
.set-nav i svg { width: 17px; height: 17px; }
.set-me { display: flex; gap: 10px; align-items: center; margin-top: 10px; padding: 12px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; }
.set-me small { color: var(--muted-2, var(--muted)); }
.set-main { min-width: 0; }
.set-pane { animation: rise .35s var(--ease) both; }
.set-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.set-grid.one { grid-template-columns: 1fr; }
.set-card { padding: 22px 24px; }
.set-card h3 { font-size: 17px; font-weight: 500; letter-spacing: -.02em; }
.set-card > p.muted { margin: 4px 0 16px; font-size: 13px; }
.set-aside { position: sticky; top: 92px; }
.set-aside-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 4px 4px 10px; }
.cur-prev { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.cur-prev span { padding: 6px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-card { background: var(--ink); color: var(--ink-text); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.calc-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: color-mix(in srgb, var(--ink-text) 65%, transparent); }
.calc-line b { color: var(--ink-text); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.calc-line b small { color: inherit; opacity: .6; font-weight: 400; }
.calc-line.hl { border-top: 1px dashed color-mix(in srgb, var(--ink-text) 25%, transparent); padding-top: 10px; }
.calc-line .accent { font-size: 18px; }
.savebar { position: sticky; bottom: 18px; z-index: 5; display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--ink); color: var(--ink-text); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(20px) scale(.98); pointer-events: none; transition: opacity .3s, transform .4s var(--spring); }
.savebar.show { opacity: 1; transform: none; pointer-events: auto; }
.savebar > span { flex: 1; display: flex; gap: 8px; align-items: center; font-weight: 500; }
.savebar .btn-ghost { color: var(--ink-text); }
.savebar .btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.check-row { display: flex; gap: 9px; align-items: center; font-size: 13.5px; cursor: pointer; }
.check-row input { width: 17px; height: 17px; accent-color: var(--accent); }

/* étiquettes */
.tags { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px; border-radius: 14px; border: 1px solid var(--border); background: var(--input); cursor: text; min-height: 46px; align-items: center; }
.tags:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px 5px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); font-weight: 500; font-size: 13px; animation: pop .3s var(--spring) both; }
.tag button { width: 20px; height: 20px; border-radius: 50%; color: var(--muted); line-height: 1; }
.tag button:hover { background: var(--ink); color: var(--ink-text); }
.tag-in { flex: 1; min-width: 150px; border: 0; outline: none; background: none; padding: 5px 6px; }

/* interrupteurs */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.switch-row:last-of-type { border-bottom: 0; }
.switch-row b { display: block; font-weight: 500; }
.switch-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); transition: background .25s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .35s var(--spring); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:disabled + i { opacity: .55; }
.switch input:focus-visible + i { box-shadow: 0 0 0 4px var(--accent-soft); }
.switch.sm { width: 34px; height: 20px; }
.switch.sm i::after { width: 14px; height: 14px; }
.switch.sm input:checked + i::after { transform: translateX(14px); }

/* fonds */
.bg-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.bg-tiles.sm { grid-template-columns: repeat(3, 1fr); margin-bottom: 4px; }
.bg-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel); font-size: 12px; color: var(--muted); transition: all .2s var(--spring); }
.bg-tile:hover { border-color: var(--border-strong); color: var(--text); }
.bg-tile.active { border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 3px var(--accent-soft); }
.bgp { width: 100%; aspect-ratio: 1; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.bg-white { background: #fff; }
.bg-gray { background: #f0f0f0; }
.bg-studio { background: radial-gradient(circle at 50% 42%, #fff, #dcdcdc 78%); }
.bg-cream { background: linear-gradient(#fffaf3, #ffe8cf); }
.bg-black { background: radial-gradient(circle at 50% 42%, #2e2e2e, #0b0b0b 80%); }
.bg-none, .checker { background-color: #fff; background-image: linear-gradient(45deg, #e9e9e9 25%, transparent 25%), linear-gradient(-45deg, #e9e9e9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e9e9e9 75%), linear-gradient(-45deg, transparent 75%, #e9e9e9 75%); background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0; }

/* rôles */
.role-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel-2); border: 1px solid var(--border); }
.role-pill.r-admin { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.role-pill.r-manager { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.perm-table td, .perm-table th { cursor: default; }
.perm-table .c { text-align: center; width: 130px; }
.perm-table tbody tr:hover { background: none; }
.perm-mini { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.perm-mini i { font-style: normal; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }

/* ---------- Fiche produit : achat en gros ---------- */
.pack-box { border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; background: var(--panel-2); }
.pack-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.pack-head > i { width: 36px; height: 36px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.pack-head b { display: block; font-weight: 600; }
.pack-head small { color: var(--muted); font-size: 12px; }
.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pack-grid .input { background: var(--panel); }
.pack-grid label small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.pack-formula { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.pack-formula b { font-size: 17px; color: var(--accent-text); }
.pack-formula i svg { width: 15px; height: 15px; }
.input[readonly] { background: var(--panel-2); color: var(--muted); }
.suggest-link { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 999px; font-size: 12.5px; color: var(--accent-text); background: var(--accent-soft); transition: transform .2s var(--spring); }
.suggest-link:hover { transform: scale(1.03); }
.suggest-link small { opacity: .75; }
.suggest-link i svg { width: 14px; height: 14px; }
.flash-in { animation: flash-in .7s ease; }
@keyframes flash-in { 30% { box-shadow: 0 0 0 5px var(--accent-soft); border-color: var(--accent); } }
.modal.readonly .dropzone::after { display: none; }

/* ---------- Réception de lot ---------- */
.modal.purchase-modal { width: min(980px, 100%); }
.modal-head h2 i svg { width: 18px; height: 18px; vertical-align: -2px; color: var(--accent); }
.pur { display: grid; grid-template-columns: 290px 1fr; gap: 22px; }
.pur-left { display: flex; flex-direction: column; gap: 14px; }
.pur-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pur-prod { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 18px; background: var(--panel-2); border: 1px solid var(--border); }
.pur-prod .shoe { width: 72px; height: 72px; border-radius: 14px; flex: none; }
.pur-prod b { display: block; font-weight: 600; }
.pur-prod small { color: var(--muted); font-size: 12px; }
.chip .cdot { margin-right: 6px; }
.lot-calc { display: flex; align-items: stretch; gap: 10px; }
.lc-cell { flex: 1; padding: 12px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.lc-cell small { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.lc-cell.res { background: var(--ink); color: var(--ink-text); border-color: var(--ink); justify-content: center; }
.lc-cell.res small { color: color-mix(in srgb, var(--ink-text) 60%, transparent); }
.lc-cell.res b { font-size: 30px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.lc-op { align-self: center; font-size: 20px; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 30px; height: 30px; border-radius: 50%; background: var(--panel); border: 1px solid var(--border); font-size: 16px; transition: all .2s var(--spring); }
.stepper button:hover { background: var(--ink); color: var(--ink-text); }
.stepper input { width: 54px; text-align: center; font-size: 22px; font-weight: 500; background: none; border: 0; outline: none; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.unit-box { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; }
.unit-box > div { padding: 12px 14px; border-radius: 16px; border: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.unit-box > div.muted { grid-column: 1 / -1; flex-direction: row; gap: 8px; align-items: center; }
.unit-box small { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.unit-box b { font-size: 22px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.unit-box span { font-size: 12px; color: var(--muted); }
.unit-box .u-main { background: var(--accent-soft); border-color: transparent; }
.unit-box .u-main b { color: var(--accent-text); font-size: 26px; }
.pu-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-top: 10px; }
.pu-size { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel); transition: all .2s var(--spring); cursor: text; }
.pu-size > span { font-weight: 600; font-size: 13px; }
.pu-size input { width: 100%; text-align: center; font-size: 18px; font-weight: 600; border: 0; background: none; outline: none; -moz-appearance: textfield; appearance: textfield; }
.pu-size input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pu-size small { font-size: 10.5px; color: var(--muted); }
.pu-size.on { border-color: var(--accent); background: var(--accent-soft); }
.pu-size:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.pu-price { display: flex; flex-direction: column; gap: 10px; }
.pu-price:empty { display: none; }
.pp-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--border); }
.pp-row:first-child { align-items: center; justify-content: space-between; }
.pp-row .txt { color: var(--text); }
.pp-row .suggest { color: var(--accent-text); border-color: var(--accent-soft); background: var(--accent-soft); margin-bottom: 4px; }
.pp-margin { display: flex; flex-direction: column; min-width: 140px; }
.pp-margin small { font-size: 11.5px; color: var(--muted); }
.pp-margin b { font-size: 20px; font-weight: 600; }
#pu-foot { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--accent-text); }

/* ---------- Studio photo ---------- */
.modal.studio-modal { width: min(1120px, 100%); }
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.st-stage { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.st-wrap { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); display: grid; place-items: center; background: var(--panel-2); min-height: 300px; }
.st-wrap canvas { display: block; max-width: 100%; max-height: min(62vh, 640px); width: auto; height: auto; touch-action: none; }
.st-wrap.mask-view canvas { cursor: none; }
.st-cursor { position: absolute; left: 0; top: 0; display: none; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(0, 0, 0, .4); background: rgba(249, 115, 22, .25); pointer-events: none; }
.st-cursor.restore { background: rgba(34, 197, 94, .25); }
.st-wrap:not(.mask-view) .st-cursor { display: none !important; }
.st-busy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: color-mix(in srgb, var(--panel-solid) 82%, transparent); backdrop-filter: blur(6px); text-align: center; padding: 20px; }
.st-busy .spinner { width: 34px; height: 34px; border-width: 3px; border-color: var(--accent-soft); border-top-color: var(--accent); }
.st-busy small { color: var(--muted); max-width: 320px; }
.st-prog { width: min(260px, 70%); height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; }
.st-prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.st-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-bar .seg i svg { width: 15px; height: 15px; }
#st-before { user-select: none; touch-action: none; }
.st-panel { display: flex; flex-direction: column; gap: 12px; max-height: min(72vh, 720px); overflow: auto; padding-right: 2px; }
.st-panel section { padding: 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--panel-2); display: flex; flex-direction: column; gap: 10px; }
.st-panel h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.st-panel h4 span { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--ink-text); display: grid; place-items: center; font-size: 11.5px; }
.st-panel .switch-row { padding: 6px 0; border: 0; }
.st-panel .switch-row b { font-size: 13px; }
.st-panel .switch-row small { font-size: 11.5px; }
.st-slider label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.st-slider label b { color: var(--text); font-variant-numeric: tabular-nums; }
.st-tools { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--border-strong); }
.st-tools .seg button i svg { width: 14px; height: 14px; }
.st-tip { font-size: 12px; color: var(--muted); line-height: 1.45; }
.st-panel .bg-tile { padding: 6px; font-size: 11px; }

@media (max-width: 1060px) {
  .settings { grid-template-columns: 1fr; }
  .set-nav { position: static; flex-direction: row; overflow: auto; }
  .set-nav button span { white-space: nowrap; }
  .set-me { display: none; }
  .set-grid { grid-template-columns: 1fr; }
  .set-aside { position: static; }
  .pur, .studio { grid-template-columns: 1fr; }
  .st-panel { max-height: none; }
}
@media (max-width: 760px) {
  .bg-tiles { grid-template-columns: repeat(3, 1fr); }
  .pack-grid { grid-template-columns: 1fr 1fr; }
  .lot-calc { flex-wrap: wrap; }
  .lc-op { display: none; }
}
.pack-head > i svg { width: 18px; height: 18px; }

/* ==========================================================================
   Mise en page sans défilement : sous-menus, blocs ajustés, pagination
   ========================================================================== */
.page-tabs { flex: 1; display: flex; justify-content: center; min-width: 0; align-self: flex-end; }
.page-tabs:empty { display: none; }
.subnav { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 999px; font-weight: 500; font-size: 13.5px; color: var(--muted); white-space: nowrap; transition: color .25s; }
.subnav button:hover { color: var(--text); }
.subnav button.active { color: var(--ink-text); }
.subnav button i { width: 15px; height: 15px; display: inline-grid; }
.subnav button i svg { width: 15px; height: 15px; }
.subnav .sn-ind { position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--ink); transition: transform .45s var(--spring), width .45s var(--spring); }
.sn-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; }

.pane { position: relative; }
.pane-in { animation: pane-in .4s var(--ease) both; }
@keyframes pane-in { from { opacity: 0; transform: translateY(8px); } }
.pane-col { display: flex; flex-direction: column; gap: 14px; }
.pane-col > .strip { margin-bottom: 0; }
.col-card { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.grow-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.center-body { justify-content: center; }
.grow { flex: 1; min-height: 0; }
.donut-wrap.stack { flex-direction: column; align-items: stretch; gap: 14px; }
.donut-wrap.stack .donut { margin: 0 auto; }
.more-link { display: block; text-align: center; padding: 0 12px 12px; font-size: 12.5px; }
.more-link:empty { display: none; }
.kpi-dark { background: var(--hero); color: #fff; border-color: transparent; }
.kpi-dark small, .kpi-dark span { color: rgba(255, 255, 255, .6) !important; }
.strip .card b { display: block; font-size: 26px; font-weight: 500; letter-spacing: -.035em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.strip .card > span { font-size: 12px; color: var(--muted); }
.hero-alert { color: var(--accent-2); font-weight: 600; }
.list.cols-2 { display: grid; grid-template-columns: 1fr 1fr; align-content: start; column-gap: 12px; padding: 4px 12px 12px; }

/* Pagination */
.pg { display: flex; flex-direction: column; min-height: 0; }
.pg-body { flex: 1; min-height: 0; overflow: hidden; }
.pg-body.pg-r { animation: pg-r .35s var(--ease) both; }
.pg-body.pg-l { animation: pg-l .35s var(--ease) both; }
@keyframes pg-r { from { opacity: 0; transform: translateX(26px); } }
@keyframes pg-l { from { opacity: 0; transform: translateX(-26px); } }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; flex: none; }
.pager:empty { display: none; }
.pg-card .pager, .pg-host.card .pager, .pg-flat .pager { border-top: 1px solid var(--border); }
.pg-info { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pg-info b { color: var(--text); font-weight: 600; }
.pg-nav { display: flex; align-items: center; gap: 4px; }
.pg-nav button { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 10px; display: inline-grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--muted); border: 1px solid transparent; transition: all .2s var(--spring); font-variant-numeric: tabular-nums; }
.pg-nav button:hover:not(:disabled) { background: var(--panel-hover); color: var(--text); }
.pg-nav button.on { background: var(--ink); color: var(--ink-text); }
.pg-nav button:disabled { opacity: .3; cursor: default; }
.pg-nav button i, .pg-nav button svg { width: 16px; height: 16px; }
.pg-gap { color: var(--muted-2); padding: 0 2px; }
.pg-host:not(.card) > .pager { padding: 12px 2px 0; }
.pg-host .product-grid, .pos-pg .pos-grid { padding: 2px; }
.pg .timeline { max-height: none; overflow: hidden; }
.tl-host .pager { padding: 8px 14px; }
.pg .table th { position: static; }

/* Divers */
.cell-2 { display: flex; flex-direction: column; min-width: 0; }
.cell-2 b { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-2 small { color: var(--muted); font-size: 12px; }
.ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-like { cursor: pointer; }
.link-like:hover { text-decoration: underline; }
.block { display: block; }
.center { text-align: center; justify-content: center; }
.txt { color: var(--text); }
.mt-s { margin-top: 8px; }
.wrap { flex-wrap: wrap; }
.chip.sm { padding: 4px 10px; font-size: 12px; }
.chips.center { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.avatar.xs { width: 26px; height: 26px; font-size: 10px; flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 11px; flex: none; }
.avatar.lg { width: 60px; height: 60px; font-size: 20px; flex: none; }
.table.compact td { padding: 9px 12px; }
.table.compact th { padding: 10px 12px; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn + .btn { margin-left: 6px; }
.table td.contact { white-space: nowrap; }
.table tr.cancelled-soft td { opacity: .6; }
.list-item .amount small { display: block; font-size: 11px; font-weight: 600; text-align: right; }

/* ---------- Crédit ---------- */
.lim { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.lim small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.lim-bar { height: 6px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.lim-bar i { display: block; height: 100%; border-radius: 6px; background: var(--accent); transition: width .8s var(--ease); }
.lim-bar.ok i { background: var(--ink); }
.aging { display: flex; flex-direction: column; gap: 14px; justify-content: center; flex: 1; }
.ag-top { display: flex; justify-content: space-between; font-size: 13px; }
.ag-top b { font-variant-numeric: tabular-nums; font-weight: 600; }
.ag-track { height: 10px; border-radius: 8px; background: var(--panel-2); overflow: hidden; margin: 6px 0 3px; }
.ag-fill { height: 100%; width: 0; border-radius: 8px; transition: width 1s var(--spring); }
.ag-row small { font-size: 11.5px; color: var(--muted); }
.mbars.cr-mbars { grid-template-columns: repeat(6, 1fr); height: auto; flex: 1; min-height: 160px; }
.mbars.fill { height: auto; flex: 1; min-height: 200px; }
.mb { max-width: 22px; }

.credit-hint { font-size: 12.5px; color: var(--accent-text); background: var(--accent-soft); border-radius: 12px; padding: 9px 12px; display: flex; gap: 8px; align-items: center; }
.credit-hint i { width: 15px; height: 15px; flex: none; }
.cust-slot { position: relative; }
.pos-cust { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 10px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--panel-2); }
.pos-cust .cell-2 { flex: 1; }
.cpick { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; display: none; }
.cpick.open { display: block; animation: pop .25s var(--spring) both; }
.cart-foot .cpick { top: auto; bottom: calc(100% + 6px); }
.cp-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; cursor: pointer; }
.cp-item > div { flex: 1; min-width: 0; }
.cp-item b { display: block; font-weight: 500; font-size: 13.5px; }
.cp-item small { color: var(--muted); font-size: 12px; }
.cp-item.sel, .cp-item:hover { background: var(--panel-hover); }
.cp-item.create i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.cp-item.create i svg { width: 14px; height: 14px; }

.cc { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cc-left, .cc-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cc-total { background: var(--hero); color: #fff; border-radius: 18px; padding: 14px 18px; }
.cc-total small { color: rgba(255, 255, 255, .6); font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.cc-total b { display: block; font-size: 30px; font-weight: 400; letter-spacing: -.04em; }
.cc-cust { border: 1px solid var(--border); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; animation: pane-in .35s var(--ease) both; }
.cc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cc-stats small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cc-stats b { font-weight: 600; font-variant-numeric: tabular-nums; }
.cc-empty { border: 1.5px dashed var(--border-strong); border-radius: 18px; padding: 26px 18px; text-align: center; color: var(--muted); }
.cc-empty i { width: 30px; height: 30px; display: inline-block; margin-bottom: 6px; }
.cc-new { border: 1px solid var(--accent); border-radius: 16px; padding: 12px; background: var(--accent-soft); }
.cc-rest { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); }
.cc-rest b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cc-warn:empty { display: none; }
.cc-warn { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--accent-text); }
.cc-warn div { display: flex; gap: 6px; align-items: center; }
.cc-warn i { width: 14px; height: 14px; flex: none; }

.cust-head { display: flex; align-items: center; gap: 16px; }
.ch-id { flex: 1; min-width: 0; }
.ch-id h2 { font-size: 24px; font-weight: 500; letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ch-id p { font-size: 13px; margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.ch-id p i { width: 13px; height: 13px; display: inline-grid; }
.ch-note { color: var(--text) !important; font-style: italic; }
.ch-contact { display: flex; gap: 6px; }
.ch-contact .icon-btn { border-color: var(--border); }
.cust-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.ck { border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; }
.ck.dark { background: var(--hero); color: #fff; border-color: transparent; }
.ck small { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ck.dark small, .ck.dark span { color: rgba(255, 255, 255, .6); }
.ck b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin: 3px 0 1px; font-variant-numeric: tabular-nums; }
.ck span { font-size: 11.5px; color: var(--muted); }
.cust-panel { margin-top: 12px; min-height: 300px; }
.cust-modal .modal-body { overflow: hidden; }
.rem-list { display: flex; flex-direction: column; gap: 4px; }
.rem-item { display: flex; gap: 12px; padding: 9px 6px; border-bottom: 1px solid var(--border); }
.rem-item b { font-weight: 500; font-size: 13.5px; }
.rem-item small { display: block; color: var(--muted); font-size: 12px; }
.rem-item p { font-size: 13px; margin-top: 3px; }
.rem-ico { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; flex: none; }
.rem-ico svg { width: 14px; height: 14px; }
.alloc { margin-top: 16px; border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; }
.alloc-title { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.alloc-row { display: grid; grid-template-columns: 90px auto 1fr 16px 1fr 90px; gap: 8px; align-items: center; padding: 6px 2px; font-size: 13px; opacity: .5; transition: opacity .2s; }
.alloc-row.on { opacity: 1; }
.alloc-row i, .alloc-row svg { width: 13px; height: 13px; }
.alloc-row .num { text-align: right; font-variant-numeric: tabular-nums; }
.alloc-total { display: flex; justify-content: space-between; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; font-size: 13.5px; }
.alloc-total b { font-variant-numeric: tabular-nums; }
.credit-panel { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; }
.contact-row { flex-wrap: wrap; }

/* ---------- Mode ajusté (écran assez grand) : rien ne défile ---------- */
@media (min-width: 900px) and (min-height: 540px) {
  .main { padding-bottom: 14px; }
  .page-head { margin: 2px 0 14px; align-items: flex-end; }
  .page-head h1 { font-size: 30px; }
  .page-head p { margin-top: 3px; font-size: 13px; }
  body:has(.page-tabs:not(:empty)) #page-sub { display: none; }
  .toolbar { margin-bottom: 12px; }

  .pane.fitted { overflow: hidden; display: flex; flex-direction: column; }
  .pane.fitted > * { flex: 1; min-height: 0; }
  .pane.fitted > .pane-col > .grow, .pane.fitted > .pane-col > .pg-card { flex: 1; min-height: 0; }
  .pg-card.fitted, .pane.fitted .pg-card { display: flex; flex-direction: column; overflow: hidden; }
  .pg-card > .pg-body, .pg-host > .pg-body, .pg-flat > .pg-body { overflow: hidden; }
  .fill-grid { height: 100%; grid-auto-rows: minmax(0, 1fr); }
  .fill-grid > .card { min-height: 0; overflow: hidden; }
  .fill-grid .span-8 { grid-column: span 8; } .fill-grid .span-4 { grid-column: span 4; } .fill-grid .span-5 { grid-column: span 5; }
  .fill-grid .span-7 { grid-column: span 7; } .fill-grid .span-6 { grid-column: span 6; } .fill-grid .span-3 { grid-column: span 3; }
  .fill-grid .hero { min-height: 0; }
  .fill-grid .hero .chart-wrap { min-height: 0; }
  .fill-grid .clamp-list { flex: 1; min-height: 0; overflow: hidden; }
  .fill-grid .donut-wrap.stack .legend { overflow: hidden; }
  .pane-col { height: 100%; }
  #prod-list.fitted > .pg-host { height: 100%; }
  #prod-list.fitted > .pg-host.card { overflow: hidden; }

  /* Caisse */
  .pos.fitted { align-items: stretch; overflow: hidden; }
  .pos.fitted .pos-catalog { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
  .pos.fitted .pos-catalog .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: none; margin-bottom: 12px !important; }
  .pos.fitted .pos-pg { flex: 1; min-height: 0; }
  .pos.fitted .pos-cart { position: relative; top: 0; max-height: none; min-height: 0; height: 100%; }
  .pos.fitted .cart-foot { gap: 9px; padding: 12px 18px 16px; }

  /* Stock */
  .stock-layout.fitted { align-items: stretch; overflow: hidden; }
  .stock-layout.fitted > .card { min-height: 0; overflow: hidden; }
  .stock-layout.fitted .matrix-wrap { max-height: none; overflow-x: auto; overflow-y: hidden; }
  .stock-layout.fitted .matrix-wrap > .pg-body { overflow-x: auto; }

  /* Réglages : seul le panneau de droite défile si besoin */
  .settings .set-main { max-height: calc(100vh - 190px); overflow: auto; scrollbar-width: thin; padding-right: 4px; }
}
@media (max-width: 1280px) and (min-width: 900px) and (min-height: 540px) {
  .stock-layout.fitted { grid-template-columns: 1fr 320px; }
  .list.cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 1060px) and (min-width: 900px) and (min-height: 540px) {
  .pos.fitted { grid-template-columns: 1fr 340px; }
  .fill-grid .hero { grid-template-columns: minmax(220px, 40%) 1fr; }
  .fill-grid .hero .hero-right { padding: 20px 22px 16px 0; }
}
@media (max-height: 760px) and (min-width: 900px) and (min-height: 540px) {
  .page-head h1 { font-size: 26px; }
  .page-head .eyebrow { display: none; }
  .hero h2 { font-size: 24px; margin: 10px 0 8px; }
  .hero-big .num { font-size: 46px; }
  .strip .card { padding: 12px 16px; }
  .strip .card b { font-size: 21px; }
  .todo-feature p, .hero p { display: none; }
}
@media (max-width: 760px) {
  .page-tabs { width: 100%; justify-content: flex-start; }
  .cc, .cust-kpis { grid-template-columns: 1fr 1fr; }
  .cc { grid-template-columns: 1fr; }
  .list.cols-2 { grid-template-columns: 1fr; }
  .alloc-row { grid-template-columns: 80px 1fr 80px; }
  .alloc-row > :nth-child(2), .alloc-row > :nth-child(4), .alloc-row > :nth-child(3) { display: none; }
}
.cart-foot .seg.full button { padding: 6px 6px; font-size: 12.5px; gap: 4px; min-width: 0; }
.cart-foot .seg.full button i, .cart-foot .seg.full button svg { width: 14px; height: 14px; }
/* .pos (caisse) ne doit pas s'appliquer aux éléments « entrée » de la timeline */
.tl-ico.pos { grid-template-columns: none; gap: 0; }
.tl-qty.pos { display: block; grid-template-columns: none; gap: 0; }

/* ---------- Accès par code à 6 chiffres ---------- */
.pin-card { width: min(400px, 100%); text-align: center; }
.pin-card .auth-brand { justify-content: center; }
.pin-card > p { margin: 6px 0 18px; }
.pin-lock { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; background: var(--ink); color: var(--ink-text); }
.pin-lock svg { width: 22px; height: 22px; }
.pin { position: relative; }
.pin-boxes { position: relative; display: flex; justify-content: center; gap: 10px; margin: 6px 0 10px; cursor: text; }
.pin-boxes span { width: 46px; height: 56px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--panel-2); display: grid; place-items: center; transition: border-color .15s, box-shadow .15s, transform .25s var(--spring), background .15s; }
.pin-boxes span::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .25s var(--spring); }
.pin-boxes span.on::after { transform: scale(1); }
.pin-boxes span.last { transform: translateY(-2px); }
.pin.focus .pin-boxes span.cur { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--panel); }
.pin.ok .pin-boxes span { border-color: var(--accent); background: var(--accent-soft); }
.pin.ok .pin-boxes span::after { background: var(--accent); }
.pin.shake .pin-boxes { animation: shake .45s; }
.pin.shake .pin-boxes span { border-color: var(--accent); }
.pin-msg { min-height: 20px; font-size: 13px; color: var(--muted); }
.pin-msg.err { color: var(--accent-text); font-weight: 500; }
.pin-msg.good { color: var(--text); font-weight: 600; }
.pin.busy .pin-boxes, .pin.locked-pad .pin-boxes { opacity: .45; pointer-events: none; }
.pin-native { position: absolute; left: 0; top: 0; width: 100%; height: 100%; opacity: 0; border: 0; color: transparent; background: transparent; caret-color: transparent; font-size: 16px; }
.pin-tip { font-size: 12px; margin-top: 16px; }
.auth-alt { margin-top: 18px; font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; }
.auth-alt:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 420px) { .pin-boxes { gap: 7px; } .pin-boxes span { width: 40px; height: 50px; } }

/* ---------- Bon de réception multi-modèles ---------- */
.pu-basket:empty { display: none; }
.pu-basket { border: 1px solid var(--border); border-radius: 16px; padding: 10px; background: var(--panel-2); display: flex; flex-direction: column; gap: 4px; max-height: 230px; overflow: auto; }
.pb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 4px 4px; font-size: 12.5px; }
.pb-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); cursor: pointer; animation: line-in .35s var(--spring) both; }
.pb-item:hover { border-color: var(--border-strong); }
.pb-item .mini-shoe { width: 34px; height: 34px; border-radius: 10px; }
.pb-item .cell-2 { flex: 1; }
.pb-now { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); padding: 6px 4px 0; display: flex; gap: 6px; align-items: center; }
.pb-now i, .pb-now svg { width: 13px; height: 13px; }
.pb-head b { white-space: nowrap; } .pb-head span { text-align: right; }

/* ---------- Autocomplete générique ---------- */
.cpick.ac { max-height: 340px; overflow: auto; }
.cpick.ac mark { background: var(--accent-soft); color: var(--accent-text); border-radius: 4px; padding: 0 1px; }
.cpick.ac .mini-shoe { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.cpick.ac .badge { flex: none; }
.ac-empty, .ac-more { padding: 8px 12px; font-size: 12.5px; color: var(--muted); }
.ac-more { border-top: 1px dashed var(--border); margin-top: 4px; }

/* ---------- Réception = facture fournisseur ---------- */
.modal.inv-modal { width: min(1320px, 100%); }
.pur3 { display: grid; grid-template-columns: 268px minmax(0, 1fr) 350px; gap: 20px; align-items: start; }
.pl-a, .pl-b, .pl-inv { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pl-b { padding-top: 34px; transition: opacity .2s; }
.pl-b.off { opacity: .35; pointer-events: none; filter: grayscale(1); }
.pl-inv { background: var(--panel-2); border: 1px solid var(--border); border-radius: 20px; padding: 14px; }
.pl-title { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pl-title .muted { font-size: 12px; }
.pl-step { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--ink-text); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.pl-inv .pl-step { background: var(--accent); color: #fff; }
.pu-pick { display: flex; gap: 10px; align-items: center; }
.pu-pick > i { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--panel); border: 1px dashed var(--border-strong); color: var(--muted); flex: none; }
.pu-pick b { font-weight: 600; }
.input.ro { display: flex; align-items: center; color: var(--muted); background: var(--panel-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.pu-addline { align-self: flex-end; }
.pl-a .pp-row { padding: 10px 12px; }
.pl-a .pp-row:first-child { flex-direction: column; align-items: flex-start; gap: 4px; }
.pl-a .pp-margin { min-width: 0; }
.input.sm { height: 34px; padding: 0 10px; font-size: 13px; }
.sup-card { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.sup-card b { color: var(--text); font-weight: 600; }
.sup-card.new i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.sup-card.new i svg { width: 12px; height: 12px; }
.inv-lines { display: flex; flex-direction: column; gap: 5px; max-height: 210px; overflow: auto; }
.il-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 4px; }
.il-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); cursor: pointer; animation: line-in .35s var(--spring) both; }
.il-item:hover { border-color: var(--border-strong); }
.il-item .mini-shoe { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.il-item .cell-2 { flex: 1; min-width: 0; }
.il-item .cell-2 b, .il-item .cell-2 small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.il-item.cur { border-style: dashed; border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 50%, var(--panel)); cursor: default; }
.il-item.editing:not(.cur) { opacity: .5; }
.il-amt { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; white-space: nowrap; }
.il-empty { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; border: 1px dashed var(--border-strong); color: var(--muted); font-size: 12.5px; }
.inv-tot { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--border); }
.inv-tot > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.inv-tot > div > span small { display: block; color: var(--muted); font-size: 11px; }
.inv-tot b { font-variant-numeric: tabular-nums; }
.inv-tot .input { width: 120px; text-align: right; }
.inv-tot .t { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }
.inv-tot .t b { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.inv-pay { display: flex; flex-direction: column; gap: 8px; }
.ip-head { justify-content: space-between; }
.ip-head label { font-size: 12.5px; font-weight: 600; }
.chip.active { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.mini-l { display: block; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 4px 0 2px; }
#pu-payd { display: flex; flex-direction: column; gap: 4px; transition: opacity .2s; }
#pu-payd.off { opacity: .35; pointer-events: none; }
#pu-payd .seg button { font-size: 12.5px; }
#pu-src-h { font-size: 11.5px; line-height: 1.35; }
.inv-debt { display: flex; flex-direction: column; gap: 8px; }
.inv-debt:empty { display: none; }
.inv-debt.on { padding: 10px 12px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.id-row { display: flex; gap: 10px; align-items: flex-start; }
.id-row > i { color: var(--accent-text); flex: none; margin-top: 1px; }
.id-row.ok > i { color: var(--text); }
.id-row b { display: block; font-size: 13px; font-weight: 600; }
.id-row small { font-size: 12px; color: var(--muted); }
.inv-debt .row .input { flex: 1; }
.inv-done { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--ink); color: var(--ink-text); cursor: pointer; animation: pop .35s var(--spring) both; }
.inv-done > i { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.inv-done > div { flex: 1; min-width: 0; }
.inv-done b { display: block; font-size: 13px; }
.inv-done small { font-size: 11.5px; opacity: .75; }
.inv-done .accent { color: var(--accent); }
.inv-done .link-like { color: var(--accent); font-size: 12.5px; font-weight: 600; }
@media (max-width: 1180px) { .pur3 { grid-template-columns: 250px minmax(0, 1fr); } .pl-inv { grid-column: 1 / -1; } }
@media (max-width: 760px) { .pur3 { grid-template-columns: 1fr; } .pl-b { padding-top: 0; } }

/* ---------- Fournisseurs ---------- */
.badge.b-src-caisse, .badge.b-src-apport { display: inline-flex; align-items: center; gap: 4px; }
.badge.b-src-caisse i svg, .badge.b-src-apport i svg { width: 12px; height: 12px; }
.badge.b-src-apport { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.cash-row.split2 > div { flex: 1; }
.big-in { font-size: 22px; height: 50px; font-weight: 600; }
.d-block { display: block; }
.alloc-row small .badge { font-size: 10.5px; }
.sp-pay .alloc { margin-top: 0; padding: 6px 10px; max-height: 200px; overflow: auto; }
.sp-pay .alloc-row { grid-template-columns: 1fr auto; }
.sp-pay .alloc-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.sp-pay .alloc-row > span:last-child small { display: block; color: var(--muted); font-size: 11.5px; }
.cpick.ac { min-width: 320px; }
.inv-modal .modal-body { overflow-x: hidden; }
.pl-inv { gap: 10px; padding: 12px 14px; }
.pl-inv .field { margin: 0; }
.pl-inv .mini-l { margin: 0; }
.ip-head { gap: 6px; flex-wrap: nowrap; }
.ip-head .input { flex: 1; min-width: 0; }
.chips.meth { gap: 5px; margin-top: 6px; }
.chips.meth .chip { padding: 4px 9px; font-size: 12px; }
.chips.meth .chip i svg { width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; }
#pu-payd .seg button { font-size: 12px; white-space: nowrap; }
.inv-lines { max-height: 180px; }
@media (min-width: 1181px) { .pl-inv { position: sticky; top: 0; max-height: calc(100dvh - 190px); overflow-y: auto; scrollbar-width: thin; } }
.sp-pay .field { margin-top: 14px; }
.sp-pay .field > label { margin-bottom: 6px; }
.sup-tbl td:nth-child(-n+2), .sup-tbl td:nth-child(2) { white-space: nowrap; }
.rec-lines .mini-shoe, .cust-panel .mini-shoe { width: 40px; height: 40px; border-radius: 11px; flex: none; }
.rec-lines td:first-child .row { flex-wrap: nowrap; }
.rec-lines td { white-space: nowrap; }

/* ---------- Réception : ligne incomplète ---------- */
.il-item.warn { border-style: dashed; border-color: var(--accent); background: var(--accent-soft); cursor: default; }
.il-item.warn small { color: var(--accent-text); white-space: normal; }
.fee-warn:empty { display: none; }
.fee-warn { display: flex; gap: 8px; font-size: 12px; color: var(--accent-text); background: var(--accent-soft); border-radius: 12px; padding: 8px 10px; }
.fee-warn i svg { width: 14px; height: 14px; }

/* ---------- Revendeurs ---------- */
.modal.consign-modal { width: min(1100px, 100%); }
.cs-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.cs-left, .cs-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cs-right { background: var(--panel-2); border: 1px solid var(--border); border-radius: 20px; padding: 14px; }
.cs-right .field { margin: 0; }
.cs-help { font-size: 12px; display: flex; gap: 6px; }
.cs-help i svg { width: 14px; height: 14px; }
.cs-add { align-items: flex-end; gap: 10px; }
.pu-size.dis { opacity: .4; }
.pl-step i svg { width: 12px; height: 12px; }
.modal.settle-modal { width: min(980px, 100%); }
.st-quick { gap: 8px; margin-bottom: 10px; align-items: center; }
.st-tbl tr.on td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.stepper.sm { justify-content: flex-end; gap: 4px; }
.stepper.sm button { width: 26px; height: 26px; font-size: 14px; }
.stepper.sm input { width: 40px; font-size: 16px; }
.st-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; align-items: start; }
#sm-pay.off { opacity: .35; pointer-events: none; }
.my-comm { white-space: nowrap; }
.my-comm b { font-weight: 600; }
@media (max-width: 900px) { .cs-grid, .st-foot { grid-template-columns: 1fr; } }
.pl-inv > *, .cs-right > * { flex-shrink: 0; }

/* ---------- Autocompletes : même style que les listes de choix (m/pickers.css) ---------- */
.cpick.ui-acpop { position: fixed; right: auto; bottom: auto; min-width: 0; z-index: 2000; max-height: 340px; overflow-y: auto; border-radius: 18px; padding: 6px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .06); scrollbar-width: thin; overscroll-behavior: contain; }
[data-theme="dark"] .cpick.ui-acpop { box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .9); }
.cpick.ui-acpop.open { animation: ui-in .22s var(--spring) both; transform-origin: top center; }
.cpick.ui-acpop.up.open { transform-origin: bottom center; }
.cpick.ui-acpop .cp-item { padding: 9px 11px; border-radius: 11px; }
.cpick.ui-acpop .cp-item.on b { font-weight: 600; }
.cpick.ui-acpop .cp-item.on > div:first-child b::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin: 0 8px 2px 0; vertical-align: middle; }
.cpick.ui-acpop .ac-check { color: var(--accent); display: grid; flex: none; }
.cpick.ui-acpop .ac-check svg { width: 16px; height: 16px; }
.input.ac-input { padding-left: 38px; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 13px center, right 12px center; }
.input.ac-input.ac-open { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background-color: var(--panel);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m18 15-6-6-6 6'/%3E%3C/svg%3E"); }
