/* GEX Finance — V4. Gex-IT identity: condensed display type, ink and warm white, one blue accent. */
:root {
  --ground: #eceef1; --surface: #ffffff; --ink: #17171a; --ink-2: #45454d; --muted: #64646c; --line: #e1e4e9;
  --accent: #2e3b5b; --accent-soft: #e6e9f0; --accent-mid: #b4bdd2;
  --good: #1d7a4c; --good-soft: #e2f1e8; --warn: #9a5800; --warn-soft: #fff1da; --warn-tile: #ffe3b3; --bad: #b3261e; --bad-soft: #fbe8e6;
  --hero: #1d1e24; --hero-muted: #a9abb8; --hero-track: #34363f;
  --display: 'Bebas Neue', 'Oswald', 'Arial Narrow', sans-serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --card-shadow: 0 0 0 1px #e1e4e9, 0 8px 24px rgba(23,23,26,.04);
  --glass: rgba(255,255,255,.74);
  --glass-shadow: 0 12px 32px rgba(23,23,26,.14), inset 0 0 0 1px rgba(255,255,255,.7), 0 0 0 1px rgba(23,23,26,.05);
  --s1: #2e3b5b; --s2: #c9822b; --warm-bar: #f2c27a;
  --spring: cubic-bezier(.32,1.28,.48,1);
  --out: cubic-bezier(.2,.8,.2,1);
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { height: 100%; background: #eceef1; -webkit-text-size-adjust: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
body { margin: 0; min-height: 100%; background: var(--ground); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.locked { overflow: hidden; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
b { font-weight: 600; }

/* ---------- Layout ---------- */
.screen { max-width: 560px; margin: 0 auto; padding: 16px 20px 132px; display: flex; flex-direction: column; gap: 14px; }
.screen.enter { }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-xs { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* ---------- Type ---------- */
.title { margin: 0; font: 400 52px/0.9 var(--display); letter-spacing: .005em; }
.title.md { font-size: 38px; overflow-wrap: anywhere; }
.display { margin: 0; font: 400 56px/0.92 var(--display); }
.lead { margin: 0; font-size: 16px; color: var(--ink-2); text-align: justify; hyphens: auto; }
.small { font-size: 12.5px; color: var(--muted); }
.just { text-align: justify; hyphens: auto; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pos { color: var(--good); } .neg { color: var(--bad); }
.warn-text { color: var(--warn); }
.eyebrow { font: 500 11px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow b { color: var(--accent); font-weight: 500; letter-spacing: 0; }
.eyebrow.on-dark { color: var(--hero-muted); }
.eyebrow.warm { color: var(--warn); }
.money { font: 400 30px/0.9 var(--display); letter-spacing: .005em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money small { font-size: .55em; margin: 0 .12em; opacity: .85; }
.money.xl { font-size: clamp(64px, 23vw, 96px); } .money.xl small { font-size: .48em; }
.money.lg { font-size: 56px; }
.money.md { font-size: 29px; }
.money.green { color: var(--good); } .money.warm { color: var(--warn); } .money.red { color: var(--bad); }

/* ---------- Top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding-top: 6px; }
.logo { height: 32px; width: auto; display: block; }
.logo.sm { height: 26px; }
.logo.xl { height: 84px; align-self: flex-start; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.glass { background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); box-shadow: var(--glass-shadow); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font: 500 10.5px/1 var(--mono); letter-spacing: .08em; background: var(--surface); color: var(--ink); white-space: nowrap; }
.chip.glass { height: 38px; padding: 0 14px; font: 500 13px/1 var(--sans); letter-spacing: 0; text-transform: capitalize; }
.chip.blue { background: var(--accent-soft); color: var(--accent); }
.chip.outline { box-shadow: 0 0 0 1px rgba(23,23,26,.1); }
.chip.plain { background: transparent; color: var(--muted); padding: 0 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.iconbtn { width: 38px; height: 38px; border-radius: 19px; border: 0; display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: pointer; color: var(--ink); background: transparent; transition: transform .2s var(--spring); }
.iconbtn:active { transform: scale(.92); }
.iconbtn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px #fff; }
.iconbtn.plain { width: 32px; height: 32px; color: var(--muted); }
.banner { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 14px; background: #ecebe6; color: var(--ink-2); font-size: 12.5px; }
.banner span { flex: 1; }
.link { border: 0; background: none; padding: 0; font: 600 13px var(--sans); color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--bad); align-self: center; margin-top: 8px; }

/* ---------- Status ---------- */
.status-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 2px; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 9px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #ecebe6; color: var(--ink-2); }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.sm { font: 500 10px/1 var(--mono); letter-spacing: .08em; padding: 5px 8px; gap: 5px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; width: 100%; text-align: left; border: 0; cursor: pointer; padding: 22px 20px 18px; border-radius: 28px; background: var(--surface); color: var(--ink); box-shadow: 0 1px 1px rgba(23,23,26,.03), 0 18px 44px rgba(23,23,26,.08); transition: transform .25s var(--spring); }
.hero:active { transform: scale(.985); }
.hero > * { position: relative; }
.hero .hero-mark { position: absolute; right: -10px; top: -26px; font: 400 132px/1 var(--display); color: #f1f0eb; pointer-events: none; }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 10px; }
.pill { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; font: 500 12px/1 var(--mono); white-space: nowrap; }
.pill.light { background: #fff; color: var(--ink); margin-bottom: 8px; }
.hero .pill { background: var(--ground); color: var(--ink); margin-bottom: 8px; }
.pill.blue { background: var(--accent-soft); color: var(--accent); }
.progress { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: #ecebe6; }
.progress i { display: block; background: var(--accent); border-right: 2px solid #fff; transition: width .8s var(--out); }
.hero-legend { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.hero-legend span { display: inline-flex; align-items: center; gap: 2px; }
.hero-legend span:first-child { color: var(--ink-2); }
.sq { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); margin-right: 6px; }
.hero-extra { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 999px; background: rgba(174,188,255,.14); color: #cdd6ff; font-size: 13px; font-weight: 500; }
.hero-wait, .hero-need { font: 400 40px/1 var(--display); }
.hero-sub { font-size: 13px; color: var(--muted); text-align: justify; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border-radius: 22px; box-shadow: var(--card-shadow); }
.card.pad { padding: 16px; }
.card.pad-x { padding: 4px 16px; }
.card.warm { background: var(--warn-soft); box-shadow: none; }
a.card, button.card { transition: transform .22s var(--spring), box-shadow .22s; }
a.card:active { transform: scale(.98); }
.pad-y { padding: 10px 0 14px; margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tile { padding: 12px; border-radius: 20px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tile .small { font-size: 11px; line-height: 1.25; }
.tile-top { display: flex; justify-content: space-between; align-items: flex-end; min-height: 30px; }
.gauge { width: 6px; border-radius: 3px; background: var(--accent-mid); transform-origin: bottom; }
.gauge.warm { background: #f2c27a; }
.kpi { padding: 12px 13px; border-radius: 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.kpi-label { font-size: 12.5px; color: var(--ink-2); }
.tag { font: 500 10px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tag.green { color: var(--good); } .tag.red { color: var(--bad); }
.itile { width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.itile.blue, .itile.accent { background: var(--accent-soft); color: var(--accent); }
.itile.warm { background: var(--warn-tile); color: var(--warn); }
.itile.green { background: var(--good-soft); color: var(--good); }
.itile.red { background: var(--bad-soft); color: var(--bad); }
.itile.grey { background: #efeee9; color: var(--ink-2); }
.mini { padding: 10px 12px; border-radius: 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mini b { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Alerts ---------- */
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--warn-soft); }
.alert.bad { background: var(--bad-soft); }
.alert .itile { width: 34px; height: 34px; border-radius: 11px; }
.alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.alert-body b { font-size: 14px; }
.alert-body span { font-size: 12.5px; color: var(--ink-2); text-align: justify; hyphens: auto; }
.alert-amount { font: 500 14px var(--mono); color: var(--good); white-space: nowrap; }
.alert-amount.neg { color: var(--bad); }

/* ---------- Rows & lists ---------- */
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.row:first-of-type { border-top: 0; }
.row .mono { color: var(--ink); text-align: right; white-space: nowrap; }
.row.head { border-top: 0; padding: 0; align-items: center; }
.row.head.top { align-items: flex-start; }
.row.total { border-top: 1px solid #f0d9ae; padding-top: 12px; align-items: flex-end; color: var(--ink); }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 0 4px; }
.line { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); width: 100%; }
.list-head + .line { border-top: 0; }
.line.slim { padding: 8px 0; }
.line-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.line-body b { font-size: 14.5px; font-weight: 500; }
.btnline { border-left: 0; border-right: 0; border-bottom: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.btnline > svg { color: var(--muted); }
.mark { width: 36px; height: 36px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font: 400 15px/1 var(--display); overflow: hidden; letter-spacing: .04em; flex-shrink: 0; }
.mark.teal { background: #e3f0f4; color: #0e5a70; } .mark.lime { background: #e8f7e0; color: #2f6b12; } .mark.violet { background: #ede8ff; color: #4b2fbf; }
.footnote { display: flex; gap: 10px; margin: 2px 4px; font-size: 13px; line-height: 1.5; color: var(--ink-2); text-align: justify; hyphens: auto; }
.footnote b { font: 500 12px var(--mono); color: var(--accent); padding-top: 2px; }
.empty { text-align: center; }

/* ---------- Team ---------- */
.person { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; }
.avatar { width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font: 400 22px/1 var(--display); background: var(--accent); color: #fff; }
.avatar.freelance { background: var(--accent-soft); color: var(--accent); }
.avatar.lg { width: 58px; height: 58px; border-radius: 18px; font-size: 30px; }
.person-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person-body .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-amount { font: 500 14px var(--mono); color: var(--good); white-space: nowrap; }
.person-amount.neg { color: var(--bad); }
.ident { display: flex; gap: 14px; align-items: center; }
.spark { display: flex; align-items: flex-end; gap: 5px; height: 56px; }
.spark i { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--accent-mid); transform-origin: bottom; }
.spark i.cur { background: var(--accent); } .spark i.warm { background: #f2c27a; }

/* ---------- Forecast ---------- */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: #e8e7e2; }
.segmented button, .segmented label { height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-size: 13.5px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .25s var(--out), box-shadow .25s; }
.segmented .on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(23,23,26,.12); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.field .segmented label { font: 13.5px var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.field .segmented label.on { color: var(--ink); font-weight: 600; }
.segmented label { position: relative; }
.chart { position: relative; padding-top: 6px; }
.bars { display: flex; align-items: flex-end; gap: 5px; height: 150px; border-bottom: 1px solid var(--line); }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.bar-wrap em { font: 500 10px var(--mono); color: var(--accent); font-style: normal; }
.bar { width: 100%; border-radius: 5px 5px 2px 2px; background: var(--accent-mid); transform-origin: bottom; }
.bar.cur { background: var(--accent); } .bar.warm { background: #f2c27a; }
.avg { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--ink-2); opacity: .4; pointer-events: none; }
.months { display: flex; gap: 5px; padding-top: 6px; }
.months span { flex: 1; text-align: center; font: 10px var(--mono); color: var(--muted); }
.months span.cur { color: var(--ink); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 8px; height: 8px; border-radius: 2px; background: var(--accent-mid); }
.sw.warm { background: #f2c27a; } .sw.dash { width: 12px; height: 0; border-top: 1.5px dashed var(--ink-2); border-radius: 0; background: none; }
.grow { animation: grow .7s var(--out) both; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- Welcome ---------- */
.welcome { min-height: 100vh; justify-content: space-between; padding-top: 48px; padding-bottom: 40px; gap: 32px; }

/* ---------- Buttons & fields ---------- */
.btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--ink); color: #fff; font: 600 16px var(--sans); cursor: pointer; transition: transform .2s var(--spring), opacity .2s; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(23,23,26,.1); }
.btn.sm { min-height: 44px; font-size: 14px; margin: 4px 0 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font: 500 11px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
input, select { width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: 14px; background: #f1f0eb; color: var(--ink); font: 16px var(--sans); appearance: none; -webkit-appearance: none; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; background: #fff; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.error { margin: 0; color: var(--bad); font-size: 13.5px; }
.preview { padding: 6px 14px; border-radius: 16px; background: #f7f6f2; }
.preview:empty { display: none; }

/* ---------- Dock ---------- */
.dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: min(528px, calc(100% - 28px)); display: flex; align-items: center; justify-content: space-between; gap: 10px; z-index: 20; }
.tabs { position: relative; display: flex; align-items: center; gap: 2px; height: 62px; padding: 6px; border-radius: 31px; }
.tab-ind { position: absolute; left: 0; top: 6px; height: 50px; width: 50px; border-radius: 25px; background: var(--accent-soft); transition: transform .5s var(--spring), width .5s var(--spring); pointer-events: none; }
.tab { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; min-width: 50px; padding: 0 13px; border-radius: 25px; color: var(--ink-2); font-size: 13px; font-weight: 600; transition: background .35s var(--out), color .35s var(--out), padding .35s var(--out); }
.tab span { display: none; }
.tab.on { color: var(--accent); padding: 0 16px; }
.tab.on span { display: inline; animation: fadeIn .35s var(--out) both; }
.tab:active { transform: scale(.94); }
@keyframes fadeIn { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
.fab { width: 62px; height: 62px; border-radius: 31px; border: 0; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; cursor: pointer; box-shadow: 0 12px 28px rgba(23,23,26,.28), inset 0 1px 0 rgba(255,255,255,.14); transition: transform .3s var(--spring); }
.fab:active { transform: scale(.9) rotate(90deg); }

/* ---------- Sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(23,23,26,.32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s var(--out); z-index: 30; }
.scrim.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 50%; bottom: 0; width: min(560px, 100%); max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; padding: 10px 20px calc(28px + env(safe-area-inset-bottom, 0px)); border-radius: 30px 30px 0 0; background: var(--ground); box-shadow: 0 -10px 40px rgba(23,23,26,.18); transform: translate(-50%, 104%); transition: transform .5s var(--spring); z-index: 31; }
.sheet:not(.open) { visibility: hidden; transition: transform .35s var(--out), visibility 0s .35s; }
.sheet.open { transform: translate(-50%, 0); visibility: visible; }
.sheet[style*="translateY"] { transition: none; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: #d4d3cd; margin: 0 auto 6px; }
.sheet-close { position: absolute; top: 12px; right: 14px; font-size: 24px; line-height: 1; }
.sheet-title { margin: 6px 0 16px; font: 400 36px/0.95 var(--display); padding-right: 40px; }
.actions { display: flex; flex-direction: column; gap: 8px; }
.action { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 20px; background: #fff; box-shadow: var(--card-shadow); text-align: left; cursor: pointer; transition: transform .2s var(--spring); }
.action:active { transform: scale(.98); }
.action .itile { width: 38px; height: 38px; border-radius: 12px; }
.action-body { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.action > svg { color: var(--muted); }
.sheet.open .action { animation: rise .45s var(--out) both; }
.sheet.open .action:nth-child(2) { animation-delay: 30ms; } .sheet.open .action:nth-child(3) { animation-delay: 60ms; }
.sheet.open .action:nth-child(4) { animation-delay: 90ms; } .sheet.open .action:nth-child(5) { animation-delay: 120ms; }
.sheet.open .action:nth-child(6) { animation-delay: 150ms; } .sheet.open .action:nth-child(7) { animation-delay: 180ms; } .sheet.open .action:nth-child(8) { animation-delay: 210ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); padding: 12px 18px; border-radius: 16px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 10px 30px rgba(23,23,26,.25); z-index: 40; animation: toast 2.6s var(--out) both; max-width: calc(100% - 40px); text-align: center; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 12px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 600px) { .screen { padding-top: 28px; } }

/* ---------- V4.2 : Gex-IT code labels, Simple/Pro switch, interactive charts ---------- */
.code { display: inline-flex; align-items: baseline; gap: 0; font: 500 12px/1.3 var(--mono); letter-spacing: .02em; color: var(--ink-2); }
.code i { font-style: normal; color: var(--accent); opacity: .85; }
.code.warm { color: var(--warn); } .code.warm i { color: var(--warn); }
.code.tagline { font-size: 13px; color: var(--muted); margin-top: 10px; }
.hero .code { font-size: 13px; }
.hero-sub-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: -6px; font-size: 14px; color: var(--ink-2); }
.hero-sub-row .pill { margin: 0; }

.mode { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; align-items: center; height: 38px; padding: 4px; border: 0; border-radius: 19px; background: #e8e7e2; cursor: pointer; font: 600 12.5px var(--sans); color: var(--muted); min-width: 124px; }
.mode span { position: relative; z-index: 1; padding: 0 10px; text-align: center; transition: color .3s var(--out); }
.mode span:first-child { color: var(--ink); }
.mode.pro span:first-child { color: var(--muted); }
.mode.pro span:nth-of-type(2) { color: #fff; }
.mode i { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 15px; background: #fff; box-shadow: 0 1px 3px rgba(23,23,26,.14); transition: transform .4s var(--spring), background .3s var(--out); }
.mode.pro i { transform: translateX(100%); background: var(--ink); }

.chips-row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px; }
.chips-row::-webkit-scrollbar { display: none; }
.card .chips-row { margin: 0 -16px; padding: 2px 16px; }
.pick { flex-shrink: 0; height: 34px; padding: 0 14px; border: 0; border-radius: 17px; background: #fff; color: var(--ink-2); font: 500 13px var(--sans); cursor: pointer; box-shadow: 0 0 0 1px rgba(23,23,26,.07); transition: background .25s var(--out), color .25s var(--out); }
.card .pick { background: #f1f0eb; box-shadow: none; }
.pick.on { background: var(--ink); color: #fff; }

.readout { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 4px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px 0 2px; border-top: 1px solid var(--line); }
.detail-grid span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.detail-grid em { font: 500 10px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-style: normal; }
.detail-grid b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.segmented.sm { padding: 3px; border-radius: 12px; display: inline-grid; }
.segmented.sm button { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; white-space: nowrap; }

button.bar-wrap { border: 0; background: none; padding: 0; cursor: pointer; }
.bar { transition: background .25s var(--out), opacity .25s var(--out); }
.bar.sel { background: var(--accent); }
.bar.neg { background: #e8a39d; }
.bar.neg.sel { background: var(--bad); }
.bars:has(.bar.sel) .bar:not(.sel) { opacity: .55; }

/* ---------- V4.3 : charts that fit the data, comparison legend, profit split ---------- */
.chart2 svg { display: block; width: 100%; overflow: visible; }
.chart2 .c-sel { fill: var(--ink); opacity: .05; }
.chart2 .c-zero { stroke: var(--line); stroke-width: 1; }
.chart2 .c-area { opacity: .12; }
.chart2 .c-hit { cursor: pointer; }
.chart2 .c-bar { transition: opacity .25s var(--out); }
.chart2 .months { display: flex; padding-top: 6px; }
.readout2 { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: flex-end; }
.leg { display: flex; flex-direction: column; gap: 2px; }
.leg > i { display: none; }
.readout2 .leg:has(> i) { padding-left: 14px; position: relative; }
.readout2 .leg > i { display: block; position: absolute; left: 0; top: 4px; width: 8px; height: 8px; border-radius: 2px; }
.pick i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 7px; vertical-align: 1px; }
.split { position: relative; display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--accent-soft); }
.split i { display: block; background: var(--s1); border-right: 3px solid var(--surface); transition: width .8s var(--out); }
.split-legend { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0 6px; }
.split-legend span { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--ink-2); }
.split-legend span:last-child { text-align: right; align-items: flex-end; }
.split-legend b { font-size: 18px; color: var(--ink); font-weight: 500; }
.split-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.split-legend .s1 { background: var(--s1); } .split-legend .s0 { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-mid); }



.split-legend em { font-style: normal; display: inline-flex; align-items: center; }

/* ---------- V4.4 : readable charts ---------- */
.chart2 { position: relative; user-select: none; -webkit-user-select: none; }
.c-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; cursor: crosshair; }
.c-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.c-axis { stroke: #cfcec7; stroke-width: 1; }
.c-tick { font: 500 9.5px var(--mono); fill: var(--muted); }
.c-tick.r { fill: var(--s2); }
.c-month { font: 500 9.5px var(--mono); fill: var(--muted); text-transform: uppercase; }
.c-month.on { fill: var(--ink); font-weight: 700; }
.c-guide { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; opacity: .35; }
.c-val { font: 600 10.5px var(--mono); fill: var(--ink); }
.c-bar { transition: opacity .2s var(--out); }
.c-bar.dim { opacity: .38; }
.c-area { opacity: .1; }
.c-dot { stroke: var(--surface); stroke-width: 2.5; }
.enter .c-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: barup .7s var(--out) both; animation-delay: calc(180ms + var(--d, 0ms)); }
.enter .c-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1s var(--out) .2s forwards; }
.enter .c-area { animation: fade .8s var(--out) .5s both; }
@keyframes barup { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
.readout2 { display: flex; flex-direction: column; gap: 6px; min-height: 64px; }
.ro-label { font: 500 12px var(--mono); color: var(--muted); text-transform: capitalize; }
.ro-values { display: flex; gap: 18px; }
.ro-values.multi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ro { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ro-name { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro-name i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.scrubbing .money { transition: none; }
.hint { display: flex; align-items: center; gap: 6px; margin: 0; }
.hint svg { flex-shrink: 0; opacity: .7; }

/* ---------- V4.4 : motion ---------- */
.rise { animation: rise .55s var(--out) both; animation-delay: calc(var(--i, 0) * 45ms); }
.progress i, .split i { transform-origin: left center; animation: fillx 1s var(--out) .25s both; }
@keyframes fillx { from { transform: scaleX(0); } }
.hero { transition: transform .25s var(--spring), box-shadow .3s var(--out); }
@media (hover: hover) { a.card:hover, .hero:hover { box-shadow: 0 1px 1px rgba(23,23,26,.03), 0 18px 40px rgba(23,23,26,.1); } }
.pick { transition: background .25s var(--out), color .25s var(--out), transform .2s var(--spring); }
.pick:active { transform: scale(.94); }
.dock { view-transition-name: dock; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2,.8,.2,1); }
html[data-dir="fwd"]::view-transition-old(root) { animation-name: vt-out-left; }
html[data-dir="fwd"]::view-transition-new(root) { animation-name: vt-in-right; }
html[data-dir="back"]::view-transition-old(root) { animation-name: vt-out-right; }
html[data-dir="back"]::view-transition-new(root) { animation-name: vt-in-left; }
@keyframes vt-out-left { to { opacity: 0; transform: translateX(-36px); } }
@keyframes vt-in-right { from { opacity: 0; transform: translateX(36px); } }
@keyframes vt-out-right { to { opacity: 0; transform: translateX(36px); } }
@keyframes vt-in-left { from { opacity: 0; transform: translateX(-36px); } }

/* ---------- V4.4 : Pro mode, light and readable, but clearly "pro" ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.pro-tag { font: 700 10px/1 var(--mono); letter-spacing: .14em; padding: 5px 7px; border-radius: 6px; background: var(--accent); color: #fff; animation: pop .4s var(--spring) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
body { transition: background-color .45s var(--out); }
body.switching .screen { animation: modeflip .45s var(--out) both; }
@keyframes modeflip { from { opacity: .4; transform: scale(.985); } to { opacity: 1; transform: none; } }
body.pro {
  --ground: #eceef1; --line: #e1e4e9;
  --card-shadow: 0 0 0 1px #e1e4e9;
  --glass-shadow: 0 10px 28px rgba(23,23,26,.10), inset 0 0 0 1px rgba(255,255,255,.7), 0 0 0 1px rgba(23,23,26,.06);
}
html:has(body.pro) { background: #eceef1; }
body.pro .screen { gap: 10px; }
body.pro .card, body.pro .hero, body.pro .kpi, body.pro .tile { border-radius: 16px; }
body.pro .hero { box-shadow: 0 0 0 1px #e1e4e9; padding: 18px; }
body.pro .money { font-family: var(--mono); font-weight: 500; letter-spacing: -.03em; }
body.pro .money.xl { font-size: clamp(46px, 14vw, 60px); }
body.pro .money.lg { font-size: 36px; }
body.pro .money.md { font-size: 21px; }
body.pro .hero .hero-mark { color: #f2f3f5; }
body.pro .mode i { background: var(--accent); }
body.pro .mode.pro > span:nth-of-type(2) { color: #fff; }
body.pro .tab-ind { background: var(--accent); }
body.pro .tab.on { color: #fff; }
body.pro .fab { background: var(--accent); box-shadow: 0 10px 24px rgba(46,59,91,.35); }
body.pro .pick.on { background: var(--accent); }
body.pro .alert { border-radius: 16px; }
body.pro .c-grid { stroke: #dfe2e7; }
.chart2 .readout2 { align-items: stretch; }
.ro-label { text-transform: none; }
.ro-label::first-letter { text-transform: uppercase; }
body.pro .pick.on { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------- V4.5 : one palette for both modes, Simple roomier, Pro denser ---------- */
.tab-ind { background: var(--accent); }
.tab.on { color: #fff; }
.fab { background: var(--accent); box-shadow: 0 10px 24px rgba(46,59,91,.32), inset 0 1px 0 rgba(255,255,255,.14); }
.pick.on { background: var(--accent); color: #fff; }
.title .pro-tag { font-size: 10px; vertical-align: middle; margin-left: 10px; position: relative; top: -6px; }
.top .mode { min-width: 118px; height: 36px; font-size: 12px; }

/* Home */
.headline { display: flex; flex-direction: column; gap: 8px; padding: 6px 2px 2px; }
.headline .display { font-size: 60px; line-height: .9; }
.headline.good .display { color: var(--ink); }
.headline.warn .display { color: var(--warn); }
.headline.bad .display { color: var(--bad); }
.headline .badge { align-self: flex-start; text-transform: capitalize; }
.cashcard { display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 12px; }
.spark-svg { display: block; width: 100%; height: 64px; }
.sp-area { fill: var(--accent-soft); }
.sp-line { fill: none; stroke: var(--accent); stroke-width: 2.25; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.sp-low { fill: var(--warn); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.enter .sp-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--out) .25s forwards; }
.spark-legend { display: flex; justify-content: space-between; font: 500 10.5px var(--mono); color: var(--muted); }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 0; text-align: left; cursor: pointer; min-width: 0; font: inherit; color: inherit; }
.stat .tag { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-progress { display: block; height: 6px; border-radius: 3px; background: #e9ebef; overflow: hidden; }
.mini-progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transform-origin: left center; animation: fillx 1s var(--out) .3s both; }

/* VAT & tax */
.vat { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.vat:first-of-type { border-top: 0; padding-top: 0; }
.detail-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Team comparison */
.hbars { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.hbar { display: grid; grid-template-columns: minmax(0, 92px) 1fr auto; align-items: center; gap: 10px; }
.hbar-name { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 10px; border-radius: 5px; background: #eef0f3; overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: 5px; background: var(--accent-mid); transform-origin: left center; animation: fillx .8s var(--out) both; animation-delay: calc(150ms + var(--i, 0) * 60ms); }
.hbar-track i.top { background: var(--accent); } .hbar-track i.neg { background: var(--bad); }
.hbar b { font-size: 13px; font-weight: 500; }

/* Full-screen charts */
.chart-card { position: relative; }
.expand { position: absolute; top: 10px; right: 10px; z-index: 2; }
.fullscreen { position: fixed; inset: 0; z-index: 45; overflow-y: auto; background: var(--ground); padding: calc(14px + env(safe-area-inset-top, 0px)) 18px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; animation: fullin .45s var(--spring) both; }
.fullscreen .chart-card { flex: none; }
.full-head { display: flex; align-items: center; justify-content: space-between; }
.full-head .sheet-title { margin: 0; }
@keyframes fullin { from { opacity: 0; transform: scale(.96) translateY(12px); } }

/* Simple ↔ Pro: the page turns over like a card, 180°, in one continuous motion.
   Only transforms are animated (smooth on the GPU); the back face takes over at the edge. */
html[data-vt="mode"] .dock { view-transition-name: none; }
html[data-vt="mode"]::view-transition-group(root) { animation: none; }
html[data-vt="mode"]::view-transition-image-pair(root) { isolation: auto; }
html[data-vt="mode"]::view-transition-old(root),
html[data-vt="mode"]::view-transition-new(root) { transform-origin: 50% 45%; backface-visibility: hidden; -webkit-backface-visibility: hidden; mix-blend-mode: normal; will-change: transform; }
html[data-vt="mode"]::view-transition-old(root) { animation: turn-front 1.1s cubic-bezier(.42,.08,.58,.92) both, dip 1.1s cubic-bezier(.37,0,.63,1) both; }
html[data-vt="mode"]::view-transition-new(root) { animation: turn-back 1.1s cubic-bezier(.42,.08,.58,.92) both, dip 1.1s cubic-bezier(.37,0,.63,1) both; }
@keyframes turn-front { from { transform: perspective(2400px) rotateY(0deg); } to { transform: perspective(2400px) rotateY(180deg); } }
@keyframes turn-back { from { transform: perspective(2400px) rotateY(-180deg); } to { transform: perspective(2400px) rotateY(0deg); } }
@keyframes dip { 0%, 100% { scale: 1; } 50% { scale: .94; } }
body.flipping #app { animation: card-flip 1.1s cubic-bezier(.42,.08,.58,.92) both; transform-origin: 50% 40vh; will-change: transform; }
@keyframes card-flip { 0% { transform: perspective(2400px) rotateY(0); } 49.99% { transform: perspective(2400px) rotateY(90deg) scale(.94); } 50% { transform: perspective(2400px) rotateY(-90deg) scale(.94); } 100% { transform: perspective(2400px) rotateY(0); } }
.headline .display.swap { animation: hlswap .6s var(--out) both; }
@keyframes hlswap { from { opacity: 0; filter: blur(4px); transform: translateY(6px); } }

/* Le point du jour */
.ai-pop { position: fixed; z-index: 35; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); width: min(528px, calc(100% - 28px)); transform: translateX(-50%); padding: 14px 16px 14px; border-radius: 22px; background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: 0 20px 50px rgba(23,23,26,.18), 0 0 0 1px rgba(23,23,26,.06); animation: popup .7s cubic-bezier(.2,.9,.25,1.05) both; }
.ai-pop.closing { animation: popdown .38s var(--out) both; }
@keyframes popup { from { opacity: 0; transform: translate(-50%, 30px) scale(.97); } }
@keyframes popdown { to { opacity: 0; transform: translate(-50%, 24px) scale(.98); } }
.ai-head { display: flex; align-items: center; gap: 8px; }
.ai-head b { font-size: 15px; flex: 1; }
.ai-mark { width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; }
.ai-src { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ai-src i { font-style: normal; padding: 3px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.ai-lines { list-style: none; margin: 10px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ai-lines li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.35; color: var(--ink); animation: rise .5s var(--out) both; animation-delay: calc(var(--i, 0) * 90ms + 150ms); }
.ai-ic { width: 22px; flex-shrink: 0; text-align: center; }
.ai-wait { color: var(--muted); animation: breathe 1.4s ease-in-out infinite !important; }
@keyframes breathe { 50% { opacity: .45; } }
.ai-actions { display: flex; gap: 8px; }
.ai-actions .btn { flex: 1; min-height: 42px; gap: 6px; }
.ai-open { height: 30px; padding: 0 12px; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }

/* Full screen: always landscape, the chart takes the whole screen, settings in a drawer */
.fullscreen { display: block; padding: 16px; overflow: hidden; animation: none; }
.fullscreen.opening { animation: fullin .45s var(--spring) both; }
.fullscreen > .chart-card { position: absolute; inset: 16px; margin: 0; padding: 18px; overflow: hidden; }
.fullscreen .hint, .fullscreen .expand { display: none; }
.fullscreen .readout2 { padding-right: 190px; }
.full-tools { position: absolute; top: 26px; right: 26px; display: flex; gap: 8px; z-index: 3; }
.pill-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 0; border-radius: 19px; font: 600 13px var(--sans); color: var(--ink); cursor: pointer; }
.pill-btn.on { background: var(--accent); color: #fff; }
.full-scrim { position: absolute; inset: 0; z-index: 4; background: rgba(23,23,26,.18); opacity: 0; pointer-events: none; transition: opacity .3s var(--out); }
.full-scrim.open { opacity: 1; pointer-events: auto; }
.full-panel { position: absolute; top: 0; bottom: 0; left: 0; z-index: 5; width: min(320px, 70%); overflow-y: auto; padding: 22px 18px; background: var(--ground); box-shadow: 10px 0 40px rgba(23,23,26,.16); display: flex; flex-direction: column; gap: 12px; transform: translateX(-104%); transition: transform .45s var(--spring); }
.full-panel.open { transform: none; }
.full-panel .chips-row { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.full-panel .segmented { grid-auto-flow: column; }
.fullscreen.rotated { top: 0; left: 0; right: auto; bottom: auto; width: 100vh; width: 100dvh; height: 100vw; transform-origin: top left; transform: rotate(90deg) translateY(-100%); animation: none; }
.fullscreen.rotated.opening { animation: turnin .55s var(--spring) both; }
@keyframes turnin { from { opacity: 0; transform: rotate(90deg) translateY(-100%) scale(.92); } to { opacity: 1; transform: rotate(90deg) translateY(-100%); } }

/* Bars and progress only grow when you arrive on a screen, not on every change */
.mini-progress i, .progress i, .split i, .hbar-track i { animation: none; }
.enter .mini-progress i, .enter .progress i, .enter .split i { animation: fillx 1s var(--out) .25s both; }
.enter .hbar-track i { animation: fillx .8s var(--out) both; animation-delay: calc(150ms + var(--i, 0) * 60ms); }
.sheet.open .split i { animation: fillx 1s var(--out) .25s both; }
body.pro .headline .display { font-size: 48px; }
body.pro .stat { padding: 12px; }

body.pro .title { font-size: 44px; }
.top .title { min-width: 0; }

.top .title { font-size: clamp(36px, 11vw, 52px); }
body.pro .top .title { font-size: clamp(34px, 10vw, 44px); }
.headline .display { font-size: clamp(40px, 11.5vw, 56px); line-height: .95; }
body.pro .headline .display { font-size: clamp(34px, 9.5vw, 46px); }

/* ---------- Pro: a graphite background for a more serious look; cards stay white and readable ---------- */
:root { --on-ground: var(--ink); --on-ground-2: var(--muted); }
body.pro { --ground: #2a2c31; --on-ground: #f3f3f5; --on-ground-2: #a9adb7; }
html:has(body.pro) { background: #2a2c31; }
.screen > .top .title, .headline .display, .full-panel .sheet-title { color: var(--on-ground); }
.screen > p.small, .screen > .hint, .headline > .small, .screen > .footnote, .screen > .footnote span { color: var(--on-ground-2); }
body.pro .headline.warn .display { color: #f0b357; }
body.pro .headline.bad .display { color: #ff8a80; }
body.pro .screen > .banner { background: #363940; color: #d4d6dc; }
body.pro .screen > .banner .link { color: #fff; }
body.pro :is(.screen, .full-panel) > .segmented, body.pro .top .mode { background: #363940; }
body.pro :is(.screen, .full-panel) > .segmented button, body.pro :is(.screen, .full-panel) > .segmented label { color: #c9ccd3; }
body.pro :is(.screen, .full-panel) > .segmented .on { background: #fff; color: var(--ink); box-shadow: none; }
body.pro .top .mode span { color: #c9ccd3; }
body.pro .top .mode i { background: #fff; }
body.pro .top .mode.pro > span:nth-of-type(2) { color: var(--ink); }
body.pro :is(.screen, .full-panel) > .chips-row .pick, body.pro .headline .pick { background: #363940; color: #e3e5ea; box-shadow: none; }
body.pro :is(.screen, .full-panel) > .chips-row .pick.on { background: #fff; color: var(--ink); box-shadow: none; }
body.pro .screen > .link.danger { color: #ff8a80; }
body.pro .full-panel { background: #2a2c31; box-shadow: 10px 0 40px rgba(0,0,0,.35); }
body.pro .sheet { background: #f2f3f5; }
body.pro .sheet .sheet-title { color: var(--ink); }
body.pro .card, body.pro .hero, body.pro .stat, body.pro .kpi { box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.18); }
body.pro .alert { box-shadow: 0 8px 24px rgba(0,0,0,.18); }
body.pro .tab-ind { background: var(--accent); }
body.pro .fab { box-shadow: 0 10px 24px rgba(0,0,0,.4); }
body.pro .headline .display, body.pro .headline.good .display { color: var(--on-ground); }
body.pro .top .iconbtn.glass { background: #363940; color: #f3f3f5; box-shadow: none; }
body.pro .top .iconbtn .dot { box-shadow: 0 0 0 2px #363940; }

/* ---------- Pro, dark and easy on the eyes: no pure white anywhere ----------
   Graphite background, slightly lighter grey cards, off-white text, softened colours. */
body.pro {
  --ground: #24262b; --surface: #2f3238; --surface-2: #383b42; --ink: #e6e7ea; --ink-2: #c3c6cd; --muted: #989ea8; --line: #3f434a;
  --accent: #a9b9e3; --accent-soft: #364056; --accent-mid: #5b6684;
  --good: #6fcf9c; --good-soft: #243a2e; --warn: #e7b062; --warn-soft: #3b3222; --warn-tile: #4a3d26; --bad: #ef8f86; --bad-soft: #43292a;
  --s1: #a9b9e3; --s2: #e7b062; --warm-bar: #8f7444;
  --on-ground: #e6e7ea; --on-ground-2: #9ea3ad;
  --card-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 6px 18px rgba(0,0,0,.22);
  --glass: rgba(43,45,51,.86);
  --glass-shadow: 0 12px 30px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.06);
}
html:has(body.pro) { background: #24262b; }
body.pro .card, body.pro .hero, body.pro .stat, body.pro .kpi, body.pro .tile, body.pro .action { background: var(--surface); box-shadow: var(--card-shadow); }
body.pro .alert { box-shadow: none; }
body.pro .alert-body span { color: var(--ink-2); }
body.pro .glass { background: var(--glass); box-shadow: var(--glass-shadow); }
body.pro .tab { color: var(--ink-2); }
body.pro .tab-ind { background: var(--accent); }
body.pro .tab.on { color: #1f2126; }
body.pro .fab { background: var(--accent); color: #1f2126; box-shadow: 0 10px 24px rgba(0,0,0,.45); }
body.pro .top .mode, body.pro :is(.screen, .full-panel) > .segmented, body.pro .segmented { background: #33363d; }
body.pro .top .mode span, body.pro .segmented button, body.pro .segmented label { color: var(--muted); }
body.pro .top .mode i { background: #4a4e57; box-shadow: none; }
body.pro .top .mode.pro > span:nth-of-type(2) { color: var(--ink); }
body.pro .segmented .on, body.pro :is(.screen, .full-panel) > .segmented .on { background: #4a4e57; color: var(--ink); box-shadow: none; }
body.pro .pick, body.pro .card .pick, body.pro :is(.screen, .full-panel) > .chips-row .pick, body.pro .headline .pick { background: #33363d; color: var(--ink-2); box-shadow: none; }
body.pro .pick.on, body.pro .card .pick.on, body.pro :is(.screen, .full-panel) > .chips-row .pick.on { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
body.pro .top .iconbtn.glass { background: #33363d; color: var(--ink); }
body.pro .top .iconbtn .dot { box-shadow: 0 0 0 2px #33363d; }
body.pro .screen > .banner { background: #2f3238; color: var(--ink-2); }
body.pro .screen > .banner .link, body.pro .link { color: var(--ink); }
body.pro .badge { background: #33363d; }
body.pro .badge.good { background: var(--good-soft); } body.pro .badge.warn { background: var(--warn-soft); } body.pro .badge.bad { background: var(--bad-soft); }
body.pro .chip { background: var(--surface-2); color: var(--ink); }
body.pro .chip.blue { background: var(--accent-soft); color: var(--accent); }
body.pro .chip.outline { background: transparent; box-shadow: 0 0 0 1px var(--line); }
body.pro .btn { background: var(--accent); color: #1f2126; }
body.pro .btn.ghost { background: var(--surface-2); color: var(--ink); box-shadow: none; }
body.pro input, body.pro select { background: #383b42; color: var(--ink); }
body.pro input:focus, body.pro select:focus { background: #40444b; }
body.pro .preview { background: #2a2d33; }
body.pro .sheet { background: #282a30; box-shadow: 0 -10px 40px rgba(0,0,0,.5); }
body.pro .sheet .sheet-title { color: var(--ink); }
body.pro .grab { background: #4a4e57; }
body.pro .scrim { background: rgba(0,0,0,.4); }
body.pro .hero .hero-mark { color: #353840; }
body.pro .progress, body.pro .mini-progress, body.pro .hbar-track { background: #3a3d44; }
body.pro .progress i, body.pro .split i { border-right-color: var(--surface); }
body.pro .split { background: var(--accent-soft); }
body.pro .c-axis { stroke: #4a4e57; }
body.pro .c-grid { stroke: #3f434a; }
body.pro .c-guide { stroke: var(--ink); opacity: .3; }
body.pro .sp-low, body.pro .c-dot { stroke: var(--surface); }
body.pro .sp-area { fill: #364056; }
body.pro .avatar { color: #1f2126; }
body.pro .avatar.freelance { color: var(--accent); }
body.pro .itile.grey { background: #3a3d44; color: var(--ink-2); }
body.pro .mark.teal { background: #22383f; color: #8fd0e2; } body.pro .mark.lime { background: #2a3a20; color: #a7d98a; } body.pro .mark.violet { background: #322a4f; color: #c3b6ff; }
body.pro .row.total { border-top-color: #5a4a2a; }
body.pro .ai-pop { background: rgba(47,50,56,.94); box-shadow: 0 20px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.05); }
body.pro .ai-mark { background: var(--accent); color: #1f2126; }
body.pro .toast { background: #3a3d44; color: var(--ink); }
body.pro .full-panel { background: #282a30; }
body.pro .fullscreen { background: var(--ground); }
body.pro .pro-tag { background: var(--accent); color: #1f2126; }

.ai-lines.compact { margin: 2px 0; gap: 6px; }
.ai-lines.compact li { font-size: 13.5px; color: var(--ink-2); }

/* ======================================================================
   Pro = exchange-app look (Binance-like): near-black background, flat dark
   panels, Binance yellow for the main action, green / red for ups and downs.
   Our own fonts stay (Geist, Geist Mono, Bebas Neue).
   ====================================================================== */
body.pro {
  --ground: #181a20; --surface: #1e2329; --surface-2: #2b3139; --ink: #eaecef; --ink-2: #b7bdc6; --muted: #848e9c; --line: #2b3139;
  --accent: #fcd535; --accent-soft: rgba(252,213,53,.12); --accent-mid: #8f7a2a;
  --good: #0ecb81; --good-soft: rgba(14,203,129,.12); --warn: #f0b90b; --warn-soft: rgba(240,185,11,.12); --warn-tile: rgba(240,185,11,.16); --bad: #f6465d; --bad-soft: rgba(246,70,93,.12);
  --s1: #fcd535; --s2: #8d86ff; --warm-bar: #6b5a1d;
  --on-ground: #eaecef; --on-ground-2: #848e9c;
  --card-shadow: none;
  --glass: rgba(24,26,32,.96);
}
html:has(body.pro) { background: #181a20; }
body.pro .screen { gap: 12px; padding-bottom: 96px; }
body.pro .card, body.pro .hero, body.pro .stat, body.pro .kpi, body.pro .tile, body.pro .action { background: var(--surface); box-shadow: none; border-radius: 12px; }
body.pro .money { font-family: var(--sans); font-weight: 600; letter-spacing: -.02em; }
body.pro .money small { font-size: .5em; font-weight: 500; color: var(--muted); opacity: 1; }
body.pro .alert { border-radius: 12px; }
body.pro .alert.warn { background: var(--surface); box-shadow: inset 3px 0 0 var(--warn); }
body.pro .alert.bad { background: var(--surface); box-shadow: inset 3px 0 0 var(--bad); }
body.pro .alert-body b { color: var(--ink); }
body.pro .itile.accent, body.pro .itile.blue { background: var(--surface-2); color: var(--accent); }
body.pro .itile.green { background: var(--good-soft); color: var(--good); }
body.pro .itile.red { background: var(--bad-soft); color: var(--bad); }
body.pro .itile.warm { background: var(--warn-soft); color: var(--warn); }
body.pro .itile.grey { background: var(--surface-2); color: var(--ink-2); }

/* Mode switch, centred like Exchange | Wallet */
body.pro .top .mode { background: var(--surface-2); height: 34px; min-width: 128px; }
body.pro .top .mode i { background: #474d57; box-shadow: none; border-radius: 13px; }
body.pro .top .mode span { color: var(--muted); }
body.pro .top .mode.pro > span:nth-of-type(2) { color: var(--ink); }
body.pro .top .iconbtn { color: var(--ink); background: transparent; box-shadow: none; }
body.pro .top .iconbtn.glass { background: var(--surface-2); }
body.pro .top .iconbtn .dot { background: var(--accent); box-shadow: 0 0 0 2px var(--ground); }

/* Tabs and pills */
body.pro .segmented, body.pro :is(.screen, .full-panel) > .segmented { background: transparent; padding: 0; gap: 18px; grid-auto-columns: max-content; justify-content: start; border-bottom: 1px solid var(--line); border-radius: 0; }
body.pro .segmented button, body.pro .segmented label { height: 36px; padding: 0; border-radius: 0; color: var(--muted); font-weight: 600; background: transparent; position: relative; }
body.pro .segmented .on, body.pro :is(.screen, .full-panel) > .segmented .on { background: transparent; color: var(--ink); box-shadow: none; }
body.pro .segmented .on::after { content: ''; position: absolute; left: 25%; right: 25%; bottom: -1px; height: 3px; border-radius: 2px; background: var(--accent); }
body.pro .segmented.sm { border-bottom: 0; gap: 14px; }
body.pro .pick, body.pro .card .pick, body.pro :is(.screen, .full-panel) > .chips-row .pick, body.pro .headline .pick { background: var(--surface-2); color: var(--ink-2); box-shadow: none; height: 30px; padding: 0 12px; border-radius: 6px; font-size: 12.5px; }
body.pro .pick.on, body.pro .card .pick.on, body.pro :is(.screen, .full-panel) > .chips-row .pick.on { background: #474d57; color: var(--ink); box-shadow: none; }
body.pro .chip { background: var(--surface-2); color: var(--ink-2); border-radius: 4px; }
body.pro .chip.blue { background: var(--accent-soft); color: var(--accent); }
body.pro .badge { border-radius: 4px; }
body.pro .btn { background: var(--accent); color: #181a20; border-radius: 10px; }
body.pro .btn.ghost { background: var(--surface-2); color: var(--ink); }
body.pro input, body.pro select { background: var(--surface-2); color: var(--ink); border-radius: 8px; }
body.pro .screen > .banner { background: var(--surface); color: var(--ink-2); border-radius: 10px; }
body.pro .sheet { background: #1e2329; border-radius: 16px 16px 0 0; }
body.pro .grab { background: #474d57; }
body.pro .full-panel { background: #1e2329; }
body.pro .ai-pop { background: rgba(30,35,41,.97); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 0 1px #2b3139; }
body.pro .ai-mark { background: var(--accent); color: #181a20; }
body.pro .avatar { background: var(--surface-2); color: var(--accent); }
body.pro .avatar.freelance { background: var(--surface-2); color: var(--ink-2); }
body.pro .progress, body.pro .mini-progress, body.pro .hbar-track { background: var(--surface-2); }
body.pro .hbar-track i { background: #474d57; } body.pro .hbar-track i.top { background: var(--accent); }
body.pro .c-grid { stroke: #2b3139; } body.pro .c-axis { stroke: #474d57; }
body.pro .c-bar.dim { opacity: .3; }
body.pro .sp-area { fill: rgba(252,213,53,.1); } body.pro .sp-line { stroke: var(--accent); }

/* Flat bottom bar */
.bn-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); background: #181a20; border-top: 1px solid #2b3139; }
.bn-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0; border: 0; background: none; color: #848e9c; font: 500 11px var(--sans); cursor: pointer; transition: color .2s var(--out); }
.bn-tab.on { color: #eaecef; }
.bn-tab.on svg { color: #fcd535; }
.bn-plus { width: 30px; height: 30px; margin-top: -2px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: #fcd535; color: #181a20; }
.bn-tab:active { transform: scale(.94); }

/* Pro home */
.bn-top { display: grid; grid-template-columns: 1fr auto 1fr; }
.bn-top > :last-child { justify-self: end; }
.bn-balance { display: flex; flex-direction: column; gap: 6px; padding: 4px 2px 2px; }
.bn-label { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; border: 0; background: none; padding: 0; color: var(--muted); font: 500 13px var(--sans); cursor: pointer; }
.bn-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bn-big { font: 600 36px/1.05 var(--sans); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bn-big small { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-left: 6px; }
.bn-yellow { flex-shrink: 0; height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: #fcd535; color: #181a20; font: 600 14px var(--sans); cursor: pointer; transition: transform .15s var(--spring), filter .2s; }
.bn-yellow:active { transform: scale(.96); filter: brightness(.95); }
.bn-pnl { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.bn-pnl b { font-weight: 600; }
.bn-sub { font-size: 12.5px; color: var(--muted); }
.bn-shorts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 6px 0 2px; }
.bn-short { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); text-align: center; }
.bn-short span { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--ink); transition: transform .2s var(--spring), background .2s; }
.bn-short:active span { transform: scale(.92); background: #3a414c; }
.bn-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bn-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 0; border-radius: 12px; background: var(--surface); overflow: hidden; }
.bn-ch { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.bn-ch .itile { width: 24px; height: 24px; border-radius: 50%; }
.bn-num { font: 600 20px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 4px; }
.bn-chg { font: 600 12.5px var(--sans); }
.bn-mini { display: block; width: calc(100% + 24px); margin: 4px -12px 0; height: 44px; }
.bn-mini .l { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.bn-mini.up .l { stroke: #0ecb81; } .bn-mini.up .a { fill: rgba(14,203,129,.12); }
.bn-mini.down .l { stroke: #f6465d; } .bn-mini.down .a { fill: rgba(246,70,93,.12); }
.bn-panel { background: var(--surface); border-radius: 12px; padding: 4px 12px 8px; }
.bn-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); }
.bn-tabtxt { position: relative; height: 40px; border: 0; background: none; padding: 0; color: var(--muted); font: 600 15px var(--sans); cursor: pointer; }
.bn-tabtxt.on { color: var(--ink); }
.bn-tabtxt.on::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 3px; border-radius: 2px; background: #fcd535; }
.bn-head { display: grid; grid-template-columns: 1fr auto 76px; gap: 10px; padding: 10px 0 4px; font-size: 12px; color: var(--muted); }
.bn-head span:nth-child(2), .bn-head span:nth-child(3) { text-align: right; }
.bn-row { display: grid; grid-template-columns: auto 1fr auto 76px; align-items: center; gap: 10px; padding: 9px 0; }
.bn-row .itile, .bn-row .mark { width: 30px; height: 30px; border-radius: 50%; font-size: 13px; }
.bn-row .avatar.sm { width: 30px; height: 30px; border-radius: 50%; font-size: 14px; }
.bn-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bn-name b { font-size: 14.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-name span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-val { font: 600 14px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.bn-pill { justify-self: end; min-width: 68px; height: 30px; padding: 0 8px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font: 600 12.5px var(--sans); color: #fff; font-variant-numeric: tabular-nums; }
.bn-pill.up { background: #0ecb81; } .bn-pill.down { background: #f6465d; } .bn-pill.flat { background: #474d57; color: var(--ink); }
.bn .stack-sm .alert { margin: 0; }
.bn-pill.soon { background: #fcd535; color: #181a20; }
body.pro .top .title { font-size: clamp(30px, 9vw, 38px); }

/* ======================================================================
   Simple = "lite" exchange-app look: white, light grey cards, yellow for the
   one action that matters, green / red text for ups and downs. Our fonts stay
   (Bebas Neue for the big amounts, Geist for text, Geist Mono for labels).
   ====================================================================== */
body:not(.pro) {
  --ground: #ffffff; --surface: #f5f5f5; --surface-2: #eaecef; --ink: #1e2329; --ink-2: #474d57; --muted: #707a8a; --line: #eaecef;
  --accent: #1e2329; --accent-soft: #eaecef; --accent-mid: #b7bdc6;
  --good: #03a66d; --good-soft: #e6f6ef; --warn: #c99400; --warn-soft: #fdf6dd; --warn-tile: #fbeec0; --bad: #cf304a; --bad-soft: #fde8eb;
  --s1: #f0b90b; --s2: #1e2329; --warm-bar: #f5d77a;
  --on-ground: #1e2329; --on-ground-2: #707a8a;
  --card-shadow: none;
}
html:not(:has(body.pro)) { background: #ffffff; }
body:not(.pro) .screen { padding-bottom: 104px; }
body:not(.pro) .card, body:not(.pro) .stat, body:not(.pro) .kpi, body:not(.pro) .tile, body:not(.pro) .action { background: var(--surface); box-shadow: none; border-radius: 16px; }
body:not(.pro) .alert { border-radius: 16px; }
body:not(.pro) .top .mode { background: #f5f5f5; }
body:not(.pro) .top .mode i { background: #fff; box-shadow: 0 1px 3px rgba(30,35,41,.12); }
body:not(.pro) .top .mode span:first-child { color: var(--ink); }
body:not(.pro) .segmented { background: transparent; padding: 0; gap: 20px; grid-auto-columns: max-content; justify-content: start; border-bottom: 1px solid var(--line); border-radius: 0; }
body:not(.pro) .segmented button, body:not(.pro) .segmented label { height: 38px; padding: 0; border-radius: 0; background: transparent; color: var(--muted); font-weight: 600; position: relative; }
body:not(.pro) .segmented .on { background: transparent; color: var(--ink); box-shadow: none; }
body:not(.pro) .segmented .on::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: -1px; height: 3px; border-radius: 2px; background: var(--ink); }
body:not(.pro) .segmented.sm { border-bottom: 0; }
body:not(.pro) .pick, body:not(.pro) .card .pick { background: transparent; color: var(--muted); box-shadow: none; border-radius: 8px; height: 32px; font-weight: 600; }
body:not(.pro) .pick.on, body:not(.pro) .card .pick.on { background: #eaecef; color: var(--ink); }
body:not(.pro) .btn { background: #fcd535; color: #1e2329; border-radius: 12px; }
body:not(.pro) .btn.ghost { background: #f5f5f5; color: var(--ink); box-shadow: none; }
body:not(.pro) input, body:not(.pro) select { background: #f5f5f5; }
body:not(.pro) .sheet { background: #ffffff; }
body:not(.pro) .action { background: #f5f5f5; }
body:not(.pro) .screen > .banner { background: #fdf6dd; color: #6f5600; }
body:not(.pro) .screen > .banner .link { color: #1e2329; }
body:not(.pro) .itile.accent, body:not(.pro) .itile.blue { background: #fdf6dd; color: #8a6d00; }
body:not(.pro) .avatar { background: #fcd535; color: #1e2329; }
body:not(.pro) .avatar.freelance { background: #eaecef; color: var(--ink); }
body:not(.pro) .chip.blue { background: #fdf6dd; color: #8a6d00; }
body:not(.pro) .c-bar.dim { opacity: .35; }
body:not(.pro) .sp-line { stroke: #f0b90b; } body:not(.pro) .sp-area { fill: #fdf6dd; }
body:not(.pro) .ai-mark { background: #fcd535; color: #1e2329; }
body:not(.pro) .ai-pop { border-radius: 18px; }

/* Light bottom bar, icons only, yellow action in the middle */
.lt-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid #eaecef; }
.lt-tab { display: flex; justify-content: center; align-items: center; height: 44px; color: #b7bdc6; transition: color .2s var(--out), transform .2s var(--spring); }
.lt-tab.on { color: #1e2329; }
.lt-tab:active { transform: scale(.9); }
.lt-act { justify-self: center; width: 52px; height: 52px; border: 0; border-radius: 50%; background: #fcd535; color: #1e2329; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 16px rgba(240,185,11,.35); transition: transform .25s var(--spring); }
.lt-act:active { transform: scale(.9) rotate(90deg); }

/* Simple home */
.lt-top .logo { height: 30px; }
.lt-balance { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border-radius: 18px; background: #f5f5f5; }
.lt-label { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font: 500 14px var(--sans); color: var(--muted); cursor: pointer; }
.lt-amount { display: flex; align-items: center; justify-content: space-between; color: var(--ink); }
.lt-amount > span { font: 400 54px/0.95 var(--display); letter-spacing: .005em; font-variant-numeric: tabular-nums; }
.lt-amount > span small { font-size: .5em; margin-left: .12em; }
.lt-promo { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 16px 18px; border: 1px solid #eaecef; border-radius: 18px; background: #fff; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: transform .2s var(--spring); }
.lt-promo:active { transform: scale(.985); }
.lt-promo-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lt-kicker { font-size: 13px; color: var(--muted); }
.lt-promo b { font-size: 18px; line-height: 1.25; font-weight: 700; color: var(--ink); }
.lt-promo.warn b { color: var(--warn); } .lt-promo.bad b { color: var(--bad); }
.lt-promo-art { flex-shrink: 0; width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: #fcd535; color: #1e2329; transform: rotate(-6deg); box-shadow: 0 8px 18px rgba(240,185,11,.3); }
.lt-box { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; border-radius: 18px; background: #fffaf0; border: 1px solid #f8eccb; text-align: left; font: inherit; color: inherit; }
.lt-box-head { display: flex; align-items: center; gap: 8px; }
.lt-box-head b { flex: 1; font-size: 16px; }
.lt-coin { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #f0b90b; color: #fff; }
.lt-pct { font: 700 16px var(--sans); }
.lt-box-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.lt-watch { display: flex; flex-direction: column; }
.lt-tabs { display: flex; gap: 24px; padding-bottom: 6px; }
.lt-tabs button { position: relative; height: 38px; border: 0; background: none; padding: 0; font: 700 18px var(--sans); color: #b7bdc6; cursor: pointer; }
.lt-tabs button.on { color: var(--ink); }
.lt-tabs button.on::after { content: ''; position: absolute; left: 0; width: 22px; bottom: 0; height: 3px; border-radius: 2px; background: var(--ink); }
.lt-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 0; }
.lt-row .avatar.sm, .lt-row .itile { width: 40px; height: 40px; border-radius: 50%; font-size: 17px; }
.lt-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lt-name b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-name span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.lt-right b { font: 600 15px var(--sans); font-variant-numeric: tabular-nums; }
.lt-right span { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lt-pct { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.lt-pct b { font: 700 16px var(--sans); }
.lt-pct small { font-size: 11.5px; color: var(--muted); }
.lt-right b { color: var(--ink); }

/* Le point du jour: a message from your assistant */
.ai-head { gap: 10px; }
.ai-who { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ai-who b { font-size: 14.5px; }
.ai-who span { font-size: 12px; color: var(--muted); }
.ai-who i { font-style: normal; font-weight: 600; color: var(--ink-2); }
.ai-mark { border-radius: 50%; }
.ai-msg { margin: 12px 0 14px; padding: 12px 14px; border-radius: 4px 16px 16px 16px; background: var(--surface); font-size: 15px; line-height: 1.5; color: var(--ink); text-align: left; animation: rise .5s var(--out) .15s both; }
body:not(.pro) .ai-pop { background: rgba(255,255,255,.97); }
body:not(.pro) .ai-msg { background: #f5f5f5; }
body.pro .ai-msg { background: #2b3139; }
.ai-msg.typing { display: flex; gap: 5px; align-items: center; width: 64px; }
.ai-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dots 1.2s infinite ease-in-out; }
.ai-msg.typing i:nth-child(2) { animation-delay: .15s; } .ai-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ---------- Final polish: alignment, wrapping, rhythm ---------- */
.code { white-space: nowrap; }
.list-head { flex-wrap: nowrap; }
.list-head .code { flex-shrink: 0; }
.list-head > .small, .list-head > .tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.row.head > .tag, .row.head > .small { text-align: right; }
.alert-body span { text-align: left; }
.just, .lead, .hero-sub, .footnote { text-align: justify; hyphens: auto; -webkit-hyphens: auto; text-wrap: pretty; }
.small, .tag { text-wrap: pretty; }
.list-card { display: flex; flex-direction: column; padding: 2px 16px; border-radius: 16px; background: var(--surface); }
.list-card .lt-row + .lt-row { border-top: 1px solid var(--line); }
.list-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 8px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.list-sum b { font: 600 15px var(--sans); color: var(--ink); }
.lt-watch .lt-row + .lt-row { border-top: 1px solid var(--line); }
body:not(.pro) .list-card { background: #fff; padding: 0; }
body:not(.pro) .list-card .lt-row { padding: 12px 0; }
body.pro .lt-row .avatar.sm { border-radius: 50%; }
body.pro .lt-name b, body.pro .lt-right b { color: var(--ink); }
body.pro .sheet .card { background: #2b3139; }
body.pro .sheet .card .row { border-top-color: #3a414c; }
.sheet .stack > .small { text-align: left; }
.split-legend span { gap: 4px; }
.split-legend em { gap: 0; }
.chart-card .hint { justify-content: center; }
.top { min-height: 48px; }
.top .mode { flex-shrink: 0; }
.lt-row { min-height: 64px; }
.tile-top, .kpi-top { min-height: 28px; }

/* ---------- One visual language for every list: More, the + menu, sheets ---------- */
/* Icons: neutral round tiles everywhere (no more coloured squares from the old design) */
.action .itile, .line .itile, .btnline .itile, .alert .itile, .lt-row .itile, .bn-row .itile { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); color: var(--ink); }
body:not(.pro) .action .itile, body:not(.pro) .line .itile, body:not(.pro) .lt-row .itile { background: #f5f5f5; color: #1e2329; }
body:not(.pro) .alert .itile { background: rgba(255,255,255,.7); }
.line .mark { width: 40px; height: 40px; border-radius: 50%; font: 600 15px var(--sans); letter-spacing: 0; background: var(--surface-2) !important; color: var(--ink) !important; }
body:not(.pro) .line .mark { background: #f5f5f5 !important; color: #1e2329 !important; }

/* + menu: same rows as the lists */
.actions { gap: 0; }
.action { border-radius: 0; background: transparent !important; box-shadow: none !important; padding: 12px 0; border-top: 1px solid var(--line); }
.action:first-child { border-top: 0; }
.action-body b { font-size: 16px; font-weight: 600; color: var(--ink); }
.action-body .small { font-size: 13px; }
.sheet.open .action { animation: rise .45s var(--out) both; }

/* More: same type sizes and colours as the other pages */
.line { padding: 12px 0; min-height: 64px; }
.line-body b { font-size: 16px; font-weight: 600; color: var(--ink); }
.line-body .small { font-size: 13px; color: var(--muted); }
.line.slim { min-height: 52px; }
.list-head { padding: 14px 0 6px; }
.list-head .code, .card > .row.head .code, .card > .code { font: 600 15px var(--sans); letter-spacing: 0; color: var(--ink); }
.list-head .code i, .card > .row.head .code i, .card > .code i { display: none; }
.badge.sm { font: 600 11px var(--sans); letter-spacing: .02em; padding: 5px 9px; border-radius: 6px; }
body:not(.pro) .screen > .card, body:not(.pro) .screen > .list-card { background: #fff; border: 1px solid #eaecef; }
body:not(.pro) .screen > .card.pad-x { padding: 4px 16px; }

/* Pro: a deeper black, closer to the original Gex-IT black and white */
body.pro { --ground: #0b0c0e; --surface: #16181c; --surface-2: #22252b; --line: #22252b; --glass: rgba(11,12,14,.96); }
html:has(body.pro) { background: #0b0c0e; }
body.pro .bn-nav { background: #0b0c0e; border-top-color: #1c1f24; }
body.pro .sheet, body.pro .full-panel { background: #16181c; }
body.pro .sheet .card { background: #22252b; }
body.pro .ai-pop { background: rgba(22,24,28,.97); box-shadow: 0 20px 50px rgba(0,0,0,.6), 0 0 0 1px #22252b; }
body.pro .ai-msg { background: #22252b; }
body.pro .top .mode, body.pro .pick, body.pro .card .pick { background: #1c1f24; }
body.pro .top .mode i, body.pro .pick.on, body.pro .card .pick.on { background: #353a42; }
body.pro .bn-short span { background: #1c1f24; }
body.pro .bn-pill.flat { background: #353a42; }
body.pro .action .itile, body.pro .line .itile, body.pro .bn-row .itile, body.pro .lt-row .itile { background: #1c1f24; color: var(--ink); }
body:not(.pro) .lt-row .itile { background: #f5f5f5; color: #1e2329; }

/* Notifications live in the bell */
.iconbtn.bell { position: relative; }
.iconbtn.bell .count { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font: 700 10.5px var(--sans); font-style: normal; background: #f6465d; color: #fff; box-shadow: 0 0 0 2px var(--ground); }
body:not(.pro) .iconbtn.bell { background: #f5f5f5; }
.notif-list { display: flex; flex-direction: column; }
.notif { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); color: inherit; }
.notif:first-child { border-top: 0; }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); align-self: start; margin-top: 6px; }
.notif.bad .notif-dot { background: var(--bad); }
.notif-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.notif-body b { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.notif-body span { font-size: 13.5px; color: var(--muted); text-align: left; }
.notif-amount { font: 600 14px var(--sans); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lt-tabs span.on { position: relative; height: 38px; display: inline-flex; align-items: center; font: 700 18px var(--sans); color: var(--ink); }
.notif-qs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.notif-q { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); }
.notif-q .ai-mark { width: 32px; height: 32px; }
.notif-q-body b { font-size: 13px; color: var(--muted); font-weight: 500; }
.notif-q-body p { margin: 4px 0 10px; font-size: 15px; line-height: 1.45; color: var(--ink); }
.q-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.q-opts .pick { background: var(--ground) !important; color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--line) !important; }
.notif.good .notif-dot { background: var(--good); }
button.lt-row, button.bn-row { width: 100%; border: 0; background: none; padding-left: 0; padding-right: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.lt-row:active, button.bn-row:active { opacity: .7; }
.due-total { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0 6px; border-top: 2px solid var(--ink); margin-top: 4px; }
.due-total > span { display: flex; flex-direction: column; gap: 2px; }
.due-total > span b { font-size: 15px; }
.due-total > span span { font-size: 12px; color: var(--muted); }
.due-total > b { font: 600 20px var(--sans); font-variant-numeric: tabular-nums; }
body.pro .due-total { border-top-color: #353a42; }

/* iPhone app: Face ID lock screen and switches */
.lockscreen { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: var(--ground); animation: fade .3s var(--out) both; }
.lockscreen.out { opacity: 0; transition: opacity .35s var(--out); }
.lock-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 32px; text-align: center; }
.lock-logo { width: 96px; height: 96px; border-radius: 24px; background: #17171a url('../icons/icon-192.png') center / cover; }
.lock-inner b { font-size: 18px; color: var(--ink); }
.lock-inner .btn { width: auto; padding: 0 28px; }
.toggle { width: 50px; height: 30px; border-radius: 15px; background: var(--surface-2); position: relative; flex-shrink: 0; transition: background .25s var(--out); }
.toggle i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .3s var(--spring); }
.toggle.on { background: #0ecb81; }
.toggle.on i { transform: translateX(20px); }
.conn-err { margin: 4px 0 8px; text-align: left; }
.need-balance { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: 100%; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.need-balance b { font-size: 16px; }
/* stray line above "Sauvegarder mes données" */
.card.pad-x > .btnline:first-child { border-top: 0; }
.card.pad-x > .line:first-child, .card.pad-x > .btnline:first-child { border-top: 0; }
.need-balance { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; font: inherit; color: inherit; cursor: pointer; }
.need-balance b { font-size: 16px; }
.bn-row.in .itile, .lt-row.in .itile { background: rgba(14,203,129,.12) !important; color: #0ecb81 !important; }
body:not(.pro) .lt-row.in .itile { background: #e6f6ef !important; color: #03a66d !important; }
.bn-row.in .bn-val, .lt-row.in .lt-right b { color: var(--good); }
.due-months { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 0 6px; }
.due-months::-webkit-scrollbar { display: none; }
.due-months button { flex-shrink: 0; height: 32px; padding: 0 14px; border: 0; border-radius: 16px; background: var(--surface-2); color: var(--ink-2); font: 600 13px var(--sans); text-transform: capitalize; cursor: pointer; }
.due-months button.on { background: var(--ink); color: var(--ground); }
body.pro .due-months button { border-radius: 6px; background: #1c1f24; }
body.pro .due-months button.on { background: #fcd535; color: #181a20; }
body:not(.pro) .due-months button { background: #f5f5f5; }
body:not(.pro) .due-months button.on { background: #1e2329; color: #fff; }
.pay-months { padding: 2px 0 0; }
.bn-balance .pay-months { padding-top: 6px; }
.q-free { display: flex; gap: 6px; margin-top: 8px; }
.q-free input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ground); color: var(--ink); font: 14px var(--sans); }
.q-free .pick { flex-shrink: 0; }
