: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; }

.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; }

/* ---------- Relevé : historique général ---------- */
.seg-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg-tabs a { text-align: center; padding: 9px 6px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg-tabs a.on { background: var(--card2, var(--card)); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.badge.cash { background: rgba(62, 207, 142, .16); color: var(--pos); }
.blk { display: block; margin-top: 3px; }
.hist-tot { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 4px 0 12px; }
.hist-tot > div { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hist-tot small { color: var(--muted); font-size: 11.5px; }
.hist-tot b { font-size: 15px; font-variant-numeric: tabular-nums; }
.hist-tot em { font-style: normal; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tbl.hist td { vertical-align: top; }
.tbl.hist tr.pay td { background: rgba(62, 207, 142, .05); }
.releve h2.mt { margin-top: 22px; }
.releve h3.cpt { font-size: 14px; margin: 14px 0 6px; color: var(--text); }
@media print {
  .hist-tot > div { border-color: #ccc; background: #fff; }
  .tbl.hist tr.pay td { background: #f1fbf6; }
  .badge.cash, .badge.cred { border: 1px solid #999; color: #000; background: #fff; }
  .releve h3.cpt { color: #000; }
}
