:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#19363e;background:#f2f5f5;font-synthesis:none}*{box-sizing:border-box}body{margin:0}main{max-width:760px;margin:auto;padding:24px 24px max(24px,env(safe-area-inset-bottom))}header{display:flex;align-items:center;justify-content:space-between;margin:12px 0 32px}.brand{display:flex;gap:12px;align-items:center}.brand strong{display:block;font-size:22px;letter-spacing:-.7px}.brand small{display:block;font-size:10px;letter-spacing:1.8px;margin-top:5px}.logo{background:#102e37;color:#c8f27c;border-radius:15px;font-size:36px;width:52px;height:52px;display:grid;place-items:center}.avatar{border:1px solid #d1dddd;border-radius:50%;width:46px;height:46px;background:white;font-size:14px}.tabs{display:flex;border-bottom:1px solid #dce4e4;margin-bottom:26px;gap:18px}.tabs button{flex:1;border:0;border-radius:0;background:none;padding:13px 0;color:#64767b;font-size:15px;border-bottom:3px solid transparent}.tabs button[aria-current]{border-color:#173d47;color:#173d47;font-weight:700}button,input,select{font:inherit}button{cursor:pointer;min-height:44px;touch-action:manipulation}button:focus-visible,input:focus-visible,select:focus-visible,.filebutton:focus-within{outline:3px solid #6a9d30;outline-offset:3px}.monthbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:8px}.round{border:1px solid #dce4e4;background:white;border-radius:50%;width:44px;flex-shrink:0;font-size:25px;color:#19363e}.monthlabel{max-width:240px}.monthlabel input{background:transparent;border:0;text-align:center;font-weight:650;padding:8px;width:100%;min-width:0}.balance{background:#102e37;color:white;padding:30px;border-radius:26px;position:relative;overflow:hidden}.balance:after{content:"";position:absolute;right:-40px;top:-65px;width:200px;height:200px;border:1px solid #31515a;border-radius:50%;pointer-events:none}.eyebrow{font-size:12px;letter-spacing:1.8px;font-weight:650}.balance .eyebrow{color:#c6d8db}.balance h1{font-size:clamp(36px,8vw,56px);font-weight:550;letter-spacing:-2px;margin:16px 0 10px;overflow-wrap:anywhere}.balance p{font-size:14px;color:#d6e3e5;line-height:1.5}.metrics{display:flex;gap:40px;border-top:1px solid #37515a;padding-top:23px;margin-top:27px}.metrics strong{font-size:25px;display:block;color:#cef391;font-weight:600}.metrics span{display:block;font-size:13px;color:#d6e3e5;margin-top:6px}.footnote{font-size:12px;line-height:1.6;color:#65777c;margin:14px 5px 26px}.sectionhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:26px 0 18px}h2{font-size:20px;letter-spacing:-.4px;margin:0}p{line-height:1.6}button{border-radius:12px;padding:10px 16px;font-weight:600}.primary{background:#c8f27c;border:1px solid #c8f27c;color:#17332d}.primary:hover{background:#b6e168}.secondary{background:white;border:1px solid #cbd9dc;color:#19363e}.wide{width:100%}.hint{background:#e6eeea;border:1px solid #d3e1d9;padding:20px;border-radius:18px}.hint p{margin:8px 0 16px;font-size:14px}.empty{text-align:center;background:white;border:1px dashed #ccd8db;border-radius:20px;padding:30px 20px}.empty .emptyicon{display:block;font-size:40px;color:#728c94;margin-bottom:10px}.empty p{font-size:14px;color:#64777d;margin-bottom:0}.entry{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:left;background:white;border:1px solid #e0e8e9;padding:18px;margin-bottom:10px;border-radius:16px;gap:12px}.entry .left{display:flex;align-items:center;gap:14px}.datebox{background:#edf3f3;border-radius:11px;min-width:48px;min-height:48px;display:grid;place-items:center;font-size:20px}.entry strong,.entry small{display:block}.entry small{font-size:12px;color:#65777c;margin-top:5px;line-height:1.5}.entry .money{text-align:right;font-size:16px;white-space:nowrap}.privacy{text-align:center;font-size:12px;color:#65777c;margin:26px 0}footer{font-size:10px;letter-spacing:1.5px;color:#65777c;border-top:1px solid #dce4e4;margin-top:35px;padding-top:20px;display:flex;justify-content:space-between;gap:10px}footer span{letter-spacing:0;font-size:12px}.pagehead{margin:30px 0}.pagehead h1{font-size:34px;letter-spacing:-1px;margin:10px 0}.pagehead p{color:#64777d;margin:0}.card{background:white;border:1px solid #e0e8e9;border-radius:20px;padding:24px;margin:18px 0}.card p{font-size:14px;color:#566b73}.card h2{margin-bottom:12px}label{display:block;font-size:14px;font-weight:600;min-width:0}input,select{display:block;width:100%;min-width:0;max-width:100%;margin:8px 0 19px;border:1px solid #ccd9dc;background:#fbfcfc;border-radius:10px;color:#19363e;padding:13px 11px;min-height:48px;font-size:16px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.muted{font-size:13px;color:#65777c;margin:0 0 22px;line-height:1.6}.backup small{display:block;font-size:12px;line-height:1.6;color:#65777c}.filebutton{position:relative;overflow:hidden;text-align:center;border:1px solid #cbd9dc;border-radius:12px;padding:14px;margin:10px 0 16px;cursor:pointer}.filebutton input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer}.steps{padding-left:24px;margin:0}.steps li{padding-left:6px;margin-bottom:24px}.steps li:last-child{margin-bottom:0}.steps p{margin:6px 0}.steps li::marker{color:#35674f;font-weight:700}dialog{border:0;border-radius:24px;padding:26px;max-width:480px;width:calc(100% - 24px);max-height:90dvh;color:#19363e}dialog::backdrop{background:#0c273bb3;backdrop-filter:blur(4px)}dialog .sectionhead{margin:0 0 24px}dialog h2{font-size:21px}.preview{display:flex;justify-content:space-between;gap:12px;background:#eff4ee;padding:16px;border-radius:12px;margin:0 0 20px;font-size:14px}.preview strong{font-size:18px}.danger{background:white;color:#a03b3b;border:1px solid #edd5d5;margin-top:10px}.error{color:#9a2727;font-size:14px}.warning{padding:16px;background:#fff1d6;border:1px solid #dfbe82;border-radius:12px;margin-bottom:18px;line-height:1.6}#toast{position:fixed;bottom:max(26px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#102e37;color:white;padding:16px 22px;border-radius:14px;box-shadow:0 8px 30px #102e3733;max-width:90vw;width:max-content;font-size:14px;z-index:20}.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}[hidden]{display:none!important}@media(min-width:900px){main{padding-top:36px}.balance{padding:36px}.metrics{gap:70px}}@media(max-width:390px){main{padding:16px}.balance{padding:24px}.grid{gap:10px}.entry{padding:14px}.entry .left{gap:9px}.tabs{gap:8px}dialog{padding:20px}}
.brand em{font-style:normal;font-size:12px;letter-spacing:1px;background:#f0bc52;color:#24323a;padding:4px 6px;border-radius:5px;vertical-align:middle}.localbadge{font-size:12px;color:#63757b}.metrics{gap:22px;justify-content:space-between}.metrics strong{font-size:22px}.metrics span{font-size:12px}.check{display:flex;align-items:center;gap:12px;margin-bottom:20px}.check input{width:23px;height:23px;min-height:23px;margin:0}.settingsgroup{margin-top:24px;border-top:1px solid #dce4e4;padding-top:20px}.settingsgroup h3{font-size:16px;margin:0 0 18px}.fieldhint{display:block;font-size:12px;color:#64777d;line-height:1.5;margin:-10px 0 18px;font-weight:400}.payrow{display:flex;align-items:start;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #edf0f0;font-size:14px}.payrow strong{white-space:nowrap}.payrow small{display:block;color:#61777e;font-size:12px;margin-top:5px}.payrow.total{font-weight:700;font-size:16px;border-top:1px solid #c5d4d7;background:#f0f5f2;padding:16px 10px;margin:8px -10px;border-radius:8px}.payrow.final{background:#102e37;color:white;font-size:19px}.payrow.final small{color:#c5d4d7}.tag{font-size:11px;padding:4px 6px;border-radius:4px;background:#e9f0eb;display:inline-block;margin-top:4px}.warning{font-size:14px;margin:12px 0}.paysection{margin-top:25px;font-size:12px;letter-spacing:1px;font-weight:700;color:#63777c;text-transform:uppercase}details summary{cursor:pointer;font-weight:650;line-height:1.5}details[open] summary{margin-bottom:18px}#refDialog{max-width:740px}.entry small{max-width:250px}.entry .money{font-size:13px}.card small{line-height:1.5}.referencecheck{background:#e9f2e5;border-radius:12px;padding:16px;font-size:14px}.referencecheck.bad{background:#fff1d6}.tablenote{font-size:13px;color:#64777d}button:disabled{opacity:.45;cursor:not-allowed}@media(max-width:420px){.localbadge{display:none}.metrics{gap:12px}.metrics strong{font-size:20px}.metrics span{font-size:11px}.entry{padding:12px}.entry .left{gap:8px}.datebox{min-width:36px}.sectionhead{flex-wrap:wrap}.payrow{font-size:13px}.payrow.total{font-size:15px}} 

textarea{display:block;width:100%;min-height:100px;resize:vertical;font:inherit;font-size:16px;border:1px solid #ccd9dc;border-radius:10px;padding:13px;margin:8px 0 20px;background:#fbfcfc;color:inherit}textarea:focus-visible{outline:3px solid #6a9d30;outline-offset:3px}.entry{color:inherit}.entry .left>span:last-child{min-width:0;overflow-wrap:anywhere}.payrow>span{min-width:0;overflow-wrap:anywhere}.payrow>span:last-child{text-align:right}.payrow>span:first-child{text-align:left}html{color-scheme:light}html[data-theme="dark"]{color-scheme:dark;background:#10181d;color:#e1eaed}html[data-theme="dark"] :is(.card,.entry,.empty,dialog,.secondary,.round,.danger){background:#1b272f;color:#e1eaed;border-color:#344650}html[data-theme="dark"] :is(input,select,textarea){background:#142028;color:#edf3f5;border-color:#41555f}html[data-theme="dark"] :is(.muted,.footnote,.privacy,.localbadge,.fieldhint,.tablenote,.paysection,.entry small,.payrow small,.card p,.backup small,.empty p,footer){color:#aec0c9}html[data-theme="dark"] :is(.hint,.preview,.referencecheck){background:#23362f;color:#deeddc;border-color:#425b49}html[data-theme="dark"] :is(.warning,.referencecheck.bad){background:#3c3020;color:#f3d8aa;border-color:#785f37}html[data-theme="dark"] :is(.datebox,.tag){background:#30414a;color:#e2edef}html[data-theme="dark"] .payrow.total{background:#283a3d}html[data-theme="dark"] .payrow.final{background:#183c43;color:#edffea}html[data-theme="dark"] :is(.payrow,.tabs,.settingsgroup,footer){border-color:#344650}html[data-theme="dark"] .tabs button{color:#aebfc7}html[data-theme="dark"] .tabs button[aria-current]{color:#c8f27c;border-color:#c8f27c}html[data-theme="dark"] .danger{color:#ffb3b3}html[data-theme="dark"] .error{color:#ffb3b3}html[data-theme="dark"] .balance{background:#17333c}html[data-theme="dark"] .monthlabel input{background:transparent}html[data-theme="dark"] #toast{background:#d4ecbe;color:#15221c}@media(max-width:350px){main{padding:12px}.grid{grid-template-columns:1fr}.balance{padding:20px}.brand strong{font-size:20px}.payrow strong{white-space:normal;text-align:right}}

/* ===== Relooking v4 : plus clair, plus lisible ===== */
:root{--ink:#14323b;--soft:#5d7279;--line:#e1e9ea;--card:#fff;--bg:#eef3f2;--accent:#c8f27c;--accent-d:#4f8a1f;--amber:#f0bc52;background:var(--bg)}
body{background:var(--bg);font-size:16px}
main{padding-bottom:110px}
header{margin:6px 0 20px}
.logo{background:linear-gradient(145deg,#173f4a,#0d252d);box-shadow:0 6px 16px #102e3733}
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:15;margin:0;gap:0;border:0;background:#fffffff2;backdrop-filter:blur(14px);border-top:1px solid var(--line);padding:6px 12px max(8px,env(safe-area-inset-bottom));justify-content:center}
.tabs button{max-width:240px;display:flex;flex-direction:column;align-items:center;gap:2px;border:0;border-radius:14px;padding:6px 0;font-size:12px;min-height:52px}
.tabs button::before{font-size:22px;line-height:1.1}
.tabs [data-tab=home]::before{content:"🏠"}.tabs [data-tab=pay]::before{content:"🧾"}.tabs [data-tab=settings]::before{content:"⚙️"}
.tabs button[aria-current]{background:#e9f4d3;color:var(--ink);border:0}
.monthbar{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:6px;box-shadow:0 2px 8px #14323b0d}
.monthlabel{max-width:none;flex:1}.monthlabel input{font-size:18px;font-weight:700}
.round{border:0;background:#eef3f2}
.balance{background:linear-gradient(150deg,#1a4652,#0f2a32 70%);border-radius:28px;box-shadow:0 14px 30px #102e3740;padding:28px 24px}
.balance .eyebrow{color:var(--accent);font-size:12px}
.balance h1{font-size:clamp(42px,12vw,64px);font-weight:700;letter-spacing:-2px;color:#fff;margin:12px 0 8px}
.balance p{font-size:13px;color:#cfdfe2}
.metrics{border:0;padding:0;margin-top:20px;gap:10px}
.metrics>div{flex:1;background:#ffffff14;border-radius:16px;padding:12px 8px;text-align:center}
.metrics strong{font-size:20px;color:var(--accent)}.metrics span{font-size:12px;margin-top:4px}
.sectionhead h2{font-size:21px}
.primary{background:var(--accent);border-radius:14px;padding:12px 20px;font-size:16px;box-shadow:0 4px 12px #8dc43a55}
.secondary{border-radius:14px}
.entry{border:1px solid var(--line);border-left:5px solid var(--accent-d);border-radius:18px;padding:14px 16px;box-shadow:0 2px 8px #14323b0a}
.datebox{background:#e9f4d3;color:var(--ink);font-weight:800;border-radius:14px;min-width:50px;min-height:50px}
.entry strong{font-size:16px;text-transform:capitalize}.entry .money{font-size:14px;color:var(--soft)}
.empty{border:2px dashed #c4d4d6;background:#fafcfc}
.card{border:1px solid var(--line);border-radius:22px;box-shadow:0 2px 8px #14323b0a}
.card p{font-size:15px}
.payrow{padding:13px 0;font-size:15px}
.payrow.total{background:#eaf3ea;border-radius:12px}
.payrow.final{background:linear-gradient(150deg,#1a4652,#0f2a32);font-size:20px;border-radius:16px;padding:18px 16px}
.paysection{margin-top:28px;padding:6px 12px;background:#e3ece9;border-radius:999px;display:inline-block;color:var(--ink)}
.warning{border-radius:14px;font-size:14px}
.localbadge{background:#fff;border:1px solid var(--line);padding:6px 10px;border-radius:999px;font-size:11px}
footer{margin-bottom:10px}
details.card summary{font-size:16px}
dialog{border-radius:26px;box-shadow:0 20px 60px #0008}
label{color:var(--ink)}
input,select{border-radius:12px;background:#f7fafa}
html[data-theme=dark]{--bg:#10181d;--card:#1b272f;--line:#344650;--ink:#e6eef0;--soft:#aec0c9}
html[data-theme=dark] .tabs{background:#142028ee}
html[data-theme=dark] .tabs button[aria-current]{background:#2a3d2f;color:var(--accent)}
html[data-theme=dark] :is(.monthbar,.paysection,.localbadge){background:#1b272f;color:#e6eef0;border-color:#344650}
html[data-theme=dark] .datebox{background:#2a3d2f;color:var(--accent)}
html[data-theme=dark] .payrow.total{background:#25392f}
html[data-theme=dark] .round{background:#2a3a43}
@media(prefers-color-scheme:dark){html[data-theme=auto]{--bg:#10181d;--ink:#e6eef0;--soft:#aec0c9;--line:#344650;color:#e1eaed;background:#10181d;color-scheme:dark}
html[data-theme=auto] :is(.card,.entry,.empty,dialog,.secondary,.monthbar,.localbadge,.paysection){background:#1b272f;color:#e1eaed;border-color:#344650}
html[data-theme=auto] :is(input,select,textarea){background:#142028;color:#edf3f5;border-color:#41555f}
html[data-theme=auto] .tabs{background:#142028ee}
html[data-theme=auto] .tabs button{color:#aebfc7}html[data-theme=auto] .tabs button[aria-current]{background:#2a3d2f;color:#c8f27c}
html[data-theme=auto] :is(.muted,.footnote,.entry small,.payrow small,.card p,footer,.localbadge){color:#aec0c9}
html[data-theme=auto] .datebox{background:#2a3d2f;color:#c8f27c}
html[data-theme=auto] .payrow.total{background:#25392f}html[data-theme=auto] .round{background:#2a3a43;color:#e1eaed}
html[data-theme=auto] :is(.payrow,footer){border-color:#344650}}

.seg{display:flex;gap:4px;background:#dfe9e7;padding:4px;border-radius:14px;margin:16px 0 0}.seg button{flex:1;border:0;background:none;border-radius:11px;font-size:14px;color:var(--soft)}.seg button[aria-pressed=true]{background:#fff;color:var(--ink);box-shadow:0 2px 6px #14323b22}html[data-theme=dark] .seg{background:#25333b}html[data-theme=dark] .seg button[aria-pressed=true]{background:#17333c;color:var(--accent)}@media(prefers-color-scheme:dark){html[data-theme=auto] .seg{background:#25333b}html[data-theme=auto] .seg button[aria-pressed=true]{background:#17333c;color:#c8f27c}}

.quick{display:flex;align-items:center;gap:14px;width:100%;text-align:left;background:linear-gradient(150deg,#1a4652,#0f2a32);color:#fff;border:0;border-radius:18px;padding:14px 18px;margin:0 0 14px;box-shadow:0 8px 18px #102e3733}.quick .qi{font-size:26px;background:#c8f27c;color:#17332d;border-radius:14px;width:46px;height:46px;display:grid;place-items:center;flex-shrink:0}.quick strong{display:block;font-size:16px}.quick small{display:block;font-size:12px;color:#cfdfe2;margin-top:3px;font-weight:400}.quick:active{transform:scale(.98)}

/* ===== Design v7 : pro & moderne ===== */
:root{--bg:#f3f6f8;--surface:#fff;--surface2:#eef2f5;--text:#0e1c23;--muted:#62767f;--line:#e2e8ec;--brand:#0c3a42;--accent:#b8f06a;--glass:#ffffffcc;--shadow:0 1px 2px #0a1a2210,0 8px 24px -12px #0a1a2222;--warn-bg:#fff6e0;--warn-tx:#6b4a0b;--warn-bd:#f0d79a}
html[data-theme=dark]{--bg:#0a1115;--surface:#131d24;--surface2:#1a2730;--text:#eaf1f4;--muted:#93a8b2;--line:#25343d;--brand:#1a3d44;--glass:#101a20d9;--shadow:0 1px 2px #0006,0 10px 30px -14px #000a;--warn-bg:#3a2e1a;--warn-tx:#f1d9a6;--warn-bd:#6e5830}
@media(prefers-color-scheme:dark){html[data-theme=auto]{--bg:#0a1115;--surface:#131d24;--surface2:#1a2730;--text:#eaf1f4;--muted:#93a8b2;--line:#25343d;--brand:#1a3d44;--glass:#101a20d9;--shadow:0 1px 2px #0006,0 10px 30px -14px #000a;--warn-bg:#3a2e1a;--warn-tx:#f1d9a6;--warn-bd:#6e5830;color-scheme:dark}}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes pop{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
html:root body{background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased}
html:root main{max-width:640px;padding:20px 18px 120px}
html:root header{margin:4px 0 18px}
html:root .brand strong{font-size:20px;letter-spacing:-.03em;color:var(--text)}
html:root .brand small{color:var(--muted);letter-spacing:.16em;font-size:10px;font-weight:600}
html:root .brand em{background:var(--accent);color:#10301f;font-weight:800;border-radius:6px;padding:3px 6px;font-size:11px}
html:root .logo{width:46px;height:46px;font-size:30px;border-radius:14px;background:linear-gradient(145deg,#1b5a66,#0a242b);color:var(--accent);box-shadow:0 8px 18px -6px #0a242b99,inset 0 1px 0 #ffffff26}
html:root .localbadge{background:var(--surface);color:var(--muted);border:1px solid var(--line);padding:6px 11px;border-radius:999px;font-size:11px;font-weight:600}
html:root .tabs{left:50%;right:auto;transform:translateX(-50%);bottom:max(14px,env(safe-area-inset-bottom));width:min(calc(100% - 28px),420px);padding:6px;border:1px solid var(--line);border-radius:24px;background:var(--glass);backdrop-filter:blur(20px) saturate(160%);-webkit-backdrop-filter:blur(20px) saturate(160%);box-shadow:0 14px 40px -10px #0a1a2255;gap:4px}
html:root .tabs button{flex:1;max-width:none;min-height:50px;border-radius:18px;color:var(--muted);font-size:11px;font-weight:650;letter-spacing:.01em;transition:background .2s,color .2s}
html:root .tabs button::before{content:"";width:22px;height:22px;background:currentColor;-webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat}
html:root .tabs [data-tab=home]::before{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-8 9 8v9a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E")}
html:root .tabs [data-tab=pay]::before{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2h12v20l-3-2-3 2-3-2-3 2z'/%3E%3Cpath d='M9 8h6M9 12h6'/%3E%3C/svg%3E")}
html:root .tabs [data-tab=settings]::before{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11M18 6h3M3 12h5M12 12h9M3 18h13M20 18h1'/%3E%3Ccircle cx='16' cy='6' r='2'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Ccircle cx='18' cy='18' r='2'/%3E%3C/svg%3E")}
html:root .tabs button[aria-current]{background:var(--brand);color:var(--accent)}
html:root .monthbar{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:6px;box-shadow:var(--shadow)}
html:root .monthlabel input{font-size:17px;font-weight:700;letter-spacing:-.02em;color:var(--text)}
html:root .round{background:var(--surface2);color:var(--text);border:0;width:42px;height:42px;min-height:42px;border-radius:14px;font-size:22px}
html:root .balance{background:radial-gradient(120% 90% at 100% 0%,#2b8a8a55 0%,transparent 55%),radial-gradient(90% 80% at 0% 100%,#b8f06a22 0%,transparent 60%),linear-gradient(160deg,#164650,#0a2229);border-radius:30px;padding:26px 22px 22px;box-shadow:0 24px 50px -18px #0a2229cc,inset 0 1px 0 #ffffff1f;border:1px solid #ffffff14}
html:root .balance:after{display:none}
html:root .balance .eyebrow{color:var(--accent);font-size:11px;letter-spacing:.16em;font-weight:700}
html:root .balance h1{font-size:clamp(44px,13vw,66px);font-weight:750;letter-spacing:-.04em;font-variant-numeric:tabular-nums;margin:10px 0 8px;color:#fff;line-height:1.05}
html:root .balance p{color:#b9d0d4;font-size:13px;line-height:1.5;margin:0}
html:root .metrics{margin-top:20px;gap:8px;border:0;padding:0}
html:root .metrics>div{background:#ffffff12;border:1px solid #ffffff14;border-radius:18px;padding:12px 6px}
html:root .metrics strong{font-size:19px;font-weight:700;color:#fff;font-variant-numeric:tabular-nums}
html:root .metrics span{font-size:11px;color:#9fbfc4;letter-spacing:.02em}
html:root .seg{background:var(--surface2);border:1px solid var(--line);border-radius:16px;padding:4px}
html:root .seg button{border-radius:12px;font-size:13px;font-weight:650;color:var(--muted);min-height:40px}
html:root .seg button[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:0 2px 8px #0a1a2222}
html:root .footnote{color:var(--muted);font-size:12px;line-height:1.6}
html:root .sectionhead h2{font-size:19px;letter-spacing:-.025em;color:var(--text)}
html:root .primary{background:var(--accent);color:#10301f;border:0;border-radius:14px;font-weight:700;padding:11px 18px;box-shadow:0 6px 16px -6px #8cc43c}
html:root .primary:hover{background:#a9e656}
html:root .secondary{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:14px;font-weight:650}
html:root .quick{background:linear-gradient(160deg,#164650,#0a2229);border:1px solid #ffffff14;border-radius:22px;padding:14px 16px;box-shadow:0 14px 30px -14px #0a2229cc}
html:root .quick .qi{background:var(--accent);color:#10301f;border-radius:15px;width:44px;height:44px;font-size:0}
html:root .quick .qi::after{content:"";width:22px;height:22px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2L4 14h7l-1 8 9-12h-7z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2L4 14h7l-1 8 9-12h-7z'/%3E%3C/svg%3E") center/contain no-repeat}
html:root .quick strong{font-size:16px;letter-spacing:-.02em;color:#fff}
html:root .quick small{color:#a9c6cb}
html:root .entry{background:var(--surface);border:1px solid var(--line);border-left:1px solid var(--line);border-radius:20px;padding:13px 15px;box-shadow:var(--shadow);transition:transform .15s}
html:root .entry:active{transform:scale(.985)}
html:root .datebox{background:var(--brand);color:var(--accent);border-radius:14px;font-weight:750;font-size:19px;min-width:48px;min-height:48px;font-variant-numeric:tabular-nums}
html:root .entry strong{color:var(--text);font-size:15px;letter-spacing:-.01em}
html:root .entry small{color:var(--muted)}
html:root .entry .money{color:var(--text);font-weight:650;font-size:14px;font-variant-numeric:tabular-nums}
html:root .empty{background:var(--surface);border:1.5px dashed var(--line);border-radius:22px;color:var(--muted)}
html:root .card{background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:var(--shadow)}
html:root .card h2{letter-spacing:-.025em;color:var(--text)}
html:root .card p{color:var(--muted)}
html:root details summary{color:var(--text);font-weight:650}
html:root .payrow{border-color:var(--line);font-size:14px;padding:12px 0}
html:root .payrow strong{font-variant-numeric:tabular-nums;color:var(--text)}
html:root .payrow small{color:var(--muted)}
html:root .payrow.total{background:var(--surface2);border:0;border-radius:14px;padding:14px 12px;margin:6px -12px}
html:root .payrow.final{background:linear-gradient(160deg,#164650,#0a2229);color:#fff;border-radius:18px;padding:18px 16px;margin:10px -12px 0;font-size:19px}
html:root .payrow.final strong{color:var(--accent)}
html:root .paysection{display:block;margin:26px 0 6px;padding:0;background:none;border-radius:0;color:var(--muted);font-size:11px;letter-spacing:.14em}
html:root .warning{background:var(--warn-bg);color:var(--warn-tx);border:1px solid var(--warn-bd);border-radius:16px;font-size:13px}
html:root .hint{background:var(--surface2);border:1px solid var(--line);border-radius:22px}
html:root label{color:var(--text);font-size:13px;font-weight:650}
html:root input,html:root select,html:root textarea{background:var(--surface2);color:var(--text);border:1px solid var(--line);border-radius:14px;transition:border-color .15s,box-shadow .15s}
html:root input:focus,html:root select:focus,html:root textarea:focus{border-color:#4aa3a3;box-shadow:0 0 0 4px #4aa3a326;outline:0}
html:root dialog{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:28px;box-shadow:0 30px 80px -20px #000a;animation:pop .22s ease}
html:root dialog::backdrop{background:#050e13b3;backdrop-filter:blur(6px)}
html:root .preview{background:var(--surface2);border-radius:16px}
html:root .danger{background:transparent;color:#d1495b;border:1px solid #d1495b55;border-radius:14px}
html:root #toast{background:var(--brand);color:#fff;border:1px solid #ffffff1f;border-radius:16px;box-shadow:0 14px 40px -10px #000a;bottom:100px}
html:root footer{color:var(--muted);border-color:var(--line)}
html:root section[id=home],html:root section[id=pay],html:root section[id=settings]{animation:rise .35s ease}
@media(max-width:600px){html:root dialog{margin:auto 0 0;width:100%;max-width:none;border-radius:28px 28px 0 0;max-height:92dvh}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

#lock{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:radial-gradient(120% 80% at 100% 0%,#2b8a8a44,transparent 55%),linear-gradient(160deg,#164650,#0a2229);color:#fff;padding:20px}
#lock[hidden]{display:none}html.locked{overflow:hidden}
.lk{width:min(100%,320px);text-align:center}.lkLogo{width:60px;height:60px;margin:0 auto 14px;border-radius:18px;background:#ffffff14;color:#b8f06a;font-size:38px;display:grid;place-items:center}
.lk h2{margin:0;font-size:22px;letter-spacing:-.02em;color:#fff}.lk p{min-height:40px;margin:6px 0 14px;color:#a9c6cb;font-size:14px}
.dots{display:flex;gap:14px;justify-content:center;margin-bottom:22px}.dots i{width:14px;height:14px;border-radius:50%;border:2px solid #ffffff66}.dots i.on{background:#b8f06a;border-color:#b8f06a}
.pad{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.pad button{height:64px;border-radius:50%;border:0;background:#ffffff14;color:#fff;font-size:26px;font-weight:600}.pad button:active{background:#ffffff33}
.lkLink{margin-top:18px;background:none;border:0;color:#b8f06a;font-size:14px}.shake{animation:shk .35s}@keyframes shk{20%,60%{transform:translateX(-10px)}40%,80%{transform:translateX(10px)}}
.btnrow{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.chk{display:flex;align-items:center;gap:10px}.chk input{width:auto;min-height:0}
.remBanner{display:flex;align-items:center;gap:10px;background:var(--warn-bg);color:var(--warn-tx);border:1px solid var(--warn-bd);border-radius:18px;padding:12px 14px;margin-bottom:14px}.remBanner div{flex:1}.remBanner strong{display:block}.remBanner small{font-size:12px}.remX{background:none;border:0;color:inherit;font-size:24px;line-height:1;width:34px}

/* ===== Design Nexo : même esthétique que nexocorp ===== */
html:root{--bg:#fafafa;--surface:#fff;--surface2:#f4f4f5;--raised:#fff;--text:#171717;--muted:#5c5c63;--faint:#737373;--line:#17171714;--ctl:#17171724;--brand:#047857;--accent:#047857;--accent-h:#065f46;--on-accent:#fff;--tint:#ecf5f0;--accent-bd:#04785740;--ring:#04785729;--hero:#fff;--grid:#1717170d;--glass:#fafafae6;--shadow:0 1px 2px #0000000d;--shadow-lg:0 8px 24px #00000014;--warn-bg:#fef6e7;--warn-tx:#7a4d06;--warn-bd:#f2c46d66;--r:14px;--r-sm:10px;--ease:cubic-bezier(.22,1,.36,1)}
html:root[data-theme=dark]{--bg:#111312;--surface:#19191b;--surface2:#1f1f22;--raised:#232325;--text:#ededed;--muted:#a1a1a6;--faint:#85858b;--line:#ededed14;--ctl:#ededed1f;--brand:#10b981;--accent:#10b981;--accent-h:#34d399;--on-accent:#03140d;--tint:#34d3991a;--accent-bd:#34d39947;--ring:#34d39933;--hero:#171a19;--grid:#ededed0a;--glass:#141415e6;--shadow:none;--shadow-lg:0 16px 40px #00000073;--warn-bg:#f5a5241a;--warn-tx:#f6c770;--warn-bd:#f5a52440}
html:root body{font-family:Inter,ui-sans-serif,"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,sans-serif;font-feature-settings:"cv11","ss01";font-size:15px;line-height:1.6;background:var(--bg);color:var(--text)}
html:root[data-theme=dark] body{background:radial-gradient(768px 416px at 8% -160px,#10b9811c,transparent 70%),radial-gradient(640px 384px at 96% -128px,#06b6d414,transparent 70%),var(--bg);background-attachment:fixed}
html:root[data-theme=light] body{background:radial-gradient(768px 416px at 8% -160px,#10b98114,transparent 70%),radial-gradient(640px 384px at 96% -128px,#06b6d40d,transparent 70%),var(--bg)}
html:root ::selection{background:var(--ring)}

/* En-tête */
html:root header{padding-bottom:14px;border-bottom:1px solid var(--line);margin:0 0 20px}
html:root .logo{width:36px;height:36px;border-radius:var(--r-sm);font-size:24px;background:var(--accent);color:var(--on-accent);box-shadow:inset 0 1px 0 #ffffff26}
html:root .brand{gap:10px}
html:root .brand strong{font-size:17px;font-weight:600;letter-spacing:-.02em}
html:root .brand em{background:var(--tint);color:var(--accent-h);border:1px solid var(--accent-bd);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:600;letter-spacing:0}
html:root[data-theme=light] .brand em{color:var(--accent)}
html:root .brand small{font-size:11px;letter-spacing:0;font-weight:400;color:var(--muted);margin-top:1px}
html:root .localbadge{display:inline-flex;align-items:center;gap:7px;background:var(--surface);border:1px solid var(--ctl);color:var(--muted);border-radius:999px;padding:5px 12px;font-size:12px;font-weight:500}
html:root .localbadge::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px var(--ring)}

/* Barre d'onglets */
html:root .tabs{background:var(--glass);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-lg);padding:5px}
html:root .tabs button{border-radius:var(--r-sm);color:var(--muted);font-weight:500;font-size:11px;min-height:48px}
html:root .tabs button:hover{color:var(--text)}
html:root .tabs button[aria-current]{background:var(--tint);color:var(--accent-h);box-shadow:inset 0 0 0 1px var(--accent-bd)}
html:root[data-theme=light] .tabs button[aria-current]{color:var(--accent)}

/* Sélecteur de mois */
html:root .monthbar{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:5px}
html:root .monthlabel input{font-size:16px;font-weight:600}
html:root .round{background:transparent;border:1px solid var(--ctl);border-radius:var(--r-sm);color:var(--text);width:40px;height:40px;min-height:40px;font-size:20px}
html:root .round:hover{background:var(--surface2)}

/* Carte principale : grille + titre en dégradé */
html:root .balance{background:var(--hero);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);padding:26px 22px 22px;color:var(--text);isolation:isolate}
html:root .balance::before{content:"";position:absolute;inset:0;z-index:-1;background-image:linear-gradient(var(--grid) 1px,transparent 1px),linear-gradient(90deg,var(--grid) 1px,transparent 1px);background-size:32px 32px;-webkit-mask-image:radial-gradient(ellipse 90% 80% at 50% 0%,#000 30%,transparent 75%);mask-image:radial-gradient(ellipse 90% 80% at 50% 0%,#000 30%,transparent 75%)}
html:root .balance .eyebrow{display:inline-flex;align-items:center;gap:8px;background:var(--surface2);border:1px solid var(--line);border-radius:999px;padding:4px 12px;color:var(--muted);font-size:12px;font-weight:500;letter-spacing:0;text-transform:none}
html:root .balance .eyebrow::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px var(--ring)}
html:root .balance h1{font-weight:600;letter-spacing:-.03em;margin:14px 0 6px;background:linear-gradient(90deg,#34d399,#22d3ee);-webkit-background-clip:text;background-clip:text;color:transparent}
html:root[data-theme=light] .balance h1{background-image:linear-gradient(90deg,#047857,#0e7490)}
html:root .balance p{color:var(--muted);font-size:14px}
html:root .metrics{margin-top:22px;padding-top:18px;border-top:1px solid var(--line);gap:0}
html:root .metrics>div{background:none;border:0;border-radius:0;padding:0 6px;text-align:left}
html:root .metrics>div+div{border-left:1px solid var(--line);padding-left:14px}
html:root .metrics strong{color:var(--text);font-size:22px;font-weight:600;letter-spacing:-.02em}
html:root .metrics span{color:var(--muted);font-size:12px;margin-top:2px}

/* Boutons */
html:root button{border-radius:var(--r-sm);font-weight:500;transition:background .2s var(--ease),border-color .2s var(--ease),color .2s var(--ease)}
html:root .primary{background:var(--accent);color:var(--on-accent);border:0;border-radius:var(--r-sm);padding:9px 20px;font-weight:500;box-shadow:inset 0 1px 0 #ffffff26}
html:root .primary:hover{background:var(--accent-h)}
html:root .secondary{background:var(--surface);color:var(--text);border:1px solid var(--ctl);border-radius:var(--r-sm);font-weight:500}
html:root .secondary:hover{background:var(--surface2)}
html:root .danger{border-radius:var(--r-sm)}
html:root :is(button,input,select,textarea):focus-visible,html:root .filebutton:focus-within{outline:2px solid var(--accent);outline-offset:2px}

/* Bascule gagné / mois complet */
html:root .seg{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:4px}
html:root .seg button{border-radius:var(--r-sm);font-weight:500;min-height:38px}
html:root .seg button[aria-pressed=true]{background:var(--surface2);color:var(--text);box-shadow:inset 0 0 0 1px var(--ctl)}

/* Ajout rapide */
html:root .quick{background:var(--surface);color:var(--text);border:1px solid var(--accent-bd);border-radius:var(--r);box-shadow:var(--shadow)}
html:root .quick:hover{background:var(--tint)}
html:root .quick .qi{background:var(--accent);color:var(--on-accent);border-radius:var(--r-sm);width:40px;height:40px}
html:root .quick strong{color:var(--text);font-weight:600}
html:root .quick small{color:var(--muted)}

/* Journées */
html:root .entry{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
html:root .entry:hover{border-color:var(--accent-bd)}
html:root .datebox{background:var(--tint);color:var(--accent-h);border:1px solid var(--accent-bd);border-radius:var(--r-sm);font-weight:600;font-size:17px;min-width:44px;min-height:44px}
html:root[data-theme=light] .datebox{color:var(--accent)}
html:root .entry strong{font-weight:600}
html:root .entry .money{font-family:"JetBrains Mono","Cascadia Code",ui-monospace,Consolas,monospace;font-weight:500;font-size:13px}
html:root .empty{background:var(--surface);border:1px dashed var(--ctl);border-radius:var(--r)}

/* Cartes, paie */
html:root .card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow);padding:22px}
html:root .card h2,html:root .sectionhead h2{font-weight:600;letter-spacing:-.02em}
html:root .payrow strong{font-family:"JetBrains Mono","Cascadia Code",ui-monospace,Consolas,monospace;font-weight:500;font-size:13px}
html:root .payrow.total{background:var(--surface2);border-radius:var(--r-sm)}
html:root .payrow.total strong{font-weight:600}
html:root .payrow.final{background:var(--hero);color:var(--text);border:1px solid var(--accent-bd);border-radius:var(--r);box-shadow:inset 0 0 0 1px var(--accent-bd),0 0 40px -12px var(--ring)}
html:root .payrow.final strong{color:var(--accent-h);font-size:17px;font-weight:600}
html:root[data-theme=light] .payrow.final strong{color:var(--accent)}
html:root .payrow.final small{color:var(--muted)}
html:root .paysection{color:var(--faint);font-size:11px;font-weight:600;letter-spacing:.08em}
html:root .tag{background:var(--tint);color:var(--accent-h);border:1px solid var(--accent-bd);border-radius:999px;padding:1px 8px}
html:root .referencecheck{background:var(--tint);border:1px solid var(--accent-bd);border-radius:var(--r-sm);color:var(--text)}
html:root .referencecheck.bad{background:var(--warn-bg);border-color:var(--warn-bd);color:var(--warn-tx)}
html:root :is(.warning,.remBanner){background:var(--warn-bg);color:var(--warn-tx);border:1px solid var(--warn-bd);border-radius:var(--r-sm)}
html:root .hint{background:var(--surface);border:1px solid var(--accent-bd);border-radius:var(--r)}
html:root .settingsgroup{border-color:var(--line)}

/* Champs */
html:root label{font-weight:500;color:var(--text)}
html:root :is(input,select,textarea){background:var(--surface2);border:1px solid var(--ctl);border-radius:var(--r-sm);color:var(--text)}
html:root :is(input,select,textarea):focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--ring);outline:0}
html:root .filebutton{border:1px solid var(--ctl);border-radius:var(--r-sm);background:var(--surface);font-weight:500}
html:root .filebutton:hover{background:var(--surface2)}
html:root .check input{accent-color:var(--accent)}

/* Fenêtres */
html:root dialog{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow-lg)}
html:root dialog::backdrop{background:#000000a6;backdrop-filter:blur(4px)}
html:root .preview{background:var(--surface2);border:1px solid var(--line);border-radius:var(--r-sm)}
html:root #toast{background:var(--raised);color:var(--text);border:1px solid var(--ctl);border-radius:var(--r-sm);box-shadow:var(--shadow-lg)}
html:root footer{border-color:var(--line);color:var(--faint);letter-spacing:.08em}
@media(max-width:600px){html:root dialog{border-radius:20px 20px 0 0}}

/* Écran de verrouillage */
html:root #lock{background:radial-gradient(768px 416px at 8% -160px,#10b9812e,transparent 70%),radial-gradient(640px 384px at 96% -128px,#06b6d41f,transparent 70%),#111312;color:#ededed}
html:root .lkLogo{background:#10b981;color:#03140d;border-radius:14px;width:52px;height:52px;font-size:32px}
html:root .lk h2{font-weight:600;color:#ededed}
html:root .lk p{color:#a1a1a6}
html:root .dots i{border-color:#ededed3d}
html:root .dots i.on{background:#10b981;border-color:#10b981}
html:root .pad button{background:#19191b;border:1px solid #ededed14;color:#ededed;font-weight:500}
html:root .pad button:active{background:#232325}
html:root .lkLink{color:#34d399}
html:root .monthbar{align-items:center}
html:root .monthlabel input{margin:0;min-height:40px;padding:6px;background:transparent;border:0;box-shadow:none}
html:root :is(.entry .money,.payrow strong){font-family:inherit;font-variant-numeric:tabular-nums;font-size:14px}
html:root img.logo{display:block;padding:0;background:none;box-shadow:none;object-fit:cover}
html:root .lkLogo{background:none;padding:0;overflow:hidden}html:root .lkLogo img{width:100%;height:100%;display:block}
html:root .brand small{text-transform:none}
