/* Finance — trésorerie, dépenses, résultat, associés. Uniquement ce qui est propre à cet écran ; le reste vient de base.css
   (listes, kpi, notice, seg) et de tasks.css (panneau latéral .drawer). Couleurs : variables du thème (clair et sombre). */
.fin-kpis { margin-bottom: 4px; }
.fin-kpi { text-align: left; display: block; width: 100%; }
button.fin-kpi:active { opacity: .6; }
.fin-kpi .v { font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-kpi.neg .v { color: var(--red); }
.fin-ks { margin-top: 2px; line-height: 1.3; }
.fin-sh { margin: 18px 16px 6px; gap: 8px; }
.fin-sh .section-title { display: flex; align-items: center; gap: 8px; }
.fin-st { margin-left: 8px; text-transform: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.fin-val { text-align: right; flex: none; font-size: 17px; max-width: 46%; }
.fin-val .small { font-size: 13px; }
.list > .item.fin-neg .fin-val .num:first-child { color: var(--red); }
.list > .item.fin-dim { opacity: .55; }
.list > .item.fin-late .small.muted { color: var(--red); }
.fin-note { margin: 6px 16px 10px; line-height: 1.4; }
.fin-cellv { color: var(--muted); text-align: right; max-width: 60%; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fin-hint { color: var(--muted); font-weight: 400; font-size: 12px; }
.fin-switch { font-size: 17px; color: var(--text); font-weight: 400; display: flex; }
.fin-clip { color: var(--muted); display: inline-flex; }
.fin-amt { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.fin-amt .seg { min-height: 44px; }
.fin-amt .seg button { min-width: 44px; }
.fin-bar .grow { min-width: 0; }
.fin-meter { height: 6px; border-radius: 3px; background: var(--fill); margin-top: 6px; overflow: hidden; }
.fin-meter i { display: block; height: 100%; border-radius: 3px; }

/* graphique */
.fin-chartcard { padding: 12px 12px 10px; margin-top: 4px; }
.fin-ch { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0 4px 6px; flex-wrap: wrap; }
.fin-chartbox { position: relative; touch-action: pan-y; }
.fin-chart { width: 100%; height: auto; display: block; }
.fin-chart .grid { stroke: var(--line); stroke-width: 1; }
.fin-chart .zero { stroke: var(--line-2); stroke-width: 1.5; }
.fin-chart .ax { fill: var(--muted); font: 400 11px var(--font); }
.fin-chart .seg { stroke: var(--surface); stroke-width: 1; }
.fin-chart .net { stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.fin-chart .hit:hover { fill: var(--hover); }
.fin-tip { position: absolute; z-index: 5; min-width: 200px; max-width: 260px; padding: 10px 12px; border-radius: 14px; background: var(--material); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-lg); font-size: 13px; pointer-events: none; display: flex; flex-direction: column; gap: 3px; }
.fin-tip[hidden] { display: none; }
.fin-tt { border-top: .5px solid var(--line-2); padding-top: 4px; margin-top: 2px; }
.fin-tr { gap: 10px; }
.fin-sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.fin-sw.line { height: 2px; border-radius: 1px; background: var(--text); width: 12px; }
.fin-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 4px 0; font-size: 13px; color: var(--muted); }
.fin-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* compte de résultat */
.fin-pnlbox { padding: 4px 0; }
.fin-pnl { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 420px; }
.fin-pnl th, .fin-pnl td { padding: 9px 12px; border-bottom: .5px solid var(--line-2); white-space: nowrap; }
.fin-pnl thead th { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.fin-pnl tbody th { text-align: left; font-weight: 400; position: sticky; left: 0; background: var(--surface); }
.fin-pnl tbody th.sub { padding-left: 24px; color: var(--muted); }
.fin-pnl td.num, .fin-pnl th.num { text-align: right; }
.fin-pnl td.cmp, .fin-pnl th.cmp { color: var(--muted); }
.fin-pnl tr.total th, .fin-pnl tr.total td { font-weight: 600; }
.fin-pnl tr.net th, .fin-pnl tr.net td { font-weight: 700; border-bottom: 0; font-size: 17px; }
.fin-pnl tr:last-child th, .fin-pnl tr:last-child td { border-bottom: 0; }
.fin-pnl .link { color: inherit; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; font: inherit; }
.fin-hold { min-width: 300px; }

/* dépense : panneau, reçu */
.fin-drawer .dhead h2 { font-size: 17px; }
.fin-dtop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px 2px; text-align: center; }
.fin-big { font-family: var(--rounded); font-size: 40px; font-weight: 700; letter-spacing: -.02em; }
.fin-status { font-size: 15px; font-weight: 600; }
.fin-dfoot { justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.fin-dfoot .grow { flex: 1; }
.fin-rcpt { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 10px; }
.fin-rcpt-img { width: 84px; height: 112px; object-fit: cover; border-radius: 10px; background: var(--fill); flex: none; }
.fin-rcpt-none { width: 84px; height: 112px; border-radius: 10px; background: var(--fill); color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12px; text-align: center; flex: none; padding: 6px; }
.fin-rcpt .btn { justify-content: flex-start; }
.fin-rcpt-big { display: block; padding: 0; width: 100%; }
.fin-rcpt-big img { display: block; width: 100%; max-height: 360px; object-fit: contain; background: var(--fill); }
.fin-photo { display: block; width: 100%; max-height: 75vh; object-fit: contain; border-radius: 12px; }

@media (max-width: 640px) {
  .fin-kpis { grid-template-columns: 1fr 1fr; }
  .fin-kpi .v { font-size: 20px; }
  .fin-kpi { padding: 12px 14px; }
  .fin-val { font-size: 16px; }
  .fin-pnl { font-size: 14px; }
  .fin-pnl th, .fin-pnl td { padding: 8px 10px; }
}

/* société d'une saisie (choisie avant d'ouvrir le formulaire) et en-têtes de section avec logo */
.fin-bizrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--fill); font-size: 17px; font-weight: 600; color: var(--text); }
.fin-bizhead { display: inline-flex; align-items: center; gap: 8px; }
.list > .item.fin-lead { --sep-left: 58px; }
/* [GPT 2026-10-26] Daily actions precede account details; historical cash flow opens on demand. */
.fin-daily-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.fin-daily-actions>.item{display:flex;align-items:center;gap:14px;text-align:left;color:var(--text);font-size:15px;border-radius:16px;background:var(--surface);min-height:88px;padding:16px}.fin-daily-actions .grow{min-width:0}.fin-daily-actions .small{font-size:12px}.fin-flow-details{margin:16px 0}.fin-flow-details>summary{cursor:pointer;padding:16px;background:var(--surface);border-radius:14px;font-weight:600;font-size:14px}.fin-flow-details[open]>summary{margin-bottom:12px}
@media(max-width:640px){.fin-daily-actions{grid-template-columns:1fr}.fin-daily-actions>.item{min-height:72px}}

/* [Claude 2026-11-06] MON2-28: tap targets ≥ 44 px on the POS / tablet — P&L drill links and the reconciliation rows. */
.fin-pnl td .link{display:inline-flex;align-items:center;min-height:44px;padding:0 6px;margin:-12px -6px;font:inherit}
.fin-recon-row{cursor:pointer;min-height:48px}.fin-recon-row input[type=checkbox]{width:26px;height:26px;flex:none}
/* [Claude 2026-11-07] UX w0 (owner walk): on a 390 px phone the amount column was cut (« $1 »). Labels wrap, comparisons
   (previous period, last year) stay in the KPI cards above, and the table fits the screen. */
@media (max-width: 480px) {
  .fin-pnl { min-width: 0; font-size: 13px; }
  .fin-pnl th, .fin-pnl td { padding: 7px 6px; }
  .fin-pnl tbody th { white-space: normal; overflow-wrap: anywhere; position: static; }
  .fin-pnl tbody th.sub { padding-left: 12px; }
  .fin-pnl td.cmp, .fin-pnl th.cmp { display: none; }
  .fin-pnl tr.net th, .fin-pnl tr.net td { font-size: 15px; }
}
