:root{font-family:'Segoe UI',system-ui,sans-serif;color:#26322e;background:#f5f5f0;font-size:14px;--green:#284e40;--lime:#e4edbd;--border:#e0e4db;--muted:#748078}*{box-sizing:border-box}body{margin:0}a{color:var(--green);text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}button,.button{display:inline-flex;align-items:center;justify-content:center;gap:14px;padding:12px 18px;background:white;border:1px solid var(--border);border-radius:9px;color:#32463a;font-weight:600;cursor:pointer;text-decoration:none}button:hover,.button:hover{border-color:#879f8a;background:#f0f3ea;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #87a45c;outline-offset:3px}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#386650;color:white}.sidebar{width:236px;background:#fff;position:fixed;inset:0 auto 0 0;border-right:1px solid var(--border);padding:35px 22px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:10px;font-size:19px;font-weight:700;letter-spacing:-.5px}.brand:hover{text-decoration:none}.brand small{display:block;font-size:10px;letter-spacing:1px;font-weight:400;margin-top:5px;color:var(--muted)}.brand-icon{display:flex;align-items:center;justify-content:center;width:42px;height:46px;border-radius:13px;background:var(--green);color:white;font-size:24px}.brand-icon span{color:#cddd9a}nav{display:grid;gap:8px;margin-top:58px}nav a{padding:13px 12px;font-weight:500;color:#657269;display:flex;justify-content:space-between;border-radius:8px}nav a.active{background:#edf2e6;color:#284e40;font-weight:700}nav a span{color:#9aa68f}.sidebar-bottom{margin-top:auto;font-size:11px;color:var(--muted)}.sidebar-bottom form{margin-top:12px}.live-dot,.dot{display:inline-block;width:7px;height:7px;background:#8ba66a;border-radius:50%;margin-right:5px}main{margin-left:236px;padding:25px 42px 10px;max-width:1850px}.test-banner{border:1px solid #dbe3ce;border-radius:7px;padding:10px 13px;font-size:10px;letter-spacing:1px;background:#eff3e6;color:#61704e;display:flex;align-items:center;gap:7px}.test-banner>span:last-child{margin-left:auto;letter-spacing:0;font-size:11px}.page-header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:24px 0 20px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;color:#7b8d6c;margin:0 0 12px}h1{font-family:Georgia,'Times New Roman',serif;font-size:38px;letter-spacing:-1px;font-weight:400;margin:0 0 12px;line-height:1.15}h2{font-size:17px;margin:0 0 18px;font-weight:600}.muted{color:var(--muted)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:20px}.stats article{background:#fff;border:1px solid var(--border);border-radius:13px;padding:16px 20px}.stats article>span{display:block;color:var(--muted);font-size:12px}.stats strong{display:block;font-size:25px;letter-spacing:-1px;font-weight:600;margin:8px 0}.stats small{font-size:10px;color:#8d978d}.stats .accent{background:var(--green);border-color:var(--green);color:#f4f5e8}.stats .accent>span,.stats .accent small{color:#b9cebd}.panel{border:1px solid var(--border);border-radius:13px;background:#fff;margin-bottom:20px;padding:20px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.section-head h2{margin:0}.section-head>span{font-size:11px}.search{display:flex;gap:8px;margin-bottom:14px}.search input{flex:1;min-width:0;background:#f8f9f5}.filters{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;margin-bottom:16px}.filter{padding:9px 12px;border:1px solid var(--border);border-radius:9px;color:#7a857a}.filter>span{font-size:11px;display:flex;align-items:center;justify-content:space-between;gap:8px}.filter b{font-size:10px;padding:3px 7px;background:#eff1eb;border-radius:5px}.filter strong{display:block;font-size:15px;font-weight:600;margin-top:5px}.filter.selected{background:#f0f5e5;border-color:#a4b781;color:#3e5931}.filter.selected b{background:#dfe9cc}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;text-align:left}th{font-size:9px;letter-spacing:.8px;text-transform:uppercase;color:#899487;font-weight:600;background:#fafbf7;padding:9px 10px;border-block:1px solid #edf0e7;white-space:nowrap}td{font-size:12px;padding:7px 10px;border-bottom:1px solid #edf0e7}tr:last-child td{border-bottom:0}td small{display:block;color:#8b9588;font-size:10px;margin-top:3px}.numeric{white-space:nowrap}.document-link{font-weight:700;white-space:nowrap}.badge{display:inline-block;background:#f5eddc;color:#8b6e35;padding:5px 8px;border-radius:5px;font-size:10px;white-space:nowrap}.badge.paid{background:#e8f1e4;color:#4f7955}.badge.draft{background:#eef0ed;color:#7f897d}.copy{padding:5px 0;border:0;background:transparent;font:10px ui-monospace,monospace;white-space:nowrap;gap:8px}.copy span{font-size:14px}.compact{padding:5px 8px;white-space:nowrap;font-size:10px}.hint{font-size:11px;line-height:1.7;color:#899182;margin:18px 0 0}.empty{text-align:center;padding:55px 20px;color:var(--muted)}.empty strong{font-family:Georgia,serif;font-size:25px;color:var(--green);font-weight:400}.empty p{margin-bottom:20px}footer{display:flex;justify-content:space-between;color:#a2a99b;font-size:10px;padding:22px 0 12px}.notice{padding:14px 18px;background:#edf5e8;border:1px solid #c9dfbd;border-radius:8px;margin:15px 0;line-height:1.6}.notice.error{background:#fff0e9;border-color:#e7c1a9;color:#97552c}.auth{max-width:480px;margin:90px auto;padding:40px}.auth h1{font-size:38px}.auth .muted{line-height:1.8}.auth button{width:100%;margin-top:22px}.auth label{margin-top:20px}label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#65735f}input,textarea,select{width:100%;min-height:43px;border:1px solid #dce2d7;background:white;border-radius:7px;padding:10px 12px;color:#26322e}textarea{min-height:90px;resize:vertical}input:disabled,select:disabled,textarea:disabled{background:#f7f8f4;color:#657260;opacity:1}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:24px}.wide{grid-column:1/-1}.editor{padding:28px;max-width:1100px}.editor p{line-height:1.8}.editor h2{margin-top:4px}.editor fieldset{padding:0;border:0;min-width:0}.lines td{padding:10px 5px}.lines td:first-child{width:55%}.lines input{min-width:80px}.lines textarea{min-width:220px;min-height:62px}.lines td:nth-child(3) input{min-width:65px}.lines button{padding:8px 12px}.bottom-fields{margin-top:25px}.actions{display:flex;flex-wrap:wrap;gap:10px}.inline-form{display:flex;align-items:end;gap:15px;flex-wrap:wrap}.inline-form label{min-width:170px}.quick-pay{padding:20px;background:#f0f5e8;border-radius:10px;margin:24px 0}details{margin:22px 0}summary{cursor:pointer;color:var(--green);padding:8px 0}details form{margin-top:18px}.link{padding:0;background:none;border:0;font-weight:400;font-size:12px}.danger{color:#a35e45}.back{display:inline-block;margin-top:25px;color:#7d8b76;font-size:12px}.import-counts{display:flex;gap:35px;flex-wrap:wrap;margin:25px 0}.import-counts strong{display:block;font-size:27px}.import-counts span{display:block;font-size:11px;color:var(--muted);margin-top:7px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:14px 22px;border-radius:9px;background:#284e40;color:#fff;box-shadow:0 5px 20px #0002;font-size:13px}
@media(min-width:1500px){main{padding-inline:36px}.panel{padding:20px}}
@media(max-width:1100px){.sidebar{width:200px;padding:30px 15px}main{margin-left:200px;padding:22px}.stats strong{font-size:23px}.stats article{padding:20px}.test-banner>span:last-child{font-size:9px}.filters{gap:6px}.filter{padding:12px}.filter strong{font-size:13px}}
@media(max-width:760px){.sidebar{position:static;width:auto;padding:18px 18px 0;border-right:0;border-bottom:1px solid var(--border)}.brand{font-size:18px}.brand-icon{height:36px;width:34px;font-size:21px}.brand small{font-size:9px}nav{display:flex;gap:4px;margin-top:18px;overflow-x:auto}nav a{white-space:nowrap;font-size:11px;padding:12px 9px;border-radius:7px 7px 0 0}nav a span{display:none}.sidebar-bottom{display:none}main{margin:0;padding:18px 14px}.test-banner{font-size:9px;padding:9px}.test-banner>span:last-child{display:none}.page-header{margin:28px 0 22px;align-items:start;flex-wrap:wrap}.page-header h1{font-size:38px}.page-header .muted{font-size:12px}.page-header>.button{font-size:12px;padding:11px 15px}.stats{gap:8px;margin-bottom:20px;grid-template-columns:1fr}.stats article{padding:17px 20px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px}.stats strong{font-size:22px;margin:0}.stats small{grid-column:1/-1;font-size:9px}.panel{padding:16px;border-radius:10px}.filters{grid-template-columns:repeat(2,1fr);gap:8px}.search{flex-wrap:wrap}.search input{flex-basis:100%;font-size:14px}.search button{font-size:12px;padding:9px 15px}.form-grid{grid-template-columns:1fr;gap:17px}.wide{grid-column:auto}.editor{padding:20px 16px}.auth{margin:35px auto;padding:26px}.auth h1{font-size:34px}.inline-form>*{width:100%}.actions form,.actions button{width:100%}.lines td:first-child{width:auto}footer{font-size:9px;gap:10px}.import-counts{gap:25px}.table-scroll{margin-inline:-4px}}

.product-picker{background:#f5f8ef;border:1px solid #e0e7d4;border-radius:10px;padding:18px;margin:0 0 20px}.picker-actions{display:flex;gap:10px;align-items:center;margin-top:10px}.picker-actions select{flex:1;min-width:0}.picker-actions button{white-space:nowrap}.product-picker .hint{margin-top:10px}.product-description{white-space:pre-line;max-width:400px}.attachment-upload{margin-top:22px}.search select{width:auto;max-width:200px}.attachment-upload input[type=file]{max-width:100%;padding:10px}.attachment-upload label{min-width:0;flex:1}
@media(max-width:760px){.picker-actions{flex-direction:column;align-items:stretch}.picker-actions select{width:100%;min-height:43px}.attachment-upload label{flex-basis:100%;max-width:100%}.attachment-upload button{width:100%}.search select{max-width:none;flex:1}.product-picker{padding:14px}nav{flex-wrap:wrap}}

/* Alternating rows retain contrast around nested controls and editor fields. */
tbody>tr:nth-child(even){background:#f0f4eb}
tbody>tr:nth-child(odd){background:#fff}
tbody>tr:hover{background:#e6eddf}
@media(max-width:760px){td .compact,td .copy{min-height:32px}}

.live-search{position:relative;flex:1;min-width:0}.live-search input{width:100%}.search-options{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:30;max-height:260px;overflow-y:auto;background:#fff;border:1px solid #bbcbb2;border-radius:8px;box-shadow:0 8px 24px #233c2720;color:#26322e;font-size:12px;font-weight:400}.search-options[hidden]{display:none}.search-option{padding:10px 12px;cursor:pointer;line-height:1.4;overflow-wrap:anywhere;border-bottom:1px solid #f0f2eb}.search-option:hover,.search-option[aria-selected=true]{background:#e8efdf;color:#284e40}.search-empty{padding:12px;color:#748078}.picker-actions>.live-search{width:100%}

tr[data-row-url]{cursor:pointer}tr[data-row-url]:focus-visible{outline:2px solid #87a45c;outline-offset:-2px}.search-status{font-size:10px;color:#748078;min-height:12px;margin:-7px 0 10px}.search-status:empty{display:none}

.row-actions{margin:0;display:inline-block}.row-actions>summary{display:flex;align-items:center;justify-content:center;list-style:none;font-size:22px;line-height:20px;width:32px;height:28px;border:1px solid #dce2d7;border-radius:6px;padding:0;background:#fff}.row-actions>summary::-webkit-details-marker{display:none}.row-menu{position:fixed;z-index:100;width:250px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow-y:auto;background:#fff;border:1px solid #b9cbb1;border-radius:9px;padding:6px;box-shadow:0 10px 30px #18331d30;text-align:left;cursor:default}.row-menu a,.row-menu>button,.row-menu form>button{display:block;width:100%;padding:9px 10px;border:0;border-radius:5px;background:transparent;text-align:left;font-size:12px;font-weight:400;line-height:1.4;white-space:normal;color:#284e40}.row-menu a:hover,.row-menu button:hover{background:#e8efdf;text-decoration:none}.row-menu .danger{color:#a35e45}.row-menu form{margin:0}.row-menu .menu-payment{border-block:1px solid #e6ebdf;padding:8px 0;margin:4px 0}.row-menu label{font-size:11px;padding:0 10px;gap:4px}.row-menu input[type=date]{min-height:34px;padding:6px 8px;font-size:12px}.row-menu .menu-payment>button{font-weight:600}

/* Document lines: readable descriptions and stable, compact number columns. */
.lines{table-layout:fixed}.lines th{white-space:normal;line-height:1.45}.lines th:first-child,.lines td:first-child{width:56%}.lines th:nth-child(2){width:10%}.lines th:nth-child(3){width:10%}.lines th:nth-child(4){width:15%}.lines th:last-child{width:9%}.lines td{vertical-align:top;padding:12px 9px;color:#26322e}.lines .line-description{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6;font-weight:500}.lines .line-number{text-align:right;font-size:13px;white-space:nowrap;font-variant-numeric:tabular-nums}.lines .line-total{font-weight:700;color:#284e40}.lines-readonly th:first-child,.lines-readonly td:first-child{width:54%}.lines-readonly th:nth-child(2){width:9%}.lines-readonly th:nth-child(3){width:10%}.lines-readonly th:nth-child(4){width:13%}.lines-readonly th:last-child{width:14%}.lines-readonly th:nth-child(2),.lines-readonly th:nth-child(4),.lines-readonly th:nth-child(5){text-align:right}.lines-editable textarea{font-size:14px;line-height:1.55;min-height:66px;resize:vertical;overflow-y:hidden}.lines-editable input{font-size:13px;min-width:0;padding:9px 8px}.lines-editable input[type=number]{text-align:right;font-variant-numeric:tabular-nums}.lines-editable td:last-child{text-align:center}.lines-editable textarea{min-width:0}.lines-editable td:nth-child(3) input{min-width:0}
@media(max-width:760px){.lines{min-width:610px}.lines-readonly{min-width:570px}.lines th:first-child,.lines td:first-child{width:52%}.lines .line-description{font-size:13px}.lines td{padding:10px 8px}}

.lines .line-name{display:block;font-weight:600;color:#263b2c;font-size:14px;white-space:normal}.lines .line-detail{margin:6px 0 0;white-space:normal}.line-detail summary{font-size:11px;padding:3px 0;color:#6c7c60}.line-detail>div{white-space:pre-wrap;line-height:1.55;font-size:12px;font-weight:400;margin-top:8px}.lines-editable input[name=line_name]{font-size:14px;font-weight:500;width:100%}.line-detail textarea{margin-top:8px;white-space:pre-wrap}.lines-editable .line-detail:not([open]){margin-bottom:0}

/* Accessible column sorting, with compact indicators. */
th .column-sort{display:inline-flex;align-items:center;gap:5px;padding:0;min-height:24px;border:0;border-radius:3px;background:transparent;color:inherit;font:inherit;text-transform:inherit;letter-spacing:inherit;text-align:inherit;white-space:inherit;cursor:pointer}
th .column-sort:hover{color:#284e40;background:transparent}
th .column-sort:focus-visible{outline:2px solid #87a45c;outline-offset:3px}
.sort-indicator{font-size:12px;opacity:.5;letter-spacing:0}
th[aria-sort=ascending] .sort-indicator,th[aria-sort=descending] .sort-indicator{opacity:1;color:#284e40}

.brand-logo{display:block;width:46px;height:46px;object-fit:contain;flex:0 0 46px}
@media(max-width:760px){.brand-logo{width:38px;height:38px;flex-basis:38px}}

.date-cell{white-space:nowrap}

.bank-preview-table{min-width:850px}.bank-preview-table td{vertical-align:top}.bank-preview-table td:last-child{min-width:260px}.bank-preview-table select{max-width:360px;width:100%;font-size:11px;padding:8px}.bank-description{margin:0;max-width:300px}.bank-description summary{font-size:12px;padding:3px 0}.bank-description p,.bank-payer{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;font-size:12px}.bank-confirm{display:flex;align-items:center;gap:10px;margin:20px 0}.bank-confirm input[type=checkbox]{width:18px;min-height:18px}.bank-preview-table input[type=checkbox]{width:18px;min-height:18px}.bank-discard{margin-top:18px}.sidebar{overflow-y:auto}nav{gap:5px;margin-top:35px}.sidebar-bottom{padding-top:22px}

.bank-filters{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:16px 0}.bank-filters label{min-width:160px}.bank-filter-search{flex:1}.bank-preview-table tbody tr.bank-row-recorded{background:#e6f1e9;color:#365a46}.bank-preview-table tbody tr.bank-row-recorded td:first-child{box-shadow:inset 4px 0 #528968}.bank-recorded-badge{display:inline-block;padding:4px 7px;margin-bottom:6px;border-radius:5px;background:#cce5d4;color:#245337;font-size:11px;font-weight:700}.bank-preview-table [data-bank-row][hidden],[data-bank-no-results][hidden]{display:none}
.bank-confirm{flex-direction:row}.bank-hidden-selection{padding:10px 12px;border-radius:6px;background:#fff2d6;color:#75551c;font-weight:600}
