:root {
  --bg: #16181c;
  --bg2: #1d2025;
  --card: #23262c;
  --card2: #2b2f36;
  --line: #353a42;
  --text: #eef0f3;
  --muted: #9aa1ab;
  --accent: #e3173e;
  --accent2: #ff4d6d;
  --accent-soft: rgba(227, 23, 62, .14);
  --pos: #3ecf8e;
  --neg: #ff6b6b;
  --warn: #f5b041;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .28);
  --nav-h: 66px;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { overflow-x: clip; }
body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(1200px 500px at 50% -200px, #2a2d33 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
}
a { color: inherit; text-decoration: none; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 10px; color: var(--muted); font-weight: 600; display: flex; justify-content: space-between; align-items: center; text-transform: uppercase; letter-spacing: .04em; }
small { font-size: 12.5px; }
.muted { color: var(--muted); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.warn { color: var(--warn); }
.link { color: var(--accent2); font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 600; }
[hidden] { display: none !important; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(22, 24, 28, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #fff; font-weight: 800; box-shadow: 0 4px 14px rgba(227, 23, 62, .4); }
.logo.big { width: 64px; height: 64px; border-radius: 20px; font-size: 30px; margin: 0 auto 14px; }
.topnav { display: none; gap: 4px; }
.topnav a { padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.topnav a:hover { background: var(--card); color: var(--text); }
.topnav a.on { background: var(--accent-soft); color: var(--accent2); }

.wrap { max-width: 920px; margin: 0 auto; padding: 14px 14px 0; animation: fadein .25s ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Navigation du bas (mobile) ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(29, 32, 37, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 600; transition: color .2s; }
.bottomnav a i { font-style: normal; font-size: 20px; line-height: 1; }
.bottomnav a.on { color: var(--accent2); }
.bottomnav a.fab { justify-self: center; width: 56px; height: 56px; border-radius: 18px; margin-top: -26px; color: #fff; background: linear-gradient(135deg, var(--accent2), var(--accent)); box-shadow: 0 8px 22px rgba(227, 23, 62, .45); justify-content: center; transition: transform .15s; }
.bottomnav a.fab:active { transform: scale(.94); }
.bottomnav a.fab i { font-size: 30px; font-weight: 300; }

@media (min-width: 900px) {
  .topnav { display: flex; }
  .bottomnav { left: auto; right: 24px; bottom: 24px; width: auto; height: auto; padding: 0; background: none; border: 0; backdrop-filter: none; display: block; }
  .bottomnav a:not(.fab) { display: none; }
  .bottomnav a.fab { margin: 0; display: flex; }
  body { padding-bottom: 40px; }
  .wrap { padding-top: 22px; }
}

/* ---------- Blocs ---------- */
.card { background: var(--card); border: 1px solid rgba(255, 255, 255, .04); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 2px 14px; }
.pagehead h1 { flex: 1; }
.back { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--card); font-size: 26px; line-height: 1; padding-bottom: 3px; }

.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 20px; margin-bottom: 14px;
  background: linear-gradient(135deg, #3a3f47 0%, #2a2d33 55%, #22252a 100%); border: 1px solid rgba(255, 255, 255, .06); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(227, 23, 62, .45), transparent 70%); }
.hero.calm::after { background: radial-gradient(circle, rgba(62, 207, 142, .25), transparent 70%); }
.hero > div { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; }
.hero strong { font-size: 32px; letter-spacing: -.02em; font-weight: 750; font-variant-numeric: tabular-nums; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stat { background: var(--card); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; border: 1px solid rgba(255, 255, 255, .04); min-width: 0; }
.stat.wide { grid-column: 1 / -1; }
.stat small { color: var(--muted); }
.stat b { font-size: 19px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stats.three .stat b { font-size: 16px; }
.stat em { font-style: normal; font-size: 12px; color: var(--muted); }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } .stat.wide { grid-column: span 2; } }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.quick.three { grid-template-columns: repeat(4, 1fr); }
.qbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; background: var(--card); border-radius: 14px; font-size: 12px; font-weight: 600; text-align: center; border: 1px solid rgba(255, 255, 255, .04); transition: transform .12s, background .2s; }
.qbtn:active { transform: scale(.96); background: var(--card2); }
@media (min-width: 700px) { .quick { grid-template-columns: repeat(8, 1fr); } }

/* Icônes de type */
.ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--card2); font-size: 17px; font-weight: 700; }
.t-whish_envoi, .t-whish_reception, .t-whish_service { background: var(--accent-soft); color: var(--accent2); }
.t-abidjan { background: rgba(245, 176, 65, .15); color: var(--warn); }
.t-change { background: rgba(93, 173, 226, .15); color: #6ab7ee; }
.t-credit { background: rgba(175, 122, 197, .17); color: #c39bd3; }
.t-remboursement, .t-apport { background: rgba(62, 207, 142, .14); color: var(--pos); }
.t-depense, .t-retrait { background: rgba(255, 107, 107, .14); color: var(--neg); }
.avatar { background: linear-gradient(135deg, #454a53, #33373e); color: #fff; }
.wa { background: rgba(37, 211, 102, .16); color: #25d366; }
.dot { background: currentColor !important; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }

/* Listes */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); transition: background .15s; border-radius: 10px; }
.list > .row:last-child, .list > .row-wrap:last-child .row { border-bottom: 0; }
.row:hover { background: rgba(255, 255, 255, .02); }
.row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row .grow b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .grow small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .amt { text-align: right; display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-wrap { display: flex; align-items: center; gap: 8px; }
.row-wrap .row { flex: 1; min-width: 0; }
.empty { color: var(--muted); text-align: center; padding: 18px 0; margin: 0; }
.badge { display: inline-block; font-size: 10.5px; padding: 2px 7px; border-radius: 20px; vertical-align: middle; font-weight: 700; }
.badge.warn { background: rgba(245, 176, 65, .18); color: var(--warn); }

.balances { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bal { background: var(--bg2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; min-width: 0; }
.bal small { color: var(--muted); }
.bal b { font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (min-width: 700px) { .balances { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Formulaires ---------- */
.form label, .filters label { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px;
  outline: none; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input.num { font-variant-numeric: tabular-nums; font-weight: 600; }
input[type=checkbox] { width: 22px; height: 22px; padding: 0; border-radius: 7px; flex: none; position: relative; }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 800; }
::-webkit-calendar-picker-indicator { filter: invert(.8); }
.form label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-weight: 500; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > label { min-width: 0; }
.hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 10px; }

details > summary { cursor: pointer; list-style: none; font-weight: 600; }
details > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: "▸"; display: inline-block; margin-right: 8px; transition: transform .2s; color: var(--muted); }
details.card[open] > summary::before { transform: rotate(90deg); }
details.card[open] > summary { margin-bottom: 12px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -14px 4px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: center; position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: block; padding: 10px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 14px; white-space: nowrap; transition: all .18s; cursor: pointer; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(227, 23, 62, .35); }
@media (min-width: 900px) { .chips { flex-wrap: wrap; margin: 0 0 4px; padding: 2px 0 12px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: 15px; padding: 13px 18px; border-radius: 13px; border: 1px solid var(--line); background: var(--card2); color: var(--text); cursor: pointer; transition: transform .1s, filter .2s, background .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent2), var(--accent)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(227, 23, 62, .3); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: transparent; color: var(--neg); border-color: rgba(255, 107, 107, .4); }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn.block { display: flex; width: 100%; margin-bottom: 8px; }
.btn.disabled { opacity: .35; pointer-events: none; }
.btn:disabled { opacity: .6; }
.btn.grow { flex: 1; }
.actions { display: flex; gap: 10px; }
.actions.sticky { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); z-index: 5; padding: 10px; margin: 0 -4px 14px; background: rgba(22, 24, 28, .85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 18px; }
@media (min-width: 900px) { .actions.sticky { bottom: 12px; } }
.inline { margin: 0; }
.danger-zone form { margin: 0; }

.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 600; animation: fadein .3s; }
.flash.ok { background: rgba(62, 207, 142, .13); color: var(--pos); border: 1px solid rgba(62, 207, 142, .3); }
.flash.err { background: rgba(255, 107, 107, .12); color: var(--neg); border: 1px solid rgba(255, 107, 107, .3); }

.filters input[type=search] { margin-bottom: 12px; }
.range-links { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.range-links a, .pill { font-size: 13px; padding: 6px 11px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.pill { display: inline-block; margin: 0 0 12px; color: var(--text); }
.seg { display: flex; background: var(--bg2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg a { flex: 1; text-align: center; padding: 8px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg a.on { background: var(--card2); color: var(--text); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; color: var(--muted); font-size: 13px; }

/* Tableaux */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tbody tr { cursor: pointer; transition: background .15s; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, .03); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }

.monthnav { display: flex; align-items: center; gap: 10px; padding: 10px; }
.monthnav form { flex: 1; margin: 0; }
.monthnav input { text-align: center; font-weight: 700; }

.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; height: 170px; align-items: end; }
.bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; min-width: 0; }
.bar .b { width: 100%; max-width: 30px; background: linear-gradient(180deg, #5b616b, #3d424a); border-radius: 6px 6px 3px 3px; transition: height .5s ease; }
.bar .b.neg { background: linear-gradient(180deg, var(--neg), #8a3a3a); }
.bar.on .b { background: linear-gradient(180deg, var(--accent2), var(--accent)); }
.bar .m { font-size: 10.5px; color: var(--muted); }
.bar .v { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; max-width: 100%; }
.bar.on .m, .bar.on .v { color: var(--text); font-weight: 700; }

details.acc { border-bottom: 1px solid var(--line); }
details.acc:last-child { border-bottom: 0; }
details.acc > summary.row { border-bottom: 0; }
details.acc.off { opacity: .55; }
.acc-body { padding: 4px 4px 12px; }
.acc-body .link { display: inline-block; margin-bottom: 12px; }

.login { max-width: 380px; margin: 8vh auto 0; text-align: center; }
.login h1 { margin-bottom: 4px; }
.login .card { text-align: left; margin-top: 22px; }

/* ===== Transferts ===== */
.s-AB { background: rgba(245, 176, 65, .15); color: var(--warn); }
.s-BA { background: var(--accent-soft); color: var(--accent2); }
.pay { background: rgba(62, 207, 142, .14); color: var(--pos); }
.badges { display: flex; gap: 4px; margin-top: 3px; }
.badge.cred { background: rgba(175, 122, 197, .2); color: #c39bd3; }
.hero strong.sub { font-size: 22px; color: var(--muted); }
.hero strong.sub-line { font-size: 24px; }

.rates .rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 10px; }
.rates label { display: flex; flex-direction: column; gap: 4px; position: relative; }
.rates label span { font-size: 12px; color: var(--muted); font-weight: 600; }
.rates label em { position: absolute; right: 12px; bottom: 13px; font-style: normal; font-size: 12px; color: var(--muted); pointer-events: none; }
.rates input { font-size: 22px; font-weight: 750; padding: 10px 52px 10px 12px; background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .08); }
.rate-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.quick.two { grid-template-columns: 1fr 1fr; }
.quick.four { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 700px) { .quick.two { grid-template-columns: 1fr 1fr; } .quick.four { grid-template-columns: repeat(4, 1fr); } }
.qbtn.big { flex-direction: row; text-align: left; padding: 14px; gap: 12px; }
.qbtn.big .ico { width: 44px; height: 44px; font-size: 22px; }
.qbtn.big span:last-child { display: flex; flex-direction: column; min-width: 0; }
.qbtn.big b { font-size: 14px; line-height: 1.2; }
.qbtn.big small { color: var(--muted); font-weight: 500; font-size: 11.5px; }

.seg label { flex: 1; margin: 0 !important; position: relative; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { display: block; text-align: center; padding: 10px 6px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); cursor: pointer; transition: all .18s; }
.seg label input:checked + span { background: var(--card2); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.seg.big { margin-bottom: 14px; background: var(--card); }
.seg.big label span { padding: 13px 6px; font-size: 14.5px; }
.seg.big label input:checked + span { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #fff; box-shadow: 0 4px 14px rgba(227, 23, 62, .35); }
.card > .seg { margin-bottom: 14px; }
.seg.links { margin-top: 2px; }

.suffix { position: relative; }
.suffix input { padding-right: 62px; }
.suffix em { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--muted); font-weight: 700; pointer-events: none; }
.suffix.small input { padding: 9px 56px 9px 10px; font-size: 16px; }
input.num.big { font-size: 22px; font-weight: 750; padding-top: 14px; padding-bottom: 14px; }
.amounts label > span { color: var(--text); }

.calc { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 10px; align-items: end; background: var(--bg2); border-radius: 14px; padding: 12px; }
.calc > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.calc small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.calc b { font-size: 16px; font-variant-numeric: tabular-nums; padding-bottom: 9px; overflow-wrap: anywhere; }
.calc .benef b { font-size: 19px; }
@media (max-width: 380px) { .calc { grid-template-columns: 1fr 1fr; } .calc .benef { grid-column: 1 / -1; } }

.credit-box { background: rgba(175, 122, 197, .08); border: 1px dashed rgba(175, 122, 197, .4); border-radius: 14px; padding: 12px 12px 2px; margin-bottom: 14px; }
.reste { margin: 0 0 10px; font-size: 14px; }
.reste b { color: var(--warn); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid3 > label { min-width: 0; }
.form label.check.pad { padding-top: 22px; }
.fill-btn { margin: -4px 6px 12px 0; }
.fill-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.fill-row small { color: var(--muted); margin-right: 2px; }
.fill-row .fill-btn { margin: 0; }
.fill-row .fill-btn em { font-style: normal; font-size: .75em; opacity: .65; }

.wa-btn { background: rgba(37, 211, 102, .16); color: #25d366; border-color: rgba(37, 211, 102, .35); font-size: 18px; padding: 8px 12px; }
.wa-full { background: linear-gradient(135deg, #2bd46a, #1ea952) !important; box-shadow: 0 6px 18px rgba(37, 211, 102, .3) !important; }
.actions:not(.sticky) { margin-bottom: 14px; flex-wrap: wrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.wrap-cell { white-space: normal !important; min-width: 150px; }
.tbl.static tbody tr { cursor: default; }
.tbl tr.sub td { color: var(--muted); font-style: italic; }
.tbl tr.total td { border-top: 2px solid var(--line); font-weight: 700; }
.sub-details { margin-top: 12px; }
.sub-details summary { color: var(--muted); font-size: 14px; margin-bottom: 8px; }

.releve header { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.releve header > div { display: flex; flex-direction: column; }
.releve header .r { text-align: right; }
.releve h2 { margin-top: 10px; }

@media print {
  :root { --text: #111; --muted: #555; --line: #ccc; --pos: #0a7a45; --warn: #9a5b00; }
  body { background: #fff !important; color: #111; padding: 0; }
  .topbar, .bottomnav, .no-print, .flash, .actions { display: none !important; }
  .card { box-shadow: none; border: 0; background: #fff; padding: 0; }
  .tbl td, .tbl th { color: #111; }
  .wrap { max-width: none; padding: 0; animation: none; }
}
@media (max-width: 560px) { .grid2.amounts { grid-template-columns: 1fr; gap: 0; } }
.badge { white-space: nowrap; }
.card > .seg label input:checked + span { background: var(--accent-soft); color: var(--accent2); box-shadow: inset 0 0 0 1.5px var(--accent); }
.releve .wrap-cell, .card .wrap-cell { min-width: 90px; }
@media (max-width: 560px) { .tbl { font-size: 13px; } .tbl td, .tbl th { padding: 9px 4px; } }
.client-info { margin: -6px 0 12px; font-size: 13px; color: var(--warn); }
.client-search { margin-bottom: 6px; }
.danger-card > summary { color: var(--neg); }
.danger-card { border-color: rgba(255, 107, 107, .25); }
.ok-badge { background: rgba(62, 207, 142, .18); color: var(--pos); margin-left: 6px; text-transform: none; letter-spacing: 0; }

/* Boutons de caisse */
.wbtns { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 6px; }
.wbtn { position: relative; margin: 0 !important; cursor: pointer; }
.wbtn input { position: absolute; opacity: 0; pointer-events: none; }
.wbtn span { display: flex; flex-direction: column; gap: 2px; padding: 11px 12px; border-radius: 13px; background: var(--bg2); border: 1.5px solid var(--line); transition: all .15s; min-height: 58px; }
.wbtn span b { color: var(--text); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbtn span small { color: var(--muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wbtn input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 4px 14px rgba(227, 23, 62, .18); }
.wbtn input:checked + span b { color: var(--accent2); }
.wbtn:active span { transform: scale(.97); }
.wbtn.none span b { color: var(--muted); }
.cz-lbl { margin: 4px 0 8px; font-size: 13.5px; }
.cz-lbl b { color: var(--text); }
.cz-after { margin: 0 0 14px; font-size: 13px; color: var(--muted); font-weight: 600; min-height: 2px; }
.cz-after.neg { color: var(--neg); }
@media (max-width: 380px) { .wbtns { grid-template-columns: 1fr 1fr; } }
.fin-list { margin: 0 0 12px; padding-left: 18px; color: var(--muted); font-size: 13.5px; }
.fin-list li { margin-bottom: 4px; }
.fin-list b { color: var(--text); }
.bal .sub-bal { font-size: 14px; }

/* ===== Whish ===== */
.who { display: none; font-size: 12.5px; color: var(--muted); font-weight: 600; }
@media (max-width: 899px) { .who { display: block; } }
.ico.cat { background: var(--accent-soft); color: var(--accent2); }
.quick.cats { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.wallet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.wallet { background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .06); border-radius: 13px; padding: 10px 12px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wallet span { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet b { font-size: 16px; font-variant-numeric: tabular-nums; }
.stat b + b { font-size: 15px; }

/* Grille de saisie par devise */
.grid-head, .grid-row { display: grid; grid-template-columns: 46px repeat(3, 1fr); gap: 6px; align-items: center; }
#opform.is-credit .grid-head, #opform.is-credit .grid-row { grid-template-columns: 46px repeat(4, 1fr); }
.av-col { display: none; }
#opform.is-credit .av-col { display: block; }
.grid-head { margin: 4px 0 6px; }
.grid-head span { font-size: 12px; color: var(--muted); font-weight: 700; text-align: center; }
.grid-row { margin-bottom: 8px; }
.grid-row .cur { font-weight: 800; font-size: 13px; color: var(--text); }
.grid-row input { padding: 12px 8px; text-align: right; font-size: 16px; min-width: 0; }
.grid-row input.ben { border-color: rgba(62, 207, 142, .35); }
.grid-row input.ben.neg-in { border-color: rgba(255, 107, 107, .5); color: var(--neg); }
.grid-row input.av-col { border-color: rgba(175, 122, 197, .45); }
.grid-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
#credit-hint { display: none; margin: 0; }
#opform.is-credit #credit-hint { display: inline; }
.reste { margin: 8px 0 0; }
.wbtn span small[hidden] { display: none; }
.cz-after span { white-space: nowrap; }
.user-caisses { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 12px; }
.role-badge { background: var(--accent-soft); color: var(--accent2); }
.off-row { opacity: .5; }
.range-links a.on { background: var(--accent-soft); color: var(--accent2); border-color: var(--accent); }
.grid-row input { padding: 11px 6px; font-size: 15px; }
#opform.is-credit .grid-row input { font-size: 14px; padding: 11px 4px; }
.row .amt b { font-size: 14px; }
.row .grow { flex: 1 1 40%; }

/* ===== Entrée / Sortie ===== */
.typeseg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.typeseg label { position: relative; margin: 0 !important; cursor: pointer; }
.typeseg input { position: absolute; opacity: 0; pointer-events: none; }
.typeseg span { display: flex; flex-direction: column; align-items: center; padding: 14px 8px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); font-weight: 800; font-size: 17px; color: var(--muted); letter-spacing: .03em; transition: all .15s; }
.typeseg span i { font-style: normal; font-size: 24px; line-height: 1; }
.typeseg span small { font-size: 11.5px; font-weight: 600; letter-spacing: 0; margin-top: 2px; }
.typeseg .t-in input:checked + span { background: rgba(62, 207, 142, .14); border-color: var(--pos); color: var(--pos); }
.typeseg .t-out input:checked + span { background: rgba(255, 107, 107, .13); border-color: var(--neg); color: var(--neg); }
.ico.ty-entree { background: rgba(62, 207, 142, .15); color: var(--pos); font-size: 20px; }
.ico.ty-sortie { background: rgba(255, 107, 107, .14); color: var(--neg); font-size: 20px; }
.form label.check.mini { margin: 0; font-size: 13px; color: var(--muted); }
.form label.check.mini input { width: 18px; height: 18px; }
.cash-pick { margin: 6px 0 2px; }
.cash-pick > summary { font-size: 14px; color: var(--muted); padding: 8px 0; }
.cash-pick > summary b { color: var(--text); }
.cash-pick[open] > summary { margin-bottom: 8px; }
.op-row { padding: 9px 2px; gap: 10px; }
.op-row .ico { width: 34px; height: 34px; border-radius: 10px; }
.op-row .grow b { font-size: 14.5px; }
.op-row .tm { font-variant-numeric: tabular-nums; }
.who-chip { display: inline-block; padding: 0 7px; border-radius: 20px; background: var(--card2); color: var(--text); font-size: 11.5px; font-weight: 700; margin-left: 2px; }
.ben-line { color: var(--pos); }
.day-head { position: sticky; top: var(--hdr, 58px); z-index: 4; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 9px 12px; margin: 14px -4px 2px; background: rgba(43, 47, 54, .95); backdrop-filter: blur(8px); border-radius: 12px; font-size: 13px; }
.day-head b { font-size: 14px; }
.day-head span { color: var(--muted); }
.day-head .pos { color: var(--pos); font-weight: 700; }
.day-head .neg { color: var(--neg); font-weight: 700; }
.typefilter { display: flex; gap: 6px; margin-bottom: 12px; }
.typefilter a { flex: 1; text-align: center; padding: 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--muted); }
.typefilter a.on { background: var(--accent-soft); color: var(--accent2); border-color: var(--accent); }
.typefilter a.on.in { background: rgba(62, 207, 142, .14); color: var(--pos); border-color: var(--pos); }
.typefilter a.on.out { background: rgba(255, 107, 107, .13); color: var(--neg); border-color: var(--neg); }
.bigtype { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.bigtype a { display: flex; flex-direction: column; align-items: center; padding: 18px 8px; border-radius: 18px; font-weight: 800; font-size: 18px; letter-spacing: .03em; transition: transform .1s; }
.bigtype a:active { transform: scale(.97); }
.bigtype a i { font-style: normal; font-size: 30px; line-height: 1; }
.bigtype a small { font-size: 12px; font-weight: 600; opacity: .85; letter-spacing: 0; }
.bigtype .in { background: linear-gradient(135deg, #2fbf7f, #1f8f5c); color: #fff; box-shadow: 0 6px 18px rgba(47, 191, 127, .3); }
.bigtype .out { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #fff; box-shadow: 0 6px 18px rgba(227, 23, 62, .3); }
#opform.is-sortie .av-col { display: none !important; }
@media (min-width: 900px) { .day-head { top: var(--hdr, 62px); } }
.list-card { padding-top: 4px; }
.list-card .day-head:first-child { margin-top: 6px; }
.sum-line { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.sum-card { padding: 12px 16px; }
.filters > summary { font-size: 14px; color: var(--muted); }
.filters[open] > summary { margin-bottom: 12px; }
.op-row .amt { max-width: 46%; white-space: normal; }
.op-row .amt b { white-space: nowrap; }
.op-row .ben-line { text-align: right; line-height: 1.3; }
.who-chip { margin: 0 4px 0 0; }
.sortie-only { display: none; }
#opform.is-sortie .sortie-only { display: inline-flex; }
.grid-row input.ben.is-auto { border-style: dashed; color: var(--pos); }
.grid-row input.ben.is-auto.neg-in { color: var(--neg); }
.typeseg.small span { padding: 10px 6px; font-size: 14px; flex-direction: row; gap: 6px; justify-content: center; }
.typeseg.small span i { font-size: 18px; }
.small-h { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
/* Raccourcis */
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-bottom: 12px; }
.rc-btn { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 15px; background: var(--card); border: 1.5px solid var(--line); transition: transform .1s, border-color .2s; min-width: 0; }
.rc-btn:active { transform: scale(.97); }
.rc-btn.entree { border-color: rgba(62, 207, 142, .45); }
.rc-btn.sortie { border-color: rgba(255, 107, 107, .45); }
.rc-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
.rc-btn.entree .rc-ico { background: rgba(62, 207, 142, .15); color: var(--pos); }
.rc-btn.sortie .rc-ico { background: rgba(255, 107, 107, .14); color: var(--neg); }
.rc-txt { display: flex; flex-direction: column; min-width: 0; }
.rc-txt b { font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-txt small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-hint { display: block; margin: 0 2px 12px; }
.shortcut-link { display: flex; }
.rc-txt b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.typefilter { flex-wrap: wrap; }
.typefilter a { min-width: 0; padding: 10px 6px; font-size: 13.5px; }
.typefilter a.on.pay { background: rgba(62, 207, 142, .10); color: var(--pos); border-color: var(--pos); }
.pay-row .ico.pay { width: 34px; height: 34px; border-radius: 10px; font-size: 17px; }
.pay-row { background: rgba(62, 207, 142, .04); }
.day-head .pay-sum { flex-basis: 100%; color: var(--pos); font-weight: 600; font-size: 12.5px; }
.typefilter { display: grid; grid-template-columns: repeat(4, 1fr); flex-wrap: nowrap; }
.typefilter a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; }
.typefilter a b { font-size: 13px; white-space: nowrap; }
.typefilter a small { font-size: 12px; opacity: .8; min-height: 15px; }
@media (max-width: 360px) { .typefilter a b { font-size: 11.5px; } }
/* Sélecteur d'icône */
.ip-wrap > summary { font-size: 14px; color: var(--muted); padding: 4px 0 10px; }
.ip-sum { font-size: 22px; vertical-align: middle; margin: 0 4px; color: var(--text); }
.icon-picker { margin-bottom: 12px; }
.ip-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.ip-head label { flex: 1; margin: 0 !important; }
.ip-preview { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; background: var(--accent-soft); font-size: 28px; }
.ip-group { margin: 10px 0 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ip-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ip-btn { aspect-ratio: 1; display: grid; place-items: center; font-size: 22px; border-radius: 12px; background: var(--bg2); border: 1.5px solid var(--line); cursor: pointer; padding: 0; transition: transform .1s, border-color .15s; color: var(--text); }
.ip-btn:active { transform: scale(.92); }
.ip-btn.on { border-color: var(--accent); background: var(--accent-soft); }
@media (min-width: 600px) { .ip-grid { grid-template-columns: repeat(12, 1fr); } }

/* ---------- Dicton du jour ---------- */
.dicton { position: relative; margin: 0 0 14px; padding: 14px 16px 12px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(227,23,62,.16), rgba(245,176,65,.08)); border: 1px solid rgba(227,23,62,.28); overflow: hidden; }
.dicton::after { content: "❝"; position: absolute; left: 10px; bottom: -18px; font-size: 80px; color: rgba(255,255,255,.05); line-height: 1; pointer-events: none; }
.dicton small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.dicton .d-ar { margin: 6px 0 4px; font-size: 22px; line-height: 1.5; font-weight: 700; text-align: right; color: var(--text); font-family: "Noto Naskh Arabic", "Amiri", "Geeza Pro", "Segoe UI", Tahoma, sans-serif; }
.dicton .d-fr { margin: 0; font-size: 13.5px; color: var(--muted); font-style: italic; }

/* ---------- Tableau de bord ---------- */
.db-greet { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 2px 12px; }
.db-greet small { color: var(--muted); font-size: 13px; font-weight: 600; }
.db-greet h1 { margin: 0; font-size: 23px; letter-spacing: -.01em; }
.db-today { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 74px; padding: 7px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.db-today b { font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.db-today small { font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.dicton.compact { padding: 10px 14px; margin-bottom: 12px; }
.dicton.compact .d-ar { font-size: 18px; margin: 0 0 2px; }
.dicton.compact .d-fr { font-size: 12.5px; }
.dicton.compact::after { display: none; }
.db-hero strong { font-size: 30px; margin: 2px 0 4px; }
.db-curs { display: flex; flex-wrap: wrap; gap: 6px; }
.db-curs span { font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-variant-numeric: tabular-nums; }
.db-hero .wallet-grid { margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.db-hero .wallet b { font-size: 15px; }
.db-hero .wallet b + b { font-size: 13.5px; color: var(--muted); }
.db-hero .wallet b.neg { color: var(--neg); }
.db-title { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 2px 8px; }
.db-title h2 { margin: 0; }
.db-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.db-kpi { background: var(--card); border: 1px solid rgba(255, 255, 255, .05); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: transform .1s, border-color .2s; }
.db-kpi:active { transform: scale(.98); }
.db-kpi:hover { border-color: var(--line); }
.db-kpi small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.db-kpi em { font-style: normal; font-size: 12px; color: var(--muted); }
.db-kpi em.pos { color: var(--pos); } .db-kpi em.neg { color: var(--neg); }
.db-amts { display: flex; flex-direction: column; }
.db-amts b { font-size: 17px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.3; }
.db-amts b.big { font-size: 24px; letter-spacing: -.01em; }
.db-kpi.main { grid-column: 1 / -1; background: linear-gradient(135deg, rgba(62, 207, 142, .12), rgba(62, 207, 142, .02)), var(--card); border-color: rgba(62, 207, 142, .22); }
.db-split { display: flex; gap: 12px; font-size: 12.5px; font-weight: 700; margin-top: 2px; }
.db-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.db-axis { stroke: var(--line); stroke-width: 1; }
.db-bar path { fill: rgba(62, 207, 142, .45); transition: fill .15s; }
.db-bar.neg path { fill: rgba(255, 107, 107, .5); }
.db-bar.today path { fill: var(--pos); }
.db-bar.today.neg path { fill: var(--neg); }
.db-bar .hit { fill: transparent; }
.db-bar:hover path, .db-bar.on path, .db-bar:focus path { fill: var(--pos); }
.db-bar.neg:hover path, .db-bar.neg.on path { fill: var(--neg); }
.db-bar { cursor: pointer; outline: none; }
.db-day { font-size: 10.5px; fill: var(--muted); text-anchor: middle; font-weight: 600; }
.db-bar.today .db-day, .db-bar.on .db-day { fill: var(--text); }
.db-val { font-size: 11px; fill: var(--text); text-anchor: middle; font-weight: 700; }
.db-tip { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); min-height: 1.4em; text-align: center; }
.db-tip b { color: var(--text); }
.db-uchips { display: flex; flex-wrap: wrap; gap: 6px; }
.db-uchips span { font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.db-uchips b { color: var(--text); }
@media (min-width: 760px) {
  .db-kpis { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .db-kpi.main { grid-column: auto; }
  .bigtype a { padding: 22px 8px; }
}
.db-kpi-link { display: flex; flex-direction: column; gap: 3px; }
.db-pay { margin-top: 8px; text-align: center; font-size: 12.5px; font-weight: 700; padding: 7px 8px; border-radius: 10px; background: rgba(62, 207, 142, .12); color: var(--pos); border: 1px solid rgba(62, 207, 142, .25); }
@media (min-width: 760px) { .db-kpis { grid-template-columns: 1.4fr 1fr 1fr; } }
.db-chart svg { max-width: 560px; margin: 0 auto; }

/* ---------- Raccourcis compacts en haut de l'accueil ---------- */
.rc-mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 6px; margin: 0 0 14px; padding: 10px 6px 8px; background: var(--card); border: 1px solid rgba(255, 255, 255, .05); border-radius: 18px; }
.rcm { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; padding: 2px; border-radius: 12px; transition: transform .1s; -webkit-tap-highlight-color: transparent; }
.rcm:active { transform: scale(.92); }
.rcm-ico { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; font-size: 23px; line-height: 1; }
.rcm.entree .rcm-ico { background: linear-gradient(145deg, rgba(62, 207, 142, .28), rgba(62, 207, 142, .1)); box-shadow: inset 0 0 0 1px rgba(62, 207, 142, .35); }
.rcm.sortie .rcm-ico { background: linear-gradient(145deg, rgba(255, 107, 107, .28), rgba(255, 107, 107, .1)); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, .35); }
.rcm.add .rcm-ico { background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 19px; }
.rcm-ico i { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; color: #fff; border: 2px solid var(--card); }
.rcm.entree .rcm-ico i { background: #23a46a; }
.rcm.sortie .rcm-ico i { background: var(--accent); }
.rcm-nom { font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--text); width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rcm.add .rcm-nom { color: var(--muted); }
@media (min-width: 560px) { .rc-mini { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); } }

/* ---------- Soldes avant → après ---------- */
.op-row.has-sl { flex-wrap: wrap; row-gap: 6px; }
.sl-line { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 5px; padding-left: 54px; }
.sl-item { display: inline-flex; align-items: baseline; gap: 4px; font-size: 11.5px; padding: 3px 8px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-item em { font-style: normal; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.sl-item i { font-style: normal; }
.sl-item.up i { color: var(--pos); }
.sl-item.down i { color: var(--neg); }
.sl-item b { color: var(--text); font-weight: 700; }
.sl-item .neg, .sl-item b.neg { color: var(--neg); }
.sl-toggle { opacity: .65; }
.sl-toggle.on { opacity: 1; background: var(--accent-soft); color: var(--accent2); border-color: var(--accent); }
.sl-card .sl-line { padding-left: 0; }
.sl-card .sl-item { font-size: 13px; padding: 6px 10px; }
.sl-card .sl-item em { max-width: none; }

/* ---------- Opérations : caisse suivie (solde USD · LBP sur chaque ligne) ---------- */
.cs-pick { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 4px; scrollbar-width: none; align-items: stretch; }
.cs-pick::-webkit-scrollbar { display: none; }
.cs-pick-l { flex: none; align-self: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; writing-mode: horizontal-tb; margin-right: 2px; }
.cs-pick a { flex: none; display: flex; flex-direction: column; padding: 7px 11px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--line); min-width: 0; }
.cs-pick a b { font-size: 13px; white-space: nowrap; }
.cs-pick a small { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cs-pick a.on { border-color: var(--accent); background: var(--accent-soft); }
.cs-pick a.on b { color: var(--accent2); }
.cs-pick a.off b { color: var(--muted); }

.cs-day { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); padding-top: 6px; margin-top: 4px; border-top: 1px dashed var(--line); }
.cs-day em { font-style: normal; font-weight: 800; color: var(--accent2); }
.cs-day b { color: var(--text); font-variant-numeric: tabular-nums; }

.op-row.has-sl { flex-wrap: wrap; row-gap: 5px; }
.cs-line { flex-basis: 100%; margin-left: 50px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 5px 10px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 0; }
.cs-line.moved { border-color: rgba(227, 23, 62, .28); background: linear-gradient(90deg, rgba(227, 23, 62, .08), var(--bg2) 60%); }
.cs-line.idle { opacity: .6; }
.cs-name { font-weight: 800; font-size: 11px; color: var(--accent2); text-transform: uppercase; letter-spacing: .03em; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-line.idle .cs-name { color: var(--muted); }
.cs-vals { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-left: auto; justify-content: flex-end; }
.cs-v { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.cs-c { font-size: 10px; font-weight: 700; color: var(--muted); }
.cs-v s { text-decoration: none; color: var(--muted); font-size: 11px; }
.cs-v i { font-style: normal; font-weight: 800; }
.cs-v.up i { color: var(--pos); }
.cs-v.down i { color: var(--neg); }
.cs-v b { font-weight: 800; color: var(--text); font-size: 12.5px; }
.cs-v b.neg { color: var(--neg); }
.cs-other { flex-basis: 100%; font-size: 10.5px; color: var(--muted); text-align: right; }
@media (max-width: 380px) { .cs-line { margin-left: 0; } }
/* v1.9 : soldes en colonnes (une colonne par devise, même ligne) */
.cs-line { margin-left: 0; display: block; padding: 5px 10px; }
.cs-vals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; margin: 0; }
.cs-vals.n1 { grid-template-columns: 1fr; }
.cs-vals.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-v { justify-content: flex-start; overflow: hidden; }
.cs-v + .cs-v { justify-content: flex-end; }
.cs-vals.n3 .cs-v:nth-child(2) { justify-content: center; }
.cs-v i { color: var(--muted); }
.cs-v.up b { color: var(--pos); }
.cs-v.down b { color: var(--neg); }
.cs-other { display: block; text-align: left; margin-top: 2px; }
@media (min-width: 560px) { .cs-line { margin-left: 50px; } }
.cs-vals, .cs-vals.n3 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.cs-v { overflow: visible; }

/* ---------- Lecture seule ---------- */
fieldset.ro { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.ro input, fieldset.ro select, fieldset.ro textarea, fieldset.ro button { opacity: .75; cursor: not-allowed; }
.ro-flash { background: rgba(245, 176, 65, .12); color: var(--warn); border: 1px solid rgba(245, 176, 65, .3); font-weight: 600; }
.lock { font-size: 11px; opacity: .7; }

/* ---------- Note facultative ---------- */
.note-field { margin-top: 12px; }
.note-field > span { font-weight: 600; }
.note-field small { color: var(--muted); font-weight: 500; }
.note-field textarea { resize: vertical; min-height: 42px; line-height: 1.35; }
.op-note { flex-basis: 100%; margin-left: 50px; font-size: 12.5px; color: var(--text); background: rgba(245, 176, 65, .08); border-left: 3px solid var(--warn); padding: 4px 9px; border-radius: 4px 8px 8px 4px; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
@media (max-width: 380px) { .op-note { margin-left: 0; } }

/* ---------- Sauvegarde / restauration ---------- */
.restore-box { margin-top: 12px; padding: 14px; border-radius: 14px; border: 1.5px solid rgba(245, 176, 65, .45); background: rgba(245, 176, 65, .06); display: flex; flex-direction: column; gap: 10px; }
.restore-box h3 { margin: 0; font-size: 15px; }
.restore-sum { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.restore-sum li { display: flex; flex-direction: column; background: var(--bg2); border-radius: 10px; padding: 7px 10px; min-width: 0; }
.restore-sum li:first-child { grid-column: 1 / -1; }
.restore-sum span { font-size: 11.5px; color: var(--muted); }
.restore-sum b { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.restore-up input[type=file] { padding: 10px; background: var(--bg2); border: 1px dashed var(--line); border-radius: 12px; width: 100%; color: var(--muted); }
.bk-list { margin-top: 8px; }
.bk-row { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.bk-row:last-child { border-bottom: 0; }
.bk-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bk-row small { color: var(--muted); font-size: 12px; }
.bk-row form { margin: 0; }

/* ---------- Transferts entre caisses ---------- */
.typefilter { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.typefilter a b { font-size: 12px; }
.typefilter a.on.vir { background: rgba(93, 173, 226, .14); color: #7cc4f0; border-color: #5dade2; }
.ico.vir { background: rgba(93, 173, 226, .16); color: #7cc4f0; font-size: 18px; }
.vir-row { background: rgba(93, 173, 226, .035); }
.vir-amt { color: #7cc4f0; }
.vir-btn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: -4px 0 14px; border-radius: 16px; background: var(--card); border: 1.5px solid rgba(93, 173, 226, .35); transition: transform .1s; }
.vir-btn:active { transform: scale(.98); }
.vir-btn i { font-style: normal; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(93, 173, 226, .16); color: #7cc4f0; font-size: 20px; font-weight: 800; flex: none; }
.vir-btn span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vir-btn small { color: var(--muted); font-size: 12px; }
.vir-btn em { font-style: normal; color: var(--muted); font-size: 20px; }
.vir-arrow { text-align: center; font-size: 26px; color: #7cc4f0; line-height: 1; margin: 6px 0 2px; }
.vir-form .wbtn.dis { opacity: .3; pointer-events: none; }
.vir-recap { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.vir-recap b { color: var(--text); }
.vir-recap b.pos { color: var(--pos); } .vir-recap b.neg, .vir-recap em.neg { color: var(--neg); font-style: normal; font-weight: 700; }

/* ---------- Fiche comptoir ($ | LL) ---------- */
.fiche { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.f-head, .f-row { display: grid; grid-template-columns: minmax(96px, 1.15fr) repeat(var(--nc, 2), minmax(0, 1fr)); gap: 6px; align-items: center; }
.f-head span { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.f-lbl { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.2; }
.f-in { width: 100%; min-width: 0; text-align: right; font-size: 17px; padding: 10px 10px; font-variant-numeric: tabular-nums; }
.f-rd .f-lbl { color: var(--warn); }
.f-rd .f-in { border-color: rgba(245, 176, 65, .35); }
.f-whish .f-lbl { color: #7cc4f0; }
.f-av { display: none; }
form.is-credit .f-av { display: grid; }
form.is-credit .f-rd { display: none; }
.f-ben { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.f-ben .f-lbl { color: var(--pos); }
.f-ben .f-in { border-color: rgba(62, 207, 142, .45); background: rgba(62, 207, 142, .06); font-weight: 800; }
.f-ben .f-in.neg-in { border-color: var(--neg); color: var(--neg); background: rgba(255, 107, 107, .06); }
.ben-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.bq { flex: 1 0 calc(20% - 6px); min-width: 54px; display: inline-flex; align-items: baseline; justify-content: center; gap: 2px; padding: 9px 4px; border-radius: 11px; border: 1.5px solid var(--line); background: var(--bg2); color: var(--text); font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; transition: transform .08s; }
.bq small { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.bq:active { transform: scale(.94); }
.bq-usd { border-color: rgba(62, 207, 142, .35); }
.bq-lbp { border-color: rgba(93, 173, 226, .35); }
.bq.on { background: rgba(62, 207, 142, .18); border-color: var(--pos); }
.bq-lbp.on { background: rgba(93, 173, 226, .18); border-color: #5dade2; }
.bq-clear { flex: 0 0 44px; min-width: 44px; color: var(--muted); }
.tiroir { display: flex; flex-direction: column; gap: 3px; margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.tiroir:empty { display: none; }
.tiroir span { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.tiroir b { font-variant-numeric: tabular-nums; }
@media (max-width: 370px) { .f-head, .f-row { grid-template-columns: 84px repeat(var(--nc, 2), minmax(0, 1fr)); } .f-lbl { font-size: 12px; } .f-in { font-size: 15px; padding: 9px 7px; } }
.ben-quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) 40px; }
.bq { min-width: 0; }
.bq-clear { grid-column: 6; grid-row: 1 / span 2; min-width: 0; }

/* ---------- Langues ---------- */
.lang-pick { display: flex; gap: 6px; justify-content: center; margin: 10px 0; flex-wrap: wrap; }
.lang-pick a { padding: 7px 14px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 14px; }
.lang-pick a.on { background: var(--accent-soft); color: var(--accent2); border-color: var(--accent); }
/* Arabe : lecture de droite à gauche, montants gardés de gauche à droite */
[dir=rtl] body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", system-ui, sans-serif; }
[dir=rtl] .num, [dir=rtl] .f-in, [dir=rtl] input[type=number], [dir=rtl] input[inputmode=decimal], [dir=rtl] input[type=tel] { direction: ltr; }
[dir=rtl] .amt b, [dir=rtl] .amt small, [dir=rtl] .wallet b, [dir=rtl] .db-amts b, [dir=rtl] .db-curs span, [dir=rtl] .cs-v, [dir=rtl] .tiroir b,
[dir=rtl] .sl-item, [dir=rtl] .hero strong, [dir=rtl] .stat b, [dir=rtl] .cs-pick small, [dir=rtl] .cz-after span, [dir=rtl] .cs-day b, [dir=rtl] .wbtn small, [dir=rtl] .tm { unicode-bidi: plaintext; }
[dir=rtl] .row .amt { text-align: left; align-items: flex-start; }
[dir=rtl] .op-note { margin-left: 0; margin-right: 50px; border-left: 0; border-right: 3px solid var(--warn); border-radius: 8px 4px 4px 8px; }
[dir=rtl] .sl-line { padding-left: 0; padding-right: 54px; }
[dir=rtl] .cs-vals { margin-left: 0; margin-right: auto; }
[dir=rtl] .cs-other { text-align: right; }
[dir=rtl] .dicton::after { left: auto; right: 10px; }
[dir=rtl] .dicton .d-fr { text-align: right; }
@media (min-width: 560px) { [dir=rtl] .cs-line { margin-left: 0; margin-right: 50px; } }
@media (max-width: 380px) { [dir=rtl] .op-note { margin-right: 0; } }
[dir=rtl] .ben-line, [dir=rtl] .day-head > span:not(:first-child), [dir=rtl] .pay-sum { direction: ltr; unicode-bidi: isolate; }
/* Caisse seule (sans Whish) */
form.sans-whish .f-whish { display: none; }
.sw-wrap span { font-weight: 700; }

/* Raccourcis séparés ENTRÉE / SORTIE */
.rc-box { background: var(--card); border: 1px solid rgba(255, 255, 255, .05); border-radius: 18px; padding: 8px 6px 4px; margin: 0 0 14px; }
.rc-box .rc-mini { background: none; border: 0; padding: 4px 0 8px; margin: 0; border-radius: 0; }
.rc-sec + .rc-sec { border-top: 1px dashed var(--line); padding-top: 6px; }
.rc-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 2px; }
.rc-tag { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; }
.rc-tag.entree { background: rgba(62, 207, 142, .14); color: var(--pos); }
.rc-tag.sortie { background: rgba(255, 107, 107, .14); color: var(--neg); }
.rc-manage { font-size: 12px; color: var(--muted); font-weight: 700; }

/* ---------- Relevé de caisse (liste des opérations) ---------- */
.rl-card { padding: 12px 10px; }
.rl-title { font-size: 15px; margin: 0 4px 10px; }
.rl-title b { color: var(--accent2); font-weight: 800; }
.rl-title span { color: var(--muted); font-size: 13px; }
.rl-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; margin-bottom: 12px; }
.rl-sum > div { background: var(--bg2); border: 1px solid var(--line); border-radius: 11px; padding: 7px 9px; display: flex; flex-direction: column; min-width: 0; }
.rl-sum small { color: var(--muted); font-size: 11px; font-weight: 600; }
.rl-sum b { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rl-sum .rl-end { border-color: rgba(227, 23, 62, .4); }
.rl-wrap { overflow-x: auto; margin: 0 -10px; -webkit-overflow-scrolling: touch; }
table.rl { border-collapse: separate; border-spacing: 0; width: 100%; min-width: max-content; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rl th { font-size: 10.5px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 5px 8px; text-align: right; white-space: nowrap; background: var(--card); }
.rl-h1 th { text-align: center; border-bottom: 1px solid var(--line); }
.rl th.rl-op { text-align: left; }
.rl th.rl-sh, .rl td.rl-sol { background: rgba(227, 23, 62, .06); }
.rl td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
.rl td.num { text-align: right; font-weight: 700; }
.rl td.z { color: var(--line); font-weight: 400; }
.rl td.rl-sol { font-weight: 800; color: var(--text); }
.rl td.rl-ben { font-size: 12px; }
.rl .rl-op { position: sticky; left: 0; z-index: 1; background: var(--card); min-width: 150px; max-width: 190px; white-space: normal; box-shadow: 1px 0 0 var(--line); }
.rl-opc { display: flex; gap: 7px; align-items: flex-start; }
.rl-opc .ico { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; flex: none; }
.rl-txt { display: flex; flex-direction: column; min-width: 0; }
.rl-txt b { font-size: 12.5px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.rl-txt b a { color: inherit; }
.rl-txt small { color: var(--muted); font-size: 11px; }
.rl-note { color: var(--warn) !important; white-space: normal; }
.rl tr.link { cursor: pointer; }
.rl tr.link:hover td { background-color: rgba(255, 255, 255, .025); }
.rl tr.rl-day td { background: var(--bg2); font-weight: 800; font-size: 12px; color: var(--text); padding: 6px 10px; position: static; }
.rl tr.rl-day td:first-child { position: sticky; left: 0; }
.ico.fin { background: var(--bg2); color: var(--muted); }
[dir=rtl] .rl th, [dir=rtl] .rl td.num { text-align: left; }
[dir=rtl] .rl th.rl-op { text-align: right; }
[dir=rtl] .rl .rl-op { left: auto; right: 0; box-shadow: -1px 0 0 var(--line); }
[dir=rtl] .rl td.num { direction: ltr; unicode-bidi: isolate; }
/* v1.17 : colonnes groupées (Mouvement | Bénéfice | Solde), devises côte à côte sur ordinateur, empilées sur téléphone */
.rl th.rl-g { text-align: right; vertical-align: bottom; }
.rl-gl { display: block; }
.rl-cur { display: flex; justify-content: flex-end; gap: 0; }
.rl-cur i { font-style: normal; width: 104px; text-align: right; font-size: 10px; opacity: .8; }
.rl td.rl-g { text-align: right; font-weight: 700; }
.rl td.rl-g .cv { display: inline-block; width: 104px; text-align: right; white-space: nowrap; }
.rl td.rl-g .cv.z { color: var(--line); font-weight: 400; }
.rl td.rl-sol { font-weight: 800; }
.rl td.rl-sol .cv { color: var(--text); } .rl td.rl-sol .cv.neg { color: var(--neg); }
.rl .cv u { text-decoration: none; font-size: 9.5px; color: var(--muted); margin-left: 2px; font-weight: 700; }
@media (max-width: 640px) {
  .rl-wrap { overflow-x: visible; margin: 0 -6px; }
  table.rl { min-width: 0; font-size: 11.5px; table-layout: fixed; }
  .rl .rl-op { position: static; min-width: 0; max-width: none; width: 38%; box-shadow: none; }
  .rl th.rl-g, .rl td.rl-g { width: 20.6%; padding: 6px 4px; }
  .rl-cur { display: none; }
  .rl td.rl-g .cv { display: block; width: auto; }
  .rl td.rl-ben .cv { font-size: 11px; }
  .rl-opc .ico { display: none; }
  .rl-txt b { font-size: 12px; }
  .rl th { padding: 5px 4px; }
  .rl td { padding: 7px 4px; }
}
[dir=rtl] .rl td.rl-g, [dir=rtl] .rl th.rl-g { text-align: left; }
[dir=rtl] .rl-cur { justify-content: flex-start; }
[dir=rtl] .rl .cv { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 640px) {
  .rl .rl-op { width: 30%; }
  .rl th.rl-g, .rl td.rl-g { width: auto; }
  .rl th.rl-g:nth-child(2), .rl td.rl-g:nth-child(2) { width: 24%; }
  .rl th.rl-g:nth-child(3), .rl td.rl-g:nth-child(3) { width: 18%; }
  .rl th.rl-g:nth-child(4), .rl td.rl-g:nth-child(4) { width: 28%; }
  .rl td.rl-g .cv { font-size: 11px; letter-spacing: -.01em; }
  .rl .cv u { font-size: 8.5px; margin-left: 1px; }
  .rl th { font-size: 9.5px; letter-spacing: 0; }
}

/* ---------- Logo HMTECH ---------- */
.logo-img { width: 32px; height: 32px; border-radius: 9px; display: block; box-shadow: 0 4px 14px rgba(240, 185, 11, .25); }
.brand b.hm { color: #F0B90B; font-weight: inherit; }
.login-logo { display: block; width: min(360px, 90vw); height: auto; margin: 10px auto 6px; border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Raccourcis dans la barre du haut (toutes les pages) ---------- */
.tb-rc { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 4px; margin: -4px 0; mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%); }
.tb-rc::-webkit-scrollbar { display: none; }
.tb-i { position: relative; flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; font-size: 18px; line-height: 1; transition: transform .1s; }
.tb-i:active { transform: scale(.9); }
.tb-i.entree { background: rgba(62, 207, 142, .16); box-shadow: inset 0 0 0 1px rgba(62, 207, 142, .4); }
.tb-i.sortie { background: rgba(255, 107, 107, .16); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, .4); }
.tb-i i { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 9px; font-weight: 800; color: #fff; border: 1.5px solid #16181c; }
.tb-i.entree i { background: #23a46a; }
.tb-i.sortie i { background: var(--accent); }
.tb-sep { flex: none; width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
.topbar { gap: 10px; }
@media (max-width: 899px) { .who.who-rc { display: none; } .tb-rc { justify-content: flex-start; } }
@media (min-width: 900px) { .tb-rc { max-width: 40vw; } }
.tb-rc, .tb-rc { justify-content: flex-start !important; }
.tb-rc > :first-child { margin-inline-start: auto; }
.tb-rc > :last-child { margin-inline-end: auto; }
/* Variante : raccourcis sur une 2e ligne centrée sous la barre du haut */
.topbar.rc-row { flex-wrap: wrap; row-gap: 8px; }
.topbar.rc-row .tb-rc { order: 5; flex: 1 0 100%; max-width: none; padding: 2px 0 0; margin: 0; border-top: 1px solid rgba(255, 255, 255, .05); padding-top: 8px; }
.topbar.rc-row .tb-i { width: 36px; height: 36px; }
@media (max-width: 899px) { .topbar.rc-row .who.who-rc { display: block; } }
@media (min-width: 900px) { .topbar.rc-row .tb-i { width: auto; padding: 0 10px 0 8px; gap: 6px; display: flex; font-size: 16px; } .topbar.rc-row .tb-i span { display: inline; font-size: 13px; font-weight: 700; color: var(--text); } }
.tb-i span { display: none; }

/* Choix des raccourcis de la barre du haut */
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.bp { cursor: pointer; }
.bp input { position: absolute; opacity: 0; pointer-events: none; }
.bp span { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg2); opacity: .55; transition: opacity .15s, border-color .15s; min-width: 0; }
.bp span i { font-style: normal; font-size: 18px; }
.bp span b { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp span small { font-weight: 800; }
.bp.entree span small { color: var(--pos); } .bp.sortie span small { color: var(--neg); }
.bp input:checked + span { opacity: 1; border-color: var(--accent); background: var(--accent-soft); }
.bp input:checked + span b::before { content: "📌 "; font-size: 11px; }
.bp-tools { display: flex; gap: 8px; margin-top: 10px; }

/* Raccourci : type + catégorie résumés sur une ligne */
.rc-fixe { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); font-size: 13px; }
.rc-fixe span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-fixe i { font-style: normal; font-weight: 900; }
.rc-fixe.entree i { color: var(--pos); } .rc-fixe.sortie i { color: var(--neg); }
.rc-fixe .link { background: none; border: 0; font-size: 12px; cursor: pointer; flex: none; }
#type-cat[hidden] { display: none !important; }

/* Raccourci : caisses en aperçu seulement */
.cz-sel, .cz-only, .cz-chg { display: none; }
#caisses.cz-compact { position: relative; padding-top: 10px; padding-bottom: 8px; }
#caisses.cz-compact .wbtns, #caisses.cz-compact .cash-pick, #caisses.cz-compact [data-h] { display: none; }
#caisses.cz-compact .cz-sel, #caisses.cz-compact .cz-only { display: block; }
#caisses.cz-compact .cz-lbl { margin: 4px 0 1px; font-size: 14px; }
#caisses.cz-compact .cz-after { margin: 0 0 8px; min-height: 18px; }
#caisses.cz-compact .cz-chg { display: block; position: absolute; top: 10px; inset-inline-end: 14px; background: none; border: 0; font-size: 12px; cursor: pointer; }
#caisses.cz-compact #whish-zone[hidden] { display: none; }
#opform:has(#caisses.cz-compact) #tiroir { display: none; }

/* Bénéfice calculé automatiquement */
#opform.ben-calc .f-ben .f-in[data-cur=USD] { border-style: dashed; }
#ben-auto-wrap[hidden] { display: none; }

/* ===================== Boutique HMTECH ===================== */
.btq-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 12px; padding: 2px; }
.btq-tabs::-webkit-scrollbar { display: none; }
.btq-tabs a { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--muted); font-weight: 700; font-size: 13px; }
.btq-tabs a i { font-style: normal; font-size: 15px; }
.btq-tabs a.on { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }
.btq-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.btq-h h2 { margin: 0; }
.btq-tools { display: flex; gap: 6px; }
.btq-go { display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 14px; border-radius: 18px; background: linear-gradient(135deg, rgba(227, 23, 62, .22), rgba(227, 23, 62, .08)); border: 1.5px solid rgba(227, 23, 62, .45); }
.btq-go i { font-style: normal; font-size: 26px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent); flex: none; }
.btq-go span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.btq-go b { font-size: 17px; }
.btq-go small { color: var(--muted); font-size: 12px; }
.btq-go em { font-style: normal; font-size: 22px; color: var(--muted); }
.btq-go:active { transform: scale(.98); }
.btq-ico { font-size: 18px; }
.btq-kpis .stat b.warn, .stat b.warn { color: var(--warn); }
.btq-filters .btq-frow { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.btq-filters .btq-frow .grow { flex: 1; min-width: 140px; }
.btq-filters .btq-frow .check { margin-bottom: 12px; }
.badge.pos-b { background: rgba(62, 207, 142, .16); color: var(--pos); }
.badge.neg-b { background: rgba(255, 107, 107, .16); color: var(--neg); }
.small-t { font-size: 13px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.prod-row { align-items: flex-start; }
.prod-row .amt { gap: 4px; }
.prod-acts { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.prod-acts .btn.small { padding: 6px 10px; }
.cat-line { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.cat-line input { flex: 1; min-width: 0; }
.imp-cats { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin: 6px 0 10px; }
.mini-bar { height: 8px; border-radius: 4px; background: var(--accent); }
.bar-col { width: 26%; }

/* Caisse de vente */
.btq-pos { display: grid; gap: 14px; align-items: start; }
@media (min-width: 980px) { .btq-pos { grid-template-columns: minmax(0, 1fr) 380px; } .pos-side { position: sticky; top: 80px; } }
.scan-box { position: relative; }
.scan-box input { font-size: 17px; padding-left: 44px; border-width: 2px; min-height: 54px; }
.scan-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 20px; pointer-events: none; z-index: 1; }
[dir=rtl] .scan-box input { padding-left: 12px; padding-right: 44px; }
[dir=rtl] .scan-ico { left: auto; right: 14px; }
.scan-msg { min-height: 18px; margin: 8px 2px 0; font-weight: 600; }
.scan-msg.pos { color: var(--pos); } .scan-msg.neg { color: var(--neg); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--card2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 30; max-height: 320px; overflow: auto; display: none; }
.suggest button { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; border: 0; background: none; color: var(--text); padding: 11px 14px; font: inherit; text-align: start; cursor: pointer; border-bottom: 1px solid var(--line); }
.suggest button span { display: flex; flex-direction: column; min-width: 0; }
.suggest button small { color: var(--muted); font-size: 12px; }
.suggest button:hover, .suggest button.sel { background: var(--accent-soft); }
.suggest .empty { padding: 12px; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) 64px 92px auto 30px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line .nm { min-width: 0; display: flex; flex-direction: column; }
.cart-line .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-line .nm small { color: var(--muted); font-size: 12px; }
.cart-line .nm small.pos { color: var(--pos); } .cart-line .nm small.neg { color: var(--neg); }
.cart-line label { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 11px; color: var(--muted); }
.cart-line input { padding: 8px 6px; text-align: right; font-size: 15px; min-height: 40px; }
.cart-line .cl-t { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-x { border: 0; background: var(--bg2); color: var(--muted); width: 30px; height: 30px; border-radius: 9px; cursor: pointer; font-size: 13px; }
@media (max-width: 520px) {
  .cart-line { grid-template-columns: minmax(0, 1fr) 56px 84px 30px; }
  .cart-line .nm { grid-column: 1 / -1; }
  .cart-line .cl-t { grid-column: 1; text-align: left; align-self: end; padding-bottom: 10px; }
  .cart-line .cl-q { grid-column: 2; grid-row: 2; } .cart-line .cl-p { grid-column: 3; grid-row: 2; } .cart-line .cl-x { grid-column: 4; grid-row: 2; align-self: end; margin-bottom: 5px; }
}
.cl-wrap { position: relative; margin-bottom: 4px; }
.flabel { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.cl-pick { display: flex; gap: 6px; }
.cl-pick input { flex: 1; min-width: 0; }
.totals { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.trow input { width: 120px; text-align: right; padding: 8px 10px; }
.trow.big { font-size: 26px; font-weight: 800; border-top: 2px solid var(--line); padding-top: 10px; margin-top: 2px; }
.trow.ll { font-size: 13px; }
.trow.warn b { color: var(--warn); }
.trow .pos, .totals b.pos { color: var(--pos); } .trow .neg, .totals b.neg { color: var(--neg); }
.pay-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 10px; }
.pay-seg button { min-height: 44px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; }
.pay-seg button.on { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }
.pay-grid { display: grid; grid-template-columns: 96px 1fr 1fr; gap: 6px; align-items: center; }
.pay-grid .ph { font-size: 12px; color: var(--muted); text-align: center; font-weight: 700; }
.pay-grid .pl { font-size: 13px; color: var(--muted); font-weight: 600; }
.pay-grid input { text-align: right; padding: 10px 8px; }
.pay-info { font-size: 13px; margin: 8px 0 4px; min-height: 18px; color: var(--muted); }
.pay-info.pos { color: var(--pos); } .pay-info.neg { color: var(--neg); } .pay-info.warn { color: var(--warn); }
.rend-btns { display: flex; gap: 6px; margin-bottom: 8px; }
.big-btn { font-size: 17px; padding: 16px; }
.dialog { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: none; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.dialog.open { display: flex; }
.dialog .box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; }
.dialog h3 { margin: 0 0 10px; }
.serie-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; max-height: 300px; overflow: auto; }
.ok-box { text-align: center; }
.ok-actions { display: flex; flex-direction: column; gap: 8px; }
.success-big { font-size: 46px; color: var(--pos); }
.fact-num { font-size: 20px; }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.fact-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact-grid .big-n { font-size: 20px; }
.fact-tot { max-width: 360px; margin-left: auto; }
[dir=rtl] .fact-tot { margin-left: 0; margin-right: auto; }
.print-acts { margin-top: 10px; }
.stock-hero strong { font-size: 22px; }
.stock-nums { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; }
.stock-nums span { display: flex; flex-direction: column; }
.stock-nums small { color: var(--muted); }
.stock-nums b { font-size: 20px; }
.rawbt-card { text-align: center; }
.etq-list { max-height: 360px; overflow: auto; margin: 8px 0; }
.etq-list .row { padding: 6px 4px; }
.etq-pick { flex: 1; min-width: 0; margin: 0; }
.etq-pick .grow { display: flex; flex-direction: column; min-width: 0; }
.etq-n { width: 74px; text-align: right; padding: 8px; }
.labels { display: flex; flex-wrap: wrap; gap: 8px; }
.label { border: 1px dashed #888; padding: 2mm; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: #fff; color: #000; overflow: hidden; }
.label .ln { font-size: 8.5pt; font-weight: 700; line-height: 1.2; max-height: 2.4em; overflow: hidden; }
.label .lp { font-size: 10pt; font-weight: 800; }
.label svg { width: 100%; height: 12mm; }
.label .lc { font-size: 7pt; font-family: monospace; }
.db-btq { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: -4px 0 14px; border-radius: 16px; background: var(--card); border: 1.5px solid rgba(227, 23, 62, .35); }
.db-btq i { font-style: normal; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); font-size: 20px; flex: none; }
.db-btq span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.db-btq small { color: var(--muted); font-size: 12px; }
.db-btq em { font-style: normal; color: var(--muted); font-size: 20px; }
.db-btq:active { transform: scale(.98); }
.db-split .btq { color: var(--text); }
.btq-lock { border: 1.5px solid rgba(227, 23, 62, .35); }
@media print {
  .btq-tabs, .pagehead, .no-print { display: none !important; }
  .label { border: none; page-break-inside: avoid; }
}
.bottomnav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; }
.wrap:has(.btq-pos) { max-width: 1240px; }
.ach-line { display: grid; grid-template-columns: 70px 90px 96px 1fr 30px; gap: 8px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ach-line .nm { grid-column: 1 / -1; display: flex; flex-direction: column; min-width: 0; }
.ach-line .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ach-line .nm small { color: var(--muted); font-size: 12px; }
.ach-line label { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 11px; color: var(--muted); }
.ach-line input { padding: 8px 6px; text-align: right; min-height: 40px; }
.ach-line .ach-ser { grid-column: 1 / -1; }
.ach-line .ach-ser textarea { min-height: 54px; }
.ach-line .cl-t { text-align: right; padding-bottom: 10px; white-space: nowrap; }
.ach-line .cl-x { margin-bottom: 5px; }
.btq-pos { grid-template-columns: minmax(0, 1fr); } .btq-pos > * { min-width: 0; } @media (min-width: 980px) { .btq-pos { grid-template-columns: minmax(0, 1fr) 380px; } }
.rel-items { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--muted); }
[dir=rtl] .rel-items { padding-left: 0; padding-right: 16px; }
.rel-items li { margin: 1px 0; }
@media print { .rel-items { color: #333; } }

/* ===================== Accueil : dispositions A / B / C1 ===================== */
.wrap:has(.dash) { max-width: 1240px; }
.dash .card { margin-bottom: 12px; }
.dash .card h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dash .db-greet { margin-bottom: 10px; }
.db-dic { flex: 1; min-width: 0; text-align: center; }
.db-dic p { margin: 0; line-height: 1.3; }
.db-dic .d-ar { font-size: 15px; font-weight: 600; }
.db-dic .d-fr { font-size: 12px; color: var(--muted); }
@media (max-width: 700px) { .db-dic { display: none; } }
.dash .db-kpis { margin-bottom: 12px; }
.dash .db-kpis.k5 { grid-template-columns: 1fr 1fr; }
.dash .db-kpis.k5 .db-kpi.main { grid-column: 1 / -1; }
@media (min-width: 900px) { .dash .db-kpis.k5 { grid-template-columns: 1.35fr 1fr 1fr 1fr 1fr; } .dash .db-kpis.k5 .db-kpi.main { grid-column: auto; } }
.dash .db-kpis.k3 { grid-template-columns: 1fr 1fr; }
.dash .db-kpis.k3 .db-kpi.main { grid-column: 1 / -1; }
@media (min-width: 760px) { .dash .db-kpis.k3 { grid-template-columns: 1.3fr 1fr 1fr; } .dash .db-kpis.k3 .db-kpi.main { grid-column: auto; } }
.dash .db-kpis.kb { grid-template-columns: 1fr 1fr; }
.dash .db-kpis.kb .db-kpi.main { grid-column: 1 / -1; }
.dash .db-amts b.big { font-size: 22px; }
.dash .db-pay { margin-top: 6px; padding: 5px 8px; }
/* raccourcis C1 : entrées | sorties en petites tuiles */
.dash .db-rc { padding: 10px 12px; }
.rcz { display: grid; gap: 10px; }
@media (min-width: 760px) { .rcz { grid-template-columns: 1fr auto 1fr; } .rcz-sep { width: 1px; background: var(--line); } }
.rcz-g { min-width: 0; }
.rcz-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.rcz-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 560px) { .rcz-tiles { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); } }
.rct { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 5px; border-radius: 11px; background: var(--bg2); border: 1px solid var(--line); text-align: center; font-size: 10.5px; font-weight: 600; line-height: 1.15; transition: transform .1s, border-color .15s; }
.rct:active { transform: scale(.95); }
.rct:hover { border-color: var(--muted); }
.rct i { position: relative; font-style: normal; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; }
.rct.entree i { background: rgba(62, 207, 142, .15); box-shadow: inset 0 0 0 1px rgba(62, 207, 142, .35); }
.rct.sortie i { background: rgba(255, 107, 107, .15); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, .35); }
.rct i em { position: absolute; right: -4px; bottom: -4px; width: 13px; height: 13px; border-radius: 50%; font-style: normal; font-size: 8px; font-weight: 800; display: grid; place-items: center; color: #fff; }
.rct.entree i em { background: #23a46a; } .rct.sortie i em { background: var(--accent); }
.rct span { max-width: 100%; padding: 0 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.3em; }
/* raccourcis A : pastilles */
.rcc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rcc-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.rcc-b { display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 10px; font-size: 12.5px; font-weight: 700; }
.rcc-b i { font-style: normal; font-size: 15px; }
.rcc-b.entree { background: rgba(62, 207, 142, .1); box-shadow: inset 0 0 0 1px rgba(62, 207, 142, .35); }
.rcc-b.sortie { background: rgba(255, 107, 107, .1); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, .35); }
/* caisses */
.db-vir { font-size: 12px; font-weight: 700; color: #7cc4f0; border: 1px solid rgba(93, 173, 226, .45); border-radius: 8px; padding: 3px 9px; text-transform: none; letter-spacing: 0; }
.db-vir:active { transform: scale(.96); }
.db-ctot { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 8px; }
.db-ctot b { font-size: 19px; }
.db-ctot > span { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); }
.db-wal { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dash-a .db-wal { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.db-wal .w { background: var(--bg2); border-radius: 11px; padding: 8px 10px; display: flex; flex-direction: column; min-width: 0; }
.db-wal .w span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-wal .w b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.db-wal .w b.neg { color: var(--neg); }
.dash .db-btq { margin: 0 0 12px; }
.dash .db-chart svg { max-width: none; }
.dash .db-recent .row { padding: 8px 4px; }
/* colonnes */
.db-cols3, .db-cols2, .db-colsb { display: grid; gap: 0 12px; align-items: start; }
.db-cols3 > div, .db-cols2 > div, .db-colsb > div { min-width: 0; }
@media (min-width: 900px) {
  .db-cols3 { grid-template-columns: 1fr 1fr 1.15fr; }
  .db-cols2 { grid-template-columns: 1fr 1fr; }
  .db-colsb { grid-template-columns: 1.35fr 1fr; }
}
.dash-a .rc-tag, .dash-c1 .rc-tag, .dash-d .rc-tag { font-size: 11px; }
.dl-pick { display: grid; gap: 6px; margin-bottom: 12px; } .dl-pick .wbtn span { display: flex; flex-direction: column; } .dl-pick small { color: var(--muted); font-size: 12px; }
.dash .db-chart svg { max-height: 175px; max-width: 100%; } .dash h2 .rc-manage, .dash h2 .db-vir, .dash h2 .link { text-transform: none; letter-spacing: 0; }
.sub-check { margin-left: 26px; } [dir=rtl] .sub-check { margin-left: 0; margin-right: 26px; }
.cart-line { grid-template-columns: minmax(0, 1fr) 58px 84px 100px auto 30px; }
.cart-line input.set { border-color: var(--warn); }
@media (max-width: 520px) {
  .cart-line { grid-template-columns: 52px 74px minmax(0, 1fr) 30px; }
  .cart-line .nm { grid-column: 1 / -1; }
  .cart-line .cl-q { grid-column: 1; grid-row: 2; } .cart-line .cl-p { grid-column: 2; grid-row: 2; } .cart-line .cl-l { grid-column: 3; grid-row: 2; } .cart-line .cl-x { grid-column: 4; grid-row: 2; align-self: end; margin-bottom: 5px; }
  .cart-line .cl-t { grid-column: 1 / -1; grid-row: 3; text-align: right; padding: 0; }
}
.quick-pay { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 6px; margin-bottom: 8px; } .quick-pay .btn { padding: 8px 6px; }
.inv-tbl td { vertical-align: middle; }
.inv-tbl td b, .inv-tbl td small { display: block; }
.inv-tbl input { width: 84px; padding: 7px 6px; text-align: right; min-height: 36px; font-size: 14px; }
.inv-tbl input.chg { border-color: var(--warn); background: rgba(245, 176, 65, .1); }
.inv-bar { position: sticky; bottom: calc(var(--nav-h) + 8px); display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-top: 10px; z-index: 5; }
.inv-bar .grow { flex: 1; min-width: 160px; margin: 0; }
.inv-n { font-size: 13px; color: var(--warn); font-weight: 700; align-self: center; }
@media (min-width: 900px) { .inv-bar { bottom: 8px; } }
@media (max-width: 520px) { .inv-tbl input { width: 64px; } .inv-tbl th, .inv-tbl td { padding: 6px 3px; } }
@media (max-width: 520px) {
  .inv-tbl input { width: 54px; font-size: 13px; padding: 6px 4px; }
  .inv-tbl td small.mono { display: none; }
  .inv-tbl td b { font-size: 13px; }
  .inv-bar { padding: 8px; gap: 6px; }
  .inv-bar .grow { min-width: 0; flex: 1 1 100%; }
  .inv-bar .btn { flex: 1; padding: 10px; }
}

/* Saisie vente / achat : tout visible sur un écran de PC */
.pos-row { display: grid; grid-template-columns: 1fr; gap: 0 8px; }
@media (min-width: 980px) {
  .wrap:has(.btq-pos) { padding-top: 10px; }
  .wrap:has(.btq-pos) .pagehead { display: none; }
  .wrap:has(.btq-pos) .btq-tabs { margin-bottom: 10px; }
  .wrap:has(.btq-pos) .btq-tabs a { padding: 6px 10px; }
  body:has(.btq-pos) .topbar.rc-row .tb-rc { display: none; }
  body:has(.btq-pos) .bottomnav a.fab { display: none; }
  .btq-pos { gap: 12px; }
  .btq-pos .card { padding: 12px 14px; margin-bottom: 10px; }
  .btq-pos .scan-box input { min-height: 46px; font-size: 16px; }
  .btq-pos .scan-msg { margin-top: 4px; min-height: 16px; font-size: 12.5px; }
  .btq-pos .cart-line, .btq-pos .ach-line { padding: 6px 0; }
  .btq-pos .cart-line input, .btq-pos .ach-line input { min-height: 34px; padding: 5px 6px; font-size: 14px; }
  .btq-pos .cart-line label span, .btq-pos .ach-line label { font-size: 10.5px; }
  .pos-side { position: sticky; top: 70px; max-height: calc(100vh - 82px); overflow-y: auto; padding: 12px 14px !important; }
  .pos-side.form label, .pos-side .flabel { font-size: 12px; margin-bottom: 6px; }
  .pos-side input, .pos-side select { min-height: 36px; padding: 6px 10px; font-size: 14px; }
  .pos-side .cl-wrap { margin-bottom: 2px; }
  .pos-side .cl-pick .btn { padding: 6px 10px; }
  .pos-side .totals { gap: 4px; margin: 6px 0; }
  .pos-side .trow { font-size: 13.5px; }
  .pos-side .trow input { width: 100px; min-height: 30px; padding: 4px 8px; }
  .pos-side .trow.big { font-size: 22px; padding-top: 6px; margin-top: 2px; }
  .pos-side .trow.ll { font-size: 12px; }
  .pos-side .pay-seg { margin: 4px 0 6px; }
  .pos-side .pay-seg button { min-height: 36px; font-size: 13.5px; }
  .pos-side .quick-pay { margin-bottom: 5px; }
  .pos-side .quick-pay .btn { padding: 6px 4px; font-size: 12.5px; }
  .pos-side .pay-grid { grid-template-columns: 84px 1fr 1fr; gap: 4px; }
  .pos-side .pay-grid input { min-height: 34px; padding: 5px 8px; }
  .pos-side .pay-info { margin: 4px 0 2px; min-height: 16px; font-size: 12.5px; }
  .pos-side .rend-btns { margin-bottom: 4px; }
  .pos-side .rend-btns .btn { padding: 5px 10px; }
  .pos-side .pos-row { grid-template-columns: 1fr 1fr; }
  .pos-side .big-btn { font-size: 16px; padding: 11px; margin-top: 2px; }
  .pos-side .hint { font-size: 11.5px; margin: 6px 0 0; }
}
.ach-head { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ach-head label:last-child { grid-column: 1 / -1; }
@media (min-width: 980px) {
  .ach-head { grid-template-columns: 1.4fr 1fr 1fr; }
  .ach-head label:last-child { grid-column: auto; }
  .btq-pos .ach-head label { margin-bottom: 0; font-size: 12px; }
  .btq-pos .ach-head input { min-height: 36px; padding: 6px 10px; font-size: 14px; }
  .btq-pos .ach-line { grid-template-columns: minmax(0, 1fr) 64px 84px 92px 70px 30px; align-items: center; }
  .btq-pos .ach-line .nm { grid-column: auto; }
  .btq-pos .ach-line .ach-ser { grid-column: 1 / -1; grid-row: 2; }
  .btq-pos .ach-line .cl-t { padding-bottom: 0; }
  .btq-pos .card .hint { margin: 4px 0 0; font-size: 12px; }
}
.nom-wrap { display: flex; gap: 6px; } .nom-wrap input { flex: 1; min-width: 0; } .lk-info { min-height: 16px; } .lk-info.pos { color: var(--pos); } .lk-info.neg { color: var(--neg); }
.range-links a.on { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }
.range-links a b { margin-left: 3px; }
.imei-grp { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 4px 4px; }
.imei-list .row { align-items: flex-start; }
.imei-list .grow small { white-space: normal; }
.imei-link { display: inline-block; margin: 2px 0; font-size: 12px; font-weight: 700; color: #7cc4f0; }
/* Colonne Whish (pour information, n'entre pas dans les soldes de la caisse) */
.rl td.rl-wh { font-weight: 700; }
.rl-whm { display: none; font-weight: 700; } .rl-whm.pos { color: var(--pos); } .rl-whm.neg { color: var(--neg); }
@media (max-width: 640px) { .rl.has-wh .rl-wh, .rl.has-wh .rl-whh { display: none; } .rl-whm { display: block; } }
.wrap:has(.rl.has-wh) { max-width: 1240px; } .rl.has-wh td.rl-g .cv { width: 96px; }
/* Relevé compact sur PC : toute la ligne visible sans défiler à droite */
@media (min-width: 641px) {
  table.rl.has-wh { min-width: 0; width: 100%; font-size: 12.5px; table-layout: fixed; }
  .rl.has-wh th.rl-g, .rl.has-wh td.rl-g { width: 16.5%; text-align: center; }
  .rl.has-wh th.rl-g .rl-cur { justify-content: center; }
  .rl.has-wh th.rl-g .rl-gl { display: block; text-align: center; }
  .rl.has-wh th.rl-g .rl-cur i, .rl.has-wh td.rl-g .cv { text-align: center; }
  .rl.has-wh .rl-op { min-width: 0; width: 34%; max-width: none; }
  .rl.has-wh th, .rl.has-wh td { padding: 6px 5px; }
  .rl.has-wh td.rl-g .cv { width: 50%; min-width: 0; font-size: 12.5px; }
  .rl.has-wh th.rl-g .rl-cur i { width: 50%; }
  .rl.has-wh .rl-txt b { font-size: 13px; }
  .rl.has-wh .rl-txt small { font-size: 11px; }
  .rl.has-wh .rl-opc .ico { width: 24px; height: 24px; font-size: 13px; }
  .rl.has-wh td.rl-g .cv small, .rl.has-wh td.rl-g .cv i { font-size: 9.5px; }
}
@media (min-width: 641px) and (max-width: 1150px) { .rl.has-wh .rl-op { width: 31%; } .rl.has-wh th.rl-g, .rl.has-wh td.rl-g { width: 17.25%; padding: 6px 2px; } .rl.has-wh td.rl-g .cv { font-size: 11px; } .rl.has-wh td.rl-g .cv u { display: none; } }
/* traits de séparation entre les groupes Mouvement / Whish / Bénéfice / Solde */
.rl th.rl-g + th.rl-g, .rl td.rl-g + td.rl-g { border-left: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); }
[dir=rtl] .rl th.rl-g + th.rl-g, [dir=rtl] .rl td.rl-g + td.rl-g { border-left: 0; border-right: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); }
@media (max-width: 640px) { .rl.has-wh th.rl-g:nth-child(2), .rl.has-wh td.rl-g:nth-child(2) { width: 24%; } .rl.has-wh th.rl-g:nth-child(4), .rl.has-wh td.rl-g:nth-child(4) { width: 18%; } .rl.has-wh th.rl-g:nth-child(5), .rl.has-wh td.rl-g:nth-child(5) { width: 28%; } }
.ach-line .ach-cbw { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ach-line input.ach-cb { min-height: 26px; padding: 2px 6px; width: 150px; max-width: 55%; text-align: left; font-size: 12px; background: transparent; border-style: dashed; }
.ach-line input.ach-cb.chg { border-color: var(--warn, #f5a524); border-style: solid; }
.ach-line .ach-cbw small { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.ach-modif { margin-bottom: 12px; }
.ach-edit-info { border: 1px solid var(--accent, #e3173e); }
.inv-art input.inv-nom { width: 100%; font-weight: 700; text-align: left; padding: 4px 6px; min-height: 30px; }
.inv-art input.inv-cb { width: 100%; text-align: left; padding: 2px 6px; min-height: 24px; font-size: 11.5px; margin-top: 3px; color: var(--muted); }
.prod-nom { color: inherit; text-decoration: none; } .prod-nom:hover b { text-decoration: underline; }
@media (max-width: 640px) { .ach-line { grid-template-columns: 54px 74px 78px minmax(0, 1fr) 28px; gap: 6px; } .ach-line .cl-t { font-size: 13px; } .ach-line input.ach-cb { width: 130px; } }
@media (max-width: 560px) { .inv-art input.inv-nom { font-size: 12.5px; } }
.cart-line .nm small.cl-stk { color: var(--muted); font-size: 11.5px; } .cart-line .nm small.cl-stk.warn { color: var(--warn, #f5a524); font-weight: 700; }
.inv-tbl input[type=checkbox] { width: 20px; height: 20px; min-height: 0; padding: 0; } .inv-tbl td.c, .inv-tbl th.c { text-align: center; }
/* alerte stock bas (accueil) */
.db-alert { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 0 0 12px; border-radius: 14px; background: rgba(245, 176, 65, .08); border: 1.5px solid rgba(245, 176, 65, .55); color: inherit; text-decoration: none; }
.db-alert i { font-style: normal; font-size: 20px; flex: none; }
.db-alert span { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.db-alert b { color: var(--warn); }
.db-alert small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-alert small em { font-style: normal; font-weight: 800; }
.db-alert .db-alert-go { flex: none; font-size: 12px; font-weight: 700; color: var(--warn); }
.db-hacts { display: inline-flex; gap: 6px; }
/* clôture de caisse */
.clo-caisses { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 2px; }
.clo-caisses a { flex: none; display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--line); color: inherit; text-decoration: none; min-width: 120px; }
.clo-caisses a.on { border-color: var(--accent); background: var(--accent-soft); }
.clo-caisses small { font-size: 11.5px; }
.clo-grid { display: grid; grid-template-columns: 54px 1fr 1fr 1fr; gap: 8px 10px; align-items: center; margin: 6px 0 12px; }
.clo-grid .ph { font-size: 11px; color: var(--muted); font-weight: 800; text-transform: uppercase; text-align: right; }
.clo-grid .pl { font-weight: 800; }
.clo-grid .clo-att, .clo-grid .clo-ec { text-align: right; font-variant-numeric: tabular-nums; }
.clo-grid input { text-align: right; font-size: 17px; font-weight: 700; }
.clo-grid .clo-ec { font-size: 15px; }
.clo-bil { grid-column: 1 / -1; margin: -2px 0 6px; }
.clo-bil summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.bil-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px 10px; margin-top: 8px; }
.bil-grid label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.bil-grid label span { flex: 1; text-align: right; color: var(--muted); white-space: nowrap; }
.bil-grid input { width: 70px; padding: 6px; text-align: right; min-height: 34px; }
.clo-hist .amt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.clo-hist .amt form { margin: 0; }
@media (max-width: 480px) { .clo-grid { grid-template-columns: 44px 1fr 1fr 0.9fr; gap: 6px; } .clo-grid input { font-size: 15px; padding: 8px 6px; } .clo-grid .clo-att, .clo-grid .clo-ec { font-size: 13px; } }
/* rapports */
.rap-seg { display: flex; gap: 6px; margin-bottom: 12px; }
.rap-seg a { flex: 1; text-align: center; padding: 10px; border-radius: 12px; background: var(--card); border: 1.5px solid var(--line); color: inherit; text-decoration: none; font-weight: 700; }
.rap-seg a.on { border-color: var(--accent); background: var(--accent-soft); }
.rap-tbl td small { display: block; font-size: 11px; }
.rap-bar { display: block; height: 4px; border-radius: 3px; background: var(--line); margin: 4px 0 2px; max-width: 220px; }
.rap-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.range-links .pill.on { border-color: var(--accent); color: var(--accent); }
/* réglages : telegram, résumé */
.tg-steps { margin: 8px 0 4px 18px; padding: 0; font-size: 13.5px; line-height: 1.5; }
.tg-steps li { margin-bottom: 4px; }
.tg-steps code { font-size: 12px; background: var(--accent-soft); padding: 1px 4px; border-radius: 4px; }
.rs-preview { white-space: pre-wrap; font-family: inherit; font-size: 13px; line-height: 1.5; background: rgba(127, 127, 127, .08); padding: 10px 12px; border-radius: 10px; margin: 8px 0 0; }
.big-check span b { font-size: 15px; }
@media (min-width: 700px) { .clo-grid { grid-template-columns: 70px 190px 220px 150px; justify-content: start; } .clo-grid .clo-bil { grid-column: 1 / -1; } }
@media (max-width: 480px) { .bil-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; } .bil-grid label { flex-direction: column; align-items: stretch; gap: 2px; } .bil-grid label span { text-align: left; font-size: 11.5px; } .bil-grid input { width: 100%; } }
/* journal des actions */
.jr-counts { display: flex; gap: 6px; flex-wrap: wrap; } .jr-counts a { text-decoration: none; }
.jr-day { font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--muted); padding: 12px 0 4px; border-bottom: 1px solid var(--line); letter-spacing: .03em; }
.jr-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.jr-h { flex: none; width: 42px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); font-size: 13px; padding-top: 2px; }
.jr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.jr-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.jr-res { font-size: 14px; overflow-wrap: anywhere; }
.jr-det { margin: 2px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.jr-det li { overflow-wrap: anywhere; }
.jr-more summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.jr-ip { flex: none; font-size: 11px; padding-top: 3px; }
.jr-suppression .jr-res, .jr-annulation .jr-res, .jr-echec .jr-res { color: var(--neg); }
.jr-pages { justify-content: center; align-items: center; margin-top: 12px; }
@media (max-width: 640px) { .jr-ip { display: none; } .jr-h { width: 36px; font-size: 12px; } }
.jr-res a.link { color: inherit; } .jr-suppression .jr-res a.link, .jr-annulation .jr-res a.link, .jr-echec .jr-res a.link { color: var(--neg); }
/* D1 à D4 : dicton dans la barre du haut */
.tb-dic { flex: 0 1 300px; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 10px; border-inline-start: 1px solid var(--line); margin-inline-start: 2px; }
.tb-dic p { margin: 0; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-dic .d-ar { font-size: 13.5px; font-weight: 700; color: #F0B90B; }
.tb-dic .d-fr { font-size: 11px; color: var(--muted); }
body:has(.tb-dic) .topnav { gap: 0; margin-inline-start: auto; }
body:has(.tb-dic) .topnav a { padding: 8px 9px; font-size: 13.5px; }
@media (max-width: 899px) { body:has(.tb-dic) .topbar .who { display: none; } .tb-dic { flex: 1 1 auto; border: 0; padding: 0 0 0 4px; } .tb-dic .d-fr { display: none; } }
/* C1 : soldes des caisses à côté de « Bonjour » */
.db-gcais { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; gap: 4px; padding: 7px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.gc-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.gc-h b { color: var(--text); font-size: 12.5px; text-transform: none; margin-inline-start: 4px; }
.gc-act { display: flex; gap: 6px; } .gc-act a { font-size: 11.5px; font-weight: 700; color: #7cc4f0; border: 1px solid rgba(93, 173, 226, .45); border-radius: 7px; padding: 1px 7px; text-transform: none; letter-spacing: 0; }
.gc-list { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.gc-w { flex: 1 1 0; min-width: 120px; display: flex; flex-direction: column; padding: 4px 8px; border-radius: 9px; background: rgba(127, 127, 127, .07); color: inherit; text-decoration: none; }
.gc-w span { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-w b { font-size: 13px; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash .db-kpis.k4 { grid-template-columns: 1fr 1fr; }
.dash .db-kpis.k4 .db-kpi.main { grid-column: 1 / -1; }
@media (min-width: 900px) { .dash .db-kpis.k4 { grid-template-columns: 1.35fr 1fr 1fr 1fr; } .dash .db-kpis.k4 .db-kpi.main { grid-column: auto; } }
@media (min-width: 760px) { .db-cols2.c1b { grid-template-columns: 1fr 1.2fr; } }
@media (max-width: 760px) { .dash-d .db-greet { flex-wrap: wrap; } .dash-d .db-greet .db-gcais { order: 3; flex: 1 0 100%; } .gc-list { display: grid; grid-template-columns: 1fr 1fr; } .gc-w { min-width: 0; } }
body:has(.tb-dic) .topnav a { white-space: nowrap; }
.tb-dic { flex: 1 1 auto; max-width: 340px; }
@media (min-width: 900px) and (max-width: 1500px) { body:has(.tb-dic) .topnav .tn-u { display: none; } body:has(.tb-dic) .topnav a { padding: 8px 7px; font-size: 13px; } }
@media (max-width: 760px) { .dash-d .db-greet > div:first-child { flex: 1; min-width: 0; } .dash-d .db-greet h1 { font-size: 20px; } .gc-act a { white-space: nowrap; padding: 1px 6px; } .gc-h { flex-wrap: nowrap; } .gc-h > span:first-child { white-space: nowrap; } }
/* C1 compact : petit bonjour, caisses larges, raccourcis tout en haut */
.dash-d .db-greet { align-items: stretch; gap: 8px; margin: 0 0 8px; }
.dash-d .db-greet > div:first-child { flex: 0 0 auto; max-width: 150px; display: flex; flex-direction: column; justify-content: center; }
.dash-d .db-greet small { font-size: 11px; }
.dash-d .db-greet h1 { font-size: 15px; line-height: 1.25; font-weight: 700; }
.dash-d .db-gcais { padding: 5px 9px; gap: 3px; border-radius: 12px; }
.dash-d .gc-h { font-size: 10px; } .dash-d .gc-h b { font-size: 12px; }
.dash-d .gc-act a { font-size: 11px; padding: 0 6px; }
.dash-d .gc-w { padding: 3px 7px; border-radius: 8px; min-width: 110px; }
.dash-d .gc-w span { font-size: 10.5px; } .dash-d .gc-w b { font-size: 12px; line-height: 1.25; }
.db-side { flex: none; display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.dash-d .db-today { min-width: 74px; padding: 4px 8px; border-radius: 12px; }
.dash-d .db-today b { font-size: 17px; } .dash-d .db-today small { font-size: 10px; }
.db-sbmini { display: block; text-align: center; font-size: 11px; font-weight: 700; color: var(--warn); border: 1px solid rgba(245, 176, 65, .55); background: rgba(245, 176, 65, .08); border-radius: 9px; padding: 3px 6px; white-space: nowrap; text-decoration: none; }
.dash-d .db-rc { margin-bottom: 10px; }
.dash-d .db-kpis { gap: 8px; margin-bottom: 10px; }
.dash-d .db-kpi { padding: 9px 12px; border-radius: 14px; gap: 2px; }
.dash-d .db-kpi small { font-size: 11.5px; } .dash-d .db-kpi em { font-size: 11px; }
.dash-d .db-amts b { font-size: 15px; } .dash-d .db-amts b.big { font-size: 20px; }
@media (max-width: 760px) {
  .dash-d .db-greet > div:first-child { flex: 1; max-width: none; }
  .dash-d .db-greet h1 { font-size: 16px; }
  .dash-d .db-side { flex-direction: row; align-items: center; }
  .dash-d .db-today { flex-direction: row; gap: 5px; min-width: 0; padding: 4px 8px; } .dash-d .db-today b { font-size: 15px; }
}
/* caisses : cases étroites, plusieurs lignes si besoin */
.dash-d .gc-list { flex-wrap: wrap; gap: 5px; overflow: visible; }
.dash-d .gc-w { flex: 0 0 auto; width: 128px; min-width: 0; padding: 3px 7px; }
.dash-d .gc-w b { font-size: 11.5px; }
@media (max-width: 760px) { .dash-d .gc-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-d .gc-w { width: auto; } }
@media (max-width: 380px) { .dash-d .gc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-d .gc-w { width: 112px; padding: 3px 6px; } .dash-d .gc-w span { font-size: 10px; } .dash-d .gc-w b { font-size: 11px; }
/* raccourcis : style « pastilles » */
.rcp { display: flex; flex-direction: column; gap: 6px; position: relative; }
.rcp .rc-manage { position: absolute; top: 0; right: 0; }
.rcp-g { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.rcp-h { font-size: 10.5px; font-weight: 800; letter-spacing: .03em; padding: 3px 7px; border-radius: 6px; min-width: 66px; text-align: center; }
.rcp-g.entree .rcp-h { color: var(--pos); background: rgba(46, 189, 133, .12); } .rcp-g.sortie .rcp-h { color: var(--neg); background: rgba(246, 70, 93, .12); }
.rcp-b { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 6px; border-radius: 99px; font-size: 12.5px; font-weight: 700; color: var(--text); background: rgba(127, 127, 127, .08); border: 1px solid var(--line); text-decoration: none; white-space: nowrap; }
.rcp-b i { font-style: normal; font-size: 14px; }
.rcp-b.entree { border-color: rgba(46, 189, 133, .35); } .rcp-b.sortie { border-color: rgba(246, 70, 93, .35); }
.rcp-b:hover { background: rgba(127, 127, 127, .16); }
.rcp-b em { font-style: normal; font-size: 11px; margin-inline-start: 2px; } .rcp-b.entree em { color: var(--pos); } .rcp-b.sortie em { color: var(--neg); }
/* raccourcis : style « mini-tuiles » */
.rcm { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; }
.rcm-g { min-width: 0; } .rcm .rcz-h { margin-bottom: 5px; }
.rcm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 5px; }
.rcm-t { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 3px; border-radius: 10px; background: rgba(127, 127, 127, .07); border: 1px solid var(--line); color: var(--text); text-decoration: none; min-width: 0; }
.rcm-t i { font-style: normal; font-size: 17px; line-height: 1.2; }
.rcm-t span { font-size: 10.5px; font-weight: 700; line-height: 1.15; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rcm-t.entree { border-color: rgba(46, 189, 133, .3); } .rcm-t.sortie { border-color: rgba(246, 70, 93, .3); }
@media (max-width: 760px) { .rcm { grid-template-columns: 1fr; } .rcm .rcz-sep { display: none; } }
/* raccourcis : style « favoris + recherche » */
.rcf-top { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; flex-wrap: wrap; }
.rcf-t { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.rcf-q { flex: 1; min-width: 160px; max-width: 340px; padding: 6px 10px; min-height: 32px; font-size: 13px; border-radius: 10px; }
.rcf-all { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 9px; background: transparent; color: var(--muted); border: 1px solid var(--line); cursor: pointer; }
.rcf-top .rc-manage { margin-inline-start: auto; }
.rcf-list { display: flex; flex-wrap: wrap; gap: 5px; }
.rcm { align-items: start; } .rcm .rcz-h { min-height: 24px; display: flex; align-items: center; justify-content: space-between; }
.rcp { padding-inline-end: 62px; } .rcp .rc-manage { top: 2px; }
.na-min { width: 56px !important; display: inline-block; padding: 2px 6px !important; min-height: 0 !important; margin: 0 4px; }
.db-pays { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.db-pays .db-pay { margin-top: 6px; }
.db-pay.db-pret { background: rgba(245, 176, 65, .1); color: var(--warn); border-color: rgba(245, 176, 65, .35); }
.pret-form .big-in { font-size: 20px; font-weight: 700; text-align: right; }
.db-pays { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 0 6px; } .db-pays .db-pay { white-space: nowrap; font-size: 12px; padding: 5px 4px; }
.kbd { font-size: 10.5px; font-weight: 800; padding: 1px 5px; border-radius: 5px; border: 1px solid rgba(255,255,255,.45); margin-inline-start: 6px; opacity: .85; vertical-align: middle; } .center-t { text-align: center; }

/* ===== v1.38 : livraisons en attente, raccourcis boutique, catégories dépense, caisses (utilisateur) ===== */
.badge.att { background: rgba(245, 176, 65, .18); color: var(--warn); }
.badge.dep { background: rgba(91, 141, 239, .18); color: #8fb0f5; }
.typefilter { flex-wrap: wrap; }
.typefilter a.att { color: var(--warn); }
.typefilter a.att.on { background: rgba(245, 176, 65, .14); color: var(--warn); border-color: var(--warn); }
@media (max-width: 560px) { .typefilter a.att { flex: 1 0 100%; padding: 7px; } }
.att-wrap { margin: 10px 0 0 !important; padding: 9px 11px; border-radius: 12px; border: 1px dashed rgba(245, 176, 65, .45); background: rgba(245, 176, 65, .06); }
.att-wrap small { display: block; font-size: 12px; font-weight: 500; }
#opform.is-attente .att-wrap { border-style: solid; background: rgba(245, 176, 65, .14); }
#opform.is-attente .att-wrap b { color: var(--warn); }
.tiroir .att-tir { color: var(--warn); }
.att-card { border: 1px solid rgba(245, 176, 65, .4); background: linear-gradient(135deg, rgba(245, 176, 65, .12), rgba(245, 176, 65, .02)), var(--card); }
.att-h { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.att-h .att-ico { font-size: 26px; }
.att-h b { color: var(--warn); display: block; }
.att-h small { color: var(--muted); font-size: 12.5px; }
.att-ok { color: var(--pos); }
.db-att { border: 1px solid rgba(245, 176, 65, .3); }
.db-att h2 span { color: var(--warn); }
.att-cols { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .att-cols { grid-template-columns: 1fr 1fr; } }
.att-col { min-width: 0; border-radius: 12px; padding: 8px 10px; background: rgba(127, 127, 127, .06); }
.att-ch { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.att-col.entree .att-ch b { color: var(--pos); } .att-col.sortie .att-ch b { color: var(--neg); }
.att-ch span { font-size: 12px; font-weight: 800; background: rgba(245, 176, 65, .2); color: var(--warn); border-radius: 20px; padding: 1px 8px; }
.att-tot { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 6px; font-size: 17px; font-variant-numeric: tabular-nums; }
.att-tot em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.att-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.att-row a.grow { flex: 1; min-width: 0; color: inherit; text-decoration: none; display: flex; flex-direction: column; }
.att-row a.grow b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-row a.grow small { font-size: 12px; color: var(--muted); }
.att-row form { margin: 0; }
.att-ok-btn { background: rgba(62, 207, 142, .14); color: var(--pos); border: 1px solid rgba(62, 207, 142, .4); white-space: nowrap; }
.att-more { display: block; font-size: 12.5px; padding-top: 6px; }
/* Raccourcis boutique */
.rc-form .typeseg { grid-template-columns: 1fr 1fr 1fr; }
.typeseg .t-btq input:checked + span { background: rgba(91, 141, 239, .14); border-color: #5b8def; color: #8fb0f5; }
.ico.ty-btq { background: rgba(91, 141, 239, .15); color: #8fb0f5; font-size: 20px; }
.rc-tag.btq { background: rgba(91, 141, 239, .15); color: #8fb0f5; }
.tb-i.btq { background: rgba(91, 141, 239, .16); box-shadow: inset 0 0 0 1px rgba(91, 141, 239, .45); }
.tb-i.btq i { background: #4a74c9; }
.rct.btq i { background: rgba(91, 141, 239, .15); box-shadow: inset 0 0 0 1px rgba(91, 141, 239, .4); }
.rct.btq i em { background: #4a74c9; }
.rcc-b.btq { background: rgba(91, 141, 239, .1); box-shadow: inset 0 0 0 1px rgba(91, 141, 239, .4); }
.rcp-g.btq .rcp-h { color: #8fb0f5; background: rgba(91, 141, 239, .12); }
.rcp-b.btq { border-color: rgba(91, 141, 239, .4); } .rcp-b.btq em { color: #8fb0f5; }
.rcm-t.btq { border-color: rgba(91, 141, 239, .35); }
.bp.btq span small { color: #8fb0f5; }
/* Accueil utilisateur : soldes des caisses (case large) à la place du bénéfice du mois */
.db-kcais small { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.db-kcais .kc-act { display: flex; gap: 6px; }
.db-kcais .kc-act a { font-size: 11.5px; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.kc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; margin-top: 4px; }
.kc-w { display: flex; flex-direction: column; padding: 5px 9px; border-radius: 10px; background: rgba(127, 127, 127, .08); color: inherit; text-decoration: none; min-width: 0; }
.kc-w span { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-w b { font-size: 15px; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash .db-kpis.kc { grid-template-columns: 1fr 1fr; }
.dash .db-kpis.kc .db-kpi.main, .dash .db-kpis.kc .db-kcais { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .dash .db-kpis.kc.kc3 { grid-template-columns: 1.15fr 2.2fr 1fr; }
  .dash .db-kpis.kc.kc4 { grid-template-columns: 1.15fr 2.2fr 1fr 1fr; }
  .dash .db-kpis.kc .db-kpi.main, .dash .db-kpis.kc .db-kcais { grid-column: auto; }
}
@media (min-width: 760px) {
  .dash .db-kpis.kb.kc.kc3 { grid-template-columns: 1fr 1fr; }
  .dash .db-kpis.kb.kc .db-kpi.main, .dash .db-kpis.kb.kc .db-kcais { grid-column: 1 / -1; }
}
@media (min-width: 760px) {
  .rcz.g3, .rcm.g3 { grid-template-columns: 2fr auto 2fr auto minmax(0, 1fr); }
  .rcz.g3 .rcz-g:last-child .rcz-tiles { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
}
/* Recherche d'articles tolérante aux fautes */
.sug-approx { font-style: normal; font-size: 11px; font-weight: 800; color: var(--warn); margin-inline-start: 4px; }
.prod-q { display: block; }
.nom-wrap { position: relative; }
.sim-box .sim-h { margin: 0; padding: 8px 14px 4px; font-size: 12px; color: var(--warn); font-weight: 700; }
.suggest a.sim-i.sel { background: var(--accent-soft); }
/* Paiement de crédit en une ou deux devises */
.pay-amts { display: grid; grid-template-columns: repeat(var(--nc, 2), minmax(0, 1fr)); gap: 10px; }
.pay-amts label { margin-bottom: 8px; }
.pay-conv { margin-top: 6px; }
.pay-res { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 14px; }
.pr-conv { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px; border-radius: 12px; background: rgba(91, 141, 239, .1); border: 1px solid rgba(91, 141, 239, .3); font-size: 14px; }
.pr-conv small { color: var(--muted); }
.pr-rest { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: rgba(127, 127, 127, .07); border: 1px solid var(--line); }
.pr-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; font-size: 14px; font-variant-numeric: tabular-nums; }
.pr-row > span:first-child { color: var(--muted); font-weight: 600; }
.pr-row > span:nth-child(2) { color: var(--muted); text-align: end; }
.pr-row b { font-size: 16px; }
.tache-etat { margin: 0 0 8px; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
/* ===== Accueil D3 : menu centré, date + salutation + op. du jour + alerte stock en haut à droite ===== */
.tb-greet { display: none; }
@media (min-width: 900px) {
  .topbar.tb-center { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
  .topbar.tb-center .brand { justify-self: start; }
  .topbar.tb-center .topnav { justify-self: center; margin: 0; gap: 2px; }
  .topbar.tb-center .topnav a { padding: 7px 8px; font-size: 13px; }
  .topbar.tb-center .topnav a[href="?p=logout"], .topbar.tb-center .who { display: none; }
  .tg-out { color: var(--muted); font-size: 16px; padding: 4px; text-decoration: none; }
  .tb-greet { justify-self: end; display: flex; align-items: center; gap: 8px; min-width: 0; }
  .tg-txt { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; min-width: 0; }
  .tg-txt small { font-size: 11px; color: var(--muted); white-space: nowrap; }
  .tg-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
  .tg-pill { display: inline-flex; align-items: baseline; gap: 3px; padding: 3px 8px; border-radius: 999px; font-size: 11px; color: var(--muted); background: var(--card); border: 1px solid var(--line); white-space: nowrap; text-decoration: none; }
  .tg-pill b { font-size: 12.5px; color: var(--text); }
  .tg-pill.warn { color: var(--warn); border-color: rgba(245, 176, 65, .45); background: rgba(245, 176, 65, .1); }
  .tg-pill.warn b { color: var(--warn); }
  /* la salutation et les compteurs sont en haut : la ligne de l'accueil garde les caisses et le dicton */
  .dash-d3 .db-greet > div:first-child, .dash-d3 .db-side { display: none; }
  .dash-d3 .db-greet { align-items: stretch; }
}
@media (min-width: 900px) and (max-width: 1180px) { .tg-txt small { display: none; } .topbar.tb-center .topnav a { padding: 7px 7px; font-size: 13px; } }
/* ===== Statistiques : période libre + impression A4 (une page) ===== */
.print-head { display: none; }
.st-range .range-links { margin-bottom: 8px; }
.st-dates { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.st-dates label { margin-bottom: 0 !important; }
@media print {
  @page { size: A4 portrait; margin: 10mm; }
:root { color-scheme: light !important; --bg: #fff; --bg2: #fff; --card: #fff; --card2: #fff; --text: #000; --line: #bbb; }
  html, body { background: #fff !important; color: #000 !important; }
  .topbar, .bottomnav, .no-print, .flash, .pagehead { display: none !important; }
  .wrap { max-width: none !important; padding: 0 !important; margin: 0 !important; animation: none !important; }
  .print-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; border-bottom: 2px solid #000; padding-bottom: 4px; margin-bottom: 8px; color: #000; }
  .print-head small { font-size: 10px; color: #444; }
  .card, .stat { background: #fff !important; border: 1px solid #bbb !important; box-shadow: none !important; padding: 6px 8px !important; margin-bottom: 6px !important; break-inside: avoid; }
  .stats { gap: 6px !important; margin-bottom: 6px !important; }
  h2 { color: #000 !important; font-size: 12px !important; margin: 0 0 4px !important; }
  .tbl { font-size: 10.5px !important; } .tbl th, .tbl td { padding: 2px 5px !important; color: #000 !important; border-color: #ccc !important; }
  .tbl tr.total td { border-top: 1.5px solid #000 !important; }
  .pos { color: #0a7a3d !important; } .neg { color: #c0182f !important; } .warn { color: #a66300 !important; }
  .stat small, .stat em, .muted { color: #444 !important; }
  .table-wrap { overflow: visible !important; }
}
/* ===== Fiche Entrée / Sortie plus compacte (on voit les options du bas) ===== */
#opform .typeseg { gap: 8px; margin-bottom: 8px; }
#opform .typeseg span { flex-direction: row; justify-content: center; gap: 8px; padding: 8px 8px; border-radius: 12px; font-size: 15px; }
#opform .typeseg span i { font-size: 18px; }
#opform .typeseg span small { margin: 0 0 0 4px; font-size: 11px; }
#opform .chips { padding-bottom: 8px; gap: 6px; }
#opform .chip span { padding: 6px 12px; font-size: 13.5px; }
#opform .card { padding: 12px 14px; margin-bottom: 10px; }
#opform .card > .seg { margin-bottom: 8px; }
#opform .seg label span { padding: 7px 6px; font-size: 13.5px; }
#opform .fiche { gap: 5px; }
#opform .f-in { font-size: 16px; padding: 7px 9px; }
#opform .ben-quick { margin: 8px 0 2px; gap: 5px; }
#opform .bq { padding: 5px 3px; font-size: 13.5px; border-radius: 9px; }
#opform .wbtn span { min-height: 0; padding: 7px 10px; border-radius: 11px; }
#opform .wbtn span small { font-size: 12px; }
#opform label { margin-bottom: 8px; }
#opform .actions.sticky { padding: 8px; margin-bottom: 10px; }
#opform .actions.sticky .btn { padding-top: 11px; padding-bottom: 11px; }
@media (max-width: 899px) { #opform .typeseg span small { display: none; } }
/* Grand écran : montants à gauche, caisses + client à droite → tout est visible sans descendre */
@media (min-width: 1100px) {
  .wrap:has(#opform) { max-width: 1240px; }
  #opform .op-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  #opform .op-col2 { position: sticky; top: 76px; }
}
#opform .op-opts { display: flex; flex-direction: column; gap: 8px; }
#opform .op-opts .att-wrap { margin: 0 !important; }
#opform .op-opts .note-field { margin: 0; }
/* ===== Accueil D3 : tout sur un écran, dernières opérations compactes ===== */
.dash-d3 .db-recent .op-row { padding: 5px 2px; gap: 8px; }
.dash-d3 .db-recent .op-row .ico { width: 26px; height: 26px; border-radius: 8px; font-size: 14px; }
.dash-d3 .db-recent .op-row .grow { flex-direction: row; align-items: baseline; gap: 8px; }
.dash-d3 .db-recent .op-row .grow b { font-size: 13px; }
.dash-d3 .db-recent .op-row .grow small { font-size: 11px; flex: none; }
.dash-d3 .db-recent .op-row .amt b { font-size: 13px; }
.dash-d3 .db-recent .op-row .amt small { font-size: 10.5px; }
.dash-d3 .db-recent .op-row .op-note, .dash-d3 .db-recent .op-row .sl-line { display: none; }
.dash-d3 .db-recent .op-row.has-sl { flex-wrap: nowrap; }
.dash-d3 .db-recent .row:hover { background: rgba(127, 127, 127, .06); }
@media (min-width: 1100px) and (min-height: 600px) {
  .dash-d3 { display: flex; flex-direction: column; height: calc(100dvh - 76px); }
  .dash-d3 > * { flex: none; }
  .dash-d3 .db-greet { margin-bottom: 6px; }
  .dash-d3 .db-rc { padding: 8px 12px; margin-bottom: 8px; }
  .dash-d3 .db-kpis { margin-bottom: 8px; }
  .dash-d3 .db-kpi { padding: 7px 11px; }
  .dash-d3 .db-kpi .db-amts b { font-size: 15px; } .dash-d3 .db-kpi .db-amts b.big { font-size: 18px; }
  .dash-d3 .db-pays .db-pay { margin-top: 3px; padding: 3px 4px; }
  .d3-bas { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 12px; padding-bottom: 8px; }
  .d3-g, .d3-d { min-height: 0; overflow: auto; scrollbar-width: thin; }
  .d3-g > .card, .d3-d > .card { margin-bottom: 10px; padding: 10px 12px; }
  .d3-d .db-recent { height: 100%; margin: 0; display: flex; flex-direction: column; box-sizing: border-box; }
  .d3-d .db-recent h2 { margin-bottom: 4px; }
  .d3-d .db-recent .list { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
  .d3-g .db-chart svg { max-height: 120px; }
  .d3-g .db-chart .db-tip { margin: 2px 0 0; font-size: 11.5px; }
  .d3-g .db-att .att-row { padding: 3px 0; }
  .d3-g .db-att .att-tot { font-size: 15px; margin: 2px 0 3px; }
  .d3-g .db-att h2 { margin-bottom: 6px; }
}
.dash-d3 .db-recent .op-row .amt { flex-direction: row-reverse; align-items: baseline; gap: 8px; max-width: 60%; }
.dash-d3 .db-recent .op-row .amt small { white-space: nowrap; }
/* D3 : dicton en petit sous le logo, caisses sur toute la largeur */
.brand-box { display: flex; flex-direction: column; justify-content: center; min-width: 0; justify-self: start; }
.tb-dic-s { display: none; }
@media (min-width: 900px) {
  .tb-dic-s { display: block; max-width: 300px; padding-inline-start: 42px; margin-top: 1px; }
  .tb-dic-s p { margin: 0; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tb-dic-s .d-ar { font-size: 11px; font-weight: 700; color: #F0B90B; text-align: start; }
  .tb-dic-s .d-fr { font-size: 9.5px; color: var(--muted); }
  .topbar.tb-center { padding-top: 6px; padding-bottom: 6px; }
  .dash-d3 .db-greet .db-gcais { flex: 1 1 100%; }
  .dash-d3 .db-gcais { flex-direction: row; align-items: center; gap: 12px; padding: 6px 10px; }
  .dash-d3 .db-gcais .gc-h { flex-direction: column; align-items: flex-start; gap: 4px; flex: none; }
  .dash-d3 .gc-list { flex: 1; flex-wrap: nowrap; overflow-x: auto; }
  .dash-d3 .gc-w { flex: 1 1 0; width: auto; min-width: 140px; flex-direction: row; align-items: baseline; flex-wrap: wrap; column-gap: 8px; }
  .dash-d3 .gc-w span { flex: 1 0 100%; }
}
@media (min-width: 1100px) and (min-height: 600px) { .dash-d3 { height: calc(100dvh - 66px); } }
@media (min-width: 900px) {
  .tb-dic-s .d-ar { text-align: left; }
  .dash-d3 .rcm-tiles { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 5px; }
  .dash-d3 .rcm-t { flex-direction: row; justify-content: flex-start; gap: 6px; padding: 5px 8px; }
  .dash-d3 .rcm-t i { font-size: 15px; }
  .dash-d3 .rcm-t span { font-size: 11.5px; text-align: start; -webkit-line-clamp: 1; }
  .dash-d3 .rcm .rcz-h { min-height: 0; margin-bottom: 4px; }
}
@media (min-width: 1100px) and (min-height: 600px) { .dash-d3 { height: calc(100dvh - 94px); } }
@media (min-width: 900px) {
  .dash-d3 .rcm-tiles { display: flex; flex-wrap: wrap; }
  .dash-d3 .rcm-t { flex: 0 0 auto; max-width: 190px; }
  .dash-d3 .rcm.g3 { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto auto; }
}
/* D3 v2 : date + salutation + compteurs dans une carte à droite des caisses (plus dans la barre du menu) */
.d3-hello { display: none; }
@media (min-width: 900px) {
  .tg-out { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 10px; border-radius: 10px; color: var(--muted); }
  .tg-out:hover { background: var(--card); color: var(--text); }
  .tg-out span { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dash-d3 .db-greet { gap: 10px; }
  .dash-d3 .db-greet .db-gcais { flex: 1 1 auto; }
  .d3-hello { display: flex; align-items: center; gap: 14px; flex: none; padding: 6px 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(240, 185, 11, .08), rgba(240, 185, 11, .01)), var(--card); border: 1px solid var(--line); }
  .dh-txt { display: flex; flex-direction: column; line-height: 1.2; }
  .dh-txt small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
  .dh-txt b { font-size: 16px; white-space: nowrap; }
  .dh-pills { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
  .dh-pills .tg-pill { justify-content: center; }
}
@media (min-width: 900px) and (max-width: 1180px) { .tg-out span { display: none; } }
@media (min-width: 900px) { .d3-hello { margin-inline-start: auto; } }
/* D3 v4 : salutation à côté du nom (barre du haut), caisses sur toute la largeur et toutes visibles */
@media (min-width: 900px) {
  .topbar.tb-center { column-gap: 24px; }
  .tb-greet { gap: 10px; padding-inline-start: 14px; border-inline-start: 1px solid var(--line); }
  .tg-pills { display: flex; flex-direction: column; gap: 3px; align-items: stretch; }
  .tg-pills .tg-pill { justify-content: center; padding: 1px 7px; font-size: 10.5px; }
  .tg-pills .tg-pill b { font-size: 11.5px; }
  .tg-out { padding: 4px 6px; font-size: 16px; }
  .dash-d3 .db-greet .db-gcais { flex: 1 1 100%; }
  .dash-d3 .gc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 5px; overflow: visible; }
  .dash-d3 .gc-w { min-width: 0; width: auto; }
}
@media (min-width: 900px) and (max-width: 1250px) { .tg-txt small { display: none; } .tg-txt b { font-size: 13px; } }

/* Impression des statistiques : texte lisible (la page est ensuite ajustée pour remplir la feuille A4) */
@media print {
  body.st-printing .print-head { font-size: 17px; }
  body.st-printing .print-head small { font-size: 11px; }
  body.st-printing h2 { font-size: 14px !important; }
  body.st-printing .tbl { font-size: 13px !important; width: 100%; }
  body.st-printing .tbl th, body.st-printing .tbl td { padding: 4px 7px !important; }
  body.st-printing .stat b { font-size: 18px; }
  body.st-printing .stat small, body.st-printing .stat em { font-size: 12px; }
  body.st-printing .wrap { margin: 0 !important; }
}
.print-only { display: none; }
@media print {
  .print-hide { display: none !important; }
  .print-only.st-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  body.st-printing .stats { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Impression des statistiques v3 : tailles fixes en points (lisibles sur papier), plusieurs pages si besoin */
@media print {
  body.st-printing { font-size: 12pt; }
  body.st-printing .wrap { zoom: 1 !important; width: auto !important; }
  body.st-printing .print-head { font-size: 15pt; padding-bottom: 6px; margin-bottom: 10px; }
  body.st-printing .print-head small { font-size: 9pt; }
  body.st-printing h2 { font-size: 12.5pt !important; margin: 0 0 6px !important; }
  body.st-printing .tbl { font-size: 11.5pt !important; }
  body.st-printing .tbl th { font-size: 10pt !important; }
  body.st-printing .tbl th, body.st-printing .tbl td { padding: 4px 6px !important; }
  body.st-printing .stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.st-printing .stat b { font-size: 15pt; }
  body.st-printing .stat small, body.st-printing .stat em { font-size: 10pt; }
  body.st-printing .card { break-inside: auto; padding: 8px 10px !important; margin-bottom: 10px !important; }
  body.st-printing thead { display: table-header-group; }
  body.st-printing tr { break-inside: avoid; }
  body.st-printing h2 { break-after: avoid; }
  body.st-printing .print-only.st-split { gap: 18px; }
}
@media print { body.st-printing .print-head { gap: 12px; flex-wrap: wrap; } body.st-printing .print-head small { margin-inline-start: auto; } }
/* Touche clavier d'un raccourci, en petit sur les boutons */
.rc-kbd { display: inline-block; margin-inline-start: 4px; padding: 0 4px; border-radius: 4px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--bg2); color: var(--muted); font: 700 9.5px/1.45 ui-monospace, monospace; vertical-align: middle; }
.rct span .rc-kbd, .rcm-t span .rc-kbd { display: block; width: fit-content; margin: 2px auto 0; }
.dash-d3 .rcm-t span .rc-kbd { display: inline-block; margin: 0 0 0 5px; }
.tb-i .rc-kbd { position: absolute; top: -6px; left: -4px; margin: 0; font-size: 8.5px; padding: 0 3px; }
.tb-i { position: relative; }
.acc .row > .rc-kbd { margin-inline-end: 6px; }
/* Recherche de client en tapant (fiche Entrée/Sortie, crédits clients) : nom + solde */
.cq-box { display: block; margin-bottom: 4px; }
label.cq-on > select#client-sel { display: none; }
.cq-box .suggest button > small { flex: none; font-size: 12.5px; font-weight: 700; text-align: end; }
.filters .cq-box { margin-bottom: 8px; } .filters .cq-box input { width: 100%; }
/* Tableau de bord : pas de bouton « + » flottant (grand écran) */
@media (min-width: 900px) { body:has(.dash) .bottomnav a.fab { display: none !important; } }
.cq-box .suggest button > small.warn { color: var(--warn); } .cq-box .suggest button > small.pos { color: var(--pos); }
/* Fiche Entrée / Sortie : la liste des clients s'ouvre vers le haut (le bas de l'écran est pris par les boutons Enregistrer) */
#opform .cq-box .suggest { top: auto; bottom: calc(100% + 4px); max-height: 300px; }
/* Taux IN / OUT affichés en petit */
.tx-line { font-size: 11.5px; color: var(--muted); white-space: nowrap; } .tx-line b { color: #F0B90B; font-weight: 700; }
/* ===== Change $ ↔ LL ===== */
.chg-tx { margin-inline-start: auto; font-size: 12.5px; }
.chg-sens span { font-size: 15px; flex-direction: column; gap: 2px; } .chg-sens span i { font-size: 15px; font-weight: 800; }
.chg-amts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chg-amts input { font-size: 22px; font-weight: 700; text-align: right; }
.chg-res { min-height: 22px; margin: 2px 0 10px; font-size: 14.5px; } .chg-res b { font-size: 15.5px; }
.chg-dates { display: inline-flex; gap: 6px; align-items: center; margin-inline-start: auto; } .chg-dates input { padding: 6px 8px; font-size: 13px; }
.chg-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.f-lbl-w { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.ll-conv { border: 1px solid rgba(240, 185, 11, .45); background: rgba(240, 185, 11, .08); color: #F0B90B; font: 700 10.5px/1.4 inherit; padding: 1px 7px; border-radius: 7px; cursor: pointer; }
.ll-conv:hover { background: rgba(240, 185, 11, .18); }
.pay-tx { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .pay-tx label { margin-bottom: 8px; } .pay-tx small { font-weight: 500; }

/* ---------- Rien ne bouge : ni au clic, ni à l'ouverture d'une page ---------- */
.wrap, .flash { animation: none; }
.bottomnav a.fab:active, .qbtn:active, .btn:active, .wbtn:active span, .bigtype a:active, .rc-btn:active, .ip-btn:active, .db-kpi:active, .rcm:active,
.vir-btn:active, .bq:active, .tb-i:active, .btq-go:active, .db-btq:active, .rct:active, .db-vir:active { transform: none; filter: brightness(1.2); }

/* ---------- Paiement de crédit : monnaie rendue ---------- */
.pay-rd-l { margin-top: 4px; }
.pay-rd input { font-size: 17px; padding: 9px 12px; }
#pay-rd-sug { margin-top: -2px; }
#pay-rd-sug .rd-btn em { font-style: normal; font-size: .75em; opacity: .65; }
#pay-rd-sug .rd-keep.on { background: rgba(62, 207, 142, .14); border-color: rgba(62, 207, 142, .45); color: var(--pos); }
.pr-row b small { font-weight: 600; opacity: .75; font-size: .82em; }

/* ---------- Mode hors ligne (bêta) ---------- */
#hl-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 60; min-height: 34px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  background: #2a2f37; color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; text-align: center; }
html.hl-on body { padding-top: var(--hl-h, 34px); }
html.hl-on .topbar { top: var(--hl-h, 34px); }
@media (max-width: 600px) { #hl-bar .hl-long { display: none; } }
#hl-bar[hidden] { display: none; }
#hl-bar.off { background: #b45309; }
#hl-bar.sync { background: #1d4ed8; }
#hl-bar.warn { background: #9f1239; }
#hl-bar a { color: #fff; text-decoration: underline; }
#hl-bar .hl-voir { border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .12); color: #fff; border-radius: 8px; padding: 3px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.hl-toast { position: fixed; left: 50%; top: 48px; transform: translate(-50%, -20px); opacity: 0; z-index: 70; max-width: calc(100% - 24px); padding: 11px 16px; border-radius: 12px;
  background: #14532d; color: #fff; font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); transition: opacity .2s, transform .2s; }
.hl-toast.err { background: #9f1239; }
.hl-toast.on { opacity: 1; transform: translate(-50%, 0); }
#hl-panel { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; }
#hl-panel .hl-box { background: var(--card, #1c2026); color: var(--text, #fff); border-radius: 16px; padding: 16px; width: min(560px, 100%); max-height: 80vh; overflow: auto; }
#hl-panel h3 { margin: 0 0 10px; font-size: 16px; }
#hl-panel .hl-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
#hl-panel .hl-row small { display: block; color: var(--muted, #9aa); font-size: 12px; margin-top: 2px; }
#hl-panel .hl-row.err small { color: #fca5a5; }
#hl-panel .hl-row button, #hl-panel .hl-close { border: 1px solid var(--line, #444); background: var(--bg2, #222); color: inherit; border-radius: 9px; padding: 6px 10px; font: inherit; font-size: 12.5px; cursor: pointer; margin-left: 4px; }
#hl-panel .hl-row button.del { color: #fca5a5; }
#hl-panel .hl-close { margin-top: 12px; width: 100%; }
#hl-panel .hl-hint { color: var(--muted, #9aa); font-size: 12.5px; }
