/* DFC Cashly · DFC Studio charte (navy, violet, yellow square, Ginto Light) + Merci Bobo backend layout */
@font-face { font-family: "Ginto"; src: url(fonts/ginto-light.woff2) format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Ginto"; src: url(fonts/ginto-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Ginto"; src: url(fonts/ginto-medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
:root {
  --navy: #0D0B35; --ink2: #474D70; --mute: #6A7095; --violet: #5B5EE8; --violet-d: #4A4DD6; --violet-bg: #EEEFFF; --lav: #F3F4FF;
  --yellow: #F7C948; --coral: #E8344A; --coral-bg: #FDECEE; --coral-d: #B3192D; --jade: #1F8B4C; --jade-bg: #E6F6EC; --jade-d: #17713D;
  --amber-bg: #FFF5D6; --amber-d: #7A5200; --mist: #F3F5FB; --band: #F9FAFD; --line: #DCE1F0; --line2: #ECEFF7; --white: #FFFFFF;
  --font: "Ginto", "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--white); color: var(--navy); font-family: var(--font); font-weight: 300; font-size: 15px; line-height: 1.5; }
a { color: var(--violet-d); }
a:hover { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.num, td.r, .r { font-variant-numeric: tabular-nums; }
.r { text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sq { display: inline-block; width: 6px; height: 6px; background: var(--yellow); margin-left: 6px; vertical-align: 2px; }
.h1sq { display: inline-block; width: .16em; height: .16em; background: var(--yellow); margin-left: .08em; }
[hidden] { display: none !important; }

/* layout */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 0 0 252px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--white);
  position: sticky; top: 0; height: 100vh; align-self: flex-start; overflow-y: auto; } /* stays put while the page scrolls */
.col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
.brand { height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 22px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--navy); }
.brand img { height: 46px; width: auto; display: block; }
.brand .sep { width: 1px; height: 26px; background: var(--line); }
.brand b { display: block; font-weight: 400; font-size: 15px; line-height: 1.2; }
.brand small { display: block; font-size: 12px; color: var(--mute); }
.nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.nav .grp { display: flex; flex-direction: column; gap: 2px; }
.nav .ttl { font-size: 11px; letter-spacing: .08em; color: var(--mute); padding: 0 12px 6px; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 10px; border-radius: 12px; color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 400; }
.nav a:hover { background: var(--lav); }
.nav a[aria-current="page"] { background: var(--violet-bg); }
.ic { flex: 0 0 32px; height: 32px; border-radius: 9px; background: var(--lav); display: inline-flex; align-items: center; justify-content: center; }
.nav a:hover .ic, .nav a[aria-current="page"] .ic { background: var(--white); }
.ic svg { width: 18px; height: 18px; }
.side-foot { margin-top: auto; padding: 12px 24px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mute); }

.top { min-height: 76px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 28px; background: rgba(255,255,255,.96); position: sticky; top: 0; z-index: 10; }
.top .grow { flex: 1 1 auto; }
.top select { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--white); font-size: 14px; max-width: 220px; }
.dd { position: relative; }
.dd-panel { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; width: 230px; padding: 18px 0 10px; background: var(--navy); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; box-shadow: 0 24px 60px rgba(13,11,53,.35); }
.dd-panel .t { display: block; padding: 0 22px 10px; font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--white); }
.dd-panel button, .dd-panel a { width: 100%; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 22px; border: 0; background: none; font-size: 15px; font-weight: 400; color: #B9BAE0; text-align: left; cursor: pointer; text-decoration: none; }
.dd-panel button:hover, .dd-panel a:hover { background: rgba(255,255,255,.08); color: var(--white); }
.dd-panel [aria-current="true"] { color: var(--white); }
.dd-panel .meta { padding: 0 22px 12px; color: #B9BAE0; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 8px; }
.dd-panel .meta b { display: block; color: var(--white); font-weight: 400; font-size: 15px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--violet); color: var(--white); font-size: 13px; font-weight: 500; cursor: pointer; }

main { flex: 1; padding: 32px 28px 56px; }
.wrap { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.eyebrow { font-size: 13px; font-weight: 400; letter-spacing: .06em; color: var(--violet-d); text-transform: uppercase; }
h1 { margin: 6px 0 0; font-weight: 300; font-size: 36px; line-height: 1.08; letter-spacing: -0.03em; }
h2 { margin: 0; font-weight: 400; font-size: 18px; }
.lead { margin: 10px 0 0; font-size: 16px; color: var(--ink2); max-width: 62ch; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumb { font-size: 13px; color: var(--mute); }
.crumb a { color: var(--mute); text-decoration: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 6px; background: var(--navy); color: var(--white); font-weight: 500; font-size: 14px; letter-spacing: .04em; border: 0; cursor: pointer; text-decoration: none; text-transform: uppercase; }
.btn:hover { background: #26245E; color: var(--white); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 8px; background: var(--white); color: var(--navy); font-size: 14px; border: 1px solid var(--line); cursor: pointer; text-decoration: none; }
.ghost:hover { background: var(--lav); color: var(--navy); }
.ghost.danger { color: var(--coral-d); }
.ghost.danger:hover { background: var(--coral-bg); }
.sm { min-height: 36px !important; padding: 0 12px !important; font-size: 13px !important; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--mute); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--coral-bg); color: var(--coral-d); }

/* cards */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .l, .tile .l { font-size: 12px; letter-spacing: .08em; color: var(--violet-d); font-weight: 400; text-transform: uppercase; }
.kpi strong { font-weight: 300; font-size: 30px; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi p, .tile p { margin: 0; font-size: 13px; color: var(--ink2); }
.tile { background: var(--mist); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile strong { font-weight: 300; font-size: 24px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.panel.lav { background: var(--lav); border-color: #DFE1F7; }
.panel-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.panel-h p { margin: 2px 0 0; font-size: 13px; color: var(--mute); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 24px; align-items: start; }
.hero-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .kpis { grid-template-columns: minmax(0, 1fr); } }
/* cash box: the DFC site's green gradient (CTA blocks) */
.cash { background: linear-gradient(180deg, var(--jade-bg) 0%, #FFFFFF 100%); border: 1px solid #CDEBD8; color: #0B4A2C; border-radius: 20px; padding: 24px 26px; display: flex; flex-direction: column; gap: 6px; }
.cash .l { font-size: 12px; letter-spacing: .08em; color: #3E7A5A; text-transform: uppercase; }
.cash strong { font-weight: 300; font-size: 44px; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cash hr { border: 0; height: 1px; background: rgba(11,74,44,.14); margin: 8px 0 4px; width: 100%; }
.cash .ent { font-size: 11px; letter-spacing: .08em; color: #3E7A5A; margin-top: 6px; text-transform: uppercase; }
.cash .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: #0B4A2C; }
.cash .row span:last-child { color: #0B4A2C; font-variant-numeric: tabular-nums; text-align: right; }
.cash .row small { color: #3E7A5A; }
.cash .foot { font-size: 12px; color: #3E7A5A; margin-top: 6px; }

/* pills */
.pill { display: inline-block; font-size: 12px; font-weight: 400; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.p-draft { background: var(--mist); color: var(--ink2); }
.p-sent, .p-info { background: var(--violet-bg); color: #3A3DC4; }
.p-partial, .p-warn, .p-todo { background: var(--amber-bg); color: var(--amber-d); }
.p-paid, .p-ok, .p-accepted, .p-done { background: var(--jade-bg); color: var(--jade-d); }
.p-late, .p-bad, .p-refused { background: var(--coral-bg); color: var(--coral-d); }
.p-none, .p-cancelled { background: var(--mist); color: var(--mute); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; vertical-align: 0; }
.ent-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* tables */
.tbl-box { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 400; font-size: 12px; letter-spacing: .06em; color: var(--mute); padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; }
.tbl td { padding: 11px 8px; border-bottom: 1px solid var(--line2); white-space: nowrap; vertical-align: middle; }
.tbl td.wrap-cell { white-space: normal; min-width: 180px; }
.tbl tbody tr.link { cursor: pointer; }
.tbl tbody tr.link:hover td { background: var(--band); }
.tbl td small { display: block; font-size: 12px; color: var(--mute); }
.tbl tfoot td { font-weight: 400; border-bottom: 0; }
.empty { padding: 28px; text-align: center; color: var(--mute); font-size: 14px; }

/* tabs / segmented */
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--mist); gap: 2px; }
.seg button { border: 0; background: transparent; color: var(--ink2); min-height: 38px; padding: 0 13px; border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 400; display: inline-flex; align-items: center; gap: 7px; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--navy); box-shadow: 0 1px 2px rgba(13,11,53,.12); }
.seg b { font-weight: 400; font-size: 12px; color: var(--mute); }

/* forms */
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; color: var(--ink2); }
.fld.wide { grid-column: 1 / -1; }
.fld input, .fld select, .fld textarea, input.cell, select.cell { font-size: 14px; font-weight: 300; color: var(--navy); border: 1px solid var(--line); border-radius: 8px; background: var(--white); min-height: 44px; padding: 0 12px; width: 100%; min-width: 0; }
.fld textarea { padding: 10px 12px; min-height: 84px; resize: vertical; line-height: 1.5; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .cell:focus { outline: 2px solid var(--violet); outline-offset: 0; border-color: var(--violet); }
.fld .hint { font-size: 12px; color: var(--mute); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--navy); }
.check input { width: 18px; height: 18px; accent-color: var(--violet); }
input.cell, select.cell { min-height: 40px; padding: 0 10px; }
input.cell.n { text-align: right; font-variant-numeric: tabular-nums; }
.lines td { padding: 4px 6px; border-bottom: 0; }
.totals { margin-left: auto; width: min(320px, 100%); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals .grand { border-top: 1px solid var(--line); padding-top: 10px; font-size: 18px; font-weight: 400; }
.err { color: var(--coral-d); font-size: 14px; }
.drop { border: 1.5px dashed #AEB9E0; border-radius: 16px; padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; background: var(--white); }
.drop.over { background: var(--lav); border-color: var(--violet); }
.drop p { margin: 0; font-size: 14px; color: var(--ink2); flex: 1 1 240px; }
.drop b { display: block; color: var(--navy); font-weight: 400; font-size: 15px; }

/* charts */
.chart { overflow-x: auto; }
.chart-in { min-width: 460px; display: flex; gap: 10px; }
.axis { display: flex; flex-direction: column; justify-content: space-between; height: 220px; font-size: 12px; color: var(--mute); text-align: right; width: 34px; font-variant-numeric: tabular-nums; }
.plot { flex: 1; display: flex; flex-direction: column; }
.bars { position: relative; height: 220px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-end; justify-content: space-between; padding: 0 4px; }
.bars .gl { position: absolute; left: 0; right: 0; height: 1px; background: #EEF0FA; }
.bars .m { display: flex; align-items: flex-end; gap: 3px; height: 100%; position: relative; z-index: 1; }
.bars .b1, .bars .b2 { width: 13px; border-radius: 3px 3px 0 0; }
.b1 { background: var(--violet); }
.b2 { background: #C9CBEF; }
.months { display: flex; justify-content: space-between; padding: 8px 4px 0; font-size: 12px; color: var(--mute); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr) 100px; gap: 12px; align-items: center; font-size: 14px; }
.track { height: 16px; background: var(--mist); border-radius: 4px; overflow: hidden; }
.track b { display: block; height: 100%; border-radius: 4px; }
.todo { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line2); text-decoration: none; color: var(--navy); min-height: 44px; }
.todo:last-child { border-bottom: 0; }
.todo span.grow { flex: 1; }
.todo small { display: block; font-size: 13px; color: var(--mute); }
.line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.line:last-child { border-bottom: 0; }
.kv { display: flex; flex-direction: column; gap: 1px; font-size: 14px; min-width: 0; }
.kv span { font-size: 12px; color: var(--mute); }
.ident { display: flex; flex-wrap: wrap; gap: 16px 22px; align-items: center; }
.mono { width: 68px; height: 68px; border-radius: 18px; background: var(--navy); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.preview { width: 100%; height: 1060px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: 10px; font-size: 14px; box-shadow: 0 12px 30px rgba(13,11,53,.3); max-width: calc(100vw - 32px); }
.toast.bad { background: var(--coral-d); }

/* auth pages: green brand panel (canvas option A1) + form */
.auth { min-height: 100vh; display: flex; background: var(--white); }
.auth-brand { flex: 0 0 44%; max-width: 640px; min-height: 100vh; position: sticky; top: 0; padding: 56px 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--navy);
  background: radial-gradient(120% 90% at 18% 8%, #5CF5A2 0%, #00D86A 42%, #00A852 100%); }
.auth-icon { width: 220px; height: 220px; border-radius: 69px; box-shadow: 0 22px 40px rgba(3,70,34,.45), 0 6px 12px rgba(3,70,34,.28); }
.auth-icon img { display: block; width: 100%; height: 100%; }
.auth-tag { margin: 56px 0 0; font-family: "Ginto", "Helvetica Neue", Arial, sans-serif; font-weight: 300; font-size: clamp(44px, 4.4vw, 64px); line-height: 1.02; letter-spacing: -.03em; }
.auth-dot { display: inline-block; width: .19em; height: .19em; margin-left: .09em; background: var(--navy); }
.auth-sub { margin: 22px 0 0; max-width: 500px; font-size: 17px; line-height: 1.55; }
.auth-side { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 28px 40px 40px; }
.auth-top { display: flex; justify-content: flex-end; }
.auth-mid { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 20px; }
.auth-card h1 { font-size: 40px; font-weight: 300; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.auth-card .lead { margin-top: -10px; font-size: 15px; }
.auth-card .fld { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #293F9E; gap: 8px; }
.auth-card .fld input, .auth-card .fld select { min-height: 50px; font-size: 16px; padding: 0 16px; text-transform: none; letter-spacing: 0; }
.auth-card .check { color: var(--ink2); }
.auth-card .check input { width: 18px; height: 18px; margin: 0; accent-color: var(--navy); }
.auth-card .btn { min-height: 52px; letter-spacing: .08em; }
.auth-card > a { align-self: flex-start; }
.auth-help { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink2); }
.pw { position: relative; display: block; }
.pw input { padding-right: 52px !important; }
.eye { position: absolute; top: 3px; right: 3px; width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.eye .off, .eye[aria-pressed="true"] .on { display: none; }
.eye[aria-pressed="true"] .off { display: block; }
.auth-langs { display: flex; gap: 6px; }
.auth-langs button { border: 0; background: none; padding: 6px 10px; min-height: 44px; min-width: 44px; border-radius: 8px; cursor: pointer; color: var(--mute); font: inherit; font-size: 14px; }
.auth-langs button[aria-pressed="true"] { color: var(--navy); background: var(--lav); }
@media (max-width: 860px) {
  .auth { flex-direction: column; }
  .auth-brand { position: static; flex: none; max-width: none; min-height: 0; padding: 36px 24px 40px; }
  .auth-icon { width: 120px; height: 120px; border-radius: 38px; }
  .auth-tag { margin-top: 28px; font-size: 38px; }
  .auth-sub { font-size: 15px; margin-top: 12px; }
  .auth-side { padding: 12px 16px 32px; }
  .auth-mid { align-items: flex-start; padding-top: 8px; }
  .auth-card h1 { font-size: 32px; }
}

@media (max-width: 900px) {
  .side { flex: 1 1 100%; border-right: 0; border-bottom: 1px solid var(--line); position: static; height: auto; overflow: visible; }
  .nav { flex-direction: row; overflow-x: auto; padding: 8px 12px; }
  .nav .grp { flex-direction: row; }
  .nav .ttl, .side-foot { display: none; }
  .nav a { white-space: nowrap; }
  main { padding: 24px 16px 48px; }
  .top { padding: 10px 16px; position: static; }
  h1 { font-size: 30px; }
  .hbar { grid-template-columns: minmax(0, 1fr) 90px; }
  .hbar .track { grid-column: 1 / -1; grid-row: 2; }
}
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.tile strong.small { font-size: 18px; line-height: 1.4; padding-top: 4px; }
/* cash card: one line per brand in CNY, accounts behind a chevron */
.cash .sub { font-size: 13px; color: #3E7A5A; font-variant-numeric: tabular-nums; }
.cash details.cb { border-bottom: 1px solid rgba(11,74,44,.10); }
.cash details.cb:last-of-type { border-bottom: 0; }
.cash summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 15px; color: #0B4A2C; }
.cash summary::-webkit-details-marker { display: none; }
.cash summary span:first-child { flex: 1; }
.cash summary .v { font-variant-numeric: tabular-nums; }
.cash summary svg { flex: none; color: #3E7A5A; transition: transform .15s; }
.cash details[open] summary svg { transform: rotate(180deg); }
.cash summary:focus-visible { outline: 2px solid #0B4A2C; outline-offset: 2px; border-radius: 4px; }
.cash .cb-in { display: flex; flex-direction: column; gap: 6px; padding: 0 24px 12px 0; }
.cash .row small { display: block; font-size: 11px; color: #4F8768; }
/* dropdowns: the style validated on the DFC client dashboard (40px, rounded, navy chevron) */
.top select, .dd-sel { height: 44px; min-width: 180px; padding: 0 34px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%230D0B35' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right 12px center; font: inherit; font-size: 14px; color: var(--navy); cursor: pointer; -webkit-appearance: none; appearance: none; }
.top select:hover, .dd-sel:hover { background-color: #F8F9FE; }
.top select:focus-visible, .dd-sel:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.top #f-year { min-width: 100px; }
.dd-field { display: inline-flex; }

/* receivables / payables */
.ar { gap: 18px; }
.ar-l { display: block; font-size: 13px; color: var(--mute); }
.ar-v { display: block; font-weight: 300; font-size: 30px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ar-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line2); }
.ar-bar b { display: block; height: 100%; }
.ar-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 14px; color: var(--ink2); }
.ar-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: 0; }
.ar-leg b { font-weight: 400; color: var(--navy); font-variant-numeric: tabular-nums; }
.ar-dd { position: relative; }
.ar-dd summary { list-style: none; display: inline-flex; align-items: center; gap: 0; min-height: 36px; padding: 0 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; }
.ar-dd summary::-webkit-details-marker { display: none; }
.ar-dd summary:hover { background: var(--lav); }
.ar-dd summary svg { margin-left: 6px; color: var(--mute); transition: transform .15s; }
.ar-dd[open] summary svg { transform: rotate(180deg); }
.ar-dd summary:focus-visible { outline: 2px solid var(--violet); outline-offset: 1px; }
.ar-pop { position: absolute; z-index: 5; left: -8px; top: calc(100% + 6px); min-width: 260px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(13,11,53,.12); padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.ar-pop .row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding: 4px 0; border-bottom: 1px solid var(--line2); }
.ar-pop .row span:last-child { color: var(--navy); font-variant-numeric: tabular-nums; }
.ar-pop a { font-size: 13px; color: var(--violet-d); padding-top: 6px; }

/* cash flow */
.cf-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: center; }
.cf-chart { position: relative; min-width: 0; }
.cf-svg { display: block; width: 100%; height: auto; }
.cf-svg text { font-family: var(--font); font-size: 12px; fill: var(--mute); font-variant-numeric: tabular-nums; }
.cf-svg text.yr { font-size: 11px; fill: var(--mute); }
.cf-svg .g { stroke: var(--line2); stroke-dasharray: 3 4; }
.cf-svg .g0 { stroke: var(--line); }
.cf-svg .cf-area { fill: #5C69E2; fill-opacity: .08; }
.cf-svg .cf-line { fill: none; stroke: #5C69E2; stroke-width: 2.2; stroke-linejoin: round; }
.cf-svg .cf-dot { fill: var(--white); stroke: #5C69E2; stroke-width: 2; }  /* hub look: hollow points, filled on hover */
.cf-svg .cf-dot.on { fill: #5C69E2; }
.cf-svg .cf-hit { fill: transparent; cursor: pointer; }
.cf-tip { position: absolute; transform: translateX(-50%); background: var(--navy); color: var(--white); border-radius: 10px; padding: 8px 12px; font-size: 12px; pointer-events: none; display: flex; flex-direction: column; gap: 1px; white-space: nowrap; box-shadow: 0 8px 20px rgba(13,11,53,.2); }
.cf-tip b { font-weight: 500; font-size: 13px; }
.cf-tip span { color: #AEB9E0; }
.cf-tip strong { font-weight: 400; font-size: 14px; font-variant-numeric: tabular-nums; }
.cf-leg { margin: 0; display: flex; flex-direction: column; gap: 18px; text-align: right; }
.cf-leg dt { font-size: 13px; color: var(--ink2); }
.cf-leg dt i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; }
.cf-leg dd { margin: 2px 0 0; font-weight: 300; font-size: 20px; color: var(--navy); font-variant-numeric: tabular-nums; }
.cf-leg dd span { font-size: 14px; color: var(--mute); }
@media (max-width: 1100px) { .cf-body { grid-template-columns: minmax(0, 1fr); } .cf-leg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; } }
@media (max-width: 560px) { .cf-leg { grid-template-columns: minmax(0, 1fr); } .ar-pop { min-width: 220px; } }
.cf.busy .cf-body { opacity: .5; transition: opacity .15s; }
.sub-h { margin: 8px 0 0; font-size: 15px; font-weight: 400; }
/* quote validity band: thin, full width, sticky under the header (yellow = expired, green = still valid) */
.qband { position: sticky; top: 76px; z-index: 9; margin: -32px -28px 22px; min-height: 44px; padding: 6px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; border-bottom: 1px solid; }
.qband .lb { font-weight: 500; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.qband span b { font-weight: 500; }
.qband .grow { flex: 1; }
.qband.exp { background: var(--amber-bg); border-color: #F0D98A; color: var(--amber-d); }
.qband.ok { background: var(--jade-bg); border-color: #BFE6CD; color: var(--jade-d); }
.qb-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 14px; border-radius: 8px; background: #FFFFFF; border: 1px solid #E6CF7E; color: var(--amber-d); font: inherit; font-size: 13px; font-weight: 400; cursor: pointer; }
.qb-btn:hover { background: #FFFBEB; }
.qb-btn:focus-visible { outline: 2px solid var(--amber-d); outline-offset: 1px; }
.qb-gauge { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; }
.qb-gauge .bar { width: 140px; height: 6px; border-radius: 3px; background: #CDEBD8; overflow: hidden; display: inline-block; }
.qb-gauge .bar b { display: block; height: 100%; background: var(--jade); }
@media (max-width: 900px) { .qband { top: 0; margin: -24px -16px 18px; padding: 6px 16px; } .qb-gauge .bar { width: 90px; } }

/* quotes list: number pill coloured by status (green active, yellow expired, blue accepted, red refused, plain draft) */
.qnum { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink2); font-size: 14px; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qn-valid { background: var(--jade-bg); color: var(--jade-d); border-color: #BFE6CD; }
.qn-expired { background: var(--amber-bg); color: var(--amber-d); border-color: #F0D98A; }
.qn-accepted { background: var(--violet-bg); color: #3B3EC4; border-color: #C9CCF2; }
.qn-refused { background: var(--coral-bg); color: var(--coral-d); border-color: #F5C2C9; }
.tbl td .qnum + small { margin-top: 4px; padding-left: 2px; }
.fdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.fd-draft { border: 1.5px solid var(--mute); box-sizing: border-box; }
.fd-valid { background: var(--jade); }
.fd-expired { background: #D9A400; }
.fd-accepted { background: var(--violet); }
.fd-refused { background: var(--coral); }
.mute { color: var(--mute); }

/* change log under the preview */
.lg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lg-item { padding: 14px 0; border-top: 1px solid var(--line2); }
.lg-item:first-child { border-top: 0; padding-top: 4px; }
.lg-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lg-h b { font-weight: 400; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--violet); flex: none; }
.lg-dot.lg-extend { background: var(--jade); }
.lg-dot.lg-status { background: #D9A400; }
.lg-ch { margin: 8px 0 0 19px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ink2); }
.lg-ch b { font-weight: 400; color: var(--navy); }
.lg-item > .hint { margin: 6px 0 0 19px; }

/* client profitability */
.pp-dates { display: flex; flex-wrap: wrap; gap: 12px; }
.pp-dates .fld { width: 200px; }
.pp-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pp-kpis > div { background: var(--lav); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.pp-kpis .l { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--violet-d); }
.pp-kpis strong { font-weight: 300; font-size: 30px; font-variant-numeric: tabular-nums; }
.pp-kpis p { margin: 0; font-size: 13px; color: var(--mute); }
.pp-kpis .pp-m.pos { background: var(--jade-bg); } .pp-kpis .pp-m.pos .l, .pp-kpis .pp-m.pos strong { color: var(--jade-d); }
.pp-kpis .pp-m.neg { background: var(--coral-bg); } .pp-kpis .pp-m.neg .l, .pp-kpis .pp-m.neg strong { color: var(--coral-d); }
.pp-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.pp-body h3 { margin: 0 0 10px; font-size: 14px; font-weight: 400; color: var(--ink2); }
.pp-chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.pp-col { flex: 1 0 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pp-bars { display: flex; align-items: flex-end; gap: 2px; height: 122px; }
.pp-bars b { display: block; width: 8px; min-height: 1px; border-radius: 3px; } /* bar corners rx 3, as on the DFC hub */
.pp-col span { font-size: 11px; color: var(--mute); }
.pp-list summary { cursor: pointer; color: var(--violet-d); font-size: 14px; min-height: 32px; display: flex; align-items: center; }
@media (max-width: 900px) { .pp-kpis, .pp-body { grid-template-columns: minmax(0, 1fr); } }

/* ---------- User menu (same as the Merci Bobo and DFC dashboards) */
.um { position: relative; flex: none; }
.um-btn { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 4px 12px 4px 4px; border: 0; border-radius: 999px; background: transparent; font-size: 15px; font-weight: 400; color: var(--navy); cursor: pointer; transition: background .15s; }
.um-btn:hover, .um:hover .um-btn, .um.is-open .um-btn { background: #E6E9FA; }
.um-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.um-chev { transition: transform .15s; color: var(--ink2); flex: none; }
.um-first { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um.is-open .um-chev { transform: rotate(180deg); }
.um-av { width: 40px; height: 40px; border-radius: 50%; background: var(--violet); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; letter-spacing: .02em; overflow: hidden; flex: none; }
.um-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.um-av.huge { width: 64px; height: 64px; font-size: 20px; }
.um-panel { display: none; position: absolute; right: 0; top: 100%; padding-top: 8px; z-index: 30; }
.um:hover .um-panel, .um.is-open .um-panel { display: block; }
.um-in { width: 270px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 8px 0; box-shadow: 0 18px 40px rgba(13, 11, 53, .14); }
.um-who { display: flex; align-items: center; gap: 12px; padding: 8px 14px 10px; }
.um-id { display: flex; flex-direction: column; min-width: 0; }
.um-id b { font-weight: 500; font-size: 14px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-id small { font-size: 12px; color: var(--mute); }
.um-sep { height: 1px; background: #EEF0F7; margin: 6px 0; }
.um-it { width: 100%; display: flex; align-items: center; gap: 12px; padding: 6px 14px; border: 0; background: none; font-size: 14px; font-weight: 400; color: var(--navy); text-decoration: none; text-align: left; cursor: pointer; }
.um-it:hover { background: var(--band); color: var(--navy); }
.um-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--lav); color: var(--violet); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.um-out .um-ic { background: var(--coral-bg); color: var(--coral-d); }
.um-lang { cursor: default; }
.um-lang:hover { background: none; }
.um-langs { margin-left: auto; display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--lav); }
.um-langs button { border: 0; background: none; font-size: 12px; color: var(--ink2); padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.um-langs button[aria-pressed="true"] { background: var(--white); color: var(--navy); box-shadow: 0 1px 2px rgba(13,11,53,.12); }
@media (max-width: 560px) { .um-first { display: none; } .um-btn { padding-right: 8px; } }

/* ---------- Users page */
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; }
.sec-head h2 { font-size: 20px; font-weight: 400; }
.u-form .sub { margin: 4px 0 0; font-size: 13px; color: var(--mute); max-width: 70ch; }
.u-form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.u-form-row .u-name { flex: 1 1 200px; } .u-form-row .u-email { flex: 1 1 260px; } .u-form-row .u-role-f { flex: 0 1 260px; }
.u-form-row input:disabled { background: var(--mist); color: var(--mute); }
.u-form-btns { display: flex; gap: 10px; margin-left: auto; }
.u-msg { margin: 0; min-height: 1em; font-size: 13px; }
.u-msg.err { color: var(--coral-d); }
.u-table td { vertical-align: middle; }
.u-table tr.off td { color: var(--mute); }
.u-who { display: inline-flex; align-items: center; gap: 10px; }
.u-who .um-av { width: 32px; height: 32px; font-size: 11px; }
.u-who > span:last-child { display: flex; flex-direction: column; }
.u-who b { font-weight: 500; }
.u-acts { display: flex; flex-wrap: wrap; gap: 4px 6px; justify-content: flex-end; }
.u-act { border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 400; color: var(--navy); cursor: pointer; white-space: nowrap; text-decoration: none; }
.u-act:hover { background: var(--lav); color: var(--navy); }
.u-act.danger { color: var(--coral-d); border-color: #F2C3CA; }
.u-act.danger:hover { background: var(--coral-bg); }
.u-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.u-role { padding: 16px 18px; border-radius: 14px; background: #F8F9FE; border: 1px solid #EEF0FA; font-size: 13px; line-height: 1.5; color: var(--ink2); }
.u-role b { display: block; margin-bottom: 4px; font-weight: 500; color: var(--navy); font-size: 14px; }

/* ---------- Activity log */
.aud-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; }
.aud-f { display: inline-flex; flex-direction: column; gap: 4px; }
.aud-f span { font-size: 11px; letter-spacing: .06em; color: var(--mute); padding-left: 2px; text-transform: uppercase; }
.aud-f .dd-sel { min-width: 200px; }
.dd-sel.on { border-color: var(--violet); }
.aud-acts { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--mute); }
.dc-link { font-size: 13px; color: var(--violet-d); background: none; border: 0; padding: 4px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.dc-link:hover { color: var(--navy); }
table.u-audit { min-width: 860px; font-size: 13px; }
.u-audit td.ev-bad { color: var(--coral-d); }
.u-audit tr.mon td { padding: 18px 10px 8px; border-bottom: 2px solid var(--violet); background: none; }
.u-audit tr.mon:first-child td { padding-top: 8px; }
.u-audit .mon-t { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; color: var(--navy); }
.u-audit .mon-t svg { color: var(--violet); }
.u-audit tr.mon small { display: inline; margin-left: 10px; font-size: 12px; color: var(--mute); font-weight: 400; }
.u-audit tr.day td { background: #F8F9FE; color: var(--navy); font-weight: 500; border-bottom: 4px solid var(--white); cursor: pointer; }
.u-audit tr.day.open td { background: var(--lav); }
.u-audit tr.day td:first-child { border-radius: 8px 0 0 8px; } .u-audit tr.day td:last-child { border-radius: 0 8px 8px 0; }
.u-audit tr.day:hover td { background: var(--violet-bg); }
.u-audit tr.day td small { display: inline; color: var(--mute); font-weight: 400; margin-left: 8px; }
.u-audit tr.day td.bad-n { text-align: right; }
.u-audit tr.day td.bad-n span { display: inline-block; font-size: 11px; font-weight: 400; padding: 2px 9px; border-radius: 999px; background: var(--coral-bg); color: var(--coral-d); }
.u-audit tr.ev td:first-child { color: var(--mute); padding-left: 46px; white-space: nowrap; }
.u-audit tr.ev td.wrap-cell { white-space: normal; min-width: 260px; }
.tb-tog { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; margin: -4px 6px -4px -4px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--violet); cursor: pointer; vertical-align: middle; }
.tb-tog svg { transition: transform .15s; }
.tb-tog[aria-expanded="true"] svg { transform: rotate(90deg); }
.tb-tog:hover { background: rgba(91, 94, 232, .14); }

/* ---------- Modals (users, profile) */
.u-modal { position: fixed; inset: 0; z-index: 60; background: rgba(13,11,53,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.u-card { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--white); border-radius: 18px; padding: 26px; box-shadow: 0 24px 60px rgba(13,11,53,.3); }
.u-card h3 { margin: 0 0 10px; font-weight: 400; font-size: 20px; }
.u-card p { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--ink2); }
.u-card > div > input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--navy); }
.u-temp { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; padding: 14px 16px; border-radius: 12px; background: var(--lav); }
.u-temp code { flex: 1; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 18px; letter-spacing: .04em; color: var(--navy); word-break: break-all; }
.u-modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn.danger { background: var(--coral-d); }
.btn.danger:hover { background: #8F1424; }
.pf-card { max-width: 460px; }
.pf-photo { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; }
.pf-photo-act { display: flex; flex-direction: column; gap: 6px; }
.pf-photo-act small { font-size: 12px; color: var(--mute); }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-mail { margin-top: 12px; }
.pf-mail input:disabled { background: var(--mist); color: var(--mute); }
.pf-note { margin: 6px 0 0 !important; font-size: 12px !important; color: var(--mute) !important; }
.pf-msg { min-height: 1em; margin: 10px 0 0 !important; font-size: 13px !important; }
.pf-msg.err { color: var(--coral-d) !important; } .pf-msg.ok { color: var(--jade-d) !important; }
@media (max-width: 480px) { .pf-grid { grid-template-columns: 1fr; } }

/* ---------- Client logos */
.mono.has-logo, .cl-logo.has-logo { background: var(--white); border: 1px solid var(--line); }
.mono img, .cl-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mono.has-logo img { padding: 8px; }
.cl-cell { display: inline-flex; align-items: center; gap: 12px; }
.cl-logo { width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; flex: none; overflow: hidden; }
.cl-logo.has-logo img { padding: 3px; }
.logo-pick { display: flex; align-items: center; gap: 18px; padding-bottom: 18px; margin-bottom: 4px; border-bottom: 1px solid var(--line2); }
.logo-act { display: flex; flex-direction: column; gap: 6px; }
.logo-act b { font-weight: 400; font-size: 14px; }
.logo-act small { font-size: 12px; color: var(--mute); }
.mono { overflow: hidden; }
/* Small client logo before client names (empty slot when there is no logo, so names stay aligned) */
.cn { display: inline-flex; align-items: center; gap: 10px; vertical-align: middle; }
.cn-logo { width: 28px; height: 28px; border-radius: 8px; flex: none; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.cn-logo.has-logo { background: var(--white); border: 1px solid var(--line); }
.cn-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; display: block; }
.cl-cell .cn-logo { width: 36px; height: 36px; border-radius: 10px; }
.cn-logo.big { width: 56px; height: 56px; border-radius: 14px; }
.cn-logo.big img { padding: 6px; }
.doc-ident { display: flex; align-items: center; gap: 16px; min-width: 0; }

/* ---------- Analysis page */
.an-range { margin: -8px 0 0; font-size: 13px; color: var(--mute); }
.an-dates { margin-top: -6px; }
.an-kpis { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .an-kpis { grid-template-columns: minmax(0, 1fr); } }
.an-kpi { background: var(--lav); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.an-kpi .l { font-size: 12px; letter-spacing: .08em; color: var(--violet-d); font-weight: 400; text-transform: uppercase; }
.an-kpi strong { font-weight: 300; font-size: 30px; letter-spacing: -0.01em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.an-kpi .n { font-size: 13px; color: var(--ink2); }
.an-evo { display: inline-block; font-size: 12px; font-weight: 400; padding: 2px 8px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-evo.up { color: var(--jade-d); background: var(--jade-bg); }
.an-evo.down { color: var(--coral-d); background: var(--coral-bg); }
.an-evo.none { color: var(--mute); padding: 0; }
.an-bars { display: flex; flex-direction: column; gap: 16px; }
.an-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px 12px; align-items: center; font-size: 14px; }
.an-bar .nm { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.an-bar .nm i, .an-sec i, .an-pill i { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.an-bar .v { text-align: right; font-variant-numeric: tabular-nums; }
.an-bar .track { height: 14px; background: var(--mist); border-radius: 999px; overflow: hidden; display: block; }
.an-bar .track b { display: block; height: 100%; border-radius: 999px; }
.an-bar .p { text-align: right; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums; min-width: 56px; }
.an-hint { margin: 14px 0 0; font-size: 13px; color: var(--mute); }
.an-svg { width: 100%; height: auto; display: block; }
.an-svg text { font-size: 12px; fill: var(--mute); }
.an-svg text.tv { font-size: 13px; fill: var(--ink2); }
.an-svg line.g { stroke: var(--line2); }
.an-svg line.g0 { stroke: var(--line); }
#an-chart .legend { margin-top: 10px; }
.an-sec { display: inline-flex; align-items: center; gap: 8px; }
.an-rate { display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.an-rate .track { width: 90px; height: 8px; border-radius: 999px; background: var(--mist); overflow: hidden; display: inline-block; }
.an-rate .track b { display: block; height: 100%; }
.an-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--mist); color: var(--ink2); white-space: nowrap; }
.an-tbl td.neg { color: var(--coral-d); }
.an-tbl tr.tot td { font-weight: 500; border-bottom: 0; }
.head .actions .seg { margin-right: 4px; }

/* ---------- New client side panel (from a quote / invoice) */
body.nc-lock { overflow: hidden; }
.nc-back { position: fixed; inset: 0; background: rgba(13,11,53,.38); z-index: 80; }
.nc-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: var(--white); box-shadow: -16px 0 40px rgba(13,11,53,.18); z-index: 81; display: flex; flex-direction: column; }
.nc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 26px 28px 18px; border-bottom: 1px solid var(--line2); }
.nc-head h2 { margin: 4px 0 0; font-weight: 300; font-size: 30px; letter-spacing: -0.02em; }
.nc-head p { margin: 6px 0 0; font-size: 14px; color: var(--ink2); }
.nc-x { flex: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; }
.nc-body { flex: 1; overflow-y: auto; padding: 22px 28px; display: flex; flex-direction: column; gap: 18px; }
.nc-logo { padding-bottom: 0; margin: 0; border: 0; }
.nc-logo .mono { width: 64px; height: 64px; border-radius: 16px; border: 1px dashed #B9BAE0; background: var(--band); color: var(--mute); font-size: 12px; font-weight: 300; }
.nc-logo .mono.has-logo { border-style: solid; }
.nc-sec { border: 0; padding: 0; margin: 0; min-width: 0; }
.nc-sec legend { font-size: 14px; font-weight: 400; padding: 0; margin-bottom: 8px; }
.nc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nc-chip { position: relative; cursor: pointer; }
.nc-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nc-chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink2); font-size: 14px; font-weight: 400; }
.nc-chip span svg { display: none; }
.nc-chip:hover span { border-color: #B9BAE0; }
.nc-chip input:checked + span { border-color: var(--violet); background: var(--violet-bg); color: var(--violet-d); }
.nc-chip input:checked + span svg { display: inline; }
.nc-chip input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.nc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nc-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.nc-row2 .fld, .nc-row3 .fld { min-width: 0; }
.nc-body textarea { min-height: 76px; }
.nc-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 28px; border-top: 1px solid var(--line2); background: var(--band); }
@media (max-width: 560px) {
  .nc-row2, .nc-row3 { grid-template-columns: 1fr; }
  .nc-head, .nc-body, .nc-foot { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Suppliers */
.sup-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.sup-search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--mute); }
.sup-search input { border: 0; outline: 0; flex: 1; min-width: 0; height: 100%; font: inherit; font-size: 14px; background: transparent; color: var(--navy); }
.sup-search:focus-within { outline: 2px solid var(--violet); outline-offset: 1px; }
.cat-dot { display: inline-flex; align-items: center; gap: 8px; }
.cat-dot i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.sup-tbl small.neg, .sal-tbl small.neg { color: var(--coral-d); }
.sal-tbl small.ok { color: var(--jade-d); }
.sp-tabs-p { padding: 10px; }
.sp-tabs { width: 100%; }
.sp-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .sp-grid { grid-template-columns: minmax(0, 1fr); } }
.sp-chart { height: 170px; }
.sp-hbar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.sp-cli { display: flex; flex-direction: column; gap: 12px; }
/* ---------- Salaries */
.sal-band { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--amber-bg); color: var(--amber-d); font-size: 14px; }
.sal-band svg { flex: none; }
.sal-band a { color: inherit; }
.emp-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.emp-pick-l { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--violet-d); }
.emp-dd { position: relative; flex: 0 1 420px; min-width: 260px; }
.emp-dd-btn { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 14px 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); text-align: left; cursor: pointer; font: inherit; color: var(--navy); }
.emp-dd-btn:hover { border-color: #B9BAE0; }
.emp-dd-btn[aria-expanded="true"] { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-bg); }
.emp-dd-btn b, .emp-opt b { display: block; font-weight: 400; font-size: 15px; line-height: 1.25; }
.emp-dd-btn small, .emp-opt small { display: block; font-size: 13px; color: var(--mute); }
.emp-dd-btn .grow, .emp-opt .grow { flex: 1; min-width: 0; }
.emp-dd-panel { position: absolute; left: 0; top: calc(100% + 6px); width: max(100%, 380px); max-width: calc(100vw - 32px); background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(13,11,53,.16); padding: 10px; z-index: 40; display: flex; flex-direction: column; gap: 8px; }
.emp-dd-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.emp-opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 10px; color: var(--navy); text-decoration: none; }
.emp-opt:hover { background: var(--mist); }
.emp-opt[aria-current="true"] { background: var(--violet-bg); }
.emp-opt .r { font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.emp-grp { padding: 10px 10px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.emp-dd-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 6px 2px; border-top: 1px solid var(--line2); font-size: 14px; }
.emp-dd-foot .dc-link { display: inline-flex; align-items: center; gap: 6px; }
.emp-av { width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; flex: none; }
.emp-av.ov { background: var(--lav); color: var(--violet-d); }
.emp-av.big { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; }
.emp-nav { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; color: var(--navy); text-decoration: none; }
.sal-emp { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .sal-emp { grid-template-columns: minmax(0, 1fr); } }
.emp-card { display: flex; flex-direction: column; gap: 12px; }
.emp-id { display: flex; align-items: center; gap: 14px; }
.emp-id b { display: block; font-weight: 400; font-size: 18px; }
.emp-id small { color: var(--mute); font-size: 13px; }
.emp-kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line2); font-size: 14px; }
.emp-kv span { color: var(--mute); }
.emp-kv b { font-weight: 400; text-align: right; }
.emp-act { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 6px; }
.sal-k3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sal-tbl td small { display: block; font-size: 12px; }
.ps-file { font-size: 11px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--violet-d); margin-left: 4px; }
.ps-form { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 90px; }
.ps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.ps-sum { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--lav); font-size: 15px; }
.ps-sum b { font-weight: 500; font-variant-numeric: tabular-nums; }
.ps-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ps-foot .grow { flex: 1; }
.ps-pdf { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.emp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.emp-form .wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .emp-form { grid-template-columns: 1fr; } .emp-dd { min-width: 0; flex-basis: 100%; } }
.empty-box { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.emp-dd-panel .sup-search { flex: none; }

/* invoice / quote lines: multi-line description (first line = title, next lines = details) */
textarea.cell.desc { display: block; width: 100%; min-height: 40px; padding: 9px 10px; line-height: 1.45; resize: none; overflow: hidden; font-family: inherit; }
.lines td { vertical-align: top; }
.lines td[data-tot] { padding-top: 14px; }

/* Payments made (canvas "Paiements émis" + preview drawer, 14 Nov 2026) */
.spm-tbl tr[aria-current] td { background: var(--violet-bg); }
.spd-back { position: fixed; inset: 0; background: rgba(13,11,53,.18); z-index: 60; }
.spd { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: var(--white); border-left: 1px solid var(--line); box-shadow: -24px 0 60px rgba(13,11,53,.14); z-index: 61; padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; outline: 0; }
.spd-top { display: flex; align-items: center; gap: 8px; }
.spd-top .eyebrow { margin: 0; }
.spd-h { font-weight: 300; font-size: 30px; letter-spacing: -.02em; margin: 0; }
.spd-sub { margin: 6px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--ink2); }
.spd-amt { background: var(--lav); border-radius: 16px; padding: 16px 20px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.spd-amt .l { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--violet-d); }
.spd-amt strong { display: block; font-weight: 300; font-size: 30px; }
.spd-amt p { margin: 0; text-align: right; color: var(--ink2); font-size: 14px; }
.spd-amt small { display: block; color: var(--mute); }
.spd-list { display: flex; flex-direction: column; }
.spd-kv { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.spd-kv > span:first-child { color: var(--mute); }
.spd-kv > span:last-child { text-align: right; }
.spd-proof { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; background: var(--band); padding: 14px 16px; }
.spd-proof small { display: block; color: var(--mute); font-size: 13px; }
.spd-proof b { font-weight: 400; }
.spd-doc { width: 40px; height: 40px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); color: var(--violet-d); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.spd-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.spf-bills { display: flex; flex-direction: column; gap: 8px; }
.spf-bill { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.spf-bill:has(input[type=checkbox]:checked) { border-color: #BFE6CD; background: var(--jade-bg); }
.spf-bill input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--navy); flex: none; }
.spf-bill b { font-weight: 400; display: block; }
.spf-bill small { display: block; color: var(--mute); font-size: 13px; }
.spf-bill.late small { color: var(--coral-d); }
.spf-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.spf-amt input { width: 130px; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 14px; text-align: right; color: var(--navy); background: var(--white); }
.spf-amt input:disabled { background: var(--mist); color: var(--mute); }
.ps-grid2 { grid-template-columns: minmax(140px, 180px) 1fr 1fr; }
@media (max-width: 760px) {
  .spd { padding: 18px 16px; }
  .spf-bill { flex-wrap: wrap; }
  .spf-amt { width: 100%; align-items: stretch; }
  .spf-amt input { width: 100%; }
  .ps-grid2 { grid-template-columns: 1fr; }
}
@media print {
  body.print-spd .side, body.print-spd .top, body.print-spd #view .wrap > :not(.spd), body.print-spd .spd-back, body.print-spd .spd-top, body.print-spd .spd-foot, body.print-spd .spd-proof label { display: none !important; }
  body.print-spd .spd { position: static; width: auto; box-shadow: none; border: 0; padding: 0; overflow: visible; }
}

/* ---------- Analysis hub (Cockpit) */
.hub-rev { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.hub-rev .l { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--violet-d); }
.hub-rev strong { font-weight: 300; font-size: 30px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.hub-tiles { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .hub-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hub-tiles { grid-template-columns: minmax(0, 1fr); } .hub-rev { align-items: flex-start; } }
.hub-tile { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hub-tile-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hub-tile-h .l { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--violet-d); font-weight: 400; }
.hub-st { font-size: 12px; font-weight: 400; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.hub-st.st-ok { color: var(--jade-d); background: var(--jade-bg); }
.hub-st.st-warn { color: var(--amber-d); background: var(--amber-bg); }
.hub-st.st-bad { color: var(--coral-d); background: var(--coral-bg); }
.hub-st.st-none { color: var(--mute); background: var(--mist); }
.hub-tile-v { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.hub-tile-v strong { font-weight: 300; font-size: 30px; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hub-spark { flex: none; }
.hub-tile p { margin: 0; font-size: 13px; color: var(--ink2); }
.hub-tile small { font-size: 12px; color: var(--mute); }
.hub-watch { display: flex; flex-direction: column; gap: 8px; }
.hub-w { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 14px; border-radius: 12px; color: var(--navy); text-decoration: none; font-size: 14px; }
.hub-w i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hub-w .grow { flex: 1; min-width: 0; }
.hub-w .go { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.hub-w .go svg { transform: rotate(-90deg); }
.hub-w.st-bad { background: var(--coral-bg); } .hub-w.st-bad i { background: var(--coral-d); } .hub-w.st-bad .go { color: var(--coral-d); }
.hub-w.st-warn { background: var(--amber-bg); } .hub-w.st-warn i { background: #B07A00; } .hub-w.st-warn .go { color: var(--amber-d); }
.hub-w.st-ok { background: var(--jade-bg); } .hub-w.st-ok i { background: var(--jade-d); } .hub-w.st-ok .go { color: var(--jade-d); }
.hub-w:hover { filter: brightness(.98); }
.hub-fams { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; } /* every card of a row as tall as the tallest one (user, 14 Nov 2026) */
@media (max-width: 1100px) { .hub-fams { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hub-fams { grid-template-columns: minmax(0, 1fr); } }
.hub-fam { gap: 0; }
.hub-fam-h { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; }
.hub-fam-h i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.hub-fam-h h3 { margin: 0; font-weight: 400; font-size: 16px; }
.hub-fam-h .mute { margin-left: auto; font-size: 12px; }
.hub-rep { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 0; border-top: 1px solid var(--line2); color: var(--navy); text-decoration: none; font-size: 14px; }
.hub-rep small { display: block; font-size: 12px; color: var(--mute); }
.hub-rep svg { transform: rotate(-90deg); flex: none; color: var(--mute); }
a.hub-rep:hover { color: var(--violet-d); }
.hub-rep.off { color: var(--ink2); }
.hub-soon { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--mist); color: var(--mute); white-space: nowrap; }
.seg a.seg-a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 13px; border-radius: 7px; color: var(--ink2); text-decoration: none; font-size: 14px; font-weight: 400; }
.seg a.seg-a[aria-current="true"] { background: var(--white); color: var(--navy); box-shadow: 0 1px 2px rgba(13,11,53,.12); }
.pnl-tbl td.tot, .pnl-tbl th.tot { background: var(--lav); }
.pnl-tbl tr.strong td { font-weight: 500; }
.pnl-tbl tr.res td { background: var(--lav); }
.pnl-tbl tr.res td.tot { background: #E4E6FF; }
.pnl-tbl td.neg { color: var(--coral-d); }
.pnl-tbl tr.rate td { font-size: 13px; color: var(--ink2); }
.an-bar .v.neg { color: var(--coral-d); }

/* ---------- Reports: 90-day forecast, DSO */
.an-kpi strong.neg { color: var(--coral-d); }
.fc-alert { background: var(--coral-bg); color: var(--coral-d); }
.fc-tbl td.ok, .tbl td.ok { color: var(--jade-d); }
.fc-tbl td.neg, .tbl td.neg { color: var(--coral-d); }
.fc-tbl td small { display: block; font-size: 12px; color: var(--mute); }
.fc-k { display: inline-block; font-size: 12px; font-weight: 400; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.fc-in { color: var(--jade-d); background: var(--jade-bg); }
.fc-bill { color: var(--amber-d); background: var(--amber-bg); }
.fc-pay { color: var(--coral-d); background: var(--coral-bg); }
.fc-rec { color: var(--violet-d); background: var(--violet-bg); }
.dso-chart { height: 170px; }

/* ---------- Invoices / quotes: full-width list + split view (Zoho-like structure, 14 Nov 2026) */
#view.full { padding: 20px 24px 40px; }
#view.full .wrap { max-width: none; gap: 16px; }
.lh { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lh-t { display: flex; align-items: baseline; gap: 14px; }
.lh-t h1 { font-size: 36px; margin: 0; }
.lh-t .mute { font-size: 13px; }
.lband { display: flex; flex-wrap: wrap; align-items: stretch; background: var(--lav); border-radius: 14px; padding: 14px 0; }
.lb { flex: 1 1 170px; display: flex; flex-direction: column; gap: 2px; padding: 0 22px; border-left: 1px solid var(--line); min-width: 0; }
.lb:first-child { border-left: 0; }
.lb .l { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--violet-d); white-space: nowrap; }
.lb strong { font-weight: 400; font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb strong.warn { color: #B07A00; } .lb strong.bad { color: var(--coral-d); }
.lb small { font-size: 12px; color: var(--mute); }
.ltools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.l-search { flex: 0 1 300px; }
.lt-box { border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.lt { font-size: 14px; }
.lt th { background: var(--band); position: sticky; top: 0; z-index: 1; }
.lt td, .lt th { padding-left: 14px; padding-right: 14px; }
.lt td.nw, .lt th { white-space: nowrap; }
.lt .lnum { color: var(--violet-d); text-decoration: none; font-weight: 400; }
.lt .lnum:hover { text-decoration: underline; }
.lt .c-subj .ell { display: inline-block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; color: var(--ink2); }
.lt .sm-subj { display: none; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt td.neg { color: var(--coral-d); }
@media (max-width: 1380px) {
  #view.full { padding: 16px 16px 32px; }
  .lt .c-co, .lt .c-subj { display: none; }
  .lt .sm-subj { display: block; }
  .lb { padding: 0 16px; }
  .lt td, .lt th { padding-left: 10px; padding-right: 10px; }
}
#view.split { padding: 0; }
.split { display: flex; height: calc(100vh - 77px); min-height: 520px; }
.sl { flex: 0 0 360px; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--white); }
.sl-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 14px 10px; }
.sl-t { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 400; color: var(--navy); text-decoration: none; }
.sl-t svg { color: var(--violet-d); transform: rotate(90deg); }
.sl-new { width: 38px; height: 38px; border-radius: 8px; background: var(--navy); color: var(--white); display: inline-flex; align-items: center; justify-content: center; }
.sl-q { margin: 0 14px 10px; flex: none; height: 40px; }
.sl-list { flex: 1; overflow-y: auto; border-top: 1px solid var(--line2); }
.sl-it { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-bottom: 1px solid var(--line2); color: var(--navy); text-decoration: none; }
.sl-it:hover { background: var(--band); }
.sl-it[aria-current="page"] { background: var(--violet-bg); }
.sl-r1 { display: flex; justify-content: space-between; gap: 10px; }
.sl-cl { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 400; }
.sl-cl > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-cl .cn-logo { width: 22px; height: 22px; }
.sl-amt { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl-r2 { font-size: 13px; color: var(--mute); }
.sl-r3 { display: flex; align-items: center; gap: 8px; }
.sl-r3 small { font-size: 12px; color: var(--mute); }
.sl-f { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.sp { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--band); }
.sp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px; background: var(--white); border-bottom: 1px solid var(--line); }
.sp-id { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.sp-id h1 { margin: 0; font-size: 24px; font-weight: 300; letter-spacing: -0.01em; }
.sp-id .mute { font-size: 13px; }
.sp-nav { display: flex; gap: 6px; flex: none; }
.sp-nav .icon-btn { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; color: var(--navy); text-decoration: none; }
.sp-nav .icon-btn.off { color: var(--line); }
.sp-nav .sp-x { color: var(--coral-d); }
.sp-back { display: none; align-items: center; gap: 4px; color: var(--violet-d); text-decoration: none; font-size: 14px; }
.sp-back svg { transform: rotate(90deg); }
.sp-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 22px; background: var(--white); border-bottom: 1px solid var(--line2); }
.sp-tabs { margin-left: auto; }
.sp-body { flex: 1; overflow-y: auto; padding: 16px 22px 40px; display: flex; flex-direction: column; gap: 14px; }
.sp-body .qband { position: static; }
.sp-kv { display: flex; flex-wrap: wrap; gap: 8px 28px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.sp-kv div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sp-kv span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.sp-kv b { font-weight: 400; font-size: 14px; font-variant-numeric: tabular-nums; }
.sp-kv .neg { color: var(--coral-d); }
.sp-pay { background: var(--white); border: 1px solid var(--line); border-radius: 12px; }
.sp-pay summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; font-size: 14px; }
.sp-pay summary::-webkit-details-marker { display: none; }
.sp-pay summary .mute { margin-left: auto; font-size: 13px; }
.sp-pay summary svg { transform: rotate(-90deg); transition: transform .15s; }
.sp-pay[open] summary svg { transform: none; }
.sp-pay .tbl-box { padding: 0 16px 10px; }
.sp-n { font-weight: 400; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--violet-bg); color: var(--violet-d); }
.sp-frame { height: 1120px; }
@media (max-width: 1100px) { .sl { flex-basis: 300px; } }
@media (max-width: 860px) {
  .split { height: auto; min-height: 0; }
  .sl { display: none; }
  .sp-back { display: inline-flex; }
  .sp-top { flex-wrap: wrap; padding: 12px 16px; }
  .sp-bar, .sp-body { padding-left: 16px; padding-right: 16px; }
}

/* phones: the menu row scrolls instead of widening the page */
@media (max-width: 900px) { .side { min-width: 0; max-width: 100%; } .nav { min-width: 0; max-width: 100%; } }

/* the split view and the full-width list always take the whole width of the page (main is a flex row) */
.split { flex: 1 1 auto; width: 100%; min-width: 0; }
#view.full .wrap { flex: 1 1 auto; width: 100%; min-width: 0; }

/* split view: the grey margins around the invoice shrink by 20% on each side, that space goes to the list (14 Nov 2026) */
@media (min-width: 1101px) { .sl { flex: 0 0 clamp(360px, calc(360px + (100% - 1044px) * 0.2), 560px); } }

/* every page full width, like the invoices list (user, 14 Nov 2026): 24 px margins, 16 px on smaller windows */
main#view { padding: 20px 24px 40px; }
#view .wrap { max-width: none; width: 100%; flex: 1 1 auto; min-width: 0; gap: 18px; }
@media (max-width: 1380px) { main#view { padding: 16px 16px 32px; } }
main#view.split { padding: 0; }

/* ---------- Overview: 25 % left empty on the right on big screens, revenue/expense bars + expense donut (14 Nov 2026) */
@media (min-width: 1600px) { #view.dash .wrap { max-width: 75%; margin: 0; } }
.ch-row { align-items: stretch; }
.ch-box { position: relative; }
.ch-svg text.yr { font-size: 11px; fill: var(--mute); }
.ch-hit { fill: transparent; cursor: default; }
.ch-hit:hover { fill: rgba(92,105,226,.05); }
.ch-tip { z-index: 5; }
.ch-tip span { display: inline-flex; align-items: center; gap: 6px; }
.ch-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.don { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 24px; align-items: center; }
@media (max-width: 640px) { .don { grid-template-columns: minmax(0, 1fr); } }
.don-svg { width: 100%; height: auto; display: block; overflow: visible; }
.ch-arc { cursor: default; transition: opacity .15s; }
.don-svg.hov .ch-arc { opacity: .18; }
.don-svg.hov .ch-arc.on { opacity: 1; }
.don-l { font-size: 13px; fill: var(--mute); }
.don-v { font-size: 20px; fill: var(--navy); font-weight: 400; }
.don-leg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.don-leg li { display: flex; align-items: center; gap: 10px; }
.don-leg i { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.don-leg .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.don-leg .mute { font-size: 13px; }
.don-leg b { font-weight: 400; font-variant-numeric: tabular-nums; min-width: 90px; text-align: right; }

/* ---------- Overview treasury box: royal-blue lavender gradient (like the DFC client dashboard "Facturation" card) and bottom aligned with the KPI cards (user, 14 Nov 2026) */
.hero { align-items: stretch; }
.cash { background: linear-gradient(135deg, #E6E8FF 0%, #F1F1FF 55%, #FAFAFF 100%); border: 1px solid #C9CBF5; color: var(--navy); }
.cash .l, .cash .ent { color: var(--violet-d); }
.cash hr { background: rgba(91,94,232,.18); }
.cash .row, .cash .row span:last-child, .cash summary { color: var(--navy); }
.cash .row small, .cash .sub, .cash summary svg { color: var(--ink2); }
.cash details.cb { border-bottom-color: rgba(91,94,232,.14); }
.cash summary:focus-visible { outline-color: var(--violet); }
.cash .foot { color: var(--ink2); margin-top: auto; padding-top: 10px; }

/* ---------- exchange rates: one row per currency, add / remove */
.rates-p { align-self: start; }
#rf .rt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 16px; }
#rf .rt-row { display: flex; align-items: flex-end; gap: 8px; }
#rf .rt-row .fld { flex: 1 1 auto; min-width: 0; }
#rf .rt-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
#rf .rt-add .fld { flex: 0 1 200px; }
#rf .rt-add .rt-code { flex: 0 1 120px; }
#rf .hint { margin: 10px 0 0; font-size: 12px; color: var(--mute); }
#rf .actions { margin-top: 16px; }
