.fi-topbar { height:62px; display:flex; justify-content:space-between; align-items:center; padding:0 36px; background:white; border-bottom:1px solid var(--line); }
.fi-brand { font-size:26px; font-weight:800; letter-spacing:-1px; color:var(--ink); }
.fi-brand span { color:var(--mint); }
.fi-topbar-actions { display:flex; align-items:center; gap:20px; }
.fi-topbar-actions > a { display:flex; align-items:center; gap:7px; font-size:12px; }
.fi-topbar .icon { width:16px; }
.fi-page { max-width:1480px; margin:auto; padding:32px 36px 48px; }
.fi-page-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:27px; }
.fi-page-heading h1 { font-size:30px; }
.fi-page-heading p { color:var(--muted); font-size:12px; margin-top:5px; }
.fi-actions { display:flex; align-items:center; gap:9px; }
.fi-actions .button { padding:10px 15px; font-size:12px; }
.fi-actions .icon { width:16px; height:16px; }
.fi-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:27px; background:white; border:1px solid var(--line); border-radius:13px; padding:23px 0 18px; }
.fi-summary section { display:flex; flex-direction:column; padding:0 24px; min-width:0; border-right:1px solid var(--line); }
.fi-summary section:last-child { border-right:0; }
.fi-summary span { color:var(--muted); font-size:12px; }
.fi-summary strong { font-size:29px; font-weight:600; margin-top:7px; letter-spacing:-.035em; white-space:nowrap; }
.fi-summary .balance strong { color:var(--petrol); }
.fi-summary .month { background:#fafcfb; margin:-23px 0 -18px; padding:23px 24px 18px; border-radius:0 13px 13px 0; }
.fi-summary small { min-height:18px; font-size:10px; color:var(--muted); margin-top:7px; }
.fi-summary .balance small { color:#9e6157; }
.fi-toolbar { display:flex; gap:12px; justify-content:space-between; align-items:center; margin-bottom:19px; }
.fi-search { display:flex; gap:10px; align-items:center; max-width:400px; width:100%; border:1px solid var(--line); background:white; border-radius:8px; padding:9px 12px; }
.fi-search .icon { color:var(--muted); width:17px; height:17px; flex-shrink:0; }
.fi-search input { padding:0; border:0; background:transparent; min-width:0; width:100%; font-size:12px; outline:none; }
.fi-search:focus-within { border-color:#70b8b5; box-shadow:0 0 0 2px #006d7710; }
.fi-client-filter select,.fi-status-filter select { background:white; border:1px solid var(--line); border-radius:8px; padding:9px 30px 9px 11px; font-size:12px; max-width:260px; }
.fi-records { border:1px solid var(--line); border-radius:13px; background:white; overflow:hidden; }
.fi-records-header { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:0 20px; border-bottom:1px solid var(--line); min-height:65px; }
.fi-tabs { display:flex; gap:25px; align-self:stretch; }
.fi-tabs button { position:relative; padding:20px 0; color:var(--muted); font-weight:550; font-size:13px; white-space:nowrap; }
.fi-tabs button.selected { color:var(--petrol); }
.fi-tabs button.selected:after { content:""; position:absolute; height:2px; bottom:-1px; left:0; right:0; background:var(--petrol); }
.fi-tabs span { font-weight:400; margin-left:4px; font-size:11px; color:var(--muted); }
.fi-status-filter select { border:0; padding-right:25px; font-size:11px; color:var(--muted); max-width:170px; }
.fi-table-scroll { overflow-x:auto; }
.fi-table { width:100%; border-collapse:collapse; text-align:left; min-width:900px; }
.fi-table th { color:var(--muted); font-size:10px; font-weight:500; white-space:nowrap; padding:12px 18px; background:#fafcfb; }
.fi-table td { padding:18px; border-top:1px solid var(--line); font-size:12px; vertical-align:middle; }
.fi-table td:first-child { min-width:150px; }
.fi-table td small { display:block; font-size:10px; color:var(--muted); margin-top:4px; }
.fi-date { white-space:nowrap; }
.fi-record-name { min-width:190px; max-width:330px; }
.fi-record-name strong { font-size:12px; font-weight:500; display:block; overflow-wrap:anywhere; }
.fi-client-name { display:block; color:var(--petrol); font-weight:600; margin-bottom:4px; font-size:12px; text-align:left; }
.fi-client-name:hover { text-decoration:underline; text-underline-offset:3px; }
.fi-row-note { white-space:pre-wrap; overflow-wrap:anywhere; max-width:300px; }
.fi-table .amount { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.fi-table .muted { color:var(--muted); }
.fi-table .fi-balance { font-weight:600; }
.fi-status { display:inline-block; font-size:10px; white-space:nowrap; color:var(--muted); }
.fi-status.overdue { color:#a35246; }
.fi-status.paid { color:var(--petrol); }
.fi-void-row td { color:var(--muted); background:#fbfcfb; }
.fi-void-row .fi-record-name strong { text-decoration:line-through; text-decoration-color:#c7cfca; }
.fi-row-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; white-space:nowrap; }
.fi-text-action { color:var(--petrol); font-size:11px; font-weight:550; }
.fi-text-action:hover { text-decoration:underline; text-underline-offset:3px; }
.fi-icon-action { display:grid; place-items:center; width:29px; height:29px; border-radius:6px; color:var(--muted); }
.fi-icon-action .icon { width:16px; height:16px; }
.fi-icon-action:hover { background:#edf5f1; color:var(--petrol); }
.fi-void-action:hover { background:#f9eeec; color:var(--danger); }
.fi-empty { min-height:275px; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:12px; padding:28px 20px; text-align:center; color:var(--muted); }
.fi-empty > .icon { width:36px; height:36px; color:#9cafaa; margin-bottom:3px; }
.fi-empty h3 { font-size:15px; font-weight:500; color:var(--muted); }
.fi-empty p { font-size:12px; }
.fi-loading { display:block; width:20px; height:20px; border:2px solid var(--line); border-top-color:var(--petrol); border-radius:50%; animation:fi-spin .8s linear infinite; }
@keyframes fi-spin { to { transform:rotate(360deg); } }
.fi-error { margin:0 0 15px; font-size:12px; color:var(--danger); white-space:pre-wrap; overflow-wrap:anywhere; }
.fi-error[hidden] { display:none; }
#fi-error-retry { margin-bottom:16px; }
#fi-error-retry[hidden] { display:none; }
.fi-readonly { color:var(--muted); font-size:12px; margin-bottom:17px; }
.fi-backdrop { z-index:130; background:#142c2855; backdrop-filter:blur(3px); }
.fi-modal { width:480px; border-radius:15px; animation:none; }
.fi-modal .modal-header { padding:20px 23px 17px; }
.fi-modal .modal-header h2 { font-size:19px; }
.fi-modal .modal-body { padding:22px 23px; }
.fi-modal .modal-footer { padding:16px 23px 19px; background:white; border-radius:0 0 15px 15px; }
.fi-modal .button { font-size:12px; }
.fi-form-fields { min-width:0; border:0; padding:0; margin:0; }
.fi-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:17px 14px; }
.fi-field { min-width:0; display:flex; flex-direction:column; gap:7px; font-size:12px; }
.fi-field.full { grid-column:1/-1; }
.fi-field > span { display:flex; justify-content:space-between; align-items:center; }
.fi-optional { color:var(--muted); font-size:10px; }
.fi-field input,.fi-field select,.fi-field textarea { display:block; width:100%; min-width:0; border:1px solid #dce5df; border-radius:7px; background:white; padding:10px 11px; font-size:13px; }
.fi-field textarea { line-height:1.5; }
.fi-field input[name="amount"] { font-size:22px; font-variant-numeric:tabular-nums; letter-spacing:-.02em; }
.fi-modal .fi-error { margin:16px 0 0; }
.fi-void-note { font-size:12px; color:var(--muted); margin-top:18px; }
.fi-uncertain { margin-top:14px; color:#9e6157; font-size:12px; }
.fi-history-heading { display:grid; gap:5px; padding-bottom:22px; }
.fi-history-heading strong { font-size:15px; }
.fi-history-heading span { font-size:12px; color:var(--muted); }
.fi-history-event { border-top:1px solid var(--line); padding:20px 0; }
.fi-history-event:last-child { padding-bottom:0; }
.fi-history-event > div { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.fi-history-dot { width:6px; height:6px; border-radius:50%; background:var(--petrol); }
.fi-history-dot.void { background:#ad655b; }
.fi-history-event strong { font-size:12px; font-weight:550; }
.fi-history-event time { color:var(--muted); font-size:10px; margin-left:auto; }
.fi-history-event p { font-size:11px; color:var(--muted); margin-top:8px; }
.fi-history-reason { white-space:pre-wrap; overflow-wrap:anywhere; }
.fi-history-event dl { display:grid; gap:7px; margin:15px 0 0; font-size:11px; }
.fi-history-event dl > div { display:flex; justify-content:space-between; gap:15px; }
.fi-history-event dt { color:var(--muted); }
.fi-history-event dd { margin:0; font-variant-numeric:tabular-nums; }
.finance-client-modal { width:min(1100px,calc(100vw - 40px)); }
.finance-client-modal > .modal-body { padding:22px; }
.fi-panel { padding:0; max-width:none; }
.fi-panel .fi-page-heading { margin-bottom:20px; }
.fi-panel .fi-page-heading h1 { font-size:22px; }
.fi-panel .fi-summary { grid-template-columns:repeat(3,minmax(0,1fr)); margin-bottom:20px; padding:17px 0 12px; }
.fi-panel .fi-summary strong { font-size:25px; }
.fi-panel .fi-summary section { padding:0 20px; }
.fi-panel .fi-table { min-width:780px; }
.fi-panel .fi-record-name { min-width:155px; }
.fi-panel .fi-table th,.fi-panel .fi-table td { padding-left:13px; padding-right:13px; }
.fi-panel .fi-empty { min-height:220px; }
@media(max-width:1100px) { .fi-summary strong { font-size:25px; } .fi-summary section { padding-left:18px; padding-right:18px; } .fi-summary .month { padding-left:18px; padding-right:18px; } }
@media(min-width:801px) and (max-width:1100px) {
  .fi-table { min-width:780px; }
  .fi-table th,.fi-table td { padding-left:11px; padding-right:11px; }
  .fi-table td:first-child { min-width:90px; }
  .fi-record-name { min-width:140px; max-width:220px; }
  .fi-table td { font-size:11px; }
  .fi-row-actions { gap:4px; }
  .fi-icon-action { width:25px; height:27px; }
  .fi-panel .fi-table { min-width:760px; }
  .fi-panel .fi-table th,.fi-panel .fi-table td { padding-left:10px; padding-right:10px; }
  .fi-panel .fi-record-name { min-width:140px; }
}
@media(max-width:800px) { .fi-page { padding:25px 20px 35px; } .fi-panel { padding:0; } .fi-topbar { padding:0 20px; } .fi-summary { grid-template-columns:1fr 1fr; gap:22px 0; padding:20px 0; } .fi-summary section:nth-child(2) { border-right:0; } .fi-summary .month { margin:0; padding-top:0; padding-bottom:0; background:transparent; } .fi-summary strong { font-size:25px; } .fi-page-heading { align-items:start; } .fi-panel .fi-page-heading { flex-direction:column; gap:14px; } .fi-summary small { margin-top:4px; } }
@media(max-width:520px) { .fi-page-heading { flex-direction:column; gap:17px; } .fi-page-heading h1 { font-size:27px; } .fi-toolbar { align-items:stretch; flex-direction:column; gap:9px; } .fi-search { max-width:none; } .fi-client-filter select { width:100%; max-width:none; } .fi-records-header { padding:0 13px; gap:8px; min-height:58px; } .fi-tabs { gap:20px; } .fi-tabs button { font-size:12px; padding:17px 0; } .fi-status-filter select { font-size:10px; max-width:130px; padding:6px 18px 6px 0; } .fi-summary strong { font-size:23px; } .fi-summary section { padding-left:16px; padding-right:16px; } .finance-client-modal { width:calc(100vw - 24px); } .finance-client-modal > .modal-body { padding:16px; } .fi-panel .fi-summary { grid-template-columns:1fr; padding:0; gap:0; } .fi-panel .fi-summary section { padding:12px 16px; flex-direction:row; align-items:center; flex-wrap:wrap; gap:4px 12px; border:0; border-bottom:1px solid var(--line); } .fi-panel .fi-summary section:last-child { border-bottom:0; } .fi-panel .fi-summary strong { margin:0 0 0 auto; font-size:21px; } .fi-panel .fi-summary small { width:100%; min-height:0; text-align:right; margin:0; } .fi-panel .fi-summary small:empty { display:none; } .fi-form-grid { gap:14px 10px; } .fi-modal .modal-header,.fi-modal .modal-body,.fi-modal .modal-footer { padding-left:18px; padding-right:18px; } }
@media(prefers-reduced-motion:reduce) { .fi-loading { animation:none; } .fi-backdrop { animation:none; } }
