/* Lucas Gill V0.91 · MES FINANCES. Same graphic system as the CRM, veille and observatoire. */
.fin-dashboard-entry{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:16px 0;padding:18px 22px;border-radius:16px;border:1px solid #bcd9ed;background:linear-gradient(108deg,#edf6fe,#e8f3fc 60%,#e9e3fa);color:#183b5a}
.fin-dashboard-entry h2{margin:4px 0;font-size:21px;letter-spacing:-.035em;color:#143b5d}
.fin-dashboard-entry p{margin:0;font-size:12px;color:#4b657e}
.fin-entry-kicker{font-size:10px;font-weight:850;letter-spacing:.11em;color:#4f6aa9}
.fin-dashboard-entry a{display:inline-flex;align-items:center;justify-content:center;padding:12px 16px;min-height:44px;background:#1d6395;color:#fff!important;border-radius:10px;font-size:12px;font-weight:800;white-space:nowrap;text-decoration:none}
.fin-dashboard-entry a:hover{background:#15517f;color:#fff!important}
.fin-main{min-width:0}
.finance-content{max-width:1740px;width:100%;padding:22px 28px 100px;margin:auto;color:#193750}
.fin-heading{display:flex;justify-content:space-between;align-items:center;gap:22px;margin-bottom:15px}
.fin-heading h1{font-size:clamp(29px,3.7vw,45px);line-height:1.08;letter-spacing:-.055em;margin:6px 0;color:#143b5c;font-weight:850}
.fin-heading p{margin:5px 0 0;font-size:13px;color:#5c7184}
.fin-eyebrow{font-size:10px;font-weight:900;letter-spacing:.16em;color:#226b9b}
.fin-dot{color:#36a1d7}
.fin-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.fin-button{border-radius:10px;border:1px solid #bad3e6;min-height:40px;padding:9px 14px;font:800 12px/1.2 system-ui,-apple-system,Segoe UI,sans-serif;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;text-decoration:none;white-space:nowrap;transition:background .15s,border-color .15s}
.fin-button:disabled{opacity:.48;cursor:not-allowed}
.fin-button:hover:not(:disabled){filter:brightness(.96)}
.fin-primary{background:#1c75a8;color:white!important;border-color:#1c75a8}
.fin-soft{background:#eff6fc;color:#22577c!important;border-color:#c7dbe9}
.fin-revolut{background:#5a45ac;color:#fff!important;border-color:#7b65cd}
.fin-revolut:hover{background:#705bc3}
.fin-notice{background:#eaf4fc;color:#1f5f84;border:1px solid #c7deef;border-radius:10px;padding:10px 13px;margin:0 0 13px;font:700 12px/1.5 system-ui}
.fin-notice[data-kind="error"]{background:#fff0ef;color:#984039;border-color:#f0c7c4}
.fin-notice[data-kind="success"]{background:#e9f8f1;color:#22694b;border-color:#c2e7d5}
.fin-tabs{display:flex;overflow-x:auto;scrollbar-width:thin;gap:3px;border-bottom:1px solid #d2e1ec;margin-bottom:16px;padding:0 2px 1px;scroll-snap-type:x proximity}
.fin-tabs button{background:transparent;border:0;border-bottom:3px solid transparent;border-radius:0;padding:12px 12px 10px;min-height:43px;font:800 12px system-ui;white-space:nowrap;cursor:pointer;color:#50738e;scroll-snap-align:start}
.fin-tabs button.active{border-bottom-color:#238ac0;color:#145e8c;background:linear-gradient(180deg,transparent,#eaf5fa)}
.fin-tabs button:hover{color:#16658f}
.fin-panel[hidden]{display:none!important}
.fin-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:15px}
.fin-metric{border-radius:14px;border:1px solid #cfdeea;border-top:3px solid #3891c4;background:#fff;padding:13px 15px;min-width:0;display:grid;gap:4px;box-shadow:0 4px 14px #163b5708}
.fin-metric.fin-income{border-top-color:#329675}.fin-metric.fin-expense{border-top-color:#c88648}.fin-metric.fin-net{border-top-color:#378ac1}.fin-metric.fin-balance{border-top-color:#826bc6}
.fin-metric span{color:#526e85;font-size:11px;font-weight:700}
.fin-metric strong{font-size:clamp(17px,2.3vw,27px);letter-spacing:-.05em;color:#163a5a;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.fin-metric small{font-size:10px;color:#708396}
.fin-overview-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);gap:13px;margin:13px 0}
.fin-card{background:#fff;border:1px solid #d2e0eb;border-radius:15px;padding:16px 18px;min-width:0;box-shadow:0 5px 20px #193b5908}
.fin-card h2{font-size:17px;line-height:1.3;letter-spacing:-.02em;color:#1a4667;margin:0 0 12px}
.fin-card h3{font-size:13px;margin:18px 0 9px;color:#25607f}
.fin-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.fin-card-head h2,.fin-card-head p{margin:0}.fin-card-head p{margin-top:5px}
.fin-muted{font-size:11px;color:#687f94;line-height:1.5}
.fin-tag{font-size:10px;color:#437a9e;background:#e8f5fc;border:1px solid #d2e4f0;padding:5px 8px;border-radius:100px;white-space:nowrap}
.fin-scope,.fin-filters{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:0 0 14px}
.fin-scope{background:#edf5fa;border-radius:11px;padding:10px 12px}
.fin-scope label{display:flex;align-items:center;gap:7px;color:#49647e;font-size:11px;font-weight:800}
.fin-scope select,.fin-scope input,.fin-filters input,.fin-filters select,.fin-actions select{background:#fff;border:1px solid #b8d3e3;color:#1b3c57;border-radius:9px;min-height:39px;padding:8px 9px;font-size:12px;min-width:0}
.fin-filters input{flex:2 1 250px}.fin-filters select{flex:1 1 135px}
.fin-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.fin-chart{min-height:168px;overflow:hidden}
.fin-chart svg{width:100%;height:auto;max-height:230px;display:block}
.fin-chart-legend{display:flex;gap:12px;justify-content:space-between;font-size:11px;color:#63809a;flex-wrap:wrap}
.fin-chart-legend strong{color:#27709e}
.fin-category-chart{display:grid;gap:14px}
.fin-bar-row>div:first-child,.fin-budget-line>div:first-child{display:flex;justify-content:space-between;gap:12px;font-size:11px;margin-bottom:5px;color:#3c647f}
.fin-bar-row strong,.fin-budget-line strong{color:#194d71}
.fin-bar-track{height:10px;border-radius:100px;background:#dfeef7;overflow:hidden}
.fin-bar-track i{display:block;height:100%;border-radius:100px;background:#3e99cc}
.fin-bar-row:nth-child(2) i{background:#8471d2}.fin-bar-row:nth-child(3) i{background:#55aa9c}.fin-bar-row:nth-child(4) i{background:#d0995b}.fin-bar-row:nth-child(5) i{background:#5e89c6}.fin-bar-row:nth-child(6) i{background:#b07fc8}
.fin-bar-track i.over{background:#cf6c65}
.fin-listline{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:9px 3px;border-bottom:1px solid #e0eaf1;color:#28526b;font-size:12px}
.fin-listline span{min-width:0;overflow-wrap:anywhere}.fin-listline small{font-size:10px;color:#7b90a4;display:block;margin-top:3px}.fin-listline strong{color:#1d4c6c}
.fin-listline .fin-button{min-height:33px;padding:6px 10px}
.fin-empty{color:#73889a;background:#f4f8fb;border-radius:9px;font-size:12px;padding:18px 12px}
.fin-link{margin-top:12px;background:none;border:none;color:#176896;font-size:12px;font-weight:800;cursor:pointer;padding:7px 2px}
.fin-table-scroll{overflow:auto}
.fin-table{border-collapse:collapse;width:100%;font-size:12px;min-width:630px}
.fin-table th{background:#ebf4fa;color:#466882;font-weight:850;text-align:left;padding:11px 13px;border-bottom:1px solid #cedfe9}
.fin-table td{padding:8px 13px;border-bottom:1px solid #e0eaf2;color:#2d526e;vertical-align:middle}
.fin-table tr[data-tx]{cursor:pointer}.fin-table tr[data-tx]:hover,.fin-table tr[data-tx]:focus{background:#eef6fb;outline:none}
.fin-table td strong{display:block;font-size:12px;color:#17425e;font-weight:850;max-width:55ch;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.fin-table td small{display:block;margin-top:2px;color:#7c93a5;font-size:10px}
.fin-table td.fin-right,.fin-table th.fin-right{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:850}
.fin-table td.fin-positive{color:#21805a}.fin-table td.fin-negative{color:#bf6141}
.fin-category-pill{border:1px solid #d1e2ee;border-radius:100px;background:#eff6fc;padding:4px 9px;font-size:10px;color:#376e92;white-space:nowrap}
.fin-pager{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:13px 2px 0;font-size:11px;color:#68819a}
.fin-pager span{margin-right:auto}
.fin-budget-line{padding:12px 6px;border-bottom:1px solid #dfe9f1;display:grid;gap:6px;position:relative}
.fin-budget-line small{color:#738799}
.fin-asset-figures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0}
.fin-asset-figures>div{border:1px solid #d2e3ef;border-radius:10px;padding:13px;font-size:11px;color:#547489}
.fin-asset-figures strong{display:block;margin-top:5px;color:#1b4b6c;font-size:18px}
.fin-form{display:grid;gap:10px;margin:12px 0}
.fin-form label,.fin-dialog label{display:grid;gap:6px;font-size:11px;font-weight:800;color:#4d657e}
.fin-form :is(input,select),.fin-dialog :is(input,select){border:1px solid #bfd5e6;background:#fafdff;color:#1d4866;border-radius:9px;min-height:41px;padding:9px 11px;width:100%;font:600 13px/1.3 system-ui}
.fin-result{background:#eaf5fa;border:1px solid #cde1ed;border-radius:10px;padding:14px;color:#1a5b81;font-size:13px;font-weight:850;line-height:1.5}
.fin-dialog{width:min(580px,calc(100vw - 24px));max-height:min(90dvh,820px);overflow:auto;margin:auto;position:fixed;inset:0;border:1px solid #b6d2e8;border-radius:17px;background:white;box-shadow:0 30px 75px #08172866;color:#183e5a;padding:24px}
.fin-dialog::backdrop{background:#081c2b9e;backdrop-filter:blur(3px)}
.fin-dialog h2{font-size:22px;color:#194c70;margin:0 35px 8px 0}
.fin-dialog>label{margin:15px 0}
.fin-close{position:absolute;top:12px;right:14px;border:1px solid #d8e7f1;background:#edf6fb;color:#275c7a;border-radius:8px;min-width:38px;min-height:38px;cursor:pointer}
.fin-dialog-actions{display:flex;gap:9px;align-items:center;justify-content:flex-end;margin-top:17px;flex-wrap:wrap}
.fin-import-summary{font-size:12px;line-height:1.5;background:#eef6fa;padding:12px;border-radius:11px;color:#345c78;max-height:310px;overflow:auto}
.fin-import-examples{margin-top:10px;border-top:1px solid #d1e3ee}
.fin-warning{color:#a15139;font-weight:700}
.fin-detail-amount{display:block;font-size:24px;letter-spacing:-.04em;color:#1a6798;margin-bottom:10px}
.fin-inline-form{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.fin-inline-form>*{flex:1;min-width:110px}
.fin-inline-form input,.fin-inline-form select{border:1px solid #bfd5e6;background:#fff;border-radius:9px;padding:10px;color:#1f4768}
.fin-icon-action{border:1px solid #d9e6ef;background:transparent;color:#9e5364;border-radius:8px;padding:5px 9px;cursor:pointer}
.fin-divider{height:1px;background:#dce9f2;margin:15px 0}
.fin-dashboard-entry a:focus-visible,.fin-button:focus-visible,.fin-tabs button:focus-visible,.fin-table tr:focus-visible,.fin-dialog :focus-visible{outline:3px solid #54b8e8;outline-offset:2px}
html[data-theme="dark"] .finance-content{color:#f4f8ff}
html[data-theme="dark"] .fin-heading h1,html[data-theme="dark"] .fin-card h2,html[data-theme="dark"] .fin-card h3,html[data-theme="dark"] .fin-metric strong,html[data-theme="dark"] .fin-bar-row strong,html[data-theme="dark"] .fin-budget-line strong,html[data-theme="dark"] .fin-listline strong,html[data-theme="dark"] .fin-table td strong,html[data-theme="dark"] .fin-asset-figures strong,html[data-theme="dark"] .fin-dialog h2{color:#f5f9ff!important}
html[data-theme="dark"] .fin-card,html[data-theme="dark"] .fin-metric,html[data-theme="dark"] .fin-dialog{background:#13283e!important;border-color:#405d78!important;color:#f2f7ff!important;box-shadow:0 10px 30px #0003}
html[data-theme="dark"] .fin-heading p,html[data-theme="dark"] .fin-muted,html[data-theme="dark"] .fin-metric span,html[data-theme="dark"] .fin-metric small,html[data-theme="dark"] .fin-listline,html[data-theme="dark"] .fin-table td,html[data-theme="dark"] .fin-asset-figures>div,html[data-theme="dark"] .fin-card .fin-form label,html[data-theme="dark"] .fin-dialog label,html[data-theme="dark"] .fin-dialog p{color:#c5d6e6!important}
html[data-theme="dark"] .fin-scope,html[data-theme="dark"] .fin-notice,html[data-theme="dark"] .fin-empty,html[data-theme="dark"] .fin-result,html[data-theme="dark"] .fin-import-summary,html[data-theme="dark"] .fin-asset-figures>div{background:#1b3853!important;border-color:#496884!important;color:#e9f5ff!important}
html[data-theme="dark"] .fin-notice[data-kind="error"]{background:#492e33!important;color:#ffe6e7!important}
html[data-theme="dark"] .fin-notice[data-kind="success"]{background:#1a483e!important;color:#d4f7e8!important}
html[data-theme="dark"] .fin-table th{background:#1a344d;color:#ddedff;border-color:#3e5a74}
html[data-theme="dark"] .fin-table tr[data-tx]:hover,html[data-theme="dark"] .fin-table tr[data-tx]:focus{background:#234560}
html[data-theme="dark"] .fin-table td,html[data-theme="dark"] .fin-listline,html[data-theme="dark"] .fin-budget-line{border-color:#354f69}
html[data-theme="dark"] .fin-soft,html[data-theme="dark"] .fin-category-pill,html[data-theme="dark"] .fin-tag{background:#203d58!important;color:#e0efff!important;border-color:#52708d!important}
html[data-theme="dark"] .fin-scope :is(select,input),html[data-theme="dark"] .fin-filters :is(select,input),html[data-theme="dark"] .fin-form :is(select,input),html[data-theme="dark"] .fin-dialog :is(select,input),html[data-theme="dark"] .fin-inline-form :is(select,input),html[data-theme="dark"] .fin-actions select{background:#0d2033!important;color:#f5f9ff!important;border-color:#50718a!important}
html[data-theme="dark"] .fin-tabs{border-color:#3e5a74}
html[data-theme="dark"] .fin-tabs button{color:#bcd5e8}
html[data-theme="dark"] .fin-tabs button.active{color:#fff;background:#1c4262;border-color:#72c9fb}
html[data-theme="dark"] .fin-bar-track{background:#25405a}
html[data-theme="dark"] .fin-metric.fin-income strong{color:#b6f0d8!important}
html[data-theme="dark"] .fin-metric.fin-expense strong{color:#f8ceaa!important}
html[data-theme="dark"] .fin-metric.fin-net strong{color:#c0e8ff!important}
html[data-theme="dark"] .fin-metric.fin-balance strong{color:#e3d7ff!important}
html[data-theme="dark"] .fin-chart-legend strong{color:#c0e8ff}
html[data-theme="dark"] .fin-dashboard-entry{background:linear-gradient(100deg,#182e47,#2a365f)!important;color:#f3f8ff;border-color:#4b6386}
html[data-theme="dark"] .fin-dashboard-entry h2{color:#fff}
html[data-theme="dark"] .fin-dashboard-entry p{color:#c7ddec}
html[data-theme="dark"] .fin-entry-kicker{color:#b6d8ff}
html[data-theme="dark"] .fin-link{color:#a6dcff}
html[data-theme="dark"] .fin-chart svg{background:transparent}
@media(max-width:1100px){.fin-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.fin-overview-grid{grid-template-columns:1fr 1fr}.fin-heading{align-items:flex-start;flex-direction:column}}
@media(max-width:860px){.finance-content{padding:16px 16px calc(104px + env(safe-area-inset-bottom))}.fin-overview-grid{grid-template-columns:1fr}.fin-head-actions{width:100%;justify-content:flex-start}.fin-tabs{margin-bottom:12px}.fin-dashboard-entry{flex-wrap:wrap;margin:12px 0}.fin-dashboard-entry a{width:100%}}
@media(max-width:520px){.finance-content{padding:14px 12px calc(100px + env(safe-area-inset-bottom))}.fin-heading h1{font-size:32px}.fin-head-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px}.fin-head-actions .fin-revolut{grid-column:1/-1}.fin-head-actions .fin-button{white-space:normal;font-size:11px;min-height:44px;padding:9px 6px}.fin-metrics{gap:8px}.fin-metric{padding:12px}.fin-metric strong{font-size:21px}.fin-card{padding:13px}.fin-card-head{flex-direction:column;align-items:flex-start}.fin-filters{display:grid;grid-template-columns:1fr 1fr}.fin-filters input{grid-column:1/-1}.fin-pager{flex-wrap:wrap}.fin-overview-grid{gap:10px}.fin-scope{align-items:stretch}.fin-scope label{width:100%;justify-content:space-between}.fin-chart-legend{font-size:10px}.fin-asset-figures{grid-template-columns:1fr}.fin-dialog{padding:17px}.fin-table{min-width:540px}.fin-table th,.fin-table td{padding:9px 7px}.fin-dashboard-entry{padding:15px}}
@media print{.sidebar,.dash-top,.lg-mobile-dock,.fin-head-actions,.fin-tabs,.fin-notice,.fin-filters,.fin-pager,.fin-button,.fin-dialog,.fin-icon-action{display:none!important}.portal-layout,.dash-main,.finance-content{background:#fff!important;color:#111!important;padding:0!important}.fin-panel{display:none!important}#fin-overview,#fin-transactions{display:block!important}.fin-card,.fin-metric{box-shadow:none!important;border:1px solid #bbb!important;break-inside:avoid}.fin-table-scroll{overflow:visible}.fin-table{min-width:0;font-size:10px}body:before{content:'Lucas GILL · Mes finances — données importées manuellement, non temps réel';display:block;font-weight:bold;margin:14px 0}}

.fin-chart-constant{background:linear-gradient(120deg,#edf6fc,#f2effc);border:1px dashed #b5d7e9;border-radius:11px;padding:30px 18px;text-align:center;color:#205a80;font-size:12px}.fin-chart-constant p{color:#567a97;margin:10px auto 0;max-width:55ch;line-height:1.6}html[data-theme="dark"] .fin-chart-constant{background:#1a3650;border-color:#486e8c;color:#eaf6ff}html[data-theme="dark"] .fin-chart-constant p{color:#c3d8ea}
/* Explicit labels and browser-native widgets in dark appearance. */
html[data-theme="dark"] .finance-content .fin-scope label,
html[data-theme="dark"] .finance-content .fin-scope .fin-muted,
html[data-theme="dark"] .finance-content .fin-budget-line small{color:#d5e7f7!important}
html[data-theme="dark"] .finance-content :is(input,select,textarea){color-scheme:dark}
html[data-theme="dark"] .finance-content #fin-mask{background:#203d58!important;color:#e0efff!important;border-color:#52708d!important}
html[data-theme="dark"] .finance-content .fin-table td.fin-positive{color:#a3efd0!important}
html[data-theme="dark"] .finance-content .fin-table td.fin-negative{color:#ffbf9f!important}

.fin-restore-label{cursor:pointer}.fin-restore-label input{display:none}.fin-restore-label:hover{filter:brightness(.96)}
