:root{font-family:Segoe UI,Arial,sans-serif;color:#203441;background:#eef3f5;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{border:1px solid #c9d6dc;border-radius:7px;background:white;color:#234251;padding:10px 14px;cursor:pointer;white-space:nowrap}button:hover:not(:disabled){background:#dcebee}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:#087e78;color:white;border-color:#087e78}.primary:hover:not(:disabled){background:#066c67}.hidden{display:none!important}.muted,.hint{color:#647886}.hint{font-size:12px}.error{color:#a02e2e;min-height:24px;margin-top:12px}.auth-page{min-height:100vh;padding:38px 20px;display:flex;justify-content:center;align-items:flex-start;background:linear-gradient(140deg,#e8f1f2,#f6f9fa)}.auth-card{background:white;box-shadow:0 18px 50px #19394822;border:1px solid #dce6e9;border-radius:14px;width:min(1020px,100%);padding:30px}.auth-card.narrow{width:min(470px,100%);margin-top:10vh}.auth-card h1{font-size:28px;margin:20px 0 4px}.brand,.side-brand{display:flex;gap:12px;align-items:center}.brand strong,.side-brand strong{display:block;font-size:17px}.brand small,.side-brand small{display:block;color:#718692}.brand-mark{width:40px;height:40px;background:#087e78;border-radius:8px;color:white;display:inline-grid;place-items:center;font-weight:750;letter-spacing:.4px}.company-tools,.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.company-tools{margin:24px 0 12px}.company-tools input{flex:1;min-width:200px}.profile-list{border:1px solid #d7e2e7;border-radius:8px;min-height:90px;max-height:225px;overflow:auto}.profile-row{padding:12px 15px;border-bottom:1px solid #e9eff1;display:flex;align-items:center;justify-content:space-between;cursor:pointer}.profile-row:last-child{border:0}.profile-row:hover,.profile-row.active{background:#e5f4f2}.profile-row b{font-weight:650}.profile-row small{display:block;color:#607581;margin-top:3px}.mapping{margin-top:18px;background:#f7fafb;border:1px solid #e0e9eb;padding:18px;border-radius:9px}.mapping-title{font-weight:700;margin-bottom:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 22px}label{display:block;color:#405b69;font-size:13px;font-weight:600}input,select{width:100%;border:1px solid #c9d7dc;border-radius:7px;padding:10px 11px;background:white;color:#18323e;margin-top:5px;min-height:40px}label.inline{display:flex;align-items:center;gap:9px;font-size:14px}label.inline input{width:17px;min-height:0;margin:0}.actions{justify-content:flex-end;margin-top:18px}.auth-card.narrow label{margin-top:16px}.shell{display:grid;grid-template-columns:235px minmax(0,1fr);height:100vh}.sidebar{display:flex;flex-direction:column;background:#e4ecef;border-right:1px solid #cad8de;min-height:0}.side-brand{background:#162d3a;color:white;padding:20px 14px;min-height:82px}.side-brand strong{font-size:13px}.side-brand small{color:#acc5ca}.sidebar nav{overflow:auto;flex:1;padding:11px 8px}.sidebar nav button{border:0;border-radius:6px;background:transparent;text-align:left;width:100%;padding:9px 12px;margin:1px 0;font-weight:600}.sidebar nav button.active{background:#087e78;color:white}.sidebar nav .group-label{font-size:11px;color:#738c98;padding:14px 12px 4px;font-weight:bold;letter-spacing:.8px}.side-footer{border-top:1px solid #cbd9df;padding:12px;font-size:12px;color:#526d7b}.side-footer button{display:block;margin-top:8px;width:100%}.content{min-width:0;display:flex;flex-direction:column;background:#f5f8f9}.page-head{display:flex;justify-content:space-between;align-items:center;background:white;padding:18px 22px 11px;min-height:82px}.page-head h1{font-size:24px;margin:0}.page-head p{margin:3px 0;color:#788e99}.page-head span{color:#617986}.ribbon{display:flex;gap:5px;padding:8px 12px;background:#eaf0f2;min-height:82px;overflow:auto;flex-shrink:0}.ribbon button{min-width:90px;min-height:61px;border:0;background:transparent;font-size:12px;font-weight:600;white-space:normal}.ribbon button:hover:not(:disabled){background:white}.filter-bar{display:flex;align-items:center;gap:8px;padding:10px 19px;background:white;border-bottom:1px solid #d8e1e5;min-height:62px}.filter-bar label{display:flex;align-items:center;gap:9px}.filter-bar input{width:min(350px,30vw);margin:0}.loading{display:flex;align-items:center;gap:9px;color:#087e78;margin-left:14px;font-weight:650}.loader{width:18px;height:18px;border:3px solid #b6dedb;border-top-color:#087e78;border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.grid-host{flex:1;min-height:0;display:flex;flex-direction:column;background:white;margin:10px 12px 0;border:1px solid #d6e2e6;border-radius:7px;overflow:hidden}.grid-header{overflow:hidden;background:#e8f0f2;min-height:38px;border-bottom:1px solid #cad7dc}.grid-scroll{overflow:auto;flex:1;position:relative}.grid-spacer{position:relative}.grid-window{position:absolute;left:0;right:0}.grid-line{display:grid;min-height:34px;align-items:center;width:max-content;min-width:100%;border-bottom:1px solid #edf1f2}.grid-line.head{font-weight:700;color:#325261;min-height:38px}.grid-line.row{cursor:pointer}.grid-line.row:nth-child(even){background:#fafcfc}.grid-line.row:hover{background:#e8f4f3}.grid-line.row.selected{background:#bde3df}.cell{padding:7px 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-right:1px solid #eff2f3;font-size:13px}.statusbar{display:flex;justify-content:space-between;align-items:center;background:white;border-top:1px solid #d8e4e7;padding:10px 18px;min-height:44px;margin:0 12px 10px}.modal{position:fixed;inset:0;background:#122b3a88;display:grid;place-items:center;padding:22px;z-index:5}.modal-card{min-width:0;width:min(1200px,100%);height:min(780px,90vh);background:white;border-radius:11px;display:flex;flex-direction:column;box-shadow:0 25px 70px #122b3a55}.modal-head{display:flex;justify-content:space-between;align-items:center;padding:17px 20px;border-bottom:1px solid #dce6e9}.modal-head h2{margin:0;font-size:20px}.modal-head p{margin:4px 0 0;color:#69818d}.modal-body{padding:16px;overflow:auto;flex:1;display:flex;flex-direction:column;gap:10px;min-height:0}.modal-body .grid-host{margin:0;min-height:250px}.detail-table{border-collapse:collapse;width:100%}.detail-table td{border-bottom:1px solid #e5ecef;padding:9px}.detail-table td:first-child{font-weight:700;width:220px;color:#435f6b}.activity-footer{display:flex;justify-content:space-between;align-items:center}.split-table{max-height:180px;overflow:auto;font-size:12px}.split-table table{border-collapse:collapse;width:100%}.split-table td,.split-table th{border:1px solid #e3e9ec;padding:5px 8px;text-align:left}.split-table th{background:#edf3f5}@media(max-width:850px){.shell{grid-template-columns:170px 1fr}.form-grid{grid-template-columns:1fr}.sidebar nav button{font-size:12px}.side-brand strong{font-size:11px}}

/* Keep controls visible while only the navigation and record list scroll. */
.shell{height:100vh;height:100dvh;max-height:100dvh;overflow:hidden}
.sidebar,.content{min-height:0;overflow:hidden}
.sidebar nav{min-height:0;flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain}
.side-footer,.side-brand,.page-head,.ribbon,.filter-bar,.statusbar{flex-shrink:0}
.page-head{gap:12px;min-width:0}
.page-title,.top-actions{display:flex;align-items:center;gap:14px;min-width:0}
.page-title>div{min-width:0}
.page-head h1,.page-head p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top-actions{white-space:nowrap}
.top-actions #logoutTop{color:#087e78;font-weight:700;border-color:#b7d7d4}
.filter-bar{flex-wrap:wrap}
.grid-host{min-height:0;flex:1 1 0;overflow:hidden}
.grid-header{flex:0 0 38px}
.grid-scroll{min-height:0;flex:1 1 0;overflow:auto;overscroll-behavior:contain}
.statusbar{gap:12px}
.menu-toggle,.menu-scrim{display:none}
@media(max-width:1000px){
 .shell{grid-template-columns:190px minmax(0,1fr)}
 .sidebar nav button{font-size:12px}
 .ribbon button{min-width:82px}
 .filter-bar input{width:min(310px,45vw)}
}
@media(max-width:760px){
 .shell{grid-template-columns:minmax(0,1fr)}
 .sidebar{position:fixed;z-index:22;top:0;bottom:0;left:0;width:min(270px,82vw);transform:translateX(-100%);transition:transform .18s ease;box-shadow:12px 0 28px #142d3c33}
 .shell.menu-open .sidebar{transform:translateX(0)}
 .shell.menu-open .menu-scrim{display:block;position:fixed;z-index:21;inset:0;background:#102c3e88;border:0;border-radius:0}
 .menu-toggle{display:inline-block;min-width:39px;padding:8px 10px;font-size:18px}
 .page-head{padding:10px 12px;min-height:65px}
 .page-head h1{font-size:19px}
 .page-head p{font-size:11px}
 .top-actions{gap:6px}
 .top-actions #userBadge{display:none}
 .top-actions #logoutTop{padding:8px;font-size:12px}
 .ribbon{min-height:70px;padding:5px 7px}
 .ribbon button{min-height:55px;min-width:74px;font-size:11px}
 .filter-bar{padding:7px 9px;gap:5px}
 .filter-bar label{flex:1;min-width:170px}
 .filter-bar input{width:100%;min-width:0}
 .grid-host{margin:6px 6px 0}
 .statusbar{margin:0 6px 6px;padding:7px 9px;font-size:12px}
}
@media(max-height:610px){
 .page-head{min-height:58px;padding-top:7px;padding-bottom:7px}
 .ribbon{min-height:65px;padding-top:2px;padding-bottom:2px}
 .ribbon button{min-height:56px}
 .filter-bar{min-height:50px;padding-top:5px;padding-bottom:5px}
 .statusbar{min-height:34px}
}
.record-editor{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:14px 18px}.record-editor label{font-weight:600}.editor-actions{display:flex;justify-content:flex-end;gap:8px;position:sticky;bottom:-16px;background:white;border-top:1px solid #dce6e9;padding:14px 0;z-index:2;margin-top:auto}.document-lines{overflow:auto;min-height:130px}.document-lines table{border-collapse:collapse;width:100%;min-width:1100px}.document-lines th{background:#e8f0f2;text-align:left;padding:8px}.document-lines td{padding:4px;border-bottom:1px solid #edf1f2}.document-lines td:first-child input{min-width:210px}.document-lines input{width:110px;font-size:13px;margin:0}.document-lines td:first-child input{width:230px}.document-total{text-align:right;padding:12px;font-size:16px}.activity-controls{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.activity-controls input{width:150px}.activity-controls input:first-child{width:230px}.notice{padding:12px;background:#fff4d8;border-radius:7px;color:#73531c}.report-card,.history-entry,.access-user{border:1px solid #dce6e9;border-radius:7px;padding:14px}.report-card{display:flex;justify-content:space-between;gap:12px;align-items:center}.history-entry pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;background:#f4f8f9;padding:12px}.access-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.access-user label{margin-top:7px}.grid-line.head .cell{cursor:pointer}.grid-line.head .cell:hover{background:#d5e6e8}@media(max-width:760px){.record-editor{grid-template-columns:repeat(2,minmax(0,1fr))}.access-grid{grid-template-columns:1fr}.activity-controls input{width:130px}.report-card{align-items:flex-start}}@media(max-width:450px){.record-editor{grid-template-columns:1fr}}
.platform-table-scroll{flex:0 0 auto;overflow-x:auto;max-height:none;margin:14px 0}.platform-table-scroll table{min-width:850px}.platform-table-scroll th{position:sticky;top:0;background:#edf2f7;text-align:left;padding:10px}.platform-table-scroll .company-tools{flex-wrap:wrap}.platform-table-scroll td{max-width:360px;overflow-wrap:anywhere}.form-grid input[type=checkbox]{width:24px;height:24px}.platform-table-scroll select{min-width:130px}

.client-account-row{cursor:pointer}.client-account-row:hover td,.client-account-row:focus td{background:#e5f4f2}.client-account-row:focus{outline:2px solid #087e78;outline-offset:-2px}textarea{font:inherit;width:100%;border:1px solid #c9d7dc;border-radius:7px;padding:10px 11px;color:#18323e;margin-top:5px;resize:vertical}.form-grid input[type=checkbox]{width:18px;min-height:18px;display:block}

/* Client sections keep their content height; the modal body owns vertical scrolling. */
.modal-head{flex-shrink:0}.modal-body>.platform-table-scroll{flex-shrink:0}.modal-body>h3,.modal-body>.company-tools,.modal-body>.form-grid,.modal-body>p{flex-shrink:0}

/* User accounts are normal-flow cards; no nested vertical scroll strips. */
.modal-body.client-profile{display:block}.client-toolbar{position:sticky;top:-16px;background:white;z-index:3;padding:12px 0;margin:0 0 12px;border-bottom:1px solid #dce6e9}.client-summary{display:flex;gap:14px;justify-content:space-between;flex-wrap:wrap;padding:16px;background:#e5f4f2;border-radius:8px}.client-profile h3{margin:24px 0 12px}.client-users{display:grid;gap:12px}.client-user-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 18px;border:1px solid #ccdce3;border-left:4px solid #087e78;border-radius:8px;padding:18px;background:white;min-height:125px}.client-user-name{font-size:18px;overflow-wrap:anywhere}.client-user-status{padding:4px 8px;background:#edf2f7;border-radius:5px}.client-user-companies{margin:0;line-height:1.6;grid-column:1/-1;overflow-wrap:anywhere}.client-user-actions{display:flex;flex-wrap:wrap;gap:8px;grid-column:1/-1}.client-profile .platform-table-scroll{overflow-y:visible;height:auto;max-height:none}.client-profile table{table-layout:auto}.client-profile td{padding:14px}
.column-context{position:fixed;z-index:30;background:white;padding:5px;border:1px solid #bdced7;border-radius:8px;box-shadow:0 8px 30px #1234}.column-customizer{position:fixed;z-index:25;right:22px;top:110px;width:360px;max-width:calc(100vw - 24px);max-height:calc(100vh - 130px);background:white;border:1px solid #9eb9c5;border-radius:10px;box-shadow:0 12px 40px #1235;display:flex;flex-direction:column}.column-customizer-head{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;background:#e5f4f2;cursor:move;border-radius:10px 10px 0 0}.column-customizer-body{padding:12px;overflow:auto;min-height:0}.column-customizer p{font-size:12px;margin:8px 0;line-height:1.5}.column-fields{display:grid;gap:5px;max-height:200px;overflow:auto;border:1px solid #d8e2e7;padding:6px}.column-field{display:flex;gap:7px;align-items:center;background:#f3f7f8;padding:7px;border:1px solid #d8e3e6;border-radius:5px;cursor:grab}.column-field span{flex:1;overflow-wrap:anywhere}.column-field input{width:65px;min-height:28px;padding:3px;margin:0}.column-field button{padding:3px 7px}.column-drop-target{outline:3px solid #087e78;outline-offset:-3px}.column-customizer-footer{display:flex;flex-wrap:wrap;gap:6px;padding:12px;border-top:1px solid #dce6e9}.column-layout-status{min-height:20px;color:#a02e2e;overflow-wrap:anywhere}.grid-header{position:relative}.grid-header .cell[draggable=true]{cursor:grab}
@media(max-width:600px){.client-user-card{grid-template-columns:minmax(0,1fr)}.client-user-status{justify-self:start}.client-toolbar button{padding:8px;font-size:12px}.column-customizer{top:70px;right:12px;max-height:calc(100vh - 90px)}}
/* Batch-entry controls stay outside the independently scrolling line grid. */
.modal-body.entry-workspace{display:flex;min-height:0;gap:10px}.entry-workspace>.notice,.entry-workspace>.entry-header,.entry-workspace>.entry-toolbar,.entry-workspace>.entry-totals,.entry-workspace>.entry-account-info,.entry-workspace>.error,.entry-workspace>.activity-controls,.entry-workspace>.editor-actions{flex-shrink:0}.entry-header{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.entry-grid-wrap{flex:1;min-height:150px;overflow:auto;border:1px solid #cadce3;border-radius:7px}.entry-table{border-collapse:separate;border-spacing:0;width:100%;min-width:1850px}.entry-table th{position:sticky;top:0;background:#e1ecef;padding:9px;text-align:left;z-index:1;white-space:nowrap}.entry-table td{padding:5px;border-bottom:1px solid #e5edef}.entry-table input,.entry-table select{min-width:115px;margin:0;padding:7px;font-size:13px}.entry-table [data-field=account],.entry-table [data-field=nominal],.entry-table [data-field=project]{width:190px}.entry-table [data-field=details]{width:250px}.entry-table [data-field=net],.entry-table [data-field=tax]{width:110px}.entry-table tr.active td{background:#e5f4f2}.entry-outstanding .entry-table{min-width:1100px}.entry-outstanding .entry-table input{width:120px}.entry-totals{text-align:right;padding:10px;background:#e5f4f2;border-radius:5px;font-size:16px}.entry-account-info{margin:0;color:#456673}.entry-toolbar{margin:0}.entry-toolbar button{padding:8px 10px;font-size:12px}.entry-success{background:#e5f4f2;padding:12px;color:#075f58}.entry-workspace .platform-table-scroll{flex:0 0 auto}.entry-workspace .editor-actions{margin-top:0;position:static;padding:10px 0}.entry-workspace .notice{margin:0;padding:9px;font-size:12px}.entry-workspace .error{margin:0;min-height:20px}.entry-workspace>.company-tools{flex-shrink:0}
@media(max-width:850px){.entry-header{grid-template-columns:repeat(2,minmax(0,1fr))}.entry-workspace .entry-grid-wrap{flex:0 0 260px}.entry-totals{font-size:13px}.entry-toolbar button{font-size:11px}.entry-header label{font-size:12px}}
.modal{z-index:24}.entry-workspace .editor-actions{position:sticky;bottom:-16px;z-index:2;background:white}
/* Maximise useful entry space; compact columns fit ordinary desktop screens. */
.wide-modal{padding:8px}.wide-modal .modal-card{width:100%;max-width:none;height:calc(100dvh - 16px);max-height:none}.wide-modal .modal-head{padding:12px 16px}.wide-modal .modal-body{padding:12px}.wide-modal .editor-actions{bottom:-12px}.wide-modal .entry-table{table-layout:fixed;min-width:1160px;width:100%}.wide-modal .entry-table th{padding:8px 4px;font-size:12px}.wide-modal .entry-table td{padding:4px}.wide-modal .entry-table input,.wide-modal .entry-table select{width:100%;min-width:0;padding:7px 4px;font-size:12px}.wide-modal .entry-table th:nth-child(1){width:14%}.wide-modal .entry-table th:nth-child(2),.wide-modal .entry-table th:nth-child(3){width:9%}.wide-modal .entry-table th:nth-child(9){width:12%}.wide-modal .entry-table th:nth-child(11){width:5%}.wide-modal .entry-table th:last-child{width:6%}.wide-modal .entry-outstanding .entry-table{min-width:850px;table-layout:auto}.wide-modal .entry-outstanding .entry-table input{min-width:90px}.wide-modal .document-lines table{min-width:1050px;width:100%}.wide-modal .entry-toolbar{gap:5px}.wide-modal .entry-toolbar button{padding:7px 8px}.wide-modal .entry-header{gap:8px}.wide-modal .entry-account-info{font-size:12px}.account-lookup{min-width:0;width:100%}.account-lookup input{width:100%;min-width:0}.account-suggestions{position:fixed;z-index:45;background:white;border:1px solid #a7c0ca;border-radius:7px;box-shadow:0 8px 28px #122b3a33;overflow:auto;overscroll-behavior:contain}.account-suggestions [role=option]{display:grid;grid-template-columns:minmax(75px,30%) minmax(0,1fr);gap:12px;padding:10px 12px;border-bottom:1px solid #edf2f4;cursor:pointer;font-size:13px}.account-suggestions [role=option]:hover,.account-suggestions [aria-selected=true]{background:#d9eeeb}.account-suggestions span,.account-suggestions strong{overflow-wrap:anywhere}.lookup-empty{padding:12px;color:#647886}
@media(max-width:850px){.wide-modal{padding:4px}.wide-modal .modal-card{height:calc(100dvh - 8px)}.wide-modal .modal-body{padding:8px}.wide-modal .entry-grid-wrap{min-height:180px}.wide-modal .entry-table{min-width:1160px}.wide-modal .editor-actions{bottom:-8px}.wide-modal .entry-header{grid-template-columns:repeat(2,minmax(0,1fr))}}
.wide-modal .entry-table [data-field=account],.wide-modal .entry-table [data-field=nominal],.wide-modal .entry-table [data-field=project],.wide-modal .entry-table [data-field=details],.wide-modal .entry-table [data-field=net],.wide-modal .entry-table [data-field=tax]{width:100%}
.wide-modal .comfortable-columns .entry-table{min-width:1850px}.wide-modal .comfortable-columns .entry-table th:nth-child(9){width:17%}
/* Activity, document and administration dialogs also use available screen space. */
.modal{padding:8px}.modal-card{width:100%;max-width:1800px;height:min(960px,calc(100dvh - 16px))}
.searchable-select{position:relative}.searchable-select>input{padding-right:30px!important}.search-select-source{display:none!important}.lookup-toggle{position:absolute;right:1px;top:6px;bottom:1px;border:0;background:transparent;padding:0 7px;min-height:0;color:#405b69;border-radius:0 6px 6px 0}.entry-table .lookup-toggle{top:1px}.searchable-select:has(input:disabled) .lookup-toggle{display:none}.account-suggestions [role=option]{min-height:38px}

.posting-progress{padding:12px;color:var(--text);border-bottom:3px solid #20a47b;animation:posting-pulse 1.2s ease-in-out infinite} @keyframes posting-pulse{50%{border-color:#98e4cc}}

.access-company-list{overflow:auto;max-height:45vh;border:1px solid #d6dde8;border-radius:8px}.access-company-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px;border-bottom:1px solid #e6ebf2}.access-company-row label{display:flex;align-items:center;gap:10px;flex:1}.access-company-row input[type=checkbox]{width:20px;height:20px}.access-company-row .select-search{min-width:180px}@media(max-width:700px){.access-company-row{flex-wrap:wrap}.access-company-row label{flex-basis:100%}}
/* Client administration: summary left, users and linked companies right. */
.client-account-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:18px;align-items:start;min-width:0}.client-account-summary{background:#edf5f7;border:1px solid #d4e2e7;border-radius:9px;padding:16px;overflow-wrap:anywhere}.client-account-summary h3{margin-top:8px}.client-account-panels{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(360px,1.15fr);gap:16px;min-width:0}.client-account-section{display:block;min-width:0;background:#fff;border:1px solid #d4e2e7;border-radius:9px;padding:14px}.client-account-section h3{margin:0 0 12px}.client-account-section .client-user-card{margin-top:12px}.client-account-section .platform-table-scroll{max-height:none;height:auto;overflow-x:auto}.client-company-panel .detail-table{min-width:440px}.client-company-panel .detail-table td{overflow-wrap:anywhere}.company-picker-row{display:flex;align-items:center;gap:12px;padding:12px;border-bottom:1px solid #dbe7eb}.company-picker-row input[type=checkbox]{width:18px;flex:0 0 18px}.mapping-progress{white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;color:#146257}.client-toolbar{position:sticky;top:-12px;z-index:3;background:#fff;padding:8px 0}.client-account-layout .client-users{grid-template-columns:none}
@media(max-width:1150px){.client-account-panels{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){.client-account-layout{grid-template-columns:minmax(0,1fr)}.client-account-summary{padding:12px}.client-toolbar{top:-8px}}
.client-account-section .client-user-card{grid-template-columns:minmax(0,1fr);padding:14px;gap:9px}.client-account-section .client-user-name{font-size:16px}.client-account-section .client-user-status{justify-self:start}.client-account-section .client-user-actions button{padding:8px 10px;font-size:12px}.client-company-panel input[type=checkbox]{width:18px;height:18px;min-height:18px;padding:0;margin:0}.client-company-panel .detail-table th:first-child,.client-company-panel .detail-table td:first-child{width:50px}.client-company-panel .detail-table td:nth-child(2){min-width:175px}.client-company-panel .detail-table td:last-child{min-width:145px}
/* Per-user view controls and UK account workspace. */
#sessionBanner{position:fixed;top:0;left:0;right:0;min-height:32px;background:#163b54;color:white;z-index:10000;padding:7px 18px;font-size:12px;line-height:18px;overflow-wrap:anywhere}#sessionBanner[hidden]{display:none}.has-session-banner .shell{height:calc(100dvh - 32px);margin-top:32px}.has-session-banner .auth-page{padding-top:55px}.has-session-banner .modal{top:32px}.has-session-banner .workspace-overlay{top:32px}.grid-header .cell{position:relative;padding-right:13px}.column-resize{position:absolute;top:0;right:0;width:10px;height:100%;cursor:col-resize;border-right:2px solid #c5d4e0;touch-action:none}.column-resize:hover{background:#87bcea}.account-editor{display:grid;grid-template-columns:175px minmax(0,1fr);gap:20px;min-height:420px}.account-editor-nav{display:flex;flex-direction:column;gap:4px}.account-editor-nav button{text-align:left;padding:14px}.account-editor-nav button.active{background:#155b94;color:white}.account-editor-panes{min-width:0}.account-editor-pane[hidden]{display:none}.account-editor-pane.record-editor{grid-template-columns:repeat(2,minmax(0,1fr))}.account-editor-pane fieldset{min-width:0;border:1px solid #cfdae5;border-radius:8px;padding:16px;display:grid;gap:12px}.account-editor-pane legend{font-weight:700;padding:0 5px}.account-editor-pane label{display:flex;flex-direction:column;gap:5px}.account-editor-pane .inline{flex-direction:row;align-items:center}.account-editor-pane input{width:100%;min-width:0}.account-editor-pane input[type=checkbox]{width:auto}.workspace-overlay{position:fixed;inset:0;background:#163b5466;z-index:3000;display:flex;padding:20px;align-items:center;justify-content:center}.workspace-overlay-panel{width:min(1600px,100%);height:min(850px,95%);background:white;border-radius:12px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px #15324655}.workspace-overlay-panel>header{display:flex;align-items:center;justify-content:space-between;padding:16px 22px;border-bottom:1px solid #d7e0e9;gap:12px}.workspace-overlay-panel h2{margin:0;font-size:21px}.workspace-overlay-content{padding:18px;overflow:auto;flex:1;min-height:0;display:flex;flex-direction:column;gap:12px}.workspace-overlay-content>.grid-host{flex:1;min-height:200px}.matching-controls{display:flex;gap:8px;flex-wrap:wrap}.matching-controls .searchable-select{flex:1;min-width:220px}.matching-controls input[type=number]{width:140px}.matching-board{display:grid;grid-template-columns:1fr 1fr;gap:18px;min-height:160px}.matching-card{border:1px solid #b8c9d8;border-left:5px solid #287caf;border-radius:6px;padding:13px;margin:8px 0;background:#f4f8fb;cursor:pointer}.matching-card[draggable=true]{cursor:grab}.matching-card p{margin:7px 0;overflow-wrap:anywhere}.matching-card.matched{border-left-color:#35955d;background:#eff9f3}.matching-card.drop-target{outline:3px solid #168ddb}.grid-header .cell{font-size:11px}.grid-line .cell{padding-left:7px;padding-right:7px}
@media(max-width:800px){.account-editor{grid-template-columns:1fr}.account-editor-nav{flex-direction:row;flex-wrap:wrap}.account-editor-nav button{padding:9px}.account-editor-pane.record-editor{grid-template-columns:1fr}.matching-board{grid-template-columns:1fr}.workspace-overlay{padding:8px}.workspace-overlay-panel{height:96%}#sessionBanner{font-size:10px;padding:3px 8px}.has-session-banner .shell{margin-top:40px;height:calc(100dvh - 40px)}.has-session-banner .modal,.has-session-banner .workspace-overlay{top:40px}}
.grid-header .cell[aria-sort=ascending]:after{content:' ↑';color:#1567a2}.grid-header .cell[aria-sort=descending]:after{content:' ↓';color:#1567a2}
.workspace-overlay-content>.notice,.workspace-overlay-content>.matching-controls,.workspace-overlay-content>.matching-board,.workspace-overlay-content>strong,.workspace-overlay-content>.company-tools{flex-shrink:0}.matching-board{flex:0 0 auto}.workspace-overlay-content>strong{margin-top:8px}

.allocation-detail-panel{margin-top:12px;max-height:230px;overflow:auto;border-top:2px solid #345c6b;padding-top:10px}.allocation-detail-panel:empty{display:none}.allocation-detail-panel table{width:100%;border-collapse:collapse}.allocation-detail-panel th{background:#345c6b;color:white}.allocation-detail-panel td,.allocation-detail-panel th{padding:6px;text-align:left;border-bottom:1px solid #dce4e8}.entry-account-info{padding:8px 12px;background:#e5f2f0;font-weight:600}.entry-header input{min-width:0}
/* v23 allocation grids and expandable invoice/payment detail */
.allocation-workspace{display:flex;flex-direction:column;gap:12px;min-height:0}.allocation-identity{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;background:#e5f4f2;padding:12px;border:1px solid #c6dce0}.allocation-help{margin:0;padding:10px 12px;background:#f2f6f8;border-left:3px solid #345c6b;font-size:13px}.allocation-board{display:grid;grid-template-columns:minmax(300px,36%) minmax(0,1fr);gap:14px;flex:1;min-height:260px}.allocation-board section{overflow:auto;border:1px solid #cedde3;border-radius:6px;min-width:0}.allocation-board h3{margin:0;padding:10px;background:#345c6b;color:#fff;font-size:14px;position:sticky;top:0;z-index:2}.allocation-table{border-collapse:collapse;width:100%;font-size:12px;background:#fff}.allocation-table th{background:#e4eef2;color:#345c6b;position:sticky;top:0;z-index:1;white-space:nowrap}.allocation-table td,.allocation-table th{padding:7px 8px;text-align:left;border-bottom:1px solid #dce7eb}.allocation-table tr.selected td{background:#ceebe6}.allocation-table tr:focus-visible{outline:2px solid #07877e}.allocation-table td:nth-last-child(2){white-space:nowrap}.allocation-table input[type=number]{width:92px;padding:6px;margin:0;min-width:0;font-size:13px}.allocation-table button{padding:5px 8px;font-size:12px}.allocation-amount-cell{display:flex;gap:4px;align-items:center}.allocation-table input:invalid{border:2px solid #b52d34}.allocation-summary{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:12px;background:#e5f4f2;position:sticky;bottom:0}.allocation-actions{display:flex;justify-content:flex-end;gap:8px;padding:10px 0}.allocation-row-actions{display:flex;gap:6px;flex-wrap:wrap}.allocation-tree-parent td{background:#f2f5fb;font-weight:600}.allocation-tree-child td{background:#fff}.allocation-tree-child td:first-child{padding-left:20px;color:#07877e}.allocation-tree-child td:nth-child(7){background:#eef0ff}.allocation-tree-child td:nth-child(8){background:#e4f6e9}.allocation-tree-child td:nth-child(9){background:#fff0ef}.allocation-register-grid{overflow:auto;max-height:calc(100dvh - 250px);border:1px solid #cedde3}.allocation-register>.company-tools{margin:12px 0}.allocation-expanded-row>td{padding:0 12px 12px}.allocation-expanded-row .allocation-detail-panel{max-height:none;margin:0;padding:8px 0;border-top:0}.allocation-detail-panel{max-height:300px}.allocation-credit-list .allocation-table tr{cursor:pointer}.allocation-invoice-list .allocation-table{min-width:740px}.allocation-credit-list .allocation-table{min-width:470px}@media(max-width:1000px){.allocation-board{grid-template-columns:1fr}.allocation-board section{max-height:340px}.allocation-summary{position:static}.allocation-register-grid{max-height:calc(100dvh - 290px)}}
.allocation-table input[type=radio],.allocation-table input[type=checkbox]{width:17px;height:17px;min-width:17px;margin:0;accent-color:#07877e}.allocation-board .allocation-table th{top:36px}

/* Current allocations are optional and stay within the allocation workspace. */
.allocation-current[hidden]{display:none}.allocation-current{flex-shrink:0;border:1px solid #cedde3;border-radius:6px;padding:10px}.allocation-current h3{margin:0 0 6px;color:#345c6b;font-size:14px}.allocation-current p{margin:6px 0;font-size:12px}.allocation-current-grid{max-height:220px;overflow:auto}.allocation-current-toggle{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:13px}.allocation-current-toggle input{width:17px;height:17px;min-width:17px;margin:0;accent-color:#07877e}.allocation-workspace>.allocation-summary{position:static;flex-shrink:0}.allocation-current>.company-tools{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}.allocation-workspace:has(.allocation-current:not([hidden])) .allocation-board{min-height:180px}

.allocation-workspace>.allocation-actions{position:sticky;bottom:0;z-index:3;background:#fff;flex-shrink:0;border-top:1px solid #e1eaee}
/* Compact toolbars and comfortable account/company forms. */
.action-icon{width:18px;height:18px;flex:0 0 18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle;margin-right:6px;pointer-events:none}
.ribbon{flex-wrap:wrap;gap:3px;padding:6px 10px;min-height:0;overflow:visible;align-content:flex-start}.ribbon button{display:inline-flex;align-items:center;justify-content:center;min-width:0;min-height:34px;padding:6px 7px;font-size:12px;white-space:nowrap;max-width:100%}.ribbon .action-icon{width:17px;height:17px;flex-basis:17px;margin-right:5px}
.statusbar{gap:12px;flex-wrap:wrap}.statusbar #lastTransaction{margin-left:auto;text-align:right;font-variant-numeric:tabular-nums}
.modal.wide-modal:has(.account-editor) .modal-card{width:min(1240px,96vw)}.account-editor{grid-template-columns:155px minmax(0,1fr);gap:24px}.account-editor-pane.record-editor{gap:20px;align-items:start}.account-editor-pane fieldset{align-content:start;gap:14px;padding:20px}.account-editor-pane label{min-width:0;line-height:1.4}.account-editor-pane input{margin-top:3px;min-height:42px}.account-editor-pane .inline input{min-height:0}.account-editor-pane.record-editor>label{padding:4px 0}.account-editor-pane input:read-only{background:#f3f7f8}
.company-details-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.company-details-form fieldset{min-width:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;border:1px solid #cfdae5;border-radius:8px;padding:20px;align-content:start}.company-details-form fieldset:first-child{grid-column:1/-1}.company-details-form legend{font-weight:700;padding:0 5px}.company-details-form label{min-width:0}.company-details-form input{min-width:0}
@media(max-width:900px){.account-editor{grid-template-columns:minmax(0,1fr)}.account-editor-nav{flex-direction:row;flex-wrap:wrap}.account-editor-nav button{padding:9px 12px}.company-details-form{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){.account-editor-pane.record-editor{grid-template-columns:minmax(0,1fr)}.company-details-form fieldset{grid-template-columns:minmax(0,1fr)}.ribbon button{font-size:11px;padding:6px 7px}.statusbar{font-size:11px}.statusbar #lastTransaction{flex:1 0 100%}.account-editor-pane fieldset{padding:16px}}

.account-details-column{display:flex;flex-direction:column;gap:20px;min-width:0}
/* Account form content and actions occupy separate, non-overlapping areas. */
.modal-body.account-record-body{overflow:hidden;padding:0!important;gap:0}.account-editor-scroll{flex:1 1 auto;min-height:0;overflow:auto;padding:18px;scroll-padding:16px}.account-record-body>.editor-actions{position:static!important;bottom:auto!important;flex:0 0 auto;margin:0;padding:12px 18px;background:white}.account-editor-pane .full-span{grid-column:1/-1}.account-editor-pane .full-span{grid-template-columns:repeat(2,minmax(0,1fr))}.account-editor-pane textarea{min-height:160px;max-width:100%}.account-editor-nav{align-self:start}.account-editor-scroll .account-editor{min-height:0}.account-editor-pane select{min-width:0}.account-editor-pane .date-input-control input{margin:0}
.date-input-control{position:relative;display:flex;align-items:center;min-width:0;width:100%;margin-top:5px}.date-input-control>input:first-child{margin:0;padding-right:32px!important;min-width:0;width:100%}.date-picker-button{position:absolute;right:3px;padding:3px 5px;min-height:24px;border:0;background:transparent;line-height:1;font-size:18px;color:#087e78}.date-picker-native{position:absolute;opacity:0;pointer-events:none;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;bottom:0;right:0}
#sessionBanner.renewal-warning{background:#a5252b;color:white}.renewal-message{font-weight:600;margin-top:3px}.renewal-message a{color:white;text-decoration:underline;white-space:nowrap}.has-session-banner .shell{margin-top:var(--session-banner-height,32px);height:calc(100dvh - var(--session-banner-height,32px))}.has-session-banner .modal,.has-session-banner .workspace-overlay{top:var(--session-banner-height,32px)}.renewal-due td,.renewal-due.client-summary{background:#ffe5e5!important}.client-account-row.renewal-due:hover td{background:#ffd2d2!important}
@media(max-width:700px){.account-editor-scroll{padding:12px}.account-editor-pane .full-span{grid-template-columns:minmax(0,1fr)}#sessionBanner{font-size:11px;line-height:16px}.account-record-body>.editor-actions{padding:10px 12px}}

.has-session-banner .wide-modal .modal-card{height:calc(100dvh - var(--session-banner-height,32px) - 16px)}
@media(max-width:850px){.has-session-banner .wide-modal .modal-card{height:calc(100dvh - var(--session-banner-height,32px) - 8px)}}
/* Invoice documents: dedicated scroll region and visible actions. */
.modal-body.invoice-workspace{padding:0!important;overflow:hidden;gap:0}.invoice-tools{flex:0 0 auto;margin:0;padding:8px 16px;border-bottom:1px solid #dce7eb}.invoice-scroll{flex:1;min-height:0;overflow:auto;padding:18px}.invoice-form{display:grid;grid-template-columns:155px minmax(0,1fr);gap:24px}.invoice-pane[hidden]{display:none}.invoice-panes{min-width:0}.invoice-header{display:grid;grid-template-columns:1fr 1.4fr;gap:26px;margin-bottom:20px}.address-text{white-space:pre-line;line-height:1.7;background:#f3f8f8;border:1px solid #d6e5e6;padding:16px;min-height:150px}.invoice-lines{overflow:auto;border:1px solid #d5e2e6;border-radius:7px}.invoice-lines table{border-collapse:collapse;min-width:1100px;width:100%;font-size:12px}.invoice-lines th{background:#345c6b;color:white;padding:10px 6px;text-align:left}.invoice-lines td{padding:6px;border-bottom:1px solid #e5edef}.invoice-lines input{margin:0;min-width:75px;padding:8px 6px;font-size:12px}.invoice-lines td[data-line=stockCode]{min-width:155px;display:flex;gap:4px}.invoice-lines td[data-line=description]{min-width:240px}.invoice-lines td[data-line=description] input{min-width:230px}.invoice-lines td[data-amount]{white-space:nowrap;text-align:right}.invoice-totals{display:flex;gap:16px;justify-content:flex-end;flex-wrap:wrap;margin-top:18px}.invoice-totals div{min-width:135px;background:#e8f5f3;padding:12px;border-radius:7px}.invoice-totals span,.invoice-totals strong{display:block}.invoice-totals span{font-size:12px;margin-bottom:6px}.invoice-totals strong{font-size:19px}.invoice-workspace>.editor-actions{position:static!important;flex:0 0 auto;margin:0;padding:10px 16px}.invoice-workspace>.editor-actions>.error{margin:0;flex:1;font-size:12px}.invoice-pane textarea{min-height:125px;border:1px solid #c9d7dc;border-radius:7px;padding:10px;font:inherit}.account-suggestions.stock-suggestions [role=option],.stock-lookup-head{display:grid;grid-template-columns:var(--stock-columns);gap:10px;min-width:max-content}.stock-suggestions{max-width:calc(100vw - 16px);overflow:auto}.stock-lookup-head{position:sticky;top:0;padding:10px;background:#345c6b;color:white;font-size:11px;z-index:1}.stock-suggestions [role=option] span{white-space:nowrap}.invoice-lines .date-picker-button{display:none}@media(max-width:900px){.invoice-form{grid-template-columns:1fr}.invoice-form .account-editor-nav{flex-direction:row;flex-wrap:wrap}.invoice-header{grid-template-columns:1fr}.invoice-scroll{padding:12px}}

.invoice-workspace>.editor-actions>.error{color:#405b69}.invoice-workspace>.editor-actions>.error[data-error=true]{color:#a02e2e}

.column-customizer{z-index:4000}

/* Company chooser: a large list scrolls independently of the company actions. */
#chooser{padding:22px 20px;min-height:100dvh}
#chooser>.auth-card{width:min(1280px,100%)}
#chooser #profileList{max-height:none;height:clamp(280px,calc(100dvh - 340px),720px);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#chooser:has(#mapping:not(.hidden)) #profileList{height:280px}
.credit-action,.credit-document #modalTitle,.credit-document .invoice-kind input,.credit-document .invoice-kind select{color:#b42318;font-weight:700}
.credit-document #modalTitle{text-transform:uppercase}
.grid-line.row.credit-row{color:#b42318;background:#fff5f4}
.grid-line.row.credit-row.selected{background:#ffdcd8;color:#9b1c15}
.account-discovery{font-size:12px;font-weight:600;display:block;margin-top:5px;color:#617887}
.account-discovery.new-account{color:#087e78}
.account-discovery.existing-account{color:#b42318}
.history-diff{width:100%;border-collapse:collapse;table-layout:fixed;margin-top:12px}
.history-diff th,.history-diff td{padding:8px;text-align:left;border:1px solid #dce6e9;vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere}
.history-diff th{background:#edf3f5}.history-diff th:first-child{width:30%}
@media(max-width:600px){#chooser{padding:10px}#chooser>.auth-card{padding:18px}#chooser #profileList{height:clamp(240px,calc(100dvh - 400px),550px)}}

.settings-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid #cfdae5}.settings-tabs button{padding:10px 14px;border-radius:6px}.settings-tabs button.active{background:#087e78;color:white;border-color:#087e78}.defaults-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:20px 0}.defaults-form label{min-width:0;display:flex;flex-direction:column;gap:6px}.defaults-form label.inline{flex-direction:row;align-items:center}.defaults-form input,.defaults-form select,.defaults-form textarea{width:100%;min-width:0;padding:9px;border:1px solid #c4d2df;border-radius:5px;background:white;color:#213644}.defaults-form input[type=checkbox]{width:auto}.defaults-form textarea{min-height:76px}@media(max-width:1000px){.defaults-form{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.defaults-form{grid-template-columns:1fr}.settings-tabs button{flex:1 1 40%;font-size:12px}}

/* Spacious allocation and settlement workspaces. */
.allocation-overlay{padding:6px}
.allocation-overlay .workspace-overlay-panel{width:100%;height:100%;max-width:none;max-height:none;border-radius:8px}
.allocation-overlay .workspace-overlay-panel>header{padding:9px 14px}
.allocation-overlay .workspace-overlay-content{padding:10px;gap:7px}
.allocation-workspace>.allocation-identity,.allocation-workspace>.allocation-help,.allocation-workspace>.company-tools{flex-shrink:0}
.allocation-workspace>.company-tools{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0}
.allocation-workspace>.company-tools>input{flex:1 1 240px;width:auto;margin:0}
.allocation-workspace .allocation-identity,.allocation-workspace .allocation-summary{padding:7px 10px;font-size:13px}
.allocation-workspace .allocation-help{padding:6px 10px;font-size:12px}
.allocation-workspace>.company-tools button{padding:7px 9px;font-size:12px}
.allocation-workspace .allocation-board{flex:1 1 0;min-height:250px;grid-template-columns:minmax(390px,40%) minmax(0,1fr);gap:9px}
.allocation-board h3{padding:7px 9px;font-size:13px;height:30px;box-sizing:border-box}
.allocation-board .allocation-table th{top:30px}
.allocation-overlay .allocation-table td,.allocation-overlay .allocation-table th{padding:3px 6px;line-height:18px}
.allocation-overlay .allocation-table td{height:30px;box-sizing:border-box}
.allocation-overlay .allocation-table input[type=number]{height:27px;min-height:27px;width:84px;padding:3px 5px;font-size:12px}
.allocation-overlay .allocation-table input[type=radio]{height:16px;width:16px;min-height:16px;margin:0;vertical-align:middle}
.allocation-overlay .allocation-table button{min-height:27px;padding:3px 6px;font-size:12px;white-space:nowrap}
.allocation-overlay .allocation-table tbody tr:nth-child(even):not(.selected) td{background:#f4f8fa}
.allocation-overlay .allocation-current{padding:7px;max-height:210px;overflow:auto}
.allocation-overlay .allocation-current-grid{max-height:110px}
.allocation-overlay .allocation-current h3,.allocation-overlay .allocation-current p{margin:3px 0}
.allocation-overlay .allocation-actions{padding:7px 0 0}
.allocation-workspace:has(.allocation-current:not([hidden])) .allocation-board{min-height:240px}
.modal-body.money-entry{gap:7px}
.money-entry .entry-header{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px 10px}
.money-entry .entry-header>label{font-size:12px}
.money-entry .entry-header input{min-height:32px;height:32px;padding:5px 8px;margin-top:3px;font-size:13px}
.money-entry .entry-header .date-input-control{margin-top:3px}
.money-entry>.notice{padding:6px 9px}
.money-entry>.entry-account-info{padding:6px 9px;background:#e5f4f2}
.money-entry>.outstanding-filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0;font-size:12px}
.outstanding-filters>label{display:flex;align-items:center;gap:5px}
.money-entry .outstanding-filters .date-input-control{width:145px;min-width:145px;margin:0;flex:0 0 145px}
.money-entry .outstanding-filters input{width:145px;min-height:32px;height:32px;padding:5px 26px 5px 7px;margin:0;font-size:12px}
.money-entry .outstanding-filters button{padding:6px 9px;min-height:32px;font-size:12px}
.money-entry .entry-outstanding{flex:1 1 0;min-height:220px}
.money-entry .entry-outstanding .entry-table{table-layout:auto;min-width:850px}
.money-entry .entry-outstanding .entry-table th{width:auto;padding:6px;font-size:12px}
.money-entry .entry-outstanding .entry-table td{padding:3px 6px;font-size:12px;line-height:18px}
.money-entry .entry-outstanding .entry-table td:nth-child(3),.money-entry .entry-outstanding .entry-table td:nth-child(4),.money-entry .entry-outstanding .entry-table td:nth-child(7){white-space:nowrap}
.money-entry .entry-outstanding .entry-table th:last-child{width:200px}
.money-entry .entry-outstanding .entry-allocation-cell{display:flex;align-items:center;gap:5px}
.money-entry .entry-outstanding .entry-allocation-cell input{width:88px;min-width:88px;min-height:28px;height:28px;padding:4px 5px}
.money-entry .entry-outstanding .entry-allocation-cell button{white-space:nowrap;min-height:28px;padding:4px 6px;font-size:12px}
.money-entry>.entry-totals{padding:7px 10px;font-size:14px}
.money-entry>.error:empty{display:none}
@media(max-width:1200px){.money-entry .entry-header{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1000px){.allocation-workspace .allocation-board{grid-template-columns:1fr;flex:0 0 auto;min-height:0}.allocation-workspace .allocation-board section{height:300px;max-height:none}.allocation-workspace:has(.allocation-current:not([hidden])) .allocation-board{min-height:0}}
@media(max-width:700px){.money-entry .entry-header{grid-template-columns:repeat(2,minmax(0,1fr))}.money-entry .entry-outstanding{flex:0 0 320px}.money-entry>.outstanding-filters>strong{flex-basis:100%}.allocation-overlay{padding:4px}.allocation-overlay .workspace-overlay-content{padding:7px}.allocation-summary{font-size:12px}.allocation-workspace>.company-tools>input{flex-basis:100%}.allocation-overlay .allocation-table td{height:36px}.allocation-overlay .allocation-table button,.allocation-overlay .allocation-table input[type=number]{height:32px}.allocation-current-toggle{font-size:12px}}

.allocation-workspace>.error:empty{display:none}
@media(max-height:760px) and (min-width:1001px){.allocation-overlay .allocation-current{max-height:160px}.allocation-overlay .allocation-current-grid{max-height:65px}}

.product-workspace{display:flex;flex-direction:column;min-height:0;overflow:hidden}.product-form{display:flex;flex:1;min-height:0;gap:14px}.product-form>.account-editor-nav{flex:0 0 135px}.product-panes{flex:1;min-width:0;overflow:auto}.product-details{display:grid;grid-template-columns:minmax(0,3fr) minmax(200px,1fr);gap:12px}.product-details[hidden],.product-activity[hidden]{display:none}.product-main,.product-side{display:flex;flex-direction:column;gap:10px}.product-details fieldset{min-width:0;border:1px solid #cadade;border-radius:6px;padding:10px}.product-details legend{font-weight:600;color:#286170}.product-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 12px}.product-side .product-field-grid{grid-template-columns:1fr}.product-workspace label{display:flex;flex-direction:column;gap:3px;font-size:12px;min-width:0}.product-workspace input,.product-workspace select{width:100%;min-width:0;padding:6px;min-height:31px}.product-workspace label.inline{flex-direction:row;align-items:center}.product-workspace input[type=checkbox]{width:auto;min-height:0}.product-workspace input[readonly],.product-workspace select:disabled{background:#f1f5f6;color:#47616b}.product-workspace .editor-actions{flex-shrink:0}.product-activity{display:flex;flex-direction:column;height:100%;min-height:450px;gap:10px}.product-activity-identity,.product-activity-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 14px}.product-activity-controls{display:flex;gap:10px;flex-wrap:wrap}.product-activity-controls>label{flex:0 1 160px}.product-activity-grid{flex:1;min-height:260px;overflow:auto;border:1px solid #cbdbe0}.product-transaction-table{border-collapse:collapse;min-width:1100px;width:100%;font-size:12px;white-space:nowrap}.product-transaction-table th{position:sticky;top:0;background:#335f70;color:white;text-align:left;padding:7px}.product-transaction-table td{padding:5px 7px;border-bottom:1px solid #dde7eb;height:28px}.product-transaction-table tr:hover td{background:#eef7f7}.product-activity-totals{margin-left:auto;width:480px;max-width:100%}.product-workspace .notice{font-size:11px;margin:0}.product-side fieldset>button{margin-top:9px;width:100%}
@media(max-width:900px){.product-form>.account-editor-nav{flex-basis:100px}.product-details{grid-template-columns:1fr}.product-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.product-form{flex-direction:column}.product-form>.account-editor-nav{flex:0 0 auto;flex-direction:row}.product-field-grid,.product-side,.product-activity-identity{grid-template-columns:1fr}.product-activity{min-height:600px}}

@media(min-width:901px){.product-field-grid>label{display:grid;grid-template-columns:minmax(90px,42%) minmax(0,1fr);align-items:center;gap:6px}.product-field-grid>label.inline{display:flex}.product-field-grid{gap:6px 12px}.product-details input,.product-details select{min-height:29px;padding:5px}.product-main fieldset:last-child .product-field-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.product-activity-identity>label,.product-activity-totals>label{display:grid;grid-template-columns:130px minmax(0,1fr);align-items:center;gap:8px}.product-activity-totals{width:560px}}

.stock-adjustment-table{overflow:auto;max-height:65vh}.stock-adjustment-table table{width:100%;min-width:1100px;border-collapse:collapse}.stock-adjustment-table th,.stock-adjustment-table td{padding:4px;border-bottom:1px solid #dde3e8;white-space:nowrap}.stock-adjustment-table input{width:100%;min-width:75px;padding:5px}.stock-adjustment-table td:nth-child(1){min-width:150px}.stock-adjustment-table td:nth-child(2){min-width:210px}.stock-adjustment-table td:nth-child(3){min-width:125px}.stock-adjustments .editor-actions{position:sticky;bottom:0;background:white}

.record-action-menu{position:fixed;z-index:2000;min-width:240px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow:auto;background:white;border:1px solid #bfd1dc;border-radius:8px;box-shadow:0 8px 30px #1234;padding:6px}.record-action-menu button{display:flex;align-items:center;gap:9px;width:100%;text-align:left;border:0;border-radius:4px;background:white;padding:7px 12px;min-height:32px}.record-action-menu button:hover:not(:disabled),.record-action-menu button:focus-visible{background:#e6f1f5;outline:2px solid #387a99}.record-action-menu button:disabled{opacity:.45;cursor:not-allowed}

.account-activity-controls{display:flex;align-items:flex-end;flex-wrap:wrap;gap:6px}.account-activity-controls>input{flex:1 1 190px;min-width:150px;max-width:320px}.activity-date-pair{display:flex;gap:6px;flex:0 0 auto}.activity-date-pair>label{display:flex;flex-direction:column;gap:3px;font-size:11px}.activity-date-pair>label{width:134px}.activity-date-pair .date-input-control{width:134px;min-width:0}.activity-date-pair input:not(.date-picker-native){width:100%;min-width:0;padding:5px 6px;height:32px}.account-activity-controls>button{padding:6px 9px;height:32px}@media(max-width:480px){.account-activity-controls>input{flex-basis:100%;max-width:none}.activity-date-pair>label,.activity-date-pair .date-input-control{width:128px}}

.sage-default-panes>[hidden],.product-panes>[hidden]{display:none!important}

.product-activity-grid{display:flex;flex-direction:column;overflow:hidden}.vat-analysis table{width:100%;border-collapse:collapse}.vat-analysis td,.vat-analysis th{padding:7px 10px;border-bottom:1px solid #dbe6e9;text-align:left}.vat-analysis .money{text-align:right}.vat-analysis{margin:18px 0}

.invoice-panes>[hidden]{display:none!important}

.platform-admin-modal .modal-card{width:min(1280px,96vw)}
.platform-gauges{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0 12px}
.platform-gauge{position:relative;display:flex;flex-direction:column;align-items:center;gap:0;padding:14px 10px 10px;background:var(--panel,#fff);color:var(--text,#182b43);border:1px solid #d7e0eb;border-radius:12px;min-width:0;cursor:pointer}
.platform-gauge strong{font-size:14px}.platform-gauge svg{width:min(220px,100%);height:115px}.gauge-track,.gauge-fill{fill:none;stroke-width:15;stroke-linecap:round}.gauge-track{stroke:#e8edf3}.gauge-fill{stroke:var(--gauge-color)}.gauge-needle{stroke:#34435a;stroke-width:3}.gauge-hub{fill:#34435a}.gauge-value{font-size:23px;font-weight:700;margin-top:-10px}.gauge-active{--gauge-color:#15976c}.gauge-suspended{--gauge-color:#df8052}.gauge-renewal{--gauge-color:#378ac8}.gauge-next{--gauge-color:#8971c5}
.platform-dashboard-summary{display:flex;flex-wrap:wrap;gap:12px 28px;padding:12px 16px;background:#f0f5fa;border-radius:8px}.platform-dashboard-summary strong{font-size:20px}
.platform-client-toolbar{align-items:center;flex-wrap:wrap;margin:16px 0 10px!important}.platform-client-toolbar input{flex:1 1 280px;min-width:160px!important}.platform-client-toolbar select{width:auto;flex:0 1 150px}.platform-client-toolbar .platform-new-client{flex:none;width:auto;padding:7px 10px;font-size:12px;white-space:nowrap}.platform-result-count{font-size:12px;color:#53657c;white-space:nowrap}.platform-table-scroll{max-width:100%;overflow:auto}
@media(max-width:800px){.platform-gauges{grid-template-columns:repeat(2,minmax(0,1fr))}.platform-admin-modal .modal-card{width:96vw}.platform-client-toolbar input{flex-basis:100%}}@media(max-width:430px){.platform-gauges{gap:8px}.platform-gauge{padding:10px 5px}.platform-gauge strong{font-size:12px}.platform-gauge svg{height:90px}.gauge-value{font-size:20px}}
.platform-client-toolbar>.searchable-select{flex:0 0 160px;width:160px;min-width:0}.platform-client-toolbar>.searchable-select input{min-width:0!important}.platform-admin-modal .detail-table{min-width:1100px}.platform-admin-modal .detail-table td{white-space:nowrap;padding-top:7px;padding-bottom:7px}.platform-admin-modal .detail-table td .company-tools{margin:0;flex-wrap:nowrap}.platform-admin-modal .detail-table td button{padding:6px 9px;font-size:12px}.platform-admin-modal .company-tools button[aria-pressed=true]{background:#e4f0f5;border-color:#6392ab;color:#183e55}
@media(max-width:800px){.platform-client-toolbar>.searchable-select{flex:1 1 140px}.platform-client-toolbar>input{flex-basis:100%}}

.company-dashboard{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;background:#f3f7f9;padding:20px;display:flex;flex-direction:column;gap:18px}.dashboard-intro h2{margin:3px 0 5px;font-size:23px}.dashboard-intro p{margin:0;color:#526b7a;font-size:12px}.dashboard-eyebrow{color:#176b83;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}.dashboard-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.dashboard-kpi{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:16px;text-align:left;background:#fff;border:1px solid #d8e4e9;border-radius:10px;min-width:0;color:#213e4c}.dashboard-kpi span{font-size:13px}.dashboard-kpi strong{font-size:25px;overflow-wrap:anywhere}.dashboard-kpi small{font-size:11px;color:#5a7180}.dashboard-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.dashboard-panel{background:#fff;border:1px solid #d8e4e9;border-radius:12px;padding:18px;min-width:0}.dashboard-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.dashboard-panel-heading h2{font-size:18px;margin:0}.dashboard-panel-heading button{font-size:12px;padding:6px 9px;white-space:nowrap}.dashboard-chart-total{font-size:12px;color:#526b7a;margin:12px 0}.dashboard-chart-layout{display:grid;grid-template-columns:minmax(140px,.85fr) minmax(0,1.3fr);align-items:center;gap:12px}.dashboard-chart-layout svg{width:100%;max-height:280px;overflow:visible;animation:dashboard-appear .5s ease-out}.dashboard-chart-layout path{stroke:white;stroke-width:2;cursor:pointer;transition:opacity .15s}.dashboard-chart-layout path:focus{outline:none;stroke:#182f41;stroke-width:4}.dashboard-chart-layout path.dashboard-dim{opacity:.4}.dashboard-legend{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:2px}.dashboard-legend button{display:grid;grid-template-columns:9px minmax(0,1fr);gap:3px 7px;width:100%;padding:5px 6px;text-align:left;border:0;background:transparent;font-size:11px;border-radius:5px}.dashboard-legend button strong{grid-column:2;font-size:12px}.dashboard-legend button:hover,.dashboard-legend button.dashboard-highlight{background:#edf5f7}.dashboard-account-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-colour{width:9px;height:9px;border-radius:50%;margin-top:3px}.dashboard-chart-detail{font-size:12px;color:#176b83;min-height:30px;margin:12px 0 0;overflow-wrap:anywhere}.dashboard-balance-notes{font-size:12px;color:#526b7a}.dashboard-balance-notes p{margin:0 0 6px}.dashboard-empty{padding:36px 16px;text-align:center;color:#526b7a}@keyframes dashboard-appear{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}@media(prefers-reduced-motion:reduce){.dashboard-chart-layout svg{animation:none}}@media(max-width:1150px){.dashboard-charts{grid-template-columns:1fr}.dashboard-chart-layout{grid-template-columns:minmax(180px,.7fr) minmax(0,1fr)}}@media(max-width:650px){.company-dashboard{padding:12px}.dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-kpi{padding:12px}.dashboard-kpi strong{font-size:20px}.dashboard-chart-layout{grid-template-columns:1fr}.dashboard-chart-layout svg{max-height:230px}.dashboard-legend button{grid-template-columns:9px minmax(0,1fr) auto}.dashboard-legend button strong{grid-column:3}.dashboard-panel{padding:12px}}
.dashboard-kpi{white-space:normal}.dashboard-kpi small{white-space:normal;overflow-wrap:anywhere}

.product-code-status{display:block;color:#087e78;font-weight:600;margin-top:5px}.product-code-status[data-exists="true"]{color:#9a6700}.invoice-discount{margin:12px 0;padding:12px;background:#f0f7f7;border:1px solid #d1e4e4;border-radius:6px}.invoice-discount small{grid-column:1/-1;color:#526974}.invoice-lines [data-line="barcode"]{min-width:145px}
.aged-balances-overlay .workspace-overlay-panel{width:min(1500px,96vw)}.aged-grid{overflow:auto;max-height:55vh;border:1px solid #d1dfe4}.aged-table{min-width:1200px}.aged-table thead{position:sticky;top:0;z-index:1}.aged-table td{white-space:nowrap}.aged-table th{white-space:nowrap}.aged-table tr[aria-selected="true"]{background:#d0e9e7}.aged-footer{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px;margin-top:12px}.aged-footer>div{display:grid;gap:5px;text-align:right;min-width:100px}.aged-footer span{font-size:12px;color:#526974}.aged-notices{font-size:12px}.aged-bar-row{display:grid;grid-template-columns:140px minmax(100px,1fr) 130px;align-items:center;gap:12px;margin:20px 0}.aged-bar{height:26px;background:#edf4f5}.aged-bar-fill{height:100%;background:#087e78}.aged-bar-fill.negative{background:#b42318}.aged-bar-row strong{text-align:right}

.aged-balances-overlay .account-editor-nav{flex-direction:row;flex-wrap:wrap}.aged-balances-overlay input[type=checkbox]{width:16px;height:16px;min-width:16px}.aged-balances-overlay label:has(input[type=checkbox]){display:flex;flex-direction:row;align-items:center;gap:8px}

.activity-audit-splits{overflow:auto;margin-top:12px}.activity-audit-splits h4{margin:8px 0}.activity-audit-splits table{white-space:nowrap}

.product-default-group{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;border:1px solid #cfdae5;border-radius:8px;padding:16px;min-width:0}.product-default-group legend{font-weight:700;padding:0 6px}@media(max-width:600px){.product-default-group{grid-template-columns:minmax(0,1fr)}}

/* Large stock lookups render only the visible slice of the preloaded catalogue. */
.lookup-virtual-spacer{position:relative}.lookup-virtual-window{position:absolute;left:0;min-width:100%;width:max-content}.stock-suggestions .lookup-virtual-window [role=option]{height:40px;min-height:40px;box-sizing:border-box;align-items:center}
/* Compact controls and native nominal workflows. */
.nominal-controls{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin-bottom:12px}.nominal-controls label{display:flex;flex-direction:column;gap:5px;max-width:240px}.nominal-controls>.date-input-control{width:160px}.nominal-table{border-collapse:collapse;width:100%;table-layout:fixed}.nominal-table td,.nominal-table th{padding:6px;border-bottom:1px solid #d8e4e8;text-align:left;overflow-wrap:anywhere}.nominal-table th{background:#edf4f5}.nominal-table input,.nominal-table .account-lookup,.nominal-table select{width:100%;min-width:0}.nominal-journal-lines{overflow:auto}.nominal-journal-lines .nominal-table{min-width:880px}.nominal-journal-lines th:nth-child(3){width:28%}.nominal-report-total{font-weight:700;text-align:right}.nominal-report h3{border-bottom:2px solid #087e78;padding:8px 0}.nominal-report h4{margin-bottom:6px}.nominal-report .nominal-table td:nth-child(n+3){text-align:right}.statusbar #lastTransaction{white-space:normal;text-align:right}

.nominal-group{border-bottom:1px solid #ccd8de;padding:8px 0}.nominal-group summary{cursor:pointer;display:flex;gap:20px;align-items:center;font-weight:600}.nominal-group summary:before{content:"▸"}.nominal-group[open] summary:before{content:"▾"}.nominal-group summary span:first-child{flex:1}.nominal-group summary span:not(:first-child){width:140px;text-align:right}.nominal-link{background:none;border:0;color:#1769aa;text-decoration:underline;padding:0;cursor:pointer}.nominal-group .nominal-table{margin-top:10px}

.nominal-overlay .error:empty{display:none}.nominal-overlay .nominal-controls,.nominal-overlay .nominal-report{flex:0 0 auto}.nominal-statement-table th:nth-child(n+2),.nominal-statement-table td:nth-child(n+2){width:160px;text-align:right}

.chart-list{flex:1;min-height:300px;overflow:auto;border:1px solid #ccd9df}.chart-list tr{cursor:pointer}.chart-overlay .selected{background:#cfeae4}.chart-overlay .error:empty{display:none}.chart-editor-layout{display:grid;grid-template-columns:minmax(360px,40%) 1fr;gap:24px}.chart-editor-left{min-width:0}.chart-editor-left .nominal-table td{padding:3px}.chart-editor-left .nominal-table input{font-size:12px;padding:6px;margin:0}.chart-editor-left .nominal-table button{padding:5px;font-size:12px;white-space:normal}.chart-editor-left>div:last-child .nominal-table th:first-child{width:45%}.chart-preview{border:1px solid #cad9df;padding:20px;overflow:auto;max-height:65vh}.chart-overlay .nominal-controls{flex:0 0 auto}.chart-overlay .nominal-controls label{max-width:none;flex:1}@media(max-width:900px){.chart-editor-layout{grid-template-columns:1fr}.chart-preview{max-height:none}}

/* v61 native nominal statements */
.nominal-account-table th:nth-child(2),.nominal-account-table td:nth-child(2){width:auto;text-align:left}.nominal-account-table th:first-child,.nominal-account-table td:first-child{width:70px}.nominal-group summary span:not(:first-child){width:160px}

.success{color:#16723b;min-height:24px;margin-top:12px}.nominal-report tfoot{font-weight:700;background:#eaf3f3}
.year-end-table{width:100%;border-collapse:collapse}.year-end-table th,.year-end-table td{padding:8px 12px;border-bottom:1px solid #d5e2e6;text-align:left}.year-end-table th:nth-child(n+3),.year-end-table td:nth-child(n+3){text-align:right}.year-end-table th{background:#edf6f6}

.vat-workspace .activity-controls{flex-wrap:wrap;gap:12px}.vat-workspace .activity-controls label{display:flex;align-items:center;gap:6px}.vat-workspace .activity-controls input[type=date]{width:145px}.vat-workspace .activity-controls input[type=checkbox]{width:auto}.vat-steps{padding:12px;background:#eaf5f3;color:#006c5b;font-weight:600}.vat-boxes{margin:16px 0;width:100%}.vat-boxes td:nth-child(n+3){text-align:right}.vat-net{background:#eaf5f3;font-weight:600}.vat-adjustments input{max-width:100%}.vat-adjustments td:nth-child(2){width:60%}.vat-workspace .notice{white-space:normal}

.wide-modal .entry-workspace .entry-table.batch-resizable{min-width:0;max-width:none;table-layout:fixed}.wide-modal .entry-workspace .batch-resizable th{width:auto;overflow:hidden;padding-right:12px}.batch-resizable th .column-resize{touch-action:none;cursor:col-resize}.batch-resizable th .column-resize:focus{background:#168ddb}.batch-column-status{font-size:12px;align-self:center;color:#456673}.batch-column-status.error{color:#a02020}.batch-resizable td{overflow:hidden}.batch-resizable input[type=checkbox]{width:20px;height:20px}

.vat-reconcile-status{flex:1;margin:0;min-width:180px;text-align:left;color:#456673}.vat-reconcile-status.success{color:#16723b}.vat-reconcile-status.error{color:#a02020}

/* Wider administration workspace, constrained by the available display. */
.platform-admin-modal .modal-card{width:calc(100vw - 24px);max-width:1800px}.stock-adjustment-table input:read-only{background:#f1f5f7;color:#415563;cursor:default}

.excel-export-tools{display:flex;justify-content:flex-end;flex-shrink:0;padding:3px 8px}.excel-export-tools button{font-size:12px;padding:6px 10px}

.year-end-preview{flex:none;min-height:0}.year-end-journal-scroll{overflow:auto;max-height:60vh;min-height:220px;border:1px solid #d5e2e6;border-radius:7px}.year-end-table thead{position:sticky;top:0;z-index:1}.year-end-table tfoot{position:sticky;bottom:0}.year-end-table th:nth-child(n+3),.year-end-table td:nth-child(n+3){text-align:left}.year-end-table th:nth-child(n+4),.year-end-table td:nth-child(n+4){text-align:right}.year-end-options label.inline input[type=checkbox]{width:18px}.year-end-options input[type=date],.year-end-options input[type=number],.year-end-options select{width:auto;min-width:180px}.year-end-summary{background:#f4f8fa;padding:12px;border-radius:7px}.year-end-options label{margin-top:10px}

.year-end-option-field{display:flex;flex-direction:column;gap:5px;max-width:420px}.year-end-options .year-end-option-field select{width:100%;min-width:240px}.year-end-options label.year-end-option-field input[type=number]{width:180px}.year-end-run-status{margin:0 auto 0 0;font-size:12px;max-width:70%;padding:9px;white-space:normal}.year-end-options label.inline input[type=checkbox]{padding:0;min-height:18px;height:18px;margin:0}

.invoice-scroll{overflow:hidden;padding:10px 14px}.invoice-form{height:100%;min-height:0;gap:14px}.invoice-panes{min-height:0;overflow:auto}.invoice-details{height:100%;min-height:0;display:flex;flex-direction:column;gap:8px;overflow:hidden}.invoice-details[hidden]{display:none}.invoice-details .invoice-header{flex:none;max-height:34dvh;overflow:auto;gap:14px;margin:0}.invoice-header .form-grid{gap:6px 12px}.invoice-header input{min-height:30px;padding:6px 8px;margin-top:3px}.invoice-header .address-text{min-height:90px;margin:8px 0 0;padding:9px;line-height:1.35}.invoice-details .invoice-lines{flex:1;min-height:70px;overflow:auto}.invoice-lines thead{position:sticky;top:0;z-index:1}.invoice-lines th{padding:7px 5px}.invoice-lines td{padding:4px}.invoice-lines input{min-height:30px;padding:6px 5px}.invoice-details .invoice-discount{flex:none;margin:0;padding:7px 10px;gap:4px 12px}.invoice-discount input{min-height:30px;padding:5px 8px;margin-top:2px}.invoice-workspace>.invoice-totals{flex:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:7px 14px;margin:0;border-top:1px solid #dce7eb;background:white}.invoice-workspace>.invoice-totals div{min-width:0;padding:8px 10px}.invoice-workspace>.invoice-totals strong{font-size:17px}.invoice-workspace>.invoice-totals span{margin-bottom:3px}.invoice-workspace>.editor-actions{padding:7px 14px}.invoice-workspace>.editor-actions button{padding:7px 12px}.invoice-tools{padding:6px 14px}.invoice-tools button{padding:7px 10px}.invoice-form .account-editor-nav button{padding:10px}.invoice-lines .excel-export-tools{padding:3px 6px}.invoice-lines .excel-export-tools button{padding:4px 8px}@media(max-width:900px){.invoice-form{grid-template-rows:auto minmax(0,1fr);gap:8px}.invoice-form .account-editor-nav{gap:4px}.invoice-form .account-editor-nav button{padding:6px 8px}.invoice-details .invoice-header{max-height:28dvh}.invoice-scroll{padding:8px}.invoice-workspace>.invoice-totals{padding:6px 8px;gap:4px}.invoice-workspace>.invoice-totals div{padding:6px}.invoice-workspace>.invoice-totals strong{font-size:15px}}

/* Fit the invoice card to the available viewport, including the session banner. */
.modal.wide-modal:has(.invoice-workspace) .modal-card{height:100%;max-height:100%;min-height:0}

/* Bank reconciliation keeps both matching panes usable on laptop displays. */
.bank-reconcile-overlay .workspace-overlay-panel{width:min(1500px,98vw);max-width:98vw}
.bank-editor-panes{overflow:auto;min-height:0}.bank-match-grid{height:clamp(160px,24vh,340px);min-height:160px;position:relative;display:flex;flex-direction:column;border:1px solid #d9e4e8}
.bank-match-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:12px;padding:12px;background:#edf5f5;margin:12px 0}.bank-match-totals div{display:flex;flex-direction:column;gap:5px}.bank-match-totals strong{text-align:right}.bank-reconcile-overlay .notice{font-size:12px;margin:4px 0}

.bank-reconcile-overlay .workspace-overlay-content>.bank-match-grid{flex:0 0 clamp(160px,24vh,340px);min-height:160px}.bank-reconcile-overlay .workspace-overlay-content>.nominal-controls,.bank-reconcile-overlay .workspace-overlay-content>.bank-match-totals{flex-shrink:0}

.bank-editor{gap:10px}.bank-editor-panes{flex:1;min-height:0;overflow:auto}.bank-record-pane{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start}.bank-record-pane[hidden]{display:none!important}.bank-record-pane fieldset{min-width:0;border:1px solid #cbdbe0;border-radius:6px;padding:12px}.bank-record-pane legend{font-weight:600;color:#286170}.bank-field-grid{display:flex;flex-direction:column;gap:8px}.bank-field-grid label{display:grid;grid-template-columns:140px minmax(0,1fr);align-items:center;gap:8px;font-size:12px;min-width:0}.bank-field-grid input,.bank-field-grid select,.bank-field-grid .account-lookup{width:100%;min-width:0;margin:0;padding:6px;min-height:32px}.bank-field-grid .account-lookup{padding:0}.bank-field-grid label.inline{display:flex}.bank-field-grid input[type=checkbox]{width:16px;min-height:16px;height:16px}.bank-field-grid input[readonly]{background:#f1f5f6}.bank-record-pane[data-tab=Settings]{max-width:650px;grid-template-columns:1fr}.bank-editor .company-tabs{flex-shrink:0}.bank-editor .account-discovery{grid-column:2}.bank-editor .editor-actions{flex-shrink:0}@media(max-width:700px){.bank-record-pane{grid-template-columns:1fr}.bank-field-grid label{grid-template-columns:120px minmax(0,1fr)}}

.bank-difference-shade{position:fixed;inset:0;z-index:3200;display:grid;place-items:center;background:#17344166;padding:20px}.bank-difference-dialog{background:white;border-radius:9px;padding:22px;max-width:560px;box-shadow:0 8px 30px #17344155}.bank-difference-dialog h3{margin-top:0}.bank-difference-dialog .company-tools{justify-content:flex-end}

.bank-reconcile-overlay{padding:6px}.bank-reconcile-overlay .workspace-overlay-panel{width:min(1650px,99vw);max-width:99vw;height:calc(100dvh - 12px);max-height:calc(100dvh - 12px)}.bank-reconcile-overlay .workspace-overlay-panel>header{padding:8px 12px}.bank-reconcile-overlay .workspace-overlay-content{padding:8px 12px;gap:6px;overflow:hidden}.bank-reconcile-overlay .nominal-controls{gap:6px;margin:0}.bank-reconcile-overlay .nominal-controls label{gap:2px;font-size:11px;max-width:220px}.bank-reconcile-overlay .nominal-controls input{min-height:30px;padding:5px 7px;margin:0}.bank-reconcile-overlay .nominal-controls button{padding:6px 9px;font-size:12px;min-height:30px}.bank-reconcile-overlay .nominal-controls .date-input-control{width:140px;min-width:0}.bank-reconcile-summary{display:flex;gap:12px;align-items:center;font-size:11px;flex-shrink:0;position:relative}.bank-reconcile-summary details[open]{position:absolute;right:0;top:0;z-index:8;background:white;border:1px solid #cbdbe0;box-shadow:0 3px 10px #17344133;padding:8px;max-width:600px;max-height:160px;overflow:auto}.bank-reconcile-overlay .error,.bank-reconcile-overlay .success{margin:0;font-size:12px;flex-shrink:0}.bank-reconcile-overlay .error:empty{display:none}.bank-match-work{display:flex;flex-direction:column;gap:6px;flex:1;min-height:0;overflow:hidden}.bank-unmatched-pane{display:flex;flex-direction:column;gap:4px;flex:1;min-height:74px}.bank-matched-pane{display:flex;flex-direction:column;gap:4px;flex:0 1 100px;min-height:74px;max-height:42%}.bank-pane-title{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-shrink:0}.bank-match-work h3{font-size:13px;margin:0;line-height:22px;flex-shrink:0}.bank-pane-title>input{width:min(400px,45vw);min-height:30px;padding:5px 7px;margin:0;font-size:12px}.bank-match-work .bank-match-grid{height:auto;min-height:0;flex:1;overflow:hidden}.bank-match-work .nominal-controls{flex-shrink:0}.bank-reconcile-overlay .bank-match-totals{gap:7px;padding:8px;margin:0;grid-template-columns:repeat(7,minmax(0,1fr));font-size:11px;flex-shrink:0}.bank-reconcile-overlay .bank-match-totals div{gap:3px;min-width:0}.bank-reconcile-overlay .bank-match-totals strong{font-size:12px;white-space:nowrap}.bank-reconcile-history{flex-shrink:0;font-size:12px;max-height:17dvh;overflow:auto}.bank-reconcile-history .company-tools{margin:4px 0;font-size:11px}.bank-reconcile-history p{margin:4px 0}@media(max-width:800px){.bank-reconcile-overlay .bank-match-totals{grid-template-columns:repeat(4,minmax(0,1fr))}.bank-reconcile-overlay .nominal-controls label{max-width:150px}.bank-reconcile-overlay .bank-match-totals strong{font-size:11px}}@media(max-height:570px){.bank-reconcile-overlay .workspace-overlay-content{overflow:auto}.bank-match-work{min-height:180px;flex:1 0 180px}}
/* Bank batches: fixed footer, scrolling rows, readable reference and amount columns. */
.bank-posting-workspace{display:flex;flex-direction:column;min-height:0;max-height:calc(100dvh - 130px);overflow:hidden;gap:8px}.bank-posting-grid{flex:1;min-height:120px;overflow:auto}.bank-posting-grid table{table-layout:auto;min-width:1100px;margin:0}.bank-posting-grid thead{position:sticky;top:0;z-index:3}.bank-posting-grid td{padding:4px}.bank-posting-grid input,.bank-posting-grid select{min-width:90px;width:100%;padding:7px}.bank-posting-grid .bank-posting-details{min-width:220px}.bank-posting-grid .bank-posting-date{min-width:140px}.bank-posting-grid .bank-posting-bank,.bank-posting-grid .bank-posting-toBank,.bank-posting-grid .bank-posting-nominal{min-width:180px}.bank-posting-grid .account-lookup{width:100%}.bank-posting-grid .active-bank-entry td{background:#edf7f6}.bank-posting-workspace .editor-actions{flex-shrink:0;margin:0}.bank-posting-grid input[readonly]{background:#eef2f5;color:#3d5260}
.maintenance-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.maintenance-cards fieldset{border:1px solid #ccdbdf;border-radius:8px;padding:14px}.maintenance-cards legend{font-weight:600;color:#087e78}.maintenance-cards p{margin:4px 0 14px}.maintenance-cards button{margin:4px 8px 4px 0}.maintenance-cards label{display:block;margin:8px 0}.maintenance-cards .account-lookup{max-width:100%}.maintenance-results{overflow:auto}.maintenance-results table{table-layout:auto}.maintenance-results th:last-child{width:55%}@media(max-width:700px){.maintenance-cards{grid-template-columns:1fr}}

/* v0.1.98: share available height equally without shrinking either grid. */
.allocation-workspace>.allocation-split-panes{display:grid;grid-template-rows:minmax(0,1fr);flex:1 1 0;min-height:0;overflow:hidden;gap:8px}
.allocation-workspace>.allocation-split-panes.show-current{grid-template-rows:minmax(0,1fr) minmax(0,1fr)}
.allocation-split-panes .allocation-board,.allocation-workspace:has(.allocation-current:not([hidden])) .allocation-split-panes .allocation-board{min-height:0;max-height:none;height:100%;grid-template-columns:minmax(0,40%) minmax(0,60%)}
.allocation-split-panes .allocation-board section{height:auto;max-height:none;min-height:0;overflow:auto}
.allocation-overlay .allocation-split-panes .allocation-current{display:flex;flex-direction:column;min-height:0;max-height:none;overflow:hidden;height:100%;box-sizing:border-box}
.allocation-split-panes .allocation-current[hidden]{display:none}
.allocation-overlay .allocation-split-panes .allocation-current-grid{flex:1 1 0;min-height:0;max-height:none;overflow:auto}
.modal-body.ledger-activity-workspace{display:flex;flex-direction:column;overflow:hidden;min-height:0}
.ledger-activity-workspace>.activity-controls,.ledger-activity-workspace>.activity-footer{flex:0 0 auto}
.ledger-activity-panes{display:grid;grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:8px;flex:1 1 0;min-height:0;overflow:hidden}
.ledger-activity-panes>.grid-host{height:100%;min-height:0;overflow:hidden}
.ledger-activity-panes>.allocation-detail-panel{display:block;min-height:0;max-height:none;margin:0;overflow:auto}
@media(max-width:700px){.allocation-split-panes .allocation-board{grid-template-columns:1fr 1fr}}

.stationery-logo-settings{border:1px solid #d2e0e4;padding:14px}.stationery-logo-preview{display:block;max-width:220px;max-height:90px;object-fit:contain;margin:10px 0}.stationery-layout-list{width:100%;border-collapse:collapse}.stationery-layout-list td,.stationery-layout-list th{padding:9px;text-align:left;border-bottom:1px solid #dce7eb}.stationery-layout-list select{min-width:180px;width:100%}.stationery-layout-list td:last-child{display:flex;gap:8px;flex-wrap:wrap}.stationery-editor{border:1px solid #cedee3;margin-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px}.stationery-editor[hidden]{display:none}.stationery-editor textarea{width:100%;min-height:100px}.stationery-editor label{display:flex;flex-direction:column;gap:7px}.stationery-editor input[type=checkbox]{width:20px}.stationery-sample{grid-column:1/-1;padding:24px;border-top:3px solid #087e78;background:#f7fbfb}.stationery-sample-footer{white-space:pre-line}@media(max-width:700px){.stationery-editor{grid-template-columns:1fr}.stationery-layout-list td:last-child{display:table-cell}}
