:root{--ink:#18334d;--muted:#718095;--bg:#f5f7fa;--border:#e2e8ef;--brand-green:#16704d;--blue:#2672bd;--green:#16835b;--sidebar:224px}*{box-sizing:border-box}body{margin:0;font:15px/1.5 'Segoe UI',Arial,sans-serif;color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;border:0;background:none;color:inherit;border-radius:7px}a{color:var(--blue);text-decoration:none}a:hover{text-decoration:underline}[hidden]{display:none!important}button:disabled{opacity:.55;cursor:wait}input,select,textarea{width:100%;border:1px solid #cdd7e1;background:white;border-radius:6px;padding:9px 10px;color:var(--ink);min-height:39px}input:focus,select:focus,textarea:focus{outline:2px solid #b0d0ed;outline-offset:1px}textarea{min-height:85px;resize:vertical}label{display:block;font-size:13px;font-weight:600;color:#54667b;margin:0 0 14px}label input,label select,label textarea{display:block;margin-top:6px;font-size:15px;font-weight:400}label.check{display:flex;gap:9px;align-items:center;font-size:14px}label.check input{width:17px;min-height:17px;height:17px;margin:0}button.primary,.button.primary{padding:10px 17px;background:var(--green);color:white;font-weight:600;box-shadow:0 2px 3px #102b3610}button.primary:hover{background:#106b49}button.secondary,.button.secondary{border:1px solid #cbd5df;background:white;padding:9px 13px;color:#3f5670}.button{display:inline-block;border-radius:7px;white-space:nowrap}.muted,small{color:var(--muted)}small{font-size:13px}.error{color:#b13838;font-size:14px;white-space:pre-line}.eyebrow{font-size:11px;letter-spacing:1.8px;font-weight:700;color:#8a97a8;margin:0 0 8px}h1{font-size:30px;letter-spacing:-.7px;font-weight:650;margin:0 0 7px}h2{font-size:20px;margin:0;font-weight:650}h3{font-size:16px;margin:0 0 12px}.topbar{height:66px;position:fixed;inset:0 0 auto;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:20px;background:var(--brand-green);padding:0 25px;box-shadow:0 1px 0 #142c3c0f}.brand{display:flex;align-items:center;gap:12px;color:var(--ink)}.brand:hover{text-decoration:none}.brand strong{font-size:21px;letter-spacing:-.5px}.brand-divider{margin:0 4px;color:#856e2f}.brandmark{font-size:44px;line-height:1;font-weight:800;letter-spacing:-5px;color:var(--ink)}.brandmark span{color:#dfaa00}.brandmark.small{font-size:29px;width:31px;letter-spacing:-3px}.brandmark.small span{color:white}.top-right{display:flex;align-items:center;gap:17px;font-size:13px}.top-right button{font-size:13px;text-decoration:underline}.private-badge{font-size:12px;background:#ffffff60;border:1px solid #fff8;border-radius:20px;padding:4px 11px}.topbar #menu-toggle{display:none}aside{position:fixed;left:0;top:66px;bottom:0;width:var(--sidebar);background:white;border-right:1px solid var(--border);padding:26px 15px;z-index:20;display:flex;flex-direction:column}.company-label{font-size:11px;letter-spacing:1.4px;color:#99a4b1;padding:0 14px 18px}nav{display:flex;flex-direction:column;gap:4px}nav button{display:flex;align-items:center;gap:12px;text-align:left;padding:10px 13px;font-size:14px;color:#65758a;font-weight:500}nav button span{font-size:21px;width:22px;color:#8999ab}nav button:hover{background:#f4f6f9}nav button.active{background:#e5f3eb;color:#215c43;font-weight:650}nav button.active span{color:#16704d}.nav-divider{border-top:1px solid #edf0f4;margin:14px 8px}.sidebar-footer{margin-top:auto;padding:18px 12px 0;color:#8190a2;font-size:12px}.sidebar-footer strong{font-weight:600;color:#64768c}.sidebar-footer p{margin:5px 0 14px}.version{font-size:11px;letter-spacing:.4px}main{margin:66px 0 0 var(--sidebar);padding:35px 38px;max-width:1700px}.page-top{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:26px}.page-actions{display:flex;align-items:center;gap:10px}.page-actions select{width:auto;min-width:110px;background:white}.notice{padding:14px 18px;background:#fff8df;border:1px solid #f1e3ab;border-radius:8px;margin-bottom:23px;font-size:13px;color:#7b692d}.notice button{font-weight:700;text-decoration:underline}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:24px}.card,.panel{background:white;border:1px solid var(--border);border-radius:10px;box-shadow:0 3px 9px #233a5203}.card{padding:21px 22px}.card .label{font-size:13px;color:#8390a1}.card .value{font-size:28px;font-weight:650;margin:10px 0 3px;letter-spacing:-.6px}.card .detail{font-size:12px;color:#99a4b1}.panel{padding:23px;margin-bottom:22px}.panel-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.split{display:grid;grid-template-columns:1.6fr 1fr;gap:22px}.empty{text-align:center;padding:48px 25px;color:#8a99a9}.empty strong{color:#52677f;font-size:17px;display:block;margin-bottom:8px}.empty p{margin:7px 0 18px}.table-wrap{overflow:auto;background:white;border:1px solid var(--border);border-radius:9px}table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:13px;text-align:left}th{padding:14px 17px;background:#f9fafc;color:#8b97a6;font-weight:600;font-size:12px;border-bottom:1px solid var(--border)}td{padding:14px 17px;border-bottom:1px solid #edf1f5;color:#546a80}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fbfcff}td.description{max-width:250px;overflow:hidden;text-overflow:ellipsis}td.amount,th.amount{text-align:right;font-variant-numeric:tabular-nums}td a,td button{font-weight:600;color:var(--blue);font-size:13px}.status{display:inline-block;border-radius:5px;padding:3px 8px;font-size:11px;font-weight:600;background:#edf1f5;color:#7a8999}.status.issued{background:#e8f1ff;color:#356fa5}.status.paid,.status.accepted{background:#e7f5ee;color:#268463}.status.overdue,.status.rejected,.status.cancelled{background:#fff0ef;color:#bb5959}.toolbar{display:flex;gap:12px;margin-bottom:17px;align-items:center}.toolbar input{max-width:350px}.toolbar select{width:auto}.toolbar .right{margin-left:auto}.count{font-size:13px;color:var(--muted)}.bar-chart{display:flex;align-items:flex-end;gap:13px;height:185px;border-bottom:1px solid #e1e7ee;margin:25px 0 7px;padding:0 5px}.month-bar{height:100%;flex:1;display:flex;flex-direction:column;justify-content:flex-end;gap:6px;min-width:14px}.bar-pair{display:flex;gap:3px;align-items:flex-end;height:155px}.bar{flex:1;min-height:2px;background:#69a79a;border-radius:3px 3px 0 0}.bar.cost{background:#f0c85a}.month-name{text-align:center;font-size:10px;color:#98a4b3}.legend{display:flex;gap:18px;font-size:12px;color:#8391a2}.legend i{width:8px;height:8px;display:inline-block;background:#69a79a;border-radius:2px;margin-right:6px}.legend i.cost{background:#f0c85a}.quick-action{display:flex;width:100%;align-items:center;justify-content:space-between;padding:13px 0;border-bottom:1px solid #eef1f5;font-size:14px;color:#526d86}.quick-action:last-child{border:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.form-grid .full{grid-column:1/-1}.help{font-size:12px;color:#8c99a9;margin-top:-7px;margin-bottom:15px}.section-title{font-size:13px;text-transform:uppercase;letter-spacing:1px;font-weight:650;color:#7c8b9e;border-bottom:1px solid #e9edf2;padding-bottom:10px;margin:19px 0 18px}.line-row{display:grid;grid-template-columns:72px 1fr 110px 105px 28px;gap:8px;align-items:start;margin-bottom:10px}.line-row input,.line-row select{font-size:13px}.line-row label{margin:0;font-size:11px}.line-row button{margin-top:29px;color:#ad5959;font-size:21px}.line-controls{display:flex;align-items:center;justify-content:space-between;margin:10px 0 22px}.line-total{font-weight:650;font-size:15px}.document{max-width:900px}.document-head{display:flex;justify-content:space-between;gap:30px;margin-bottom:26px}.document-head .muted{white-space:pre-line;font-size:13px}.document-actions{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:21px}.totals{max-width:330px;margin:20px 0 20px auto}.totals div{display:flex;justify-content:space-between;padding:8px 0;color:#67798b}.totals .grand{font-size:18px;color:var(--ink);font-weight:700;border-top:2px solid #e2e8ef}.notes{white-space:pre-wrap;color:#61758b;font-size:14px}.app-footer{font-size:11px;color:#a5afbd;margin-top:32px}dialog{padding:0;border:0;border-radius:12px;width:min(900px,94vw);max-height:90vh;box-shadow:0 24px 100px #15304745;color:var(--ink)}dialog::backdrop{background:#18334d70;backdrop-filter:blur(2px)}.modal-head{display:flex;align-items:center;justify-content:space-between;padding:22px 27px;border-bottom:1px solid var(--border);background:#fbfcfe}.modal-head button{font-size:27px;color:#8393a7}#editor-form{padding:22px 27px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:19px;border-top:1px solid var(--border);margin-top:20px}#toast{position:fixed;bottom:25px;right:25px;max-width:480px;z-index:100;background:#18334d;color:white;padding:14px 20px;border-radius:9px;box-shadow:0 6px 25px #13294030;font-size:14px}.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(120deg,#e0f0e7,#f7f9fc 55%);padding:30px}.login-card{width:440px;padding:42px;background:white;border:1px solid #e3e7ec;border-radius:14px;box-shadow:0 15px 70px #283d4c12}.login-card .brandmark{margin-bottom:30px}.login-card h1{font-size:27px}.login-card .muted{font-size:14px;margin-bottom:27px}.login-card button{width:100%;margin:5px 0 13px}.login-card small{display:block;text-align:center;font-size:11px;line-height:1.7}.login-card .eyebrow{font-size:10px}.export-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.export-item{border:1px solid var(--border);border-radius:8px;padding:20px}.export-item p{font-size:13px;color:var(--muted)}.checkbox-cell{width:25px;min-height:15px;height:15px}.tagline{font-size:13px;color:var(--muted);margin:0 0 20px}.danger{color:#b94a48!important}.settings-save{position:sticky;bottom:15px;padding:13px;background:#fffffff0;border:1px solid var(--border);border-radius:8px;display:flex;justify-content:flex-end;z-index:5}.skeleton{padding:60px;text-align:center;color:#8b99a8}
.price-field>label{margin:0}.line-row label.price-mode{font-size:10px;gap:4px;margin-top:5px;font-weight:400}.price-mode input{width:13px;height:13px;min-height:13px;margin:0}.price-tax{display:block;font-size:10px}.financial-cards{grid-template-columns:repeat(auto-fit,minmax(165px,1fr))}.financial-cards .value{font-size:25px}.signed-chart .bar-pair{position:relative;border-bottom:0}.signed-chart .bar-pair:before{content:'';position:absolute;left:0;right:0;top:50%;height:1px;background:#d2dce7}.signed-chart .bar{position:absolute;width:46%;min-height:0;border-radius:2px}.signed-chart .bar.negative{background:#bd6776;border-radius:0 0 2px 2px}.status.credited{background:#eee9fa;color:#7558a2}.source-badge{display:inline-block;margin:4px 5px 0 0;font-size:11px;line-height:1.5;border:1px solid #d6e5ee;background:#f0f7fc;color:#537a99;border-radius:4px;padding:2px 6px;white-space:nowrap}.credit-badge{background:#fff4e7;border-color:#f0d8b9;color:#966a37}.document-help{margin-top:12px;line-height:1.7}.import-notice{max-width:900px}.import-notice p,.cutover-notice p{margin:9px 0;line-height:1.65}.cutover-notice .check{align-items:flex-start;margin-bottom:2px;line-height:1.6}.cutover-notice .check input{flex:none;margin-top:2px}.number-preview{padding:13px 15px;background:#eff7f2;border:1px solid #d6e7dc;border-radius:7px;font-size:13px}.document-actions button,.document-actions .button{white-space:normal;text-align:center}.toolbar{flex-wrap:wrap}.toolbar input{flex:1 1 180px;min-width:0}.document table{white-space:normal}.document td:nth-child(2){min-width:170px}.document td:not(:nth-child(2)){white-space:nowrap}input:disabled,select:disabled,textarea:disabled,input[readonly]{background:#f1f4f7;color:#718095}.topbar .brandmark.small{width:30px}
@media(max-width:1150px){:root{--sidebar:192px}main{padding:28px 24px}.cards{grid-template-columns:repeat(2,1fr)}.page-top{align-items:flex-start}.page-actions{flex-wrap:wrap;justify-content:flex-end}.page-actions #refresh{display:none}.split{grid-template-columns:1fr}.export-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){:root{--sidebar:0px}.topbar{height:58px;padding:0 15px;gap:10px}.brand{gap:8px}.brand strong{font-size:18px}.brand-divider,.brand>span:last-child,.top-right .private-badge,#user-name{display:none}.topbar #menu-toggle{display:block;font-size:22px}.top-right{margin-left:auto}.topbar .brandmark{font-size:25px}aside{top:58px;width:224px;transform:translateX(-100%);box-shadow:10px 0 30px #182f4915;transition:transform .15s}body.menu-open aside{transform:translateX(0)}main{margin-top:58px;padding:23px 15px}.page-top{display:block;margin-bottom:20px}.page-actions{justify-content:flex-start;margin-top:15px}.page-actions select{min-width:95px}.cards{gap:10px}.card{padding:15px}.card .value{font-size:23px}.panel{padding:17px}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.line-row{grid-template-columns:62px 1fr 28px}.line-row label:nth-child(3),.line-row label:nth-child(4){grid-row:2}.line-row>.price-field{grid-row:2;grid-column:1}.line-row label:nth-child(3){grid-column:1}.line-row label:nth-child(4){grid-column:2}.line-row button{grid-column:3;grid-row:1}.export-grid{grid-template-columns:1fr}.document-head{display:block}.document-head>div+div{margin-top:20px}#editor-form{padding:17px}.modal-head{padding:17px}.login-card{padding:27px}.bar-chart{gap:6px}.notice{font-size:12px}}

/* Explicit VAT entry mode; schemes and source amounts remain per line. */
.vat-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;border-bottom:1px solid var(--border);margin:18px 0 10px;padding-bottom:12px}.vat-toolbar .section-title{margin:0;padding:0;border:0}.vat-price-switch{display:flex;border:1px solid #aebdcb;border-radius:7px;overflow:hidden}.vat-price-switch button{padding:9px 13px;border-radius:0;background:white;font-size:13px;min-height:40px}.vat-price-switch button+button{border-left:1px solid #aebdcb}.vat-price-switch button[aria-pressed=true]{background:#e4eff9;color:#155b97;box-shadow:inset 0 -3px #2672bd;font-weight:700}.vat-price-switch button:focus-visible{outline:2px solid #2672bd;outline-offset:-3px}.vat-price-switch button:disabled{cursor:not-allowed}.vat-help{font-size:13px;color:#61758b;margin:0 0 18px;line-height:1.6}.line-row{grid-template-columns:72px minmax(0,1fr) 135px 145px 28px}.line-row label.price-mode{font-size:12px;gap:6px;margin-top:8px;line-height:1.5}.price-mode input{width:16px;height:16px;min-height:16px;flex:none}.editor-totals{max-width:360px;margin:0 0 20px auto;font-variant-numeric:tabular-nums}.editor-totals>div{display:flex;justify-content:space-between;gap:20px;padding:8px 0;font-size:13px;color:#61758b}.editor-totals .grand{border-top:1px solid var(--border);font-size:15px;color:var(--ink)}
@media(max-width:720px){.vat-toolbar{gap:10px}.vat-price-switch{width:100%}.vat-price-switch button{flex:1;min-height:44px}.line-row{grid-template-columns:110px minmax(0,1fr) 28px}.line-row>.price-field{grid-row:2;grid-column:1}.line-row>label:nth-child(4){grid-row:2;grid-column:2}.editor-totals{max-width:none}}

/* FastFactuur's own green identity; blue editing/saving and red errors. */
:root{--header-green:#16704d;--header-blue:#205da1;--header-red:#a52b35;--header-height:66px}
.topbar{isolation:isolate;color:white;background:var(--header-green);transition:background-color .18s ease}
.topbar:before{content:'';position:absolute;inset:0;z-index:-1;background:var(--header-green);transform:scaleX(0);transform-origin:left;pointer-events:none}
.topbar .brand,.topbar .brandmark,.topbar .brandmark span,.topbar .brand-divider,.topbar button{color:white}.topbar .brand-divider{opacity:.65}.topbar .private-badge{border-color:#ffffff60;background:#ffffff18}
.topbar[data-status=editing],.topbar[data-status=saving],.topbar[data-status=saved]{background:var(--header-blue)}
.topbar[data-status=saved]:before{animation:header-confirmed-save .95s ease-in-out forwards}
.topbar[data-status=error]{background:var(--header-red)}
.save-status{font-size:12px;font-weight:600;padding:5px 10px;border-radius:20px;border:1px solid #ffffff45;white-space:nowrap;background:#00000010}
.topbar[data-status=saving] .save-status:before{content:'';display:inline-block;width:9px;height:9px;border:2px solid #ffffff70;border-top-color:white;border-radius:50%;margin-right:7px;vertical-align:-1px;animation:header-saving-spin .75s linear infinite}
.login-card .brandmark span{color:var(--header-green)}
/* Keep the real status header visible above the modal, including on phones. */
dialog{margin:calc(var(--header-height) + 16px) auto 16px;max-height:calc(100dvh - var(--header-height) - 32px)}
dialog::backdrop{background:linear-gradient(to bottom,transparent 0 var(--header-height),#18334d70 var(--header-height) 100%);backdrop-filter:none}
@keyframes header-confirmed-save{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes header-saving-spin{to{transform:rotate(360deg)}}
@media(max-width:950px){.top-right .private-badge{display:none}.top-right{gap:10px}}
@media(max-width:720px){:root{--header-height:58px}.topbar{gap:7px}.topbar .brand{gap:5px}.topbar .brand strong{font-size:18px}.topbar .top-right{gap:8px}.save-status{font-size:11px;max-width:124px;overflow:hidden;text-overflow:ellipsis;padding:4px 7px}.topbar #logout{font-size:12px}.topbar .brandmark.small{width:21px}.topbar{padding:0 10px}}
@media(prefers-reduced-motion:reduce){.topbar{transition:none}.topbar[data-status=saved]:before{animation:none;transform:scaleX(1)}.topbar[data-status=saving] .save-status:before{animation:none}}

/* F·F is drawn as paths: translation cannot replace its letters or dot. */
.brandmark.ff-mark{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;letter-spacing:normal;font-size:0;line-height:1;width:76px;height:48px;color:var(--header-green)}
.brandmark.ff-mark svg{display:block;width:100%;height:100%;overflow:visible}
.topbar .brandmark.ff-mark{width:48px;height:32px;color:white}
.year-control{display:flex;flex-direction:column;gap:3px;margin:0;font-size:11px;white-space:nowrap;min-width:0;color:#65758a}
.year-control select{margin:0;min-width:190px;width:100%}
@media(max-width:720px){.topbar .brandmark.ff-mark{width:34px;height:26px}.topbar .save-status{max-width:110px}.year-control select{min-width:185px}.page-actions{align-items:flex-end}}
@media(max-width:360px){.topbar .save-status{max-width:66px}.topbar .brand{gap:3px}.topbar .brand strong{font-size:17px}.topbar .top-right{gap:5px}}

/* Higher-contrast text, retaining font sizes, layout and status-color meaning. */
:root{--ink:#132c43;--muted:#52657a}
.muted,small,.help,.tagline,.count,.notes,.vat-help,.document-head .muted,
.card .label,.card .detail,.company-label,.eyebrow,.month-name,.legend,
.sidebar-footer,.sidebar-footer strong,.version,.app-footer,.year-control,
.editor-totals>div,.totals div{color:var(--muted)}
th{color:#4d6075}
td,label,nav button,.quick-action,.section-title,.modal-head button{color:#41566d}
nav button span{color:#627287}
nav button.active,nav button.active span{color:#215c43}
.editor-totals .grand,.totals .grand{color:var(--ink)}
.source-badge{color:#386184}
.status{color:#4d6075}
.status.paid,.status.accepted{color:#216b4f}
.status.overdue,.status.rejected,.status.cancelled{color:#9c3636}
input::placeholder,textarea::placeholder{color:#627287;opacity:1}
input:disabled,select:disabled,textarea:disabled,input[readonly]{color:#52657a}

.payment-history{min-width:210px;max-width:480px;white-space:normal;margin-top:9px;font-weight:400}
.payment-history summary{cursor:pointer;color:var(--blue);font-weight:600}
.payment-history ol{padding-left:20px}.payment-history li+li{border-top:1px solid var(--border);margin-top:14px;padding-top:12px}
.payment-history p{margin:6px 0;overflow-wrap:anywhere}

/* Unpaid invoice only: exact yellow left half / green right half. */
:root{--invoice-status-green:#8ed5ae;--invoice-status-ink:#123524}
.status.issued.outstanding{background:linear-gradient(to right,#ffe08a 0%,#ffe08a 50%,var(--invoice-status-green) 50%,var(--invoice-status-green) 100%);color:var(--invoice-status-ink)}
.status.paid{background:var(--invoice-status-green);color:var(--invoice-status-ink)}
