:root{--cc-purple:#635bff;--cc-purple-hover:#5046df;--cc-purple-dark:#493580;--cc-purple-soft:#eceaff;--cc-purple-border:#b7a4ef}
:root{font-family:Segoe UI,Arial,sans-serif;color:#203441;background:#f4f5fa;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:var(--cc-purple-dark);padding:10px 14px;cursor:pointer;white-space:nowrap}button:hover:not(:disabled){background:#eceaff}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:#635bff;color:white;border-color:#635bff}.primary:hover:not(:disabled){background:#5046df}.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 #17213b22;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:#635bff;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:#eceaff}.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:#f0f0f8;border-right:1px solid #cad8de;min-height:0}.side-brand{background:#17213b;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:#635bff;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:#f4f5fa}.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:#f0f0f8;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:#635bff;margin-left:14px;font-weight:650}.loader{width:18px;height:18px;border:3px solid #d7d3ff;border-top-color:#635bff;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:#ececf7;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:#f1efff}.grid-line.row.selected{background:#eceaff}.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:#f0f0f8}@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:#635bff;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),(max-width:1024px) and (max-height:600px){
 .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:#ececf7;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:var(--cc-purple-soft)}@media(max-width:760px),(max-width:1024px) and (max-height:600px){.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:#eceaff}.client-account-row:focus{outline:2px solid #635bff;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:#eceaff;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 #635bff;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:#eceaff;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 #635bff;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:#eceaff}.entry-outstanding .entry-table{min-width:1100px}.entry-outstanding .entry-table input{width:120px}.entry-totals{text-align:right;padding:10px;background:#eceaff;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:#eceaff;padding:12px;color:var(--cc-purple-hover)}.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:var(--cc-purple-soft)}.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:var(--cc-purple-soft);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:var(--cc-purple-dark)}.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:var(--cc-purple-border)}.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:var(--cc-purple);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 var(--cc-purple);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 var(--cc-purple)}.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:var(--cc-purple-dark)}.grid-header .cell[aria-sort=descending]:after{content:' ↓';color:var(--cc-purple-dark)}
.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 var(--cc-purple-dark);padding-top:10px}.allocation-detail-panel:empty{display:none}.allocation-detail-panel table{width:100%;border-collapse:collapse}.allocation-detail-panel th{background:var(--cc-purple-dark);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:#eceaff;padding:12px;border:1px solid #c6dce0}.allocation-help{margin:0;padding:10px 12px;background:#f2f6f8;border-left:3px solid var(--cc-purple-dark);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:var(--cc-purple-dark);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:var(--cc-purple-soft);color:var(--cc-purple-dark);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:var(--cc-purple-soft)}.allocation-table tr:focus-visible{outline:2px solid var(--cc-purple)}.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:#eceaff;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:var(--cc-purple)}.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:var(--cc-purple)}.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:var(--cc-purple-dark);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:var(--cc-purple)}.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:#635bff}.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:var(--cc-purple-dark);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:var(--cc-purple-soft);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:var(--cc-purple-dark);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:#635bff}
.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:#f0f0f8}.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:#635bff;color:white;border-color:#635bff}.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:#eceaff}
.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:var(--cc-purple-dark)}.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:var(--cc-purple-dark);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:var(--cc-purple-soft)}.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:var(--cc-purple-soft);outline:2px solid var(--cc-purple)}.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:var(--cc-purple)}.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:var(--cc-purple-soft);border-color:var(--cc-purple-border);color:var(--cc-purple-dark)}
@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:var(--cc-purple-dark);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:var(--cc-purple-soft)}.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:var(--cc-purple-dark);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:#635bff;font-weight:600;margin-top:5px}.product-code-status[data-exists="true"]{color:#9a6700}.invoice-discount{margin:12px 0;padding:12px;background:#f5f3ff;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:var(--cc-purple-soft)}.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:#f0f0f8}.aged-bar-fill{height:100%;background:#635bff}.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:#f0f0f8}.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 #635bff;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:var(--cc-purple-dark);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:var(--cc-purple-soft)}.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:#f0f0f8}
.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:var(--cc-purple-soft)}

.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:var(--cc-purple-soft);color:var(--cc-purple-dark);font-weight:600}.vat-boxes{margin:16px 0;width:100%}.vat-boxes td:nth-child(n+3){text-align:right}.vat-net{background:var(--cc-purple-soft);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:var(--cc-purple)}.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:var(--cc-purple-dark)}.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:var(--cc-purple-soft)}.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:#635bff}.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 #635bff;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}}

/* Distinct invoice and credit actions in the module ribbon and copied context menu. */
.ribbon .invoice-action,.record-action-menu .invoice-action{color:var(--cc-purple-dark);background:var(--cc-purple-soft);border-color:var(--cc-purple-border);font-weight:700}
.ribbon .credit-action,.record-action-menu .credit-action{color:#b42318;background:#fff1f0;border-color:#e7aaa4;font-weight:700}
.ribbon .invoice-action:hover:not(:disabled),.record-action-menu .invoice-action:hover:not(:disabled){background:var(--cc-purple-soft)}
.ribbon .credit-action:hover:not(:disabled),.record-action-menu .credit-action:hover:not(:disabled){background:#ffe0dc}

/* Corporate Computing midnight / violet application theme. */
:root{--cc-navy:#17213b;--cc-violet:#635bff;--cc-surface:#f4f5fa;--cc-selection:#eceaff;accent-color:var(--cc-violet)}
.sidebar{background:var(--cc-navy);border-right-color:#283454;color:#e6e9f4}
.side-brand{background:#111a30}.side-brand small{color:#b6bed5}
.sidebar nav button{color:#dbe0ef}.sidebar nav button:hover:not(:disabled){background:#293553;color:white}
.sidebar nav button.active,.sidebar nav button.active:hover{background:var(--cc-violet);color:white}
.sidebar nav .group-label{color:#a6b0ce}.side-footer{color:#b8c1da;border-top-color:#303b57}.side-footer button{background:#26324e;color:#eef0f9;border-color:#46516e}
.primary,.brand-mark{background:var(--cc-violet);border-color:var(--cc-violet);color:white}.primary:hover:not(:disabled){background:#5046df}
#sessionBanner:not(.renewal-warning){background:#202d4b;color:white}
.auth-page{background:linear-gradient(140deg,#edeaff,#f4f5fa)}
input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible{outline:2px solid #635bff;outline-offset:2px}
.grid-header,.entry-table th,.split-table th,.nominal-table th{background:#f0f0f8;color:#303754}
.grid-line.row.selected{background:var(--cc-selection)}.grid-line.row:hover{background:#f3f1ff}
.statusbar #lastTransaction{margin-left:auto;text-align:right}

/* v112: compact, touch-friendly mobile workspaces; desktop layout and saved columns remain intact. */
.mobile-user-actions{display:contents}#mobileUserToggle,.mobile-nav-close,.mobile-more-actions{display:none}
@media(max-width:760px),(max-width:1024px) and (max-height:600px){
 body{overflow:hidden}.shell{height:var(--mobile-viewport-height,100dvh);max-width:100vw}.has-session-banner .shell{height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,32px))}
 button{touch-action:manipulation;min-height:44px}input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important;min-height:44px}button:focus-visible{outline:3px solid #635bff;outline-offset:2px}
 #sessionBanner{padding:4px 10px;font-size:11px;line-height:18px}#sessionBanner .session-info{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#sessionBanner.renewal-warning .session-info{white-space:normal}
 .page-head{position:relative;padding:8px 10px;gap:8px;min-height:64px}.page-title{gap:8px;flex:1;min-width:0}.page-head h1{font-size:17px;white-space:normal;line-height:1.2;overflow-wrap:anywhere}.page-head p{font-size:11px}.top-actions{flex:0 0 auto}#mobileUserToggle{display:block;font-size:13px;padding:8px 12px}
 .mobile-user-actions{display:none;position:absolute;right:8px;top:calc(100% - 4px);z-index:23;padding:8px;background:white;border:1px solid #d5d6e7;border-radius:10px;box-shadow:0 10px 35px #17213b33;min-width:190px;max-width:calc(100vw - 16px)}.top-actions.user-open .mobile-user-actions{display:flex;flex-direction:column;align-items:stretch;gap:6px}.mobile-user-actions button{text-align:left;font-size:14px!important;padding:10px!important}.mobile-user-actions #userBadge{display:block;white-space:normal;overflow-wrap:anywhere;font-size:12px;padding:6px}
 .sidebar{top:var(--session-banner-height,0px);bottom:0;width:min(310px,88vw);padding-bottom:env(safe-area-inset-bottom);z-index:22}.side-brand{padding:12px;gap:8px;min-height:70px}.side-brand>div{flex:1}.mobile-nav-close{display:block;background:transparent;color:white;border-color:#ffffff55;padding:8px;font-size:12px}.sidebar nav button{min-height:44px;font-size:14px}.sidebar nav{overscroll-behavior:contain}.side-footer{padding:10px}.side-footer button{min-height:44px}.shell.menu-open .menu-scrim{top:var(--session-banner-height,0px)}
 .ribbon{min-height:54px;gap:2px;padding:4px 6px;align-items:center;flex-wrap:nowrap;overflow-x:auto}.ribbon button{min-height:44px;min-width:0;flex:0 0 auto;display:inline-flex;gap:5px;align-items:center;padding:8px 9px;font-size:12px;white-space:nowrap}.ribbon button svg{width:18px;height:18px;flex-shrink:0}.ribbon:not(.mobile-expanded) .mobile-secondary-action{display:none}.ribbon .mobile-more-actions{display:inline-flex;margin-left:auto;color:#635bff;background:white;border:1px solid #d8d5ff;position:sticky;right:0}.ribbon.mobile-expanded{flex-wrap:wrap;max-height:35dvh;overflow:auto;align-content:flex-start}.ribbon.mobile-expanded .mobile-more-actions{position:static}
 .filter-bar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px;padding:6px 8px;min-height:56px}.filter-bar label{min-width:0;gap:0;font-size:0}.filter-bar input{width:100%;min-width:0;margin:0;font-size:16px}.filter-bar button{font-size:12px;padding:8px}.filter-bar .loading{grid-column:1/-1;margin:0;font-size:12px}.main-grid-export-tools{display:none}
 .statusbar{flex-wrap:wrap;gap:4px 12px;padding:7px 9px;margin-bottom:env(safe-area-inset-bottom,6px);font-size:11px;line-height:1.4}.statusbar #selectionTotal{margin-left:auto;overflow-wrap:anywhere}.statusbar #lastTransaction{flex-basis:100%;white-space:normal;overflow-wrap:anywhere;text-align:right;font-size:10px}.grid-line.row .cell{font-size:14px}.grid-scroll{touch-action:pan-x pan-y}
 .modal,.wide-modal{padding:0;bottom:auto;height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px));top:var(--session-banner-height,0px)}.modal .modal-card,.wide-modal .modal-card{height:100%;max-height:100%;border-radius:0}.modal-head{padding:10px 12px;gap:10px}.modal-head>div{min-width:0}.modal-head h2{font-size:18px;overflow-wrap:anywhere}.modal-head p{font-size:12px;line-height:1.35}.modal-head button{padding:8px 12px}.modal-body{padding:10px;overscroll-behavior:contain}.form-grid,.entry-header{grid-template-columns:minmax(0,1fr)}.editor-actions{flex-wrap:wrap;padding-bottom:max(10px,env(safe-area-inset-bottom))}
 .invoice-tools{padding:6px 8px;gap:6px;flex-wrap:nowrap;overflow:auto}.invoice-tools button{font-size:12px;padding:7px 10px;flex-shrink:0}.invoice-scroll{overflow:auto!important;padding:8px}.invoice-form{height:auto;min-height:100%;grid-template-columns:minmax(0,1fr);gap:8px}.invoice-form .account-editor-nav{flex-wrap:nowrap;overflow:auto;gap:4px;padding-bottom:4px}.invoice-form .account-editor-nav button{font-size:13px;flex-shrink:0;padding:8px 10px}.invoice-panes{overflow:visible}.invoice-details{height:auto;overflow:visible;gap:10px}.invoice-details .invoice-header{max-height:none;overflow:visible;grid-template-columns:minmax(0,1fr);gap:10px}.invoice-header .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.invoice-header .address-text:empty{display:none}.invoice-header .address-text{min-height:0;font-size:13px;margin-top:6px}.invoice-details .invoice-lines{flex:none;min-height:220px;max-height:45dvh}.invoice-lines input{padding:9px 6px}.invoice-lines td[data-line=stockCode]{min-width:180px}.invoice-discount{margin:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px}.invoice-discount label{font-size:12px}.invoice-workspace>.invoice-totals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:6px 8px;gap:4px;margin:0}.invoice-workspace>.invoice-totals div{min-width:0;padding:6px 8px}.invoice-totals span{font-size:11px;margin-bottom:2px}.invoice-totals strong{font-size:16px}.invoice-workspace>.editor-actions{padding:6px 8px max(6px,env(safe-area-inset-bottom));gap:6px}.invoice-workspace>.editor-actions>.error:empty{display:none}.invoice-workspace>.editor-actions>.error:not(:empty){flex-basis:100%;font-size:12px}
 .workspace-overlay{padding:0;bottom:auto;height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px));top:var(--session-banner-height,0px)}.workspace-overlay-panel,.bank-reconcile-overlay .workspace-overlay-panel{width:100%;max-width:100%;height:100%;max-height:100%;border-radius:0}.workspace-overlay-panel>header{padding:10px 12px}.workspace-overlay-content{padding:10px}.bank-reconcile-overlay .workspace-overlay-content{overflow:auto}.activity-controls{gap:6px}.activity-controls input{max-width:100%;width:145px}.company-tabs,.settings-tabs{flex-wrap:nowrap;overflow:auto}.company-tabs button,.settings-tabs button{flex:0 0 auto;white-space:nowrap}.auth-page{height:var(--mobile-viewport-height,100dvh);min-height:0;overflow:auto;padding:16px 10px}.auth-card{padding:20px 16px}.auth-card.narrow{margin-top:3vh}.has-session-banner .auth-page{padding-top:calc(var(--session-banner-height,32px) + 16px)}
}
@media(max-width:380px){.invoice-header .form-grid,.invoice-discount{grid-template-columns:minmax(0,1fr)}.page-head h1{font-size:16px}.ribbon button{padding:8px 6px;font-size:11px}}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}
@media print{#mobileUserToggle,.mobile-nav-close,.mobile-more-actions{display:none!important}}
@media(max-width:760px),(max-width:1024px) and (max-height:600px){.grid-header{flex-basis:44px;min-height:44px}.grid-line.head{min-height:44px}.column-resize{width:18px}.account-suggestions [role=option]{min-height:44px}}

/* Platform overview and client administration occupy separate tabs. */
.platform-admin-modal .modal-body>.company-tools:first-child{position:sticky;top:0;z-index:5;background:white;margin:0 0 12px;padding:6px 0 10px}
.platform-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin:8px 0 18px}
.platform-metric{display:flex;flex-direction:column;text-align:left;align-items:flex-start;white-space:normal;gap:5px;padding:15px;border:1px solid #d4dfea;border-radius:10px;background:#f8fafc;color:#203441;min-width:0}
.platform-metric-label{font-weight:600;font-size:13px}.platform-metric-value{font-size:30px;line-height:1.2}.platform-metric small{color:#647886;font-size:11px;line-height:1.4}.metric-live{background:#ecf8f3;border-color:#b6decd}.metric-renewal{background:#eff6fd}.metric-next{background:#f5f0fc}
.platform-live-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.platform-live-heading h3{margin:0 0 10px}.platform-live-heading span{font-size:13px;color:#647886}
.platform-live-logins .platform-table-scroll{max-height:clamp(160px,calc(100dvh - 390px),480px);overflow:auto;border:1px solid #d4dfea;border-radius:8px}
.platform-admin-modal .platform-live-logins .detail-table{min-width:760px;width:100%}.platform-live-logins th{position:sticky;top:0;background:#ebf1f6;z-index:1}.platform-live-logins .detail-table td{padding:8px 10px}.platform-updated{margin:6px 0}
@media(max-width:1100px){.platform-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:550px){.platform-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.platform-metric{padding:10px}.platform-metric-value{font-size:25px}.platform-live-heading{align-items:flex-start}.platform-live-logins .platform-table-scroll{max-height:240px}}

/* High-contrast selection remains visible over hover, credit and renewal colours. */
.grid-line.row.selected,.grid-line.row.selected:hover,.grid-line.row.credit-row.selected,.grid-line.row.credit-row.selected:hover,table tr.selected,table tr.selected:hover{background:#493580!important;color:#fff!important;box-shadow:inset 4px 0 #b7a4ef}.grid-line.row.selected .cell,table tr.selected td{color:#fff!important}.grid-line.row.credit-row.selected{box-shadow:inset 4px 0 #ffaca4}.grid-column-title{display:block;overflow:hidden;text-overflow:ellipsis}.grid-header .cell{padding-right:38px}.column-filter{position:absolute;right:10px;top:3px;padding:4px 6px;min-height:28px;border:0;background:transparent;color:inherit}.column-filter.active{background:var(--cc-purple-soft);color:var(--cc-purple-dark)}.grid-filter-panel{position:fixed;z-index:5000;width:320px;max-width:95vw;max-height:80vh;overflow:auto;background:white;border:1px solid #92a8bb;border-radius:9px;box-shadow:0 8px 30px #17213b44;padding:14px}.grid-filter-panel .filter-values{max-height:230px;overflow:auto;margin:10px 0}.filter-value{display:flex;gap:8px;align-items:center;padding:4px}.filter-value input{width:16px;min-height:0;margin:0}.filter-value span{overflow-wrap:anywhere}.grid-filter-panel .company-tools{margin:10px 0 0}

.invoice-lines [hidden]{display:none!important}.invoice-lines th{position:relative}.invoice-lines table{width:max-content;min-width:100%}.invoice-lines{overflow:auto}

.account-suggestions [role=option][aria-selected=true]{background:#493580!important;color:white!important}.account-suggestions [role=option][aria-selected=true] span,.account-suggestions [role=option][aria-selected=true] strong{color:white!important}

/* v123: consistent selected rows across table and virtual views. */
.grid-line.row.selected,.entry-table tr.selected,.entry-table tr[aria-selected="true"],.allocation-table tr.selected,.allocation-table tr[aria-selected="true"]{background:#493580!important;color:#fff!important;box-shadow:inset 4px 0 #b7a4ef}.grid-line.row.selected .cell,.entry-table tr.selected td,.entry-table tr[aria-selected="true"] td{color:#fff!important}.debt-grid,.shortfall-grid{height:65vh;min-height:260px}.chase-controls input[type="number"]{width:80px}

/* v124: document workspaces reserve the available viewport for item lines. */
.modal.wide-modal:has(.invoice-workspace) .modal-head{padding:6px 10px;align-items:center;gap:8px}
.modal.wide-modal:has(.invoice-workspace) .modal-head h2{font-size:18px;margin:0}
.modal.wide-modal:has(.invoice-workspace) .modal-head p{font-size:11px;margin:2px 0 0}
.modal.wide-modal:has(.invoice-workspace) .modal-head button{padding:6px 10px;min-height:28px}
.invoice-workspace .invoice-tools{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:5px 8px}
.invoice-workspace .invoice-tools button{min-height:28px;padding:5px 8px;font-size:12px}
.invoice-workspace>.invoice-tabs{display:flex;flex-direction:row;align-items:center;flex:0 0 auto;gap:4px;padding:4px 8px;overflow:auto;border-bottom:1px solid #dce7eb}
.invoice-workspace>.invoice-tabs button{flex:0 0 auto;padding:5px 10px;min-height:28px;font-size:12px}
.invoice-workspace .invoice-scroll{padding:6px 8px;min-height:0}
.invoice-workspace .invoice-form{display:flex;flex-direction:column;gap:0;height:100%;min-height:0}
.invoice-workspace .invoice-panes{flex:1;min-height:0}
.invoice-workspace .invoice-details{gap:5px}
.invoice-workspace .invoice-details .invoice-header{display:grid;grid-template-columns:minmax(200px,26%) minmax(0,1fr);max-height:180px;gap:10px;margin:0;flex-shrink:0}
.invoice-workspace .invoice-header .form-grid{grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;gap:4px 8px}
.invoice-workspace .invoice-header label{font-size:11px;min-width:0;line-height:1.2}
.invoice-workspace .invoice-header input,.invoice-workspace .invoice-header select{min-height:28px;padding:4px 6px;margin-top:2px;font-size:12px;width:100%;min-width:0}
.invoice-workspace .invoice-header .address-text{min-height:0;max-height:64px;overflow:auto;margin:4px 0 0;padding:5px 7px;line-height:1.25;font-size:11px}
.invoice-workspace .invoice-details .invoice-lines{min-height:100px;flex:1 1 0;max-height:none}
.invoice-workspace .invoice-lines table{table-layout:fixed;min-width:100%;width:100%;font-size:12px}
.invoice-workspace .invoice-lines td,.invoice-workspace .invoice-lines th{min-width:0;overflow:hidden;text-overflow:ellipsis;padding:3px;box-sizing:border-box}
.invoice-workspace .invoice-lines td[data-line=stockCode]{display:table-cell;min-width:0;white-space:nowrap}
.invoice-workspace .invoice-lines td[data-line=stockCode]>.account-lookup{display:inline-block;width:calc(100% - 25px);vertical-align:middle}
.invoice-workspace .invoice-lines td[data-line=stockCode]>button{width:23px;min-width:0;padding:3px 0;margin-left:2px;min-height:28px}
.invoice-workspace .invoice-lines td[data-line=description],.invoice-workspace .invoice-lines td[data-line=barcode]{min-width:0}
.invoice-workspace .invoice-lines input,.invoice-workspace .invoice-lines select,.invoice-workspace .invoice-lines .account-lookup,.invoice-workspace .invoice-lines .search-select{width:100%;min-width:0;max-width:100%;padding:4px 3px;min-height:28px;font-size:12px}
.invoice-workspace .invoice-lines .account-lookup,.invoice-workspace .invoice-lines .search-select{padding:0}
.invoice-workspace .invoice-lines td[data-line=description] input{min-width:0}
.invoice-workspace .invoice-lines td:not([data-line]):not([data-amount]){width:40px}
.invoice-workspace .invoice-lines td>button{font-size:10px;padding:5px 2px;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.invoice-workspace .invoice-discount{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;padding:3px 6px}
.invoice-workspace .invoice-discount label{display:flex;align-items:center;gap:6px;flex:1;min-width:200px;font-size:11px}
.invoice-workspace .invoice-discount input{width:90px;flex:0 0 90px;margin:0;min-height:26px;padding:3px 5px;font-size:12px}
.invoice-workspace .invoice-discount small{font-size:10px;margin:0}
.invoice-workspace>.invoice-totals{display:flex;gap:6px;padding:4px 8px;flex-wrap:wrap}
.invoice-workspace>.invoice-totals div{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;flex:1 1 180px;padding:4px 8px}
.invoice-workspace>.invoice-totals span{font-size:11px;margin:0}
.invoice-workspace>.invoice-totals strong{font-size:14px;white-space:nowrap}
.invoice-workspace>.editor-actions{min-height:0;padding:0 8px;border:0}
.invoice-workspace>.editor-actions:has(.error:empty){display:none}
.invoice-workspace>.editor-actions .error:not(:empty){padding:4px 0;font-size:11px}
@media(max-width:1050px){.invoice-workspace .invoice-header .form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.invoice-workspace .invoice-details .invoice-header{max-height:190px}}
@media(max-width:700px){.invoice-workspace .invoice-form{height:100%;min-height:0}.invoice-workspace .invoice-scroll{overflow:auto!important}.invoice-workspace .invoice-details{height:100%;overflow:visible}.invoice-workspace .invoice-details .invoice-header{grid-template-columns:minmax(0,1fr);max-height:none;overflow:visible}.invoice-workspace .invoice-header .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.invoice-workspace .invoice-header .address-text{display:none}.invoice-workspace .invoice-panes{overflow:visible}.invoice-workspace .invoice-details .invoice-lines{min-height:200px;flex:1 0 200px}.invoice-workspace .invoice-discount small{display:none}.invoice-workspace .invoice-discount label{min-width:180px}.invoice-workspace>.invoice-totals div{flex-basis:40%;padding:3px 5px}}
/* Resizable allocation work areas, with compact chrome and a clear grab target. */
.allocation-overlay .workspace-overlay-panel>header{padding:6px 10px}
.allocation-overlay .workspace-overlay-panel>header h2{font-size:18px;margin:0}
.allocation-overlay .workspace-overlay-panel>header button{padding:6px 10px;min-height:28px}
.allocation-overlay .allocation-workspace{gap:5px;padding:6px 8px;overflow:hidden}
.allocation-overlay .allocation-help{font-size:11px;padding:4px 8px}
.allocation-overlay .allocation-identity{padding:5px 8px;font-size:12px}
.allocation-overlay .allocation-workspace>.company-tools{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;gap:4px}
.allocation-overlay .allocation-workspace>.company-tools>input{width:auto;min-height:28px;padding:5px 7px;flex:1 1 220px;min-width:120px;font-size:12px}
.allocation-overlay .allocation-workspace>.company-tools button{padding:5px 7px;min-height:28px;font-size:11px}
.allocation-overlay .allocation-split-panes{gap:0}
.allocation-overlay .allocation-split-panes .allocation-board{gap:0;grid-template-columns:minmax(0,40fr) 9px minmax(0,60fr);height:100%;min-height:0;flex:none}
.allocation-resize{position:relative;background:#d7e4ed;touch-action:none;border-radius:3px;outline-offset:-2px;min-width:0;min-height:0}
.allocation-resize:hover,.allocation-resize:focus{background:var(--cc-purple-border);outline:2px solid var(--cc-purple-dark)}
.allocation-resize-columns{cursor:col-resize;margin:0 2px}
.allocation-resize-rows{cursor:row-resize;margin:2px 0}
.allocation-resize-columns:after,.allocation-resize-rows:after{content:'';position:absolute;border-radius:2px;background:var(--cc-purple-dark)}
.allocation-resize-columns:after{width:3px;height:36px;left:1px;top:calc(50% - 18px)}
.allocation-resize-rows:after{height:3px;width:36px;top:1px;left:calc(50% - 18px)}
.resizing-allocation{user-select:none}
.allocation-overlay .allocation-split-panes .allocation-board section{min-height:0;height:100%;max-height:none}
.allocation-overlay .allocation-table tr.selected td{background:#493580!important;color:#fff!important}
.allocation-overlay .allocation-current{padding:4px 6px}
.allocation-overlay .allocation-current h3{font-size:12px;margin:2px 0}
.allocation-overlay .allocation-current p{font-size:10px;margin:2px 0;flex:none}
.allocation-overlay .allocation-current>.company-tools{margin:2px 0;gap:4px;flex:none}
.allocation-overlay .allocation-current button{padding:4px 7px;font-size:11px;min-height:26px}
.allocation-overlay .allocation-summary{padding:4px 8px;font-size:11px}
.allocation-overlay .allocation-actions{padding:4px 0;margin:0}
.allocation-overlay .allocation-actions button{padding:5px 9px;min-height:28px}
@media(max-width:700px){.allocation-overlay .allocation-workspace{overflow:auto}.allocation-overlay .allocation-split-panes{flex:1 0 440px;min-height:440px}.allocation-overlay .allocation-resize-columns{cursor:row-resize;margin:2px 0}.allocation-overlay .allocation-resize-columns:after{height:3px;width:36px;top:1px;left:calc(50% - 18px)}.allocation-overlay .allocation-board{grid-template-rows:minmax(0,40fr) 9px minmax(0,60fr)}}
/* Report grids and their footer each occupy their own flex area. */
.debt-report-overlay .workspace-overlay-panel>header{padding:8px 10px}
.debt-report-overlay .debt-report-workspace{display:flex;flex-direction:column;overflow:hidden;min-height:0;gap:6px;padding:8px 10px}
.debt-report-workspace>.debt-grid,.debt-report-workspace>.shortfall-grid{position:relative;display:flex;flex-direction:column;flex:1 1 0;height:auto;min-height:0;overflow:hidden}
.debt-report-workspace>.notice{flex:0 0 auto;position:static;margin:0;padding:5px 7px;font-size:11px;max-height:64px;overflow:auto}
.debt-report-workspace>.company-tools{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;flex:0 0 auto;gap:6px;margin:0}
.debt-report-workspace .chase-controls>select{width:160px;flex:0 1 160px;margin:0;min-height:30px;padding:5px 7px}
.debt-report-workspace .chase-controls>input[type=date],.debt-report-workspace .chase-controls>.date-input-control{width:140px;flex:0 1 140px;margin:0;min-height:30px}
.debt-report-workspace .chase-controls input[type=search]{width:auto;flex:1 1 200px;min-width:140px;margin:0;min-height:30px;padding:5px 7px}
.debt-report-workspace .chase-days,.debt-report-workspace .chase-inactive{display:flex;align-items:center;gap:5px;white-space:nowrap;margin:0;font-size:12px;flex:0 0 auto}
.debt-report-workspace .chase-days input{width:58px;min-width:0;min-height:30px;margin:0;padding:5px}
.debt-report-workspace .chase-inactive input[type=checkbox]{width:16px;height:16px;min-height:0;margin:0;padding:0}
.debt-report-workspace .company-tools button{min-height:30px;padding:5px 8px;font-size:12px}

/* Clear, consistent selection and compact document footer. */
:root{--cc-selection:#493580}
.grid .row.selected,.grid .row.selected .cell,.grid-row.selected,.grid-row.selected .cell,.allocation-table tr.selected td{background:#493580!important;color:#fff!important}
.invoice-workspace>.editor-actions,.invoice-workspace>.editor-actions:has(.error:empty){display:flex!important;justify-content:flex-end;flex:0 0 auto;gap:8px;padding:8px 12px}
.invoice-workspace>.editor-actions>.error{flex:1;min-width:0}
.grid-filter-panel .account-lookup{position:relative}

/* Shared controls use the same purple palette in every module. */
input[type=checkbox],input[type=radio],input[type=range],progress{accent-color:var(--cc-purple)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[role=button]:focus-visible,[role=option]:focus-visible{outline:2px solid var(--cc-purple);outline-offset:2px}
input:focus-visible,select:focus-visible,textarea:focus-visible{border-color:var(--cc-purple)}
::selection{background:var(--cc-purple-dark);color:white}
.column-resize:hover,.column-resize:focus-visible{background:var(--cc-purple-border)}

.sidebar nav button:hover:not(:disabled),.side-footer button:hover:not(:disabled){background:var(--cc-purple-dark);color:white}
.aged-table tr[aria-selected=true],.chart-overlay .selected{background:var(--cc-purple-dark);color:white}
a{color:var(--cc-purple-dark)}option:checked{background:var(--cc-purple-dark);color:white}

/* VAT summary stays compact; all five essential columns can be resized. */
.wide-modal .vat-workspace .vat-boxes{table-layout:fixed;width:auto;min-width:0;max-width:none;margin:12px 0;border-collapse:separate}
.vat-summary-scroll{max-width:100%;overflow:auto}
.vat-workspace .vat-boxes th{position:relative;white-space:normal;padding-right:18px}
.vat-workspace .vat-boxes th:nth-child(n+3){text-align:right}
.vat-workspace .vat-boxes td{overflow-wrap:anywhere;vertical-align:top}
.vat-workspace .vat-boxes td:first-child{width:auto}
.vat-workspace .vat-boxes td:nth-child(n+3){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.vat-workspace .vat-boxes td:last-child button{max-width:100%;min-height:30px;padding:5px 8px;overflow:hidden;text-overflow:ellipsis}
.vat-workspace .vat-column-resize{position:absolute;inset:0 0 0 auto;width:12px;padding:0;border:0;border-right:2px solid var(--cc-purple-border);border-radius:0;background:transparent;cursor:col-resize;touch-action:none}
.vat-workspace .vat-column-resize:hover,.vat-workspace .vat-column-resize:focus-visible{background:var(--cc-purple-soft)}
.vat-column-status{font-size:12px;white-space:normal}

/* Filled module icons follow the sidebar text in every state. */
.sidebar nav button{display:flex;align-items:center;gap:10px;white-space:normal;line-height:1.3}
.sidebar-icon{display:block;width:20px;height:20px;flex:0 0 20px;fill:currentColor;stroke:none;pointer-events:none}

/* Modern scrollbars share the sidebar and selected-module theme colours. */
@media (forced-colors:none){
 *{scrollbar-width:thin;scrollbar-color:var(--cc-violet) var(--cc-navy)}
 @supports selector(::-webkit-scrollbar){
  /* Let Chromium/WebKit use the rounded custom thumb rather than its native one. */
  *{scrollbar-width:auto;scrollbar-color:auto}
  ::-webkit-scrollbar{width:10px;height:10px}
  ::-webkit-scrollbar-track{background:var(--cc-navy)}
  ::-webkit-scrollbar-thumb{background:var(--cc-violet);border:2px solid var(--cc-navy);border-radius:999px;min-height:32px;min-width:32px;background-clip:padding-box}
  ::-webkit-scrollbar-thumb:hover{background-color:#9387ff}
  ::-webkit-scrollbar-thumb:active{background-color:#b2a7ff}
  ::-webkit-scrollbar-button{display:none;width:0;height:0}
  ::-webkit-scrollbar-corner{background:var(--cc-navy)}
 }
}

/* Audix500 branding and single-line module labels. */
.brand-home{display:block;max-width:100%;border-radius:8px;overflow:hidden;background:white;line-height:0;flex:1;min-width:0}.brand-home:focus-visible{outline:3px solid #b9a5ee;outline-offset:3px}.audix-logo{display:block;width:100%;height:auto}.brand .brand-home{max-width:340px}.side-brand{padding:10px 12px;gap:8px}.side-brand .brand-home{max-width:250px}.sidebar nav button{white-space:nowrap;font-size:13px;gap:8px;padding-inline:10px}.sidebar-icon{flex-shrink:0}.modal-head>.toolbar-excel{margin-left:auto;margin-right:10px}.toolbar-excel{flex-shrink:0}
@media(min-width:901px){.shell{grid-template-columns:270px minmax(0,1fr)}}
@media(max-width:900px){.sidebar nav button{font-size:13px;gap:6px;padding-inline:6px}.side-brand .brand-home{max-width:220px}}

/* Focused, responsive sign-in card. Authentication remains server controlled. */
#loginPage{align-items:center;padding:36px 20px;background:radial-gradient(ellipse at 15% 15%,#e9e0f7 0,transparent 52%),linear-gradient(135deg,#f6f4fb,#edf0f7)}
#loginPage .auth-card.narrow{width:min(460px,100%);margin:0;padding:28px 38px 30px;border:1px solid #e2ddec;border-radius:18px;box-shadow:0 20px 65px #27114814}
#loginPage .brand{flex-direction:column;justify-content:center;gap:0;width:100%;margin:0 auto 8px}
#loginPage .brand-home{flex:none;width:min(320px,100%);max-width:320px;margin-inline:auto}
#loginPage #loginCompany:empty{display:none}#loginPage #loginCompany{text-align:center;color:#6d617e}
#loginPage .login-intro{text-align:center;margin:0 0 26px}#loginPage h1{font-size:25px;line-height:1.25;letter-spacing:-.4px;margin:0 0 9px;color:#2d1749}#loginPage .login-intro p{margin:0;line-height:1.55;color:#746a80}
#loginPage label{font-size:13px;font-weight:600;color:#453751;margin-top:18px}
#loginPage input{min-height:48px;padding:12px 14px;border:1px solid #d7d0e1;border-radius:9px;margin-top:7px;background:#fff;color:#291b3c;transition:border-color .15s,box-shadow .15s}
#loginPage input::placeholder{color:#998fa4}#loginPage input:focus{outline:none;border-color:#725093;box-shadow:0 0 0 3px #8e6cb322}
#loginPage .actions{margin-top:25px;gap:10px}#loginPage #loginButton{width:100%;min-height:48px;border-radius:9px;background:#49216c;border-color:#49216c;color:#fff;font-weight:650;font-size:15px}#loginPage #loginButton:hover:not(:disabled){background:#361550;border-color:#361550}#loginPage #loginButton:focus-visible{outline:3px solid #b9a5ee;outline-offset:3px}
#loginPage #backCompany{width:100%}#loginPage #loginError:empty{display:none}#loginPage #loginError{margin-top:16px;font-size:13px;line-height:1.5}
#loginPage .login-access-note{display:flex;align-items:center;justify-content:center;gap:7px;border-top:1px solid #eee9f2;padding-top:20px;margin:24px 0 0;color:#7d7189;font-size:11px;line-height:1.5;text-align:center}#loginPage .login-access-note svg{width:16px;height:16px;flex:0 0 16px;color:#76588d}
@media(max-width:520px){#loginPage{padding:20px 14px}#loginPage .auth-card.narrow{padding:22px 24px 25px}#loginPage .brand-home{width:min(285px,100%)}}
@media(max-height:650px){#loginPage{align-items:flex-start}#loginPage .auth-card.narrow{margin-block:auto}}

/* Consistent toolbar buttons, with a clear dark-purple hover state. */
.ribbon button:hover:not(:disabled),.ribbon .invoice-action:hover:not(:disabled),.ribbon .credit-action:hover:not(:disabled){background:var(--cc-purple-dark);color:white;border-color:var(--cc-purple-dark)}
.ribbon button:focus-visible{outline:2px solid var(--cc-purple-dark);outline-offset:2px}

#loginPage .login-terms{text-align:center;margin:20px 0 0;font-size:12px}#loginPage .login-terms a{color:#49216c;text-underline-offset:3px}#loginPage .login-terms span{color:#7d7189}#loginPage .login-access-note{margin-top:18px}
.modal-head,.workspace-overlay-panel>header{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.modal-head>div:first-child,.workspace-overlay-panel>header>h2{flex:1;min-width:0}.modal-head>#modalClose,.workspace-overlay-panel>header>button:not(.toolbar-excel){order:100;margin-left:auto;flex-shrink:0}.modal-head>.toolbar-excel,.workspace-overlay-panel>header>.toolbar-excel{order:90;margin-left:0;margin-right:0}
.price-list-workspace .company-tools{margin:0 0 8px}.price-list-editor{display:flex;flex-direction:column;gap:12px;min-height:0;flex:1}.price-list-editor .grid-host{margin:0;min-height:140px;flex:1}.price-list-editor fieldset{min-width:0}.price-list-section{display:flex;flex-direction:column;min-height:190px;flex:1}.price-list-section h3{margin:4px 0;font-size:14px}.price-list-save{display:flex;gap:8px;justify-content:flex-end;position:sticky;bottom:0;padding:10px 0;background:white}.price-list-picker{padding:12px;border:1px solid #cfc3dd;border-radius:8px;background:#faf8fd}.price-list-picker .grid-host{height:220px;min-height:140px;flex:none}.pricing-settings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.pricing-settings label{font-size:12px}.pricing-settings input,.pricing-settings select{min-height:34px;padding:6px}.price-list-section .company-tools input{max-width:340px}.pricing-readonly{color:#75667e;font-size:12px}@media(max-width:700px){.pricing-settings{grid-template-columns:1fr 1fr}.price-list-editor .form-grid{grid-template-columns:1fr}}

.company-tools>.window-close,.actions>.window-close,.editor-footer>.window-close,.price-list-save>.window-close{margin-left:auto;order:100}.modal-head>.window-close,.workspace-overlay-panel>header>.window-close{margin-left:auto;order:100}

.invoice-billing-details{margin-top:6px}.invoice-billing-details>summary{cursor:pointer;color:var(--accent,#7762b3);font-weight:600}.invoice-billing-details .form-grid{margin-top:8px;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.invoice-billing-details input{min-width:0;width:100%}

/* v143: approved light and dark Audix500 brand treatments. */
.side-brand{background:#201038}.side-brand .brand-home{background:#201038;border-radius:4px}.platform-brand{background:#201038;border-radius:10px;padding:10px 16px;justify-content:center}.platform-brand .brand-home{background:#201038;flex:none;width:min(340px,100%);max-width:340px;margin-inline:auto}.platform-admin-brand{display:flex;align-items:center;margin:0 0 12px}.platform-admin-brand .brand-home{width:min(300px,100%)}
#loginPage .brand-home{background:white}.side-brand .audix-logo,.platform-brand .audix-logo{object-fit:contain}

/* v144: one vertical scroll owner for administration; content never flex-shrinks behind its tabs. */
.modal{max-width:100vw;max-height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px));overflow:hidden}
.modal .modal-card{min-height:0;max-height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px) - 16px);min-width:0}
.modal-head{min-width:0}.modal-head>div{min-width:0}.modal-head h2,.modal-head p{overflow-wrap:anywhere}.modal-head .toolbar-excel,.modal-head .window-close{flex-shrink:0}
.platform-admin-modal .modal-body{display:block;overflow-y:auto;overflow-x:hidden;min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.platform-admin-modal .modal-body>.company-tools{position:static!important;top:auto;z-index:auto;flex-wrap:wrap}
.platform-admin-modal .platform-dashboard-content{display:block;min-height:0;flex:none}.platform-admin-modal .platform-metrics{flex:none}
.platform-table-scroll{max-width:100%;overflow:auto;overscroll-behavior:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
.client-account-layout,.client-account-panels,.client-account-section{min-width:0}.client-account-summary{position:static!important;max-height:none!important}
.global-search-overlay .workspace-overlay-panel{width:min(840px,calc(100vw - 24px));min-height:0;max-height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px) - 24px)}
.global-search-results{max-height:none;min-height:0}.global-search-results h3{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#77628c;margin:18px 0 6px}.global-search-hit{display:flex;flex-direction:column;width:100%;text-align:left;white-space:normal;gap:4px;padding:10px 12px;margin:4px 0}.global-search-hit small{font-weight:400;color:#6b6078}.global-search-hit:hover,.global-search-hit[aria-selected=true]{background:#493580;color:white}.global-search-hit:hover small,.global-search-hit[aria-selected=true] small{color:white}
#globalSearchButton{white-space:nowrap;flex-shrink:0}.page-title,.top-actions{min-width:0}.top-actions{gap:6px}
@media(min-width:761px) and (max-height:820px){.page-head{padding:8px 16px;min-height:58px}.page-head h1{font-size:21px}.ribbon{padding:4px 8px;min-height:58px;align-items:center}.ribbon button{min-height:46px;min-width:76px;padding:5px 8px;font-size:11px}.filter-bar{padding:6px 14px;min-height:46px}.filter-bar input{min-height:34px;padding:6px 9px}.modal-head{padding:9px 14px}.modal-head h2{font-size:19px}.modal-body{padding:12px}.platform-admin-brand .brand-home{width:min(200px,100%)}.platform-brand{padding:4px 12px}.platform-metric{padding:10px}.platform-metric-value{font-size:24px}}
@media(max-width:760px),(max-height:520px){.modal{inset:auto 0 0;top:var(--session-banner-height,0px);height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px));padding:0}.modal .modal-card{height:100%;max-height:100%;width:100%;border-radius:0}.modal-head{flex-wrap:wrap;padding:8px 10px;gap:6px}.modal-head>div{flex:1 1 160px}.modal-head h2{font-size:18px}.modal-head p{font-size:12px;margin:3px 0}.modal-head>button{padding:8px 10px;min-height:40px}.platform-admin-modal .modal-body{padding:10px}.platform-admin-modal .company-tools{gap:6px;margin:8px 0}.platform-admin-modal .company-tools button{padding:7px 9px;font-size:12px;min-height:40px}.platform-admin-brand{margin-bottom:8px}.platform-admin-brand .brand-home{width:min(220px,100%)}.client-account-layout{display:block}.client-account-summary{width:100%;margin-bottom:16px}.client-profile .client-toolbar{position:static}.global-search-overlay{padding:0}.global-search-overlay .workspace-overlay-panel{width:100%;height:100%;max-height:100%;border-radius:0}#globalSearchButton{font-size:12px;padding:8px;min-height:40px}.page-title{min-width:0}.top-actions{gap:4px}}
@media(orientation:landscape) and (max-height:520px){.platform-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.platform-metric{padding:8px}.platform-metric-value{font-size:22px}.platform-admin-brand .brand-home{width:170px}.platform-brand{padding:2px 10px}.platform-admin-modal .platform-live-logins .platform-table-scroll{max-height:none}.modal-head p{display:none}}
/* v145: centred command search and activity within account editors. */
.page-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,440px) minmax(0,1fr);gap:16px}.top-actions{justify-self:end;max-width:100%}.top-actions #userBadge{overflow:hidden;text-overflow:ellipsis;max-width:180px}.system-search-trigger{width:100%;min-width:0;display:flex;align-items:center;gap:12px;padding:10px 16px!important;border:1px solid #ded7ee;border-radius:14px;background:linear-gradient(120deg,#faf8ff,#f0ebfa);box-shadow:0 3px 12px #21123d08;transition:box-shadow .18s,border-color .18s,background .18s;text-align:left}.system-search-trigger:hover:not(:disabled),.system-search-trigger:focus-visible{background:#eee5fa;border-color:#9d82c3;box-shadow:0 4px 16px #38205b18}.system-search-trigger svg{width:19px;height:19px;flex-shrink:0;fill:none;stroke:#70558f;stroke-width:1.8;stroke-linecap:round}.system-search-trigger span{color:#8b7b9d;font-weight:400;font-size:14px;flex:1;overflow:hidden;text-overflow:ellipsis}.system-search-trigger kbd{font:11px inherit;color:#887795;border:1px solid #e0d7eb;background:#ffffffaa;border-radius:5px;padding:3px 5px;white-space:nowrap}.editor-activity-pane{min-width:0;display:flex;flex-direction:column;gap:10px;min-height:420px}.editor-activity-pane[hidden],.editor-details-pane[hidden]{display:none}.editor-activity-pane .grid-host{min-height:280px}.editor-activity-pane .ledger-activity-panes{min-height:320px}.editor-tab-panes{min-width:0;flex:1}.account-editor-pane[hidden]{display:none}.account-editor-panes:has(>.editor-activity-pane:not([hidden])){display:block}.account-editor-scroll:has(.editor-activity-pane:not([hidden])){flex:1;min-height:0}.editor-details-pane>.record-editor{width:100%}.editor-activity-pane .activity-controls{flex-wrap:wrap}.editor-activity-pane .activity-controls button{padding:7px 10px;font-size:12px}
@media(max-width:1100px){.page-head{grid-template-columns:minmax(0,1fr) minmax(180px,360px) minmax(0,1fr);gap:10px}.top-actions #userBadge{display:none}}
@media(max-width:760px),(max-width:1024px) and (max-height:600px){.page-head{grid-template-columns:minmax(0,1fr) minmax(150px,1.5fr) auto;gap:8px}.system-search-trigger{gap:8px;padding:8px 10px!important;border-radius:11px}.system-search-trigger span{font-size:12px}.system-search-trigger kbd{display:none}.page-head .page-title{gap:5px}.page-head .page-title h1{font-size:16px}.page-head .page-title p{display:none}.editor-activity-pane{min-height:380px}.editor-activity-pane .ledger-activity-panes{display:flex;flex-direction:column}.editor-activity-pane .allocation-detail-panel{min-height:120px;max-height:220px}}
@media(max-width:420px){.page-head{grid-template-columns:40px minmax(145px,1fr) auto}.page-head .page-title>div{display:none}}

/* Shared related-record actions and responsive report catalogue. */
.lookup-action-menu{z-index:6500;min-width:210px;max-width:calc(100vw - 16px)}
.lookup-action-menu>strong{display:block;padding:10px 12px;color:#4d3471;font-size:.85rem;border-bottom:1px solid #e9e2f2;overflow-wrap:anywhere}
.lookup-action-menu button:focus-visible{outline:2px solid #8c62c7;outline-offset:-3px}
.reports-catalogue{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:18px;align-items:start}
.reports-module{border:1px solid #e2d9ee;border-radius:14px;background:#fff;padding:18px;display:grid;gap:8px}
.reports-module h3{margin:0 0 6px;color:#39234f}.reports-module button{text-align:left;white-space:normal}
.reports-search{width:min(100%,520px);margin-bottom:20px}

.report-card.report-highlight{background:#f1eafa;outline:2px solid #9070bd;outline-offset:2px}

.grid-line.row.deleted-row:not(.selected){color:#766c80;background:#f6f2f8;border-left:3px solid #ae9abd}
.transaction-parameters{max-width:850px;border:1px solid #e4dced;border-radius:12px;padding:18px}.transaction-parameters .inline{display:flex;align-items:center;gap:10px;font-weight:600}.transaction-parameters p{line-height:1.5}

.email-overlay{position:fixed;inset:0;top:var(--session-banner-height,0px);z-index:8000;background:#1f103e99;display:flex;align-items:center;justify-content:center;padding:16px}.email-panel{background:#fff;border-radius:14px;box-shadow:0 20px 70px #170a3d66;width:min(1100px,100%);max-height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px) - 32px);display:flex;flex-direction:column;overflow:hidden}.email-panel>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;border-bottom:1px solid #e4dcef}.email-panel h2{margin:0;font-size:20px}.email-content{padding:18px;overflow:auto;min-height:0}.email-preview{display:block;width:100%;height:58dvh;border:1px solid #d8cee8;border-radius:8px;background:#f4f0fa}.email-preview.compact{height:28dvh}.email-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:16px}.email-content textarea{display:block;width:100%;padding:10px;border:1px solid #cfc3df;border-radius:6px;font:inherit}.email-content>.notice{white-space:normal}.email-overlay button:hover{background:#4b2b70;color:white}.email-primary{background:#382052;color:white;border-color:#382052}@media(max-width:650px){.email-overlay{padding:5px}.email-panel{max-height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px) - 10px)}.email-content{padding:12px}.email-content .form-grid{grid-template-columns:1fr}.email-panel>header{padding:12px}.email-preview{height:48dvh}}
.email-download{display:inline-flex;align-items:center;padding:10px 16px;border:1px solid #cfc3df;border-radius:7px;color:#382052;text-decoration:none;font:inherit}.email-download:hover{background:#4b2b70;color:#fff}.email-overlay button:disabled{opacity:.55;cursor:wait}
.reports-type{border-top:1px solid #e5dcef;padding:12px 0}.reports-type h4{margin:0 0 10px;color:#594177;font-size:14px}.reports-type button{margin:0 8px 8px 0}

/* v163: readable session identity, matched aubergine and SQL-saved sidebar. */
:root{--cc-navy:#211237}
.sidebar,.side-brand{background:var(--cc-navy)}.sidebar{border-right-color:#4b345f}.side-footer{border-top-color:#503b66}.side-footer button{background:#352246;border-color:#6e5486}.sidebar nav button:hover:not(:disabled){background:#493260}
#sessionBanner:not(.renewal-warning){background:var(--cc-navy);color:#fff}
#sessionBanner .session-info{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.5}
.top-actions #userBadge{display:block;max-width:none;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;font-size:12px;line-height:1.4;min-width:0}
.top-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center}.top-actions button{flex-shrink:0}.mobile-user-actions{min-width:0}
.sidebar-resize{position:absolute;right:-5px;top:0;bottom:0;width:10px;padding:0;border:0;border-radius:0;background:transparent;cursor:col-resize;touch-action:none;z-index:24}
.sidebar-resize:after{content:'';position:absolute;inset:0 4px;background:#b7a4ef55}.sidebar-resize:hover:after,.sidebar-resize:focus-visible:after{background:#c6acf5}.sidebar-resize:focus-visible{outline:2px solid #b7a4ef;outline-offset:-2px}.sidebar-resizing,.sidebar-resizing *{cursor:col-resize!important;user-select:none!important}
.sidebar-layout-status:empty{display:none}.sidebar-layout-status{font-size:11px;line-height:1.4;color:#e5ccff;overflow-wrap:anywhere;margin:6px 0 0}
@media(min-width:761px) and (min-height:601px),(min-width:1025px){.shell{grid-template-columns:var(--sidebar-width,270px) minmax(0,1fr)}.sidebar{position:relative;min-width:0}.sidebar nav button{white-space:normal;overflow-wrap:anywhere}.side-brand .brand-home{width:100%;min-width:0}.side-brand .audix-logo{max-width:100%}.page-head{grid-template-columns:minmax(100px,1fr) minmax(180px,400px) minmax(140px,1fr)}}
@media(max-width:760px),(max-width:1024px) and (max-height:600px){.sidebar-resize{display:none}.top-actions .mobile-user-actions #userBadge{white-space:normal;overflow:visible;max-width:none}.top-actions{flex-wrap:nowrap}#sessionBanner{font-size:11px;padding:4px 10px}}

/* A wider user-sized sidebar can leave a narrow workspace even on a laptop. */
.content{container-type:inline-size;container-name:workspace}
@container workspace (max-width:620px){.page-head{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:8px 10px}.page-head .page-title{grid-column:1;grid-row:1}.page-head .top-actions{grid-column:2;grid-row:1;max-width:220px}.page-head .system-search-trigger{grid-column:1/-1;grid-row:2;width:min(100%,400px);justify-self:center}}

/* Invoice report criteria: compact defaults with optional line/accounting bounds. */
.invoice-report-criteria .form-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 18px}
.invoice-report-advanced{margin:12px 0;padding:12px 16px;border:1px solid #d8cde7;border-radius:10px;background:#faf8fd}
.invoice-report-advanced summary{cursor:pointer;color:var(--cc-navy);font-weight:600;padding:4px 0}
.invoice-report-advanced[open] summary{margin-bottom:12px}
@media(max-width:900px){.invoice-report-criteria .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.invoice-report-criteria .form-grid{grid-template-columns:minmax(0,1fr)}}
/* Personalized home dashboards */
.home-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 22px;background:linear-gradient(115deg,#25133e,#493065);border-radius:16px;color:white}.home-intro .dashboard-eyebrow{color:#cdb3f5}.home-intro p{color:#e1d6ed}.home-intro h2{font-size:clamp(19px,2vw,27px);overflow-wrap:anywhere}.home-intro button{background:#f3edff;color:#39204f;border-color:#d6c1ef;flex-shrink:0}.home-dashboard-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end;padding:14px 18px;background:#fff;border:1px solid #e0d8e9;border-radius:12px}.home-dashboard-controls label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#584366}.home-dashboard-controls input{max-width:180px;min-width:0}.home-currency{margin-left:auto;align-self:center;font-size:12px;color:#675575}.home-dashboard-status{font-size:12px;color:#675575;margin:0}.home-dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.home-panel{box-shadow:0 3px 15px #2c163507;border-color:#e0d8e9;padding:20px;overflow:hidden}.home-panel-wide{grid-column:1/-1}.home-panel-group{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:#80648f;font-weight:700;margin-bottom:6px}.home-panel .dashboard-panel-heading{align-items:flex-start;margin-bottom:18px}.home-panel .dashboard-panel-heading h2{color:#39204f;font-size:18px}.home-panel-content{min-height:100px}.home-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.home-metric{padding:14px;background:#f8f5fc;border:1px solid #eee6f5;border-radius:12px;display:flex;flex-direction:column;gap:8px;min-width:0}.home-metric span{font-size:12px;color:#6d5879}.home-metric strong{font-size:clamp(17px,1.7vw,25px);color:#39204f;overflow-wrap:anywhere}.home-metric small{font-size:11px;color:#766482}.home-panel-note{font-size:11px;line-height:1.6;color:#756680;margin:16px 0 0}.home-bars{list-style:none;display:flex;flex-direction:column;gap:10px;padding:0;margin:0}.home-bar-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;width:100%;padding:6px 0;white-space:normal;border:0;background:transparent;text-align:left}.home-bar-label{grid-column:1/-1;font-size:12px;color:#4b345e;overflow-wrap:anywhere}.home-bar-track{height:10px;align-self:center;min-width:0;background:#f0eaf6;border-radius:8px;overflow:hidden}.home-bar-fill{height:100%;display:block;background:#735095;border-radius:8px;min-width:0}.home-bar-secondary{background:#b59bd3}.home-bar-negative{background:#aa567b}.home-bar-amount{font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums;color:#4d355e}.home-bar-detail{grid-column:1/-1;color:#85718e;font-size:10px}.home-bar-row:is(button):hover{background:#eee5f8;border-radius:6px}.home-bar-row:is(button):focus-visible{outline:2px solid #735095;outline-offset:3px}.home-chart-key{display:flex;flex-wrap:wrap;gap:14px;font-size:11px;margin-bottom:14px}.home-debit-key{color:#735095}.home-credit-key{color:#9273b2}.home-empty{font-size:13px;color:#766482;padding:18px 0}.home-layout-list{display:flex;flex-direction:column;gap:8px}.home-layout-row{display:grid;grid-template-columns:minmax(0,1fr) auto 38px 38px;align-items:center;gap:8px;padding:12px;border:1px solid #e4dcec;border-radius:10px;background:#faf8fd;cursor:grab}.home-layout-row label{display:flex;align-items:center;gap:8px;font-size:12px;min-width:0}.home-layout-row input[type=checkbox]{width:17px;height:17px;flex:none;accent-color:#593674}.home-layout-row button{padding:6px}.home-layout-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:18px}.home-layout-actions button:first-child{margin-right:auto}.home-layout-actions button:last-child{background:#493065;color:#fff;border-color:#493065}.home-layout-actions button:last-child:hover{background:#2d193f}
@media(max-width:1050px){.home-dashboard-grid{grid-template-columns:1fr}.home-panel-wide{grid-column:auto}.home-intro{padding:18px}.home-currency{margin-left:0}}@media(max-width:600px){.home-intro{align-items:flex-start;flex-direction:column}.home-intro button{width:100%}.home-dashboard-controls{padding:12px}.home-dashboard-controls label{flex:1;min-width:120px}.home-dashboard-controls input{width:100%;max-width:none}.home-dashboard-controls button{width:100%}.home-panel{padding:14px}.home-layout-row{grid-template-columns:minmax(0,1fr) 34px 34px}.home-layout-row label:first-child{grid-column:1/-1}.home-layout-actions button:first-child{margin-right:0}.home-layout-actions button{flex:1}.home-metrics{gap:8px}.home-metric{padding:11px}.home-bar-amount{font-size:11px}}
.home-panel-tools{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.home-chart-select{font-size:12px;max-width:150px;padding:6px 8px;border:1px solid #dac9e8;border-radius:7px;color:#563270;background:#fcfaff}.home-visual-chart{display:grid;grid-template-columns:minmax(160px,.8fr) minmax(0,1.2fr);gap:16px;align-items:center}.home-visual-chart svg{width:100%;max-height:290px;overflow:visible}.home-visual-chart svg[viewBox="0 0 680 260"]{grid-column:1/-1;max-height:330px}.home-visual-chart path[role=button]{cursor:pointer;stroke:#fff;stroke-width:2;transition:opacity .15s}.home-visual-chart path[role=button]:hover{opacity:.78}.home-visual-chart path:focus-visible,.home-visual-chart circle:focus-visible{outline:none;stroke:#352046;stroke-width:4}.home-pie-legend-row{display:grid;grid-template-columns:9px minmax(0,1fr);gap:4px 8px;width:100%;border:0;padding:7px;text-align:left;background:transparent;font-size:12px;white-space:normal}.home-pie-legend-row strong{grid-column:2;font-size:12px}.home-pie-legend-row:hover{background:#f3edf9;border-radius:7px}.home-axis-label{font-size:11px;fill:#766181}.home-doughnut-title{font-size:15px;font-weight:600;fill:#503163}.home-chart-values,.home-visual-chart>.home-panel-note{grid-column:1/-1;font-size:12px}.home-layout-row{grid-template-columns:minmax(0,1fr) 140px auto 38px 38px}.home-layout-row .home-chart-select{width:100%}@media(max-width:650px){.home-visual-chart{grid-template-columns:1fr}.home-layout-row{grid-template-columns:minmax(0,1fr) auto 34px 34px}.home-layout-row label:first-child{grid-column:1/-1}.home-layout-row select{grid-column:1}.home-panel-tools{flex-direction:column}.home-chart-select{max-width:130px}}

/* Shared chart feedback: values remain readable with mouse, keyboard and touch. */
.home-chart-detail{padding:10px 12px;border-radius:10px;background:#f1ebfa;color:#392052;min-height:2.8em;font-size:.88rem;font-weight:600;line-height:1.4;flex-basis:100%;grid-column:1/-1;order:3}
.home-visual-chart svg [data-chart-index]{cursor:pointer;transition:opacity .15s,filter .15s,stroke-width .15s}
.home-visual-chart svg .home-chart-match{filter:brightness(1.13) drop-shadow(0 2px 3px #32134b55);stroke:#32134b;stroke-width:2.5}
.home-visual-chart svg circle.home-chart-match{r:7}
.home-chart-muted{opacity:.42}
.home-pie-legend-row,.home-bar-row,.home-chart-values [data-chart-index]{transition:background-color .15s,opacity .15s;outline-offset:2px;border-radius:8px}
.home-pie-legend-row.home-chart-match,.home-bar-row.home-chart-match,.home-chart-values .home-chart-match{background:#e9dcf7;box-shadow:inset 3px 0 #7645bc}
.home-chart-values{max-height:190px;overflow:auto;padding:0 6px;grid-column:1/-1;flex-basis:100%}
.home-chart-values h3{font-size:.85rem;margin:6px 0}.home-chart-values p{padding:6px 9px;margin:2px 0;font-size:.83rem}
.home-bar-track:focus-visible,.home-chart-values [data-chart-index]:focus-visible{outline:2px solid #7645bc}
@media(prefers-reduced-motion:reduce){.home-visual-chart svg [data-chart-index],.home-pie-legend-row,.home-bar-row,.home-chart-values [data-chart-index]{transition:none}}

.home-bar-row.home-chart-muted{opacity:.65}.home-bar-track.home-chart-muted{opacity:1}

/* Nonblocking report progress, scoped to the current login/company. */
.report-task-tray{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));width:min(355px,calc(100vw - 28px));max-height:52dvh;overflow:auto;z-index:6500;background:#fbf9fe;border:1px solid #d4c3e6;border-radius:14px;box-shadow:0 8px 32px #24103633;padding:12px;color:#392447}
.report-task-tray>h2{font-size:.9rem;margin:0 0 8px;color:#604078}.report-task{padding:10px;border-radius:9px;background:#fff;border:1px solid #e8dff0;margin-top:7px}.report-task h3{font-size:.88rem;margin:0 0 5px}.report-task p{font-size:.8rem;line-height:1.4;margin:5px 0;overflow-wrap:anywhere}.report-task-status{color:#705a83}.report-task[data-status=ready]{border-color:#a88bca;background:#f5effc}.report-task[data-status=failed]{border-color:#c48da0}.report-task-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.report-task-actions button{font-size:.76rem;padding:6px 9px;min-height:30px}.report-task-actions button:not(:disabled):hover{background:#ded0ef;border-color:#9876b9}
@media(max-width:600px){.report-task-tray{max-height:35dvh}.report-task-tray>h2{display:none}}

.report-task[data-status=cancelling]{border-color:#a78bca}.report-task[data-status=cancelled]{opacity:.85}.report-task-actions button{white-space:nowrap}

/* Embedded account activity owns an intrinsic-height stack. A virtualized grid
   must never overflow a fractional track into its allocation-detail sibling. */
.editor-activity-pane.ledger-activity-workspace{min-height:0;min-width:0}
.editor-activity-pane.ledger-activity-workspace>.ledger-activity-panes{display:flex;flex-direction:column;flex:0 0 auto;min-height:0;min-width:0;height:auto;overflow:visible;gap:12px}
.editor-activity-pane.ledger-activity-workspace>.ledger-activity-panes>.grid-host{flex:0 0 auto;height:clamp(240px,42dvh,480px);min-height:0;min-width:0;margin:0;overflow:hidden}
.editor-activity-pane.ledger-activity-workspace>.ledger-activity-panes>.allocation-detail-panel{position:relative;isolation:isolate;flex:0 0 auto;display:block;height:auto;min-height:0;max-height:clamp(160px,30dvh,360px);margin:0;padding:12px;border:1px solid #ded6e8;border-radius:7px;background:#fff;overflow:auto;overscroll-behavior:contain}
.editor-activity-pane.ledger-activity-workspace .activity-allocation-hint{margin:0;line-height:1.5}
@media(max-width:760px),(max-height:520px){.editor-activity-pane.ledger-activity-workspace>.ledger-activity-panes>.grid-host{height:clamp(200px,42dvh,360px)}}

/* v176: spacious same-page previews and document keyboard navigation. */
.email-panel{width:min(1600px,98vw)}
.email-overlay{padding:8px}
.email-panel{max-height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px) - 16px)}
.email-preview{height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px) - 210px);min-height:220px}
.email-preview.compact{height:30dvh;min-height:160px}
.preview-layout-choice{display:flex;align-items:center;gap:8px;margin-left:auto;font-size:13px;color:#493064}
.preview-layout-choice select{max-width:260px;padding:7px;border:1px solid #cfc3df;border-radius:7px;background:white;color:inherit}
.invoice-lines input[type=number]{appearance:textfield;-moz-appearance:textfield}
.invoice-lines input[type=number]::-webkit-inner-spin-button,.invoice-lines input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
@media(max-width:650px){.email-panel>header{flex-wrap:wrap;gap:8px}.preview-layout-choice{order:3;width:100%;margin:0}.preview-layout-choice select{max-width:none;flex:1}.email-preview{height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px) - 260px);min-height:180px}.email-actions{gap:6px}.email-content{padding:10px}}

/* v177: numeric fields are typed; mouse-wheel scrolling never changes their values. */
input[type=number]{appearance:textfield;-moz-appearance:textfield}
input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

.ledger-posting-task progress{width:100%;height:7px;accent-color:#8460b5}.ledger-posting-task details{font-size:.8rem;max-height:160px;overflow:auto}.ledger-posting-task summary{cursor:pointer}.ledger-posting-task[data-status=stopping]{border-color:#a78bca}
.document-layout-designer{grid-column:1/-1;margin:16px 0;border-top:1px solid #d9d0e8;padding-top:16px}.layout-designer-controls{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0}.layout-designer-controls label{flex:1 1 130px}.layout-designer-canvas{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;background:#eae5f2;border:1px solid #cec1e0;border-radius:12px;padding:16px;margin:12px 0}.layout-designer-card{background:white;border:1px solid #bca9d4;border-radius:8px;padding:14px;min-width:0;box-shadow:0 2px 6px #2410380d}.layout-designer-card[draggable=true]{cursor:grab;border-left:4px solid #7762b3}.layout-designer-card.dragging{opacity:.45}.layout-designer-card small{display:block;color:#647080;margin-top:6px}.layout-designer-card>div{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.layout-designer-card button{font-size:12px;padding:5px 8px}.document-layout-designer fieldset{margin-top:16px}.document-layout-designer fieldset>div>div{display:flex;gap:12px;align-items:center;margin:6px 0}@media(max-width:640px){.layout-designer-canvas{padding:8px;gap:6px}.layout-designer-card{padding:8px}.layout-designer-card button{padding:5px}.layout-designer-controls label{flex-basis:45%}}

.entry-amount-mode{display:block;line-height:1.35;color:#65527e;font-size:12px;margin-top:4px;max-width:280px}
/* Document layouts: one selector, folded options, live paper preview. */
.layout-manager{display:grid;grid-template-columns:minmax(290px,370px) minmax(0,1fr);gap:22px;align-items:start;margin-top:14px}.layout-controls{min-width:0}.layout-selection{background:#f5f1fa;border:1px solid #d9cfe8;border-radius:12px;padding:16px;margin-bottom:14px}.layout-selection label+label{margin-top:12px}.layout-selection-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.layout-selection-actions button{padding:8px 12px}.layout-selection p{font-size:12px;margin-bottom:0}.layout-copy-name{border-top:1px solid #d9cfe8;margin-top:14px;padding-top:12px}.layout-copy-name button{margin:10px 6px 0 0}.layout-options{border:0;padding:0;margin:0;min-width:0}.layout-controls details{border:1px solid #ded7e8;border-radius:9px;background:white;margin-bottom:10px;padding:12px}.layout-controls summary{cursor:pointer;color:#402c60;font-weight:650;list-style-position:inside}.layout-controls details[open] summary{margin-bottom:12px}.layout-controls details label{margin-top:10px;font-weight:500}.layout-controls label:has(input[type=checkbox]){display:flex;flex-direction:row-reverse;justify-content:flex-end;align-items:center;gap:9px;min-height:27px}.layout-controls input[type=checkbox]{width:17px;height:17px;min-height:0;margin:0;accent-color:#614078}.layout-controls textarea{width:100%;resize:vertical;border:1px solid #c9d7dc;border-radius:7px;padding:10px;font:inherit}.layout-controls input[type=color]{height:38px;padding:4px}.layout-controls fieldset:disabled{opacity:.65}.layout-live-preview{position:sticky;top:0;min-width:0;border:1px solid #d8cfe5;border-radius:12px;background:#faf8fd;padding:14px}.layout-preview-heading{display:flex;align-items:center;justify-content:space-between}.layout-preview-heading h3{margin:0 0 10px;color:#402c60}.layout-preview-tools{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}.layout-preview-tools select{width:auto;flex:1;min-width:150px}.layout-preview-tools label{font-size:12px;width:90px}.layout-preview-tools button{padding:10px}.layout-live-preview p{font-size:12px;margin:10px 0}.layout-preview-viewport{overflow:auto;max-height:calc(100dvh - 285px);min-height:360px;background:#e6e0ed;border-radius:8px;padding:10px;overscroll-behavior:contain}.layout-preview-stage{margin:0 auto;position:relative}.layout-preview-stage iframe{display:block;position:absolute;left:0;top:0;border:0;transform-origin:top left;background:white;box-shadow:0 3px 12px #29153922}.layout-account-chip{display:flex;justify-content:space-between;align-items:center;margin-top:8px}.layout-status{min-height:20px;color:#59446e}.layout-controls .document-layout-designer{padding-top:0;margin:0;border:0}.layout-controls .layout-designer-canvas{padding:6px;gap:6px}.layout-controls .layout-designer-card{padding:8px}.layout-controls .layout-designer-card strong{font-size:12px}.layout-controls .layout-designer-card button{white-space:normal}.layout-controls .layout-designer-card>div{gap:3px}.layout-controls .layout-designer-card select{font-size:12px;padding:6px}.layout-controls .layout-designer-card button{font-size:11px;padding:4px}.layout-controls .layout-designer-controls{gap:8px}.layout-controls .layout-designer-card[draggable=true]{cursor:grab}@media(max-width:900px){.layout-manager{grid-template-columns:1fr}.layout-live-preview{position:static}.layout-preview-viewport{max-height:65dvh;min-height:300px}.layout-controls details{padding:10px}.layout-preview-tools button{white-space:normal}}@media(min-width:1600px){.layout-manager{grid-template-columns:400px minmax(0,1fr)}}
/* Read-only integration setup */
.read-api-window .read-api-status{background:#f2edf9;border:1px solid #d8c8ed;border-radius:12px;padding:18px;margin:16px 0}.read-api-status strong{font-size:1.2rem;color:#35204e}.read-api-create,.read-api-credentials,.read-api-test{border:1px solid #ded5e9;border-radius:12px;padding:18px;margin:16px 0}.read-api-credentials{background:#faf7ff}.read-api-credentials textarea{width:100%;box-sizing:border-box;font-family:monospace;font-size:.85rem}.read-api-checks{border:1px solid #ded5e9;border-radius:8px;padding:12px;margin:14px 0;display:flex;flex-wrap:wrap;gap:10px 20px}.read-api-checks label{display:flex;align-items:center;gap:8px}.read-api-checks input[type=checkbox]{width:18px;height:18px;accent-color:#513177}.read-api-window input[readonly]{min-width:0}.read-api-window .company-tools{flex-wrap:wrap}.read-api-window a{color:#563779}@media(max-width:600px){.read-api-window .form-grid{grid-template-columns:1fr}.read-api-checks{flex-direction:column}.read-api-create,.read-api-credentials{padding:12px}}

/* Compact module header after moving personal email configuration into Settings. */
@media(min-width:761px) and (min-height:601px),(min-width:1025px){.page-head{min-height:56px;padding:8px 16px;gap:12px}.page-head h1{font-size:22px;line-height:1.2}.page-head .page-title p{margin:3px 0 0;font-size:12px}.page-head .top-actions{flex-wrap:nowrap}.page-head .system-search-trigger{padding:8px 12px!important;min-height:38px}}

/* v208: contain account controls and use the compact shell on landscape phones. */
.page-head{align-content:start;align-items:center}
.page-head .top-actions{min-width:0;max-width:100%;align-self:center}
.mobile-user-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:6px;width:100%;min-width:0}
.top-actions #userBadge{flex:1 0 100%;width:100%;max-width:100%;min-width:0;overflow-wrap:break-word;word-break:normal;white-space:normal}
@media(max-width:1100px){.top-actions #userBadge{display:none}}
@media(max-width:760px),(max-width:1024px) and (max-height:600px){
 .shell{grid-template-columns:minmax(0,1fr)}
 .sidebar{position:fixed;transform:translateX(-100%);max-height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px));padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
 .sidebar-resize{display:none}.shell.menu-open .sidebar{transform:translateX(0)}
 .side-brand{flex-shrink:0}.side-brand .brand-home{max-width:180px}
 .sidebar nav{min-height:44px}.side-footer{padding:6px 10px}.side-footer button{min-height:36px;padding:6px 10px;margin-top:5px}
 .page-head{grid-template-columns:minmax(110px,1fr) minmax(150px,1.5fr) auto;padding:6px max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left));min-height:56px;gap:8px}
 .page-head .page-title{grid-column:1;grid-row:1;min-width:0}.page-head .top-actions{grid-column:3;grid-row:1;flex-wrap:nowrap;max-width:none}.page-head .system-search-trigger{grid-column:2;grid-row:1;width:100%;min-width:0;justify-self:stretch}
 .page-head .page-title p{display:none}.page-head .page-title h1{font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .system-search-trigger span{min-width:0;font-size:12px}.system-search-trigger kbd{display:none}
 .mobile-user-actions{display:none;width:min(280px,calc(100vw - 20px));max-height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px) - 66px);overflow-y:auto}
 .top-actions.user-open .mobile-user-actions{display:flex}.top-actions .mobile-user-actions #userBadge{display:block;flex:0 0 auto;width:100%;overflow-wrap:anywhere}
 #sessionBanner{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
 .modal-head,.workspace-overlay-panel>header{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
}
@media(max-width:420px){.page-head{grid-template-columns:40px minmax(145px,1fr) auto}.page-head .page-title>div{display:none}}
@media(max-width:1024px) and (max-height:600px){
 .side-brand{min-height:52px;padding:6px 10px}.side-brand .brand-home{max-width:140px}.sidebar nav{padding:4px 8px}.sidebar nav button{min-height:36px;padding-block:6px}
 .ribbon{min-height:48px}.filter-bar{min-height:48px}.statusbar{padding-block:3px;min-height:28px}
 .platform-admin-brand .brand-home{width:150px}.platform-brand{padding:2px 10px}.platform-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
}

.document-column-setting{display:grid;grid-template-columns:minmax(90px,1fr) 70px auto;gap:6px;align-items:center;padding:7px 0;border-bottom:1px solid #eee7f5}.document-column-setting input{min-width:0;margin:0;padding:6px;min-height:32px}.document-column-setting small{grid-column:1/-1;color:#7b6a8c}.document-text-style{display:inline-flex;gap:3px;flex-wrap:nowrap}.document-text-style button{padding:5px 8px;min-width:28px;min-height:30px}.document-text-style button:nth-child(1){font-weight:bold}.document-text-style button:nth-child(2){font-style:italic}.document-text-style button:nth-child(3){text-decoration:underline}.document-text-style button[aria-pressed=true]{background:#493260;color:white;border-color:#493260}.document-field-setting{display:flex!important;flex-wrap:wrap;align-items:center;gap:6px}.document-field-setting .document-text-style{margin-left:auto}.record-visibility-control{display:flex!important;align-items:center;gap:6px!important;white-space:nowrap;font-size:12px!important;min-width:0!important}.record-visibility-control input{width:16px!important;min-height:0!important;margin:0}.record-visibility-status{font-size:11px;color:#6f537f}.record-visibility-control[hidden]{display:none!important}

/* Keep clickable labels separate from formatting actions. */
.document-field-setting>label{flex:1;min-width:120px;margin:0!important}.document-field-setting[hidden]{display:none!important}.layout-controls .document-field-setting{flex-wrap:nowrap;padding:5px 0}.layout-controls .document-field-setting>label{flex-direction:row!important}.layout-controls .document-field-setting>label input{order:-1}.parties .billing-contact{min-width:0}

.login-consent{display:flex;gap:9px;align-items:flex-start;font-size:12px;line-height:1.5;margin:14px 0}.login-consent input{width:17px;min-width:17px;min-height:17px;margin:2px 0 0;accent-color:#614078}

.report-pin-choice{display:flex;align-items:stretch;gap:5px;min-width:0;max-width:100%;margin:5px 0}.report-pin-choice>button:first-child{flex:1;min-width:0;text-align:left;white-space:normal}.report-pin{flex:0 0 38px!important;width:38px;min-width:38px!important;padding:6px!important;font-size:21px;color:#614078;align-self:stretch}.report-pin[aria-pressed=true]{color:#614078;background:#eee8ff}.report-criteria-pin{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin:8px 0;font-size:12px}

/* The consent step reuses the existing responsive login card; other layouts are unchanged. */
#loginPage .login-consent-user{text-align:center;color:#746a80;font-size:12px;overflow-wrap:anywhere;margin:0 0 16px}#loginPage #loginConsentStep .login-terms{font-size:12px;line-height:1.6;text-align:left;margin:14px 0}#loginPage #loginConsentStep .login-terms a{font-weight:600}#loginPage #loginConsentStep .login-consent{font-size:12px;line-height:1.6;align-items:flex-start}#loginPage #loginConsentStep #acceptTerms{width:18px;min-width:18px;height:18px;min-height:18px;flex:0 0 18px;padding:0;margin:2px 0 0}#loginPage #loginConsentBack{width:100%;min-height:44px;background:transparent;border-color:transparent;font-weight:500}#loginPage #loginConsentBack:hover{background:#f4eff9}
#loginPage{align-items:safe center}#loginPage .auth-card.narrow{flex-shrink:0}@media(max-width:760px),(max-height:650px){#loginPage{align-items:flex-start}}

/* v218: keep the signed-in identity aligned with the right-side account actions. */
#userBadge{text-align:right;align-self:flex-end;width:100%;overflow-wrap:anywhere}
#sessionBanner .session-info,#sessionBanner .renewal-message{text-align:right}
.entry-outstanding input[type=number]{min-width:100px}

/* Partner administration follows the existing modal scroll and responsive layout. */
.partner-workspace{min-width:0}.partner-controls{flex-wrap:wrap;gap:8px}.partner-summary,.partner-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:12px;margin:16px 0}.partner-summary article,.partner-total-card{background:#f4f0fb;border:1px solid #ded5ed;border-radius:12px;padding:14px;color:#322044}.partner-total-card h3{margin-top:0}.partner-discount{align-self:center;color:#5b4285;font-weight:600}.partner-workspace .form-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr))}.partner-workspace .platform-table-scroll{max-width:100%;overflow:auto}.partner-workspace .editor-actions{flex-wrap:wrap}.partner-workspace input,.partner-workspace select{max-width:100%;min-width:0}

.client-management-filters{margin:12px 0;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))}.client-management-table th{white-space:nowrap}.client-management-table th button{padding:3px 7px;margin-left:4px;min-width:0;background:transparent;color:#583976;border:1px solid transparent}.client-management-table th button:hover,.client-management-table th button.active{background:#dfd2f3;border-color:#ae96cf}.partner-login-fields{border:1px solid #d7c9e8;border-radius:10px;margin:15px 0;padding:14px}.partner-login-fields label{display:flex;flex-direction:column;gap:5px;margin:8px 0}

/* Unified client management dashboard */
.client-resizable{table-layout:fixed;min-width:0!important;max-width:none}.client-resizable th{position:relative;padding-right:15px;overflow:hidden}.client-resizable td{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.client-resizable th .client-column-title{white-space:normal}.client-resizable td:last-child{white-space:normal}.client-resizable td:last-child .company-tools{gap:5px}.client-resizable td:last-child button{font-size:11px;padding:5px 8px}.client-resizable th button{padding:3px 5px}.client-resizable .column-resize{z-index:2}.client-inline-editor{border:1px solid #ccc3f0;border-radius:10px;padding:20px;margin-top:20px;background:#faf9ff;min-width:0}.client-inline-editor[hidden]{display:none}.client-inline-editor .partner-summary{margin:12px 0}.client-overview-totals{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));margin-bottom:15px}.client-overview-totals .partner-total-card{padding:12px}.client-overview-totals h3{font-size:12px;margin:0 0 8px}.client-overview-totals strong{font-size:15px}.client-relationship{font-weight:600}.client-relationship[data-relationship=partner]{color:#5634a5}.client-relationship[data-relationship=direct]{color:#246344}.client-column-customizer{z-index:4500;width:450px}.client-column-customizer .column-field button{min-width:25px}.client-column-customizer .column-field input{width:60px}

.client-resizable th:first-child,.client-resizable td:first-child{position:sticky;left:0;z-index:1;background:white;box-shadow:2px 0 3px #1c11351a}.client-resizable th:first-child{z-index:3;background:#eaf0f5}.client-resizable tr.renewal-due td:first-child{background:#fee5e5}

.platform-admin-modal .platform-admin-brand{min-height:0;padding:12px;margin-bottom:14px}.platform-admin-modal .platform-admin-brand .audix-logo{width:220px;max-height:66px;object-fit:contain}
/* Independent administration page and focused client account tabs. */
.platform-admin-page{position:fixed;inset:0;z-index:15;display:flex;flex-direction:column;background:#f4f5fa;overflow:hidden}.platform-admin-page[hidden]{display:none}.admin-page-header{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:20px 28px;background:white;border-bottom:1px solid #dce0ee;flex:none}.admin-page-header h1{font-size:24px;line-height:1.3;margin:5px 0;color:#241541}.admin-page-header p{margin:0}.admin-page-header .company-tools{margin:0}.admin-page-eyebrow{font-size:10px;font-weight:750;letter-spacing:1.8px;color:#6a56a0}.admin-page-body{flex:1;min-height:0;overflow:auto;padding:20px 28px 32px}.admin-page-body>.company-tools:first-child{margin-top:0}.admin-page-body .client-management-table{background:white;border:1px solid #dbe1ea;border-radius:10px;padding:0 8px}.admin-page-body .platform-table-scroll{max-height:calc(100dvh - 410px)}.admin-page-body .client-management-filters{background:white;padding:16px;border:1px solid #dbe1ea;border-radius:10px}.admin-page-body .client-toolbar{justify-content:space-between;margin:0 0 18px;padding:0}.admin-account-tabs{display:flex;gap:4px;overflow-x:auto;border-bottom:1px solid #d6d8e8;margin:0 0 20px;padding:0 0 8px}.admin-account-tabs button{border:0;background:transparent;border-radius:7px;padding:12px 16px;color:#586174}.admin-account-tabs button.active{background:#eae4ff;color:#452297;font-weight:700}.admin-account-tabs button:focus-visible{outline:2px solid #6550cc;outline-offset:-2px}.admin-account-content{background:white;border:1px solid #dbe1ea;border-radius:12px;padding:24px;min-height:360px}.admin-account-content h2{font-size:20px;margin:0 0 16px}.admin-account-content .form-grid{max-width:1200px;grid-template-columns:repeat(3,minmax(0,1fr))}.admin-account-content>.company-tools{justify-content:flex-end;border-top:1px solid #e6e6ef;padding-top:16px;margin-top:24px}.admin-account-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;max-width:1300px}.admin-summary-card{padding:18px;background:#f8f7fc;border:1px solid #ebe8f3;border-radius:9px;min-width:0}.admin-summary-card>span{display:block;font-size:12px;color:#6a6a80;margin-bottom:10px}.admin-summary-card>strong{font-size:17px;overflow-wrap:anywhere}.admin-account-intro p{color:#647184;margin:0 0 22px}.admin-account-note{margin-top:24px;padding:4px 0}.admin-account-note h3{font-size:14px}.admin-account-content .client-account-section{border:0;padding:0;margin:0;width:100%;min-width:0;background:none}.admin-account-content .client-user-card{max-width:1300px;margin-bottom:14px}.admin-account-content .platform-table-scroll{max-height:none}.admin-account-content .read-api-window{max-width:none}.client-column-context{z-index:4501;display:flex;flex-direction:column;min-width:210px}.client-column-context button{text-align:left;border:0;border-radius:4px}.platform-admin-page~.column-customizer{z-index:4500}.platform-admin-page .company-tools{gap:8px}
@media(max-width:1000px){.admin-account-summary,.admin-account-content .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-page-header{padding:16px}.admin-page-body{padding:16px}.admin-account-tabs button{padding:10px 12px}}
@media(max-width:600px){.admin-page-header{align-items:flex-start;gap:10px}.admin-page-header h1{font-size:19px}.admin-page-header .company-tools button{font-size:12px;padding:8px}.admin-account-summary,.admin-account-content .form-grid{grid-template-columns:1fr}.admin-account-content{padding:16px}.admin-page-body .platform-table-scroll{max-height:none}}

.admin-workspace-open>.modal{z-index:100}.has-session-banner .platform-admin-page{top:32px}

.admin-page-header h1:focus{outline:none}.admin-account-tabs button:not(.active){background:transparent}.client-resizable td .company-tools{margin:0}.admin-page-body .client-resizable td{padding:12px 8px}.admin-tab-pane>.company-tools{justify-content:flex-end;border-top:1px solid #e6e6ef;padding-top:16px;margin-top:24px}.admin-page-actions{margin-left:auto;flex-shrink:0}
/* Phone/tablet account workspaces: measured banner, safe areas and touch controls. */
.platform-admin-page{top:var(--session-banner-height,0px);bottom:auto;height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px));padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.has-session-banner .platform-admin-page{top:var(--session-banner-height,32px)}
.admin-page-header>div:first-child{flex:1;min-width:0}.admin-page-header h1,.admin-page-header .hint{overflow-wrap:anywhere}.admin-page-header h1{max-width:100%}
.admin-page-body,.admin-account-content,.admin-tab-pane{min-width:0;max-width:100%}.admin-account-content .platform-table-scroll{width:100%;max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.admin-account-tabs{flex-shrink:0;max-width:100%;overscroll-behavior-x:contain;scroll-padding-inline:8px;-webkit-overflow-scrolling:touch}
.client-management-table .platform-table-scroll{max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.mobile-grid-hint{display:none}.admin-page-body button{touch-action:manipulation}
@media(max-width:760px),(max-width:1024px) and (max-height:600px){
 .admin-page-header{flex-wrap:wrap;gap:10px;padding:12px 14px;max-height:45%;overflow:auto}.admin-page-header>div:first-child{flex-basis:100%;width:100%}.admin-page-header h1{font-size:20px;line-height:1.3;margin:4px 0}.admin-page-eyebrow{font-size:10px;letter-spacing:1.3px}.admin-page-header .hint{font-size:12px}.admin-page-actions{width:100%;margin-left:0;justify-content:flex-end;gap:8px}
 .admin-page-header .company-tools button,.admin-page-body button,.admin-account-tabs button{min-height:44px}.admin-page-body{padding:14px 12px max(18px,env(safe-area-inset-bottom));overscroll-behavior-y:contain}.admin-page-body input,.admin-page-body select,.admin-page-body textarea{font-size:16px;max-width:100%;min-width:0}.admin-page-body label{min-width:0}
 .admin-page-body>.company-tools button,.admin-tab-pane>.company-tools button,.admin-tab-pane .client-user-actions button{white-space:normal;overflow-wrap:anywhere}.admin-page-body .client-management-filters{padding:12px;gap:12px}.admin-account-content{padding:16px 12px;min-height:0}.admin-account-content h2,.admin-account-content h3{overflow-wrap:anywhere}.admin-account-tabs{margin-bottom:14px}.admin-account-tabs button{padding:10px 12px}
 .mobile-grid-hint{display:block;font-size:12px;color:#647886;margin:8px 0}.admin-page-body .client-resizable th:first-child,.admin-page-body .client-resizable td:first-child{position:static;box-shadow:none}.admin-page-body .platform-table-scroll{max-height:none}
 .client-column-customizer{top:calc(var(--session-banner-height,0px) + 8px);right:max(8px,env(safe-area-inset-right));width:450px;max-width:calc(100vw - 16px);max-height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px) - 16px)}.client-column-customizer .column-customizer-head,.client-column-customizer .column-customizer-footer{flex-shrink:0}.client-column-customizer .column-customizer-body{flex:1;min-height:0}.client-column-customizer .column-field{display:grid;grid-template-columns:minmax(0,1fr) 60px repeat(3,36px);gap:4px;padding:6px}.client-column-customizer .column-field span{min-width:0;font-size:12px}.client-column-customizer .column-field button{min-width:36px;min-height:40px;padding:5px}.client-column-customizer .column-field input{width:60px;min-height:40px;font-size:16px}.client-column-customizer .column-fields:last-of-type .column-field{grid-template-columns:minmax(0,1fr) 40px}.client-column-customizer .column-customizer-footer button{min-height:44px}.client-column-context button{min-height:44px}.admin-workspace-open .modal-head{flex-wrap:wrap;gap:8px}.admin-workspace-open .modal-head>div{flex:1 0 100%;min-width:0}.admin-workspace-open .modal-head h2{overflow-wrap:anywhere}.admin-workspace-open .modal-head button{min-height:44px}
}
@media(max-width:380px){.admin-page-header h1{font-size:18px}.admin-page-actions{gap:6px}.admin-page-actions button{padding:8px 10px}.admin-summary-card{padding:14px}.client-overview-totals{grid-template-columns:1fr}}

/* v225: client and partner grids share the window width, including saved layouts. */
.client-management-table{min-width:0;max-width:100%}
.client-management-table .platform-table-scroll{width:100%;min-width:0;overflow-x:auto}
.client-management-table .client-resizable{width:100%;max-width:100%;min-width:0!important;table-layout:fixed}
.admin-page-body .client-management-table .client-resizable th,.admin-page-body .client-management-table .client-resizable td{white-space:normal;overflow-wrap:anywhere;word-break:normal;text-overflow:clip;padding:8px 4px;min-width:0}
.client-management-table .client-resizable th:first-child,.client-management-table .client-resizable td:first-child{position:static;box-shadow:none}
.client-management-table .client-resizable th{padding-right:10px}
.client-management-table .client-column-title{display:block;overflow-wrap:anywhere}
.client-management-table .client-resizable th button{min-width:0;max-width:100%;padding:3px 1px;margin:0;overflow-wrap:anywhere}
.client-management-table .client-resizable td .company-tools{min-width:0;max-width:100%;flex-wrap:wrap}
.client-management-table .client-resizable td button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;padding:5px 1px}

/* v226: dashboard commands share the title header, leaving the body for records. */
.admin-dashboard-header{align-items:center;gap:16px;padding:14px 24px}
.admin-dashboard-header>div:first-child{flex:0 1 270px;min-width:180px}
.admin-header-tools{flex:1 1 600px;min-width:0;display:flex;flex-direction:column;gap:7px}
.admin-header-tools .company-tools{margin:0!important;gap:6px;flex-wrap:wrap}
.admin-header-tools button{font-size:12px;padding:8px 10px}
.admin-header-tools .partner-discount{font-size:12px;align-self:center}
.admin-dashboard-header .admin-page-actions{align-self:flex-start;margin-top:10px;gap:6px}
.admin-page-body .client-overview-totals{grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px;margin:12px 0}
.admin-page-body .client-overview-totals .partner-total-card{padding:10px}
.admin-page-body .client-overview-totals h3{font-size:11px;margin-bottom:6px}
.client-management-table .client-resizable th{isolation:isolate}
.client-management-table .client-resizable .column-resize{display:block;position:absolute;inset:0 0 0 auto;width:10px;z-index:10;pointer-events:auto;touch-action:none;user-select:none;cursor:col-resize}
.client-column-resizing,.client-column-resizing *{cursor:col-resize!important;user-select:none!important}
@media(max-width:1000px){.admin-dashboard-header{flex-wrap:wrap}.admin-dashboard-header>div:first-child{flex:1 1 50%;min-width:0}.admin-dashboard-header .admin-header-tools{order:3;flex:1 1 100%}.admin-dashboard-header .admin-page-actions{margin-top:0}}
@media(max-width:760px),(max-width:1024px) and (max-height:600px){.admin-dashboard-header .admin-header-tools{width:100%}.admin-header-tools button{min-height:44px}.admin-dashboard-header .admin-page-actions{width:auto!important}.client-management-table .client-resizable .column-resize{width:12px}}
@media(max-width:760px),(max-width:1024px) and (max-height:600px){
 .admin-header-tools .company-tools{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:3px;overscroll-behavior-x:contain}
 .admin-header-tools .company-tools>button,.admin-header-tools .partner-discount{flex:0 0 auto;white-space:nowrap}
}
/* A non-sticky first heading still needs to anchor its absolute resize handle. */
.admin-page-body .client-management-table .client-resizable th,
.admin-page-body .client-management-table .client-resizable th:first-child{position:relative}
.admin-page-body .client-overview-totals{grid-template-columns:repeat(auto-fit,minmax(130px,1fr))}
@media(min-width:1001px) and (min-height:601px){
 .admin-dashboard-header{display:grid;grid-template-columns:260px minmax(0,1fr);gap:6px 18px}
 .admin-dashboard-header>div:first-child{grid-column:1;grid-row:1;min-width:0}
 .admin-dashboard-header .admin-header-tools{grid-column:2;grid-row:1 / span 2}
 .admin-dashboard-header .admin-page-actions{grid-column:1;grid-row:2;margin:0;align-self:start;justify-content:flex-start;flex-wrap:nowrap}
 .admin-dashboard-header .admin-page-actions button{font-size:12px;padding:8px 10px}
}

/* v227: every catalogue report has a consistent launch row and favourite column. */
.reports-hub .reports-type{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.reports-hub .report-pin-choice{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:6px;margin:0;width:100%;align-items:stretch}
.reports-hub .report-pin-choice>button{margin:0;min-height:44px;min-width:0;max-width:100%;box-sizing:border-box}
.reports-hub .report-pin-choice>button:first-child{text-align:left;justify-content:flex-start;padding:10px 14px;white-space:normal;overflow-wrap:anywhere}
.reports-hub .report-pin-choice>.report-pin{width:44px;min-width:44px!important;justify-content:center;text-align:center}
.reports-hub .reports-module{gap:8px;min-width:0}
#modalBody .report-card{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;gap:8px;text-align:left}
#modalBody .report-card>b{min-width:0;overflow-wrap:anywhere}
#modalBody .report-card .report-pin{width:44px;min-width:44px!important;min-height:44px}
@media(max-width:500px){#modalBody .report-card{grid-template-columns:minmax(0,1fr) 44px}#modalBody .report-card>b{grid-column:1 / -1}#modalBody .report-card>button{min-height:44px}}
@media(min-width:1001px) and (min-height:601px){.admin-dashboard-header .admin-page-actions{flex-wrap:wrap}}

/* v228: one compact desktop filter row; feedback belongs with the header commands. */
.admin-page-body .client-management-filters{gap:8px;margin:8px 0;padding:8px 10px;grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr)) repeat(2,minmax(0,.95fr))}
.admin-page-body .client-management-filters.has-client-selector{grid-template-columns:minmax(0,1.15fr) minmax(0,1.6fr) repeat(3,minmax(0,1fr)) repeat(2,minmax(0,.95fr))}
.admin-page-body .client-management-filters>label{display:flex;flex-direction:column;gap:3px;margin:0;min-width:0;font-size:11px;line-height:1.3}
.admin-page-body .client-management-filters input,.admin-page-body .client-management-filters select,.admin-page-body .client-management-filters .searchable-select{width:100%;min-width:0;max-width:100%;margin:0;font-size:12px;min-height:32px;padding:6px 7px}
.admin-page-body .client-management-filters .searchable-select{padding:0}
.client-grid-feedback{display:flex;align-items:center;flex-wrap:wrap;gap:4px 14px;font-size:11px;line-height:1.4;color:#647886;min-width:0}
.client-grid-feedback .platform-result-count{font-size:11px;white-space:normal}
.client-grid-feedback .client-view-status{font-size:11px;line-height:1.4;margin:0;overflow-wrap:anywhere}
.client-grid-help{min-width:0;max-width:100%}.client-grid-help summary{cursor:pointer;color:#614078;font-size:11px}.client-grid-help p{margin:5px 0!important;max-width:700px;font-size:12px!important;line-height:1.5}
@media(max-width:1000px){.admin-page-body .client-management-filters,.admin-page-body .client-management-filters.has-client-selector{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px),(max-width:1024px) and (max-height:600px){.admin-page-body .client-management-filters input,.admin-page-body .client-management-filters select{min-height:44px;font-size:16px}.client-grid-help summary{padding:6px 0}}
@media(max-width:600px){.admin-page-body .client-management-filters,.admin-page-body .client-management-filters.has-client-selector{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:380px){.admin-page-body .client-management-filters,.admin-page-body .client-management-filters.has-client-selector{grid-template-columns:minmax(0,1fr)}}
.admin-page-body .client-management-filters{padding:6px 8px}
@media(min-width:1001px){.admin-page-body .client-management-filters>label{white-space:nowrap}}

.stationery-email-messages{border:1px solid #d8d0e8;border-radius:8px;padding:14px;margin:12px 0 18px}.stationery-email-messages summary{cursor:pointer;font-weight:600;padding:8px 0}.stationery-email-messages details{border-top:1px solid #e5e0ee;padding:6px 0}.stationery-email-messages textarea{width:100%;display:block;font:inherit;font-weight:400;margin:8px 0;padding:10px}.stationery-email-messages [role=status]:empty{display:none}

/* v235: mobile administration uses readable, swipeable grid columns. */
.admin-mobile-more,.admin-mobile-search-action,.admin-mobile-grid-status{display:none}
.admin-mobile-overview{display:contents}.admin-mobile-overview>summary,.admin-mobile-filters{display:none}
.admin-client-list{display:flex;flex-direction:column}.admin-client-list>.admin-mobile-overview{order:0}.admin-client-list>.client-management-filters{order:1}.admin-client-list>.client-management-table{order:3}.admin-client-list>.admin-mobile-grid-status{order:4}
@media(max-width:760px),(max-width:1024px) and (max-height:600px){
 .platform-admin-page .admin-page-header{position:relative;display:flex;flex-wrap:nowrap;gap:6px;padding:8px 10px;max-height:none;overflow:visible;z-index:25}
 .platform-admin-page .admin-page-header>div:first-child{flex:1;min-width:0;width:auto;flex-basis:auto;order:0}
 .platform-admin-page .admin-page-header h1{font-size:18px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .platform-admin-page .admin-page-eyebrow,.platform-admin-page .admin-page-header>div:first-child>.hint{display:none}
 .platform-admin-page .admin-page-actions{flex:0 0 auto;width:auto;gap:4px;margin:0;order:1;flex-wrap:nowrap}
 .platform-admin-page .admin-page-actions button{padding:8px;min-height:44px;font-size:12px}
 .admin-mobile-more{display:block;order:2;min-height:44px;padding:8px;font-size:13px}
 .platform-admin-page .admin-header-tools{display:none;position:absolute;top:100%;left:8px;right:8px;width:auto;background:white;box-shadow:0 8px 24px #24154133;border:1px solid #ddd5ed;border-radius:8px;padding:10px;max-height:55dvh;overflow:auto;z-index:30}
 .platform-admin-page .admin-mobile-menu-open .admin-header-tools{display:block}
 .admin-mobile-menu-open .admin-header-tools .company-tools{display:grid;grid-template-columns:1fr 1fr;overflow:visible;gap:6px;margin-bottom:8px}
 .admin-mobile-menu-open .admin-header-tools .company-tools button{white-space:normal;min-width:0;min-height:44px;font-size:13px}
 .admin-mobile-menu-open .client-grid-feedback{font-size:11px}
 .platform-admin-page .admin-page-body{padding:6px;min-height:0;overflow:auto}
 .admin-client-list{display:block}
 .admin-client-list>.client-management-filters{display:flex!important;gap:6px;padding:0;margin:0 0 6px;border:0}
 .admin-client-list>.client-management-filters>label{flex:1;min-width:0;font-size:0}
 .admin-client-list>.client-management-filters>label input{font-size:16px;min-height:44px;padding:8px}
 .admin-mobile-search-action{display:block;min-height:44px;padding:8px;font-size:12px}
 .admin-mobile-filters,.admin-mobile-overview{display:block;border:1px solid #ded8e8;border-radius:6px;margin:4px 0;padding:0 8px;font-size:12px}
 .admin-mobile-overview>summary,.admin-mobile-filters>summary{display:list-item;cursor:pointer;min-height:32px;padding:7px 0;font-weight:600}
 .admin-mobile-filter-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:8px 0}
 .admin-mobile-filter-fields label{font-size:12px;min-width:0}.admin-mobile-filter-fields input,.admin-mobile-filter-fields .account-lookup{width:100%;min-width:0}
 .admin-mobile-grid-status{display:block;font-size:11px;color:#647886;margin:6px 2px}
 .admin-page-body .client-management-table{padding:0;border-radius:8px;flex-shrink:0;overflow:hidden}
 .admin-page-body .client-management-table .platform-table-scroll{overflow:auto;max-height:calc(var(--mobile-viewport-height,100dvh) - var(--session-banner-height,0px) - 220px);min-height:180px;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}
 .admin-page-body .client-management-table .client-resizable th,.admin-page-body .client-management-table .client-resizable td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal;word-break:normal;font-size:13px;height:44px;padding:7px 8px}
 .admin-page-body .client-management-table .client-resizable th{position:sticky!important;top:0;z-index:3;background:#eaf0f5;height:48px}
 .admin-page-body .client-management-table .client-resizable th .client-column-title{display:inline-block;max-width:calc(100% - 48px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}
 .admin-page-body .client-management-table .client-resizable td:last-child button{white-space:nowrap;font-size:12px;padding:7px;min-height:34px}
 .admin-page-body .client-management-table .client-resizable td:last-child .company-tools{flex-wrap:nowrap}
}
@media(max-width:760px),(max-width:1024px) and (max-height:600px){
 .admin-page-header:not(:has(.admin-header-tools))>.admin-mobile-more{display:none}
 .admin-page-body .platform-table-scroll .detail-table:not(.client-resizable){min-width:850px}
 .admin-page-body .platform-table-scroll .detail-table:not(.client-resizable) th,.admin-page-body .platform-table-scroll .detail-table:not(.client-resizable) td{white-space:nowrap;overflow-wrap:normal;word-break:normal;padding:8px;min-height:44px}
}
