*{box-sizing:border-box;margin:0;padding:0}
:root{--bg:#f3f5f7;--surface:#fff;--ink:#171a1f;--muted:#737b87;--line:#e5e8ec;--soft:#f7f8fa;--brand:#df2729;--brand-soft:#fff3f3;--accent:#1a97d4;--accent-soft:#eef8fc;--green:#16803c;--red:#df2729;--amber:#a15c00;--radius:12px;--shadow:0 1px 2px rgba(16,24,40,.04),0 8px 28px rgba(16,24,40,.045)}
html{font-size:15px}body{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.5;-webkit-font-smoothing:antialiased}a{color:inherit}.app{min-height:100vh}.sidebar{position:sticky;top:0;z-index:100;height:72px;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 30px;gap:30px}.brand-lockup{display:flex;align-items:center;width:118px;min-width:118px;height:44px;overflow:hidden}.system-logo{display:block;width:108px;height:auto;max-height:40px;object-fit:contain;object-position:left center}.brand-caption{display:none}.nav{display:flex;align-items:center;gap:3px;flex:1;overflow:auto;scrollbar-width:none}.nav::-webkit-scrollbar{display:none}.nav-section{width:1px;height:24px;background:var(--line);margin:0 9px;flex:0 0 auto;font-size:0}.nav a{display:inline-flex;align-items:center;gap:7px;padding:9px 11px;border-radius:8px;text-decoration:none;color:#626a75;font-size:12px;font-weight:700;white-space:nowrap;transition:background .15s,color .15s}.nav a:hover{background:#f1f3f5;color:var(--ink)}.nav a.active{background:var(--brand-soft);color:var(--brand);box-shadow:inset 0 0 0 1px rgba(223,39,41,.08)}.nav-icon{font-size:12px;opacity:.75}.sidebar-footer{display:none}.main{width:min(1480px,100%);margin:0 auto;padding:32px 38px 70px}.page-header{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:22px}.eyebrow{font-size:9px;font-weight:850;letter-spacing:1.5px;color:var(--accent);margin-bottom:5px}.page-header h1{font-size:29px;line-height:1.1;letter-spacing:-.9px;font-weight:800}.page-header p{margin-top:6px;color:var(--muted);font-size:13px}.actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 13px;border:1px solid transparent;border-radius:8px;text-decoration:none;font-size:12px;font-weight:750;cursor:pointer;white-space:nowrap;transition:.15s}.btn-primary{background:var(--brand);color:#fff}.btn-primary:hover{background:#c91f22;box-shadow:0 3px 10px rgba(223,39,41,.14)}.btn-secondary{background:#fff;border-color:#dfe3e8;color:#3f4752}.btn-secondary:hover{background:#f7f8fa}.btn-small{min-height:30px;padding:5px 9px;background:#fff;border:1px solid #dfe3e8;border-radius:7px;font-size:11px;text-decoration:none;font-weight:700}.card,.table-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:21px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.cards .card{min-height:125px}.metric-label{font-size:10px;color:#78808b;font-weight:750}.metric-value,.card-value{display:block;margin-top:7px;font-size:24px;line-height:1.1;font-weight:800;letter-spacing:-.7px}.cards small{display:block;margin-top:9px;color:#9aa1ab;font-size:10px}.accent-card{background:var(--brand);border-color:var(--brand);color:#fff}.accent-card .metric-label{color:#ffe5e5}.accent-card small{color:#ffd6d6}.accent-card.net-cash-positive{background:#166534;border-color:#166534}.accent-card.net-cash-positive .metric-label{color:#dcfce7}.accent-card.net-cash-positive small{color:#bbf7d0}.accent-card.net-cash-negative{background:var(--red);border-color:var(--red)}.dashboard-grid{display:grid;grid-template-columns:1.35fr .85fr;gap:12px;margin-top:12px}.section-heading,.card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.section-heading h2,.card-header h2{font-size:16px;letter-spacing:-.2px}.section-heading p,.card-header p{color:#9299a3;font-size:11px;margin-top:3px}.action-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.action-grid a{border:1px solid var(--line);border-radius:10px;padding:14px;text-decoration:none;background:#fff}.action-grid a:hover{border-color:#cfd5dc}.action-grid span{display:block;color:var(--accent);font-size:9px;font-weight:850;letter-spacing:1px}.action-grid strong{display:block;font-size:13px;margin-top:4px}.action-grid small{display:block;color:#969da7;font-size:10px;margin-top:2px}.mini-list div{display:flex;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid #f0f2f4;font-size:12px}.mini-list div:last-child{border-bottom:0}.mini-list span{color:#737b87}.filter-card{padding:12px 15px;margin-bottom:12px}.filter-bar{display:flex;align-items:flex-end;gap:9px}.dashboard-period-filter{flex-wrap:wrap}.dashboard-period-filter .filter-field,.dashboard-period-filter .filter-controls{display:flex;flex-direction:column;gap:5px}.dashboard-period-filter label{font-size:9px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;color:#78808b}.dashboard-period-filter .filter-controls[hidden]{display:none}.dashboard-period-filter input,.dashboard-period-filter select{height:37px}.dashboard-period-filter input{min-width:145px;padding:0 11px;border:1px solid #dfe3e8;border-radius:8px;background:#fff}.dashboard-period-filter input:focus,.dashboard-period-filter select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft);outline:none}.filter-bar>div{margin-right:auto}.filter-bar>div span{display:block;color:#9aa1ab;font-size:10px;margin-top:2px}.filter-bar input,input,textarea,select{font:inherit}.filter-bar input{height:37px}.filter-bar select{height:37px;min-width:145px;padding:0 34px 0 11px;cursor:pointer}.filter-bar select[name="year"]{min-width:105px}.metric-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:12px}.metric-strip>div{background:#fff;border:1px solid var(--line);border-radius:10px;padding:13px 15px}.metric-strip span{display:block;font-size:10px;color:#8b939e;font-weight:700}.metric-strip strong{display:block;margin-top:4px;font-size:16px}.table-wrap,.quotation-table-wrapper{overflow:auto;width:100%}.quotation-table,.items-table{width:100%;border-collapse:separate;border-spacing:0}.quotation-table th,.items-table th{padding:10px 12px;background:#f8fafb;color:#66717d;font-size:9px;text-transform:uppercase;letter-spacing:.7px;text-align:left;border-top:1px solid var(--line);border-bottom:1px solid var(--line);white-space:nowrap}.quotation-table th:first-child,.items-table th:first-child{border-left:1px solid var(--line);border-top-left-radius:8px}.quotation-table th:last-child,.items-table th:last-child{border-right:1px solid var(--line);border-top-right-radius:8px}.quotation-table td,.items-table td{padding:12px;border-bottom:1px solid #edf0f2;font-size:12px;vertical-align:middle}.quotation-table tbody tr:hover td{background:#fbfcfd}.quotation-table tbody tr:last-child td:first-child,.items-table tbody tr:last-child td:first-child{border-bottom-left-radius:8px}.quotation-table tbody tr:last-child td:last-child,.items-table tbody tr:last-child td:last-child{border-bottom-right-radius:8px}.empty-state,.empty-table-cell{text-align:center;color:#9aa1ab;padding:36px!important}.status-pill{display:inline-flex!important;align-items:center;padding:5px 9px;border-radius:999px;font-size:10px!important;font-weight:800!important}.status-unpaid{background:#fff4e5;color:#9a5600}.status-partially-paid{background:#edf4ff;color:#1d4ed8}.status-paid{background:#eaf8ef;color:#147536}.status-cancelled{background:#fdecec;color:#b42323}.tag{display:inline-flex;padding:4px 8px;border-radius:6px;background:#f0f2f4;color:#59616c;font-size:9px;font-weight:800}.tag-job-cost{background:#fff4e5;color:#9a5600}.tag-invoice-payment{background:#edf4ff;color:#1d4ed8}.tag-direct-sale{background:#eaf8ef;color:#147536}.money-in{color:var(--green);font-weight:750}.money-out{color:var(--red);font-weight:750}.text-right{text-align:right!important}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-full{grid-column:1/-1}.form-group label,.form-grid label,.card>form>label{display:block;font-size:10px;font-weight:750;color:#4e5661;margin-bottom:6px}.form-grid input,.form-grid textarea,.form-grid select,.card>form input,.card>form textarea,.card>form select{width:100%;border:1px solid #dfe3e8;border-radius:8px;background:#fff;padding:9px 10px;outline:none}.form-grid input:focus,.form-grid textarea:focus,.form-grid select:focus,.card>form input:focus,.card>form textarea:focus,.card>form select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.quotation-wrapper{width:100%;max-width:none;margin:0 auto;padding:34px 42px 40px}.quotation-header{display:flex;justify-content:space-between;gap:30px;padding-bottom:21px;border-bottom:1px solid var(--line)}.company-name{font-size:19px;font-weight:850;letter-spacing:-.5px}.quotation-title{text-align:right}.quotation-title h1{font-size:24px;letter-spacing:1px}.quotation-title strong{font-size:12px}.quotation-title span{font-size:10px;color:#7d8590}.quotation-info{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:25px;margin:24px 0}.info-title{font-size:9px;text-transform:uppercase;letter-spacing:1px;font-weight:850;color:#9aa1ab;margin-bottom:6px}.item-specification{margin-top:4px;color:#737b87;font-size:10px;line-height:1.45}.summary{width:340px;margin:23px 0 0 auto}.summary>div{display:grid;grid-template-columns:1fr auto;gap:25px;padding:7px 0;font-size:12px}.summary-total{border-top:1px solid var(--ink);margin-top:4px;padding-top:12px!important;font-size:15px!important}.document-card{max-width:980px}.invoice-card{max-width:none}.internal-cost{margin-top:12px;background:#fbfdff;border-color:#d7e6fb}.internal-badge{font-size:9px;font-weight:850;letter-spacing:1px;color:#1d4ed8;background:#edf4ff;padding:6px 8px;border-radius:6px}.cost-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.cost-grid>div{background:#fff;border:1px solid #e4ebf5;border-radius:9px;padding:13px}.cost-grid span{display:block;color:#7b8490;font-size:10px}.cost-grid strong{display:block;margin-top:4px;font-size:16px}.cost-action{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:12px;padding:12px 14px;border:1px dashed #bdd4f5;background:#fff;border-radius:9px}.cost-action span{display:block;color:#929aa5;font-size:10px;margin-top:2px}.success-note,.muted-note{margin-top:12px;padding:11px 13px;border-radius:8px;font-size:11px}.success-note{background:#eaf8ef;color:#176b35}.success-note a{font-weight:800}.muted-note{background:#f5f7f9;color:#929aa5}.detail-hero{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:9px;padding-bottom:19px;border-bottom:1px solid var(--line)}.detail-hero>div{padding:14px;border-radius:9px;background:#f7f8fa}.detail-hero span,.detail-grid span{display:block;color:#929aa5;font-size:10px}.detail-hero strong{display:block;margin-top:4px;font-size:16px}.detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:0 24px}.detail-grid>div{padding:14px 0;border-bottom:1px solid #f0f2f4}.detail-grid strong{display:block;margin-top:4px;font-size:12px}.notes-box{margin-top:17px;padding:14px;background:#f7f8fa;border-radius:9px;font-size:11px}.notes-box p{margin-top:4px;color:#737b87}

/* shared form controls used by legacy quotation page */
input,textarea,select{border:1px solid #dfe3e8;border-radius:8px;background:#fff;padding:9px 10px;outline:none}input:focus,textarea:focus,select:focus{border-color:#8ccbe8;box-shadow:0 0 0 3px #eef8fc}.header{margin-bottom:20px}.quotation-summary{width:min(420px,100%);margin:20px 0 0 auto;border:1px solid var(--line);border-radius:10px;padding:13px;background:#fafbfc}.summary-row{display:flex;justify-content:space-between;padding:7px 0;font-size:12px}.total-row{border-top:1px solid var(--ink);margin-top:5px;padding-top:12px;font-size:15px}.profit-row{color:var(--green)}
@media(max-width:1100px){.sidebar{padding:0 18px;gap:18px}.cards{grid-template-columns:1fr 1fr}.metric-strip{grid-template-columns:1fr 1fr}.dashboard-grid{grid-template-columns:1fr}.main{padding:28px}}
@media(max-width:760px){.sidebar{height:auto;min-height:64px;padding:0 10px;gap:8px}.brand-lockup{width:92px;min-width:92px;height:38px}.system-logo{width:86px;max-height:34px}.nav a{font-size:11px;padding:8px}.nav-icon{display:none}.main{padding:22px 13px 50px}.page-header{align-items:flex-start;flex-direction:column}.actions{width:100%}.cards,.metric-strip,.form-grid,.cost-grid,.detail-grid{grid-template-columns:1fr}.filter-bar{flex-wrap:wrap}.filter-bar>div{width:100%}.quotation-wrapper{padding:24px 17px}.quotation-info{grid-template-columns:1fr}.quotation-title{text-align:left}.summary{width:100%}.cost-action{align-items:flex-start;flex-direction:column}.quotation-table th,.quotation-table td,.items-table th,.items-table td{white-space:nowrap}}
/* V8 quotation form refinement */
.form-section{margin-bottom:14px}.required{color:var(--accent)}.section-heading{margin-bottom:18px}.editable-items th{vertical-align:bottom}.editable-items .desc-col{min-width:420px}.editable-items td{padding:10px 9px}.editable-items td:not(.item-detail-cell){min-width:120px}.item-detail-cell{min-width:420px}.item-detail-cell input,.item-detail-cell textarea{display:block;width:100%;margin:0}.item-detail-cell textarea{margin-top:7px;resize:vertical}.item-action{width:48px;min-width:48px;text-align:center}.th-note{display:inline-block;font-size:8px;color:#9aa1ab;font-weight:600;text-transform:none;letter-spacing:0}.items-toolbar{display:flex;align-items:center;gap:12px;margin-top:12px}.items-toolbar span{font-size:11px;color:#9299a3}.summary-input{width:145px;text-align:right;border:1px solid #dfe3e8;border-radius:8px;padding:8px 9px}.full-control{display:block;width:100%;border:1px solid #dfe3e8;border-radius:8px;padding:10px 11px;resize:vertical}.form-actions{margin-top:4px}.dashboard-metrics .card{min-height:132px}.profit-snapshot{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px}.profit-snapshot>div{padding:16px;background:var(--soft);border-radius:10px}.profit-snapshot span{display:block;color:var(--muted);font-size:11px}.profit-snapshot strong{display:block;margin-top:5px;font-size:18px}.profit-total{background:#eef8f1!important}.profit-total strong{color:var(--green)}
@media(max-width:900px){.editable-items .desc-col,.item-detail-cell{min-width:300px}.profit-snapshot{grid-template-columns:1fr}.dashboard-metrics{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.dashboard-metrics{grid-template-columns:1fr}.editable-items th,.editable-items td{white-space:normal}.editable-items .desc-col,.item-detail-cell{min-width:280px}.items-toolbar{align-items:flex-start;flex-direction:column}}
/* V8.1 — cleaner quotation item fields, readable snapshot and colour-coded finance tags */
.editable-items{table-layout:fixed}.editable-items .col-detail{width:50%}.editable-items .col-qty{width:13%}.editable-items .col-price{width:15%}.editable-items .col-cost{width:15%}.editable-items .col-action{width:7%}.editable-items th{padding:12px 14px}.editable-items td{padding:14px}.editable-items .item-detail-cell{min-width:0;vertical-align:top}.editable-items .numeric-field{vertical-align:top}.editable-items .numeric-field input{width:100%;box-sizing:border-box}.field-caption{font-size:9px;font-weight:800;letter-spacing:.55px;text-transform:uppercase;color:#7d8692;margin:0 0 6px}.field-caption-sub{margin-top:10px}.item-detail-cell input,.item-detail-cell textarea{box-sizing:border-box}.item-detail-cell input{font-size:13px;font-weight:600}.item-detail-cell textarea{font-size:12px;line-height:1.45;min-height:58px}.internal-field{background:#fbfdff}.internal-field input{background:#f8fbff}.editable-items tbody tr{border-bottom:1px solid #edf0f2}.editable-items tbody tr:hover td{background:#fcfdff}.profit-snapshot{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.profit-snapshot>div{padding:18px 20px;border:1px solid var(--line);background:#fff;border-radius:12px}.profit-snapshot span{font-size:10px;font-weight:750;letter-spacing:.45px;text-transform:uppercase;color:#7e8792}.profit-snapshot strong{display:block;margin-top:9px;font-size:22px;line-height:1.15;letter-spacing:-.4px}.profit-total{background:#f0f9f3!important;border-color:#d6ebdc!important}.profit-total strong{color:var(--green)}.tag{border:1px solid transparent}.tag-job-cost{background:#fff0dc;color:#a65a00;border-color:#ffdcae}.tag-invoice-payment{background:#eaf2ff;color:#245db7;border-color:#cfe0ff}.tag-direct-sale{background:#eaf8ef;color:#17733a;border-color:#cfead8}.tag-expense{background:#fff0f0;color:#b42323;border-color:#ffd3d3}.tag-category-production{background:#fff0dc;color:#a65a00;border-color:#ffdcae}.tag-category-transport{background:#eef7ff;color:#1f67a8;border-color:#d5eaff}.tag-category-office{background:#f3efff;color:#6543a5;border-color:#dfd4ff}.tag-category-utilities{background:#fff8df;color:#8a6500;border-color:#f3e2a3}.tag-category-other{background:#eef1f4;color:#59616c;border-color:#dce1e6}.receipt-amount-box{margin-top:28px;padding:24px 26px;background:#f7f8fa;border:1px solid var(--line);border-radius:12px}.receipt-amount-box span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:1px;font-weight:800;color:#8b939e}.receipt-amount-box strong{display:block;margin-top:7px;font-size:30px;letter-spacing:-.8px}.receipt-meta{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:18px}.receipt-meta>div{padding:14px 0;border-bottom:1px solid #edf0f2}.receipt-meta span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.8px;color:#9aa1ab;font-weight:800}.receipt-meta strong{display:block;margin-top:5px;font-size:12px}.document-card{max-width:1050px}
@media(max-width:760px){.editable-items{table-layout:auto}.editable-items .col-detail,.editable-items .col-qty,.editable-items .col-price,.editable-items .col-cost,.editable-items .col-action{width:auto}.editable-items th,.editable-items td{white-space:normal}.profit-snapshot{grid-template-columns:1fr}.receipt-meta{grid-template-columns:1fr}}
/* Ledger payment method summary */
.ledger-payment-summary{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}.ledger-payment-summary-header{margin-bottom:12px}.ledger-payment-summary-header h2{font-size:14px;letter-spacing:-.2px}.ledger-payment-summary-header p{color:#9299a3;font-size:10px;margin-top:3px}.ledger-payment-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.ledger-payment-item{border:1px solid #e3e7eb;border-radius:10px;background:#fff;padding:13px;box-shadow:0 2px 8px rgba(20,27,35,.035)}.ledger-payment-method{font-size:11px;font-weight:800;color:#20242a;margin-bottom:10px;padding-bottom:9px;border-bottom:1px solid #eef0f2}.ledger-payment-values{display:grid;grid-template-columns:1fr;gap:7px}.ledger-payment-values>div{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.ledger-payment-values span{font-size:9px;color:#8b939e}.ledger-payment-values strong{font-size:11px}.ledger-payment-net{margin-top:1px;padding-top:8px;border-top:1px solid #e5e8eb}.ledger-payment-net span{font-weight:700;color:#68717c}.ledger-payment-net strong{font-weight:800}
@media(max-width:1100px){.ledger-payment-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.ledger-payment-grid{grid-template-columns:1fr}}
/* Shared Printec document identity */
.document-company{display:flex;align-items:center;gap:14px;min-width:0}.document-logo-wrap{width:170px;height:auto;background:transparent;border:0;border-radius:0;box-shadow:none;display:flex;align-items:center;justify-content:flex-start;overflow:visible;flex:0 0 170px}.document-logo-wrap img{width:165px;height:auto;max-width:100%;max-height:none;object-fit:contain;object-position:left center;display:block;background:transparent;border:0;border-radius:0;box-shadow:none}.document-company-details{min-width:0;flex:1}.document-company-kicker{font-size:13px;font-weight:500;color:#20242a;line-height:1.3}.document-company-name{font-size:16px;font-weight:850;letter-spacing:-.2px;color:#171a1f;line-height:1.35}.document-company-address{margin-top:4px;max-width:650px;color:#737b87;font-size:10px;line-height:1.45}@media(max-width:760px){.document-company{align-items:flex-start;flex-direction:column;gap:8px}.document-logo-wrap{width:160px;flex-basis:auto}.document-logo-wrap img{width:155px}.document-company-kicker{font-size:13px}.document-company-name{font-size:16px}.document-company-address{font-size:10px}}
/* Net Cash Flow state colors */
.accent-card.net-cash-positive{background:#166534!important;border-color:#166534!important;color:#fff!important}
.accent-card.net-cash-positive .metric-label{color:#dcfce7!important}
.accent-card.net-cash-positive small{color:#bbf7d0!important}
.accent-card.net-cash-negative{background:#df2729!important;border-color:#df2729!important;color:#fff!important}
.accent-card.net-cash-negative .metric-label{color:#ffe5e5!important}
.accent-card.net-cash-negative small{color:#ffd6d6!important}
/* Customer document templates */
.quotation-document-card,.invoice-card,.receipt-document-card{max-width:none;padding:0;border:0;box-shadow:none;background:#fff;border-radius:0}
.quotation-template{width:210mm;max-width:100%;min-height:297mm;margin:0 auto;padding:14mm 15mm 12mm;background:#fff;box-sizing:border-box;display:flex;flex-direction:column}
.quotation-template .quotation-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:16mm;padding-bottom:7mm;border-bottom:1px solid #e2e6ea}
.quotation-template .quotation-company{min-width:0;display:flex;flex-direction:column;align-items:flex-start}.quotation-template .quotation-company-logo{width:170px;max-width:100%;line-height:0;margin-bottom:5mm}.quotation-template .quotation-company-logo img{display:block;width:170px;height:auto;max-width:100%;background:transparent;border:0;border-radius:0;box-shadow:none}
.quotation-template .quotation-company-details{min-width:0}.quotation-template .document-company-kicker{font-size:11pt;font-weight:500;line-height:1.3;color:#20242a}.quotation-template .document-company-name{font-size:12.5pt;font-weight:850;letter-spacing:-.15px;line-height:1.35;text-transform:none;color:#171a1f}.quotation-template .document-company-address{margin-top:1.2mm;max-width:170mm;color:#7d8793;font-size:8.5pt;line-height:1.4}
.quotation-template .quotation-title{text-align:right;white-space:nowrap;padding-top:2mm}.quotation-template .quotation-title h1{font-size:19pt;line-height:1.1;letter-spacing:.6px;margin-bottom:3mm}.quotation-template .quotation-title strong{font-size:9.5pt}.quotation-template .quotation-title span{display:inline-block;margin-top:2mm;font-size:8.5pt;color:#7d8790}
.quotation-template .quotation-info{display:block;margin:10mm 0 8mm}.quotation-template .quotation-info .info-title{margin-bottom:2mm}.quotation-template .quotation-info strong{font-size:11pt}.quotation-template .quotation-info>div{font-size:9.5pt;line-height:1.5}.quotation-template .items-table{width:100%;table-layout:fixed}.quotation-template .items-table th{padding:3mm 3.5mm;background:#f8fafb}.quotation-template .items-table td{padding:4mm 3.5mm;font-size:9.5pt}.quotation-template .item-specification{font-size:8pt;line-height:1.4;margin-top:1mm}.quotation-template .print-note{margin-top:5mm}
.quotation-template .quotation-footer{margin-top:auto;padding-top:8mm}.quotation-template .summary{width:72mm;max-width:100%;margin:0 0 0 auto}.quotation-template .summary>div{font-size:9.5pt;padding:2mm 0}.quotation-template .summary-total{font-size:12pt;padding-top:3mm}.quotation-template .quotation-terms{margin-top:6mm;padding-top:4mm;border-top:1px solid #e2e6ea;color:#171a1f;font-size:7.8pt;line-height:1.35}.quotation-template .quotation-terms-title{font-size:9pt;font-weight:800;margin-bottom:1mm}.quotation-template .quotation-terms ul{margin:0;padding-left:5mm}.quotation-template .quotation-terms li{padding-left:1mm;margin:0}
.receipt-template{width:297mm;min-height:210mm;padding:10mm 12mm 9mm}.receipt-template .quotation-header{gap:10mm;padding-bottom:5mm}.receipt-template .quotation-company-logo{width:135px;margin-bottom:3mm}.receipt-template .quotation-company-logo img{width:135px}.receipt-template .document-company-kicker{font-size:9pt}.receipt-template .document-company-name{font-size:10.5pt}.receipt-template .document-company-address{font-size:7.5pt;max-width:150mm}.receipt-template .quotation-title h1{font-size:16pt;margin-bottom:2mm}.receipt-template .quotation-title strong{font-size:8.5pt}.receipt-template .quotation-title span{font-size:7.5pt;margin-top:1mm}.receipt-parties{display:grid;grid-template-columns:1fr 1.7fr;gap:10mm;margin:8mm 0 6mm}.receipt-parties>div{font-size:9pt;line-height:1.4}.receipt-parties strong{display:block;font-size:10pt}.receipt-template .receipt-amount-box{margin-top:4mm;padding:7mm 8mm;border-radius:8px}.receipt-template .receipt-amount-box span{font-size:7.5pt}.receipt-template .receipt-amount-box strong{font-size:21pt;margin-top:1mm}.receipt-template .receipt-meta{grid-template-columns:1fr 1fr;gap:10mm;margin-top:5mm}.receipt-template .receipt-meta>div{padding:3mm 0}.receipt-template .receipt-meta span{font-size:7.5pt}.receipt-template .receipt-meta strong{font-size:9pt;margin-top:1mm}
@media(max-width:900px){.quotation-template{width:100%;min-height:0;padding:30px 28px 36px}.receipt-template{width:100%}}
@media(max-width:760px){.quotation-template{padding:24px 17px 30px}.quotation-template .quotation-header{grid-template-columns:1fr;gap:20px}.quotation-template .quotation-company-logo{width:160px}.quotation-template .quotation-company-logo img{width:160px}.quotation-template .quotation-title{text-align:left;padding-top:0}.quotation-template .quotation-title h1{font-size:24px}.quotation-template .quotation-info{margin:28px 0 24px}.quotation-template .summary{width:100%;margin-top:24px}.receipt-template .quotation-header{grid-template-columns:1fr}.receipt-template .quotation-title{text-align:left}.receipt-parties{grid-template-columns:1fr}.receipt-template .receipt-meta{grid-template-columns:1fr}}
@media print{@page{size:A4 portrait;margin:0}.quotation-document-card,.invoice-card{display:block}.quotation-template{width:210mm;max-width:none;min-height:297mm;height:297mm;padding:14mm 15mm 12mm;margin:0;page-break-after:always}.quotation-template .quotation-company-logo{width:170px}.quotation-template .quotation-company-logo img{width:170px}.quotation-template .items-table tr{break-inside:avoid}.quotation-template .quotation-footer{break-inside:avoid}.quotation-template .quotation-terms{font-size:7.8pt;line-height:1.35;break-inside:avoid}.receipt-document-card{display:block}.receipt-template{width:297mm;max-width:none;min-height:210mm;height:210mm;padding:10mm 12mm 9mm;margin:0;page-break-after:auto}}
/* Invoice list status highlights */
.invoice-status{display:inline-flex;align-items:center;justify-content:center;padding:6px 11px;border-radius:8px;border:1px solid transparent;font-size:10px;font-weight:800;line-height:1;white-space:nowrap}.invoice-status.status-paid{background:#eaf7ef;border-color:#c7ead3;color:#18753b}.invoice-status.status-partial{background:#fff6e8;border-color:#f7d7a3;color:#a35a00}.invoice-status.status-unpaid{background:#fff0f0;border-color:#ffcaca;color:#c62828}.invoice-status.status-cancelled{background:#f1f3f5;border-color:#dce1e6;color:#68717c}
/* V36 authentication / branch context */
.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:32px;background:#f6f8fa}.auth-card{width:min(430px,100%);background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:34px;box-shadow:0 14px 40px rgba(15,23,42,.08)}.auth-card-wide{width:min(680px,100%)}.auth-logo{display:block;width:150px;height:auto;margin:0 0 22px}.auth-card h1{margin:4px 0 8px}.auth-card p{color:#64748b;margin:0 0 22px}.auth-card label{display:block;font-size:13px;font-weight:700;margin:14px 0 7px}.auth-card input{width:100%;box-sizing:border-box}.btn-block{width:100%;margin-top:20px}.setup-link{display:block;text-align:center;margin-top:16px;color:#64748b;font-size:13px}.alert{padding:12px 14px;border-radius:10px;margin:16px 0;font-size:13px}.alert-error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}.alert-success{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}.setup-account{border-top:1px solid #e5e7eb;padding:18px 0}.setup-account h3{margin:0 0 3px}.setup-account small{color:#64748b}
/* Account bar */
.account-bar{display:flex;align-items:center;justify-content:flex-end;gap:16px;margin:-8px 0 24px;padding:10px 12px 10px 16px;background:rgba(255,255,255,.82);border:1px solid #e4e8ec;border-radius:12px;box-shadow:0 4px 18px rgba(16,24,40,.035)}.account-profile{display:flex;align-items:center;gap:10px;min-width:0}.account-avatar{width:34px;height:34px;display:flex;align-items:center;justify-content:center;flex:0 0 34px;border-radius:50%;background:var(--brand-soft);color:var(--brand);font-size:12px;font-weight:850;text-transform:uppercase}.account-details{display:flex;flex-direction:column;min-width:0;line-height:1.15}.account-details strong{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:800;color:var(--ink)}.account-details span{margin-top:3px;color:#8a929d;font-size:10px;font-weight:650}.account-separator{width:1px;height:30px;background:#e7eaee;flex:0 0 auto}.account-branch{display:flex;align-items:center;gap:8px}.account-label{color:#9aa1aa;font-size:9px;font-weight:800;letter-spacing:1px}.branch-switch{display:flex;align-items:center}.branch-switch select{min-width:145px;height:32px;padding:5px 30px 5px 10px;border:1px solid #dfe4e8;border-radius:8px;background:#fff;color:#3f4752;font-size:11px;font-weight:750;cursor:pointer}.branch-badge{display:inline-flex;align-items:center;min-height:32px;padding:6px 11px;border:1px solid #dfe4e8;border-radius:8px;background:#f8fafb;color:#3f4752;font-size:11px;font-weight:750}.account-actions{display:flex;align-items:center;gap:6px;margin-left:2px}.account-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:6px 10px;border:1px solid #dfe4e8;border-radius:8px;background:#fff;color:#505864;text-decoration:none;font-size:10px;font-weight:750;white-space:nowrap;transition:background .15s,border-color .15s,color .15s}.account-action svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.account-action:hover{background:#f7f8fa;border-color:#d5dbe1;color:var(--ink)}.account-action-logout{color:#69727d}.account-action-logout:hover{background:#fff4f4;border-color:#f0cccc;color:var(--brand)}
@media(max-width:900px){.account-bar{justify-content:flex-start;flex-wrap:wrap}.account-actions{margin-left:auto}}
@media(max-width:620px){.account-bar{align-items:flex-start;gap:12px;padding:12px}.account-separator{display:none}.account-branch{width:100%;padding-top:2px;border-top:1px solid #edf0f2}.account-label{min-width:44px}.account-actions{width:100%;margin-left:0}.account-action{flex:1}.account-action span{display:inline}.branch-switch{flex:1}.branch-switch select{width:100%}}
/* Password controls */
.password-field{position:relative;display:block;width:100%}.password-field > input{display:block;width:100%;min-height:42px;padding-right:48px}.password-field > .password-toggle{position:absolute;right:7px;top:50%;z-index:2;display:flex;align-items:center;justify-content:center;width:34px;height:34px;margin:0;padding:0;border:0;border-radius:7px;background:transparent;color:#8b939e;cursor:pointer;transform:translateY(-50%);line-height:1;appearance:none;-webkit-appearance:none}.password-field > .password-toggle:hover{background:#f1f3f5;color:#3f4752}.password-field > .password-toggle.is-visible{color:var(--brand)}.password-field > .password-toggle svg{display:block;width:18px;height:18px;flex:0 0 18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Dark Mode */
html[data-theme="dark"]{--bg:#0f1115;--surface:#171a1f;--ink:#f3f4f6;--muted:#9aa3af;--line:#2a2f36;--soft:#1d2127;--brand-soft:#32191b;--accent-soft:#102b38;--shadow:0 1px 2px rgba(0,0,0,.25),0 8px 28px rgba(0,0,0,.22)}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] .sidebar{background:rgba(23,26,31,.96);border-bottom-color:var(--line)}
html[data-theme="dark"] .nav a{color:#aeb6c1}
html[data-theme="dark"] .nav a:hover{background:#22272e;color:#fff}
html[data-theme="dark"] .nav a.active{background:#32191b;color:#ff6567;box-shadow:inset 0 0 0 1px rgba(223,39,41,.2)}
html[data-theme="dark"] .nav-section{background:#30353c}
html[data-theme="dark"] .card,html[data-theme="dark"] .table-card,html[data-theme="dark"] .metric-strip>div,html[data-theme="dark"] .action-grid a{background:var(--surface);border-color:var(--line);box-shadow:var(--shadow)}
html[data-theme="dark"] .action-grid a:hover{border-color:#3a414a}
html[data-theme="dark"] .action-grid small,html[data-theme="dark"] .section-heading p,html[data-theme="dark"] .card-header p,html[data-theme="dark"] .page-header p{color:#8f98a5}
html[data-theme="dark"] .btn-secondary,html[data-theme="dark"] .btn-small{background:#1c2026;border-color:#353b43;color:#d4d8de}
html[data-theme="dark"] .btn-secondary:hover,html[data-theme="dark"] .btn-small:hover{background:#252a31}
html[data-theme="dark"] .filter-card{background:var(--surface)}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select,html[data-theme="dark"] .filter-bar select,html[data-theme="dark"] .dashboard-period-filter input,html[data-theme="dark"] .dashboard-period-filter select,html[data-theme="dark"] .summary-input,html[data-theme="dark"] .full-control{background:#1c2026;border-color:#353b43;color:#edf0f3}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#737c88}
html[data-theme="dark"] input:focus,html[data-theme="dark"] textarea:focus,html[data-theme="dark"] select:focus,html[data-theme="dark"] .dashboard-period-filter input:focus,html[data-theme="dark"] .dashboard-period-filter select:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(26,151,212,.12)}
html[data-theme="dark"] .quotation-table th,html[data-theme="dark"] .items-table th{background:#1d2127;color:#aeb6c1;border-color:#30363e}
html[data-theme="dark"] .quotation-table td,html[data-theme="dark"] .items-table td{border-bottom-color:#2a2f36}
html[data-theme="dark"] .quotation-table tbody tr:hover td{background:#1c2026}
html[data-theme="dark"] .mini-list div,html[data-theme="dark"] .detail-grid>div,html[data-theme="dark"] .receipt-meta>div{border-bottom-color:#2a2f36}
html[data-theme="dark"] .detail-hero>div,html[data-theme="dark"] .notes-box,html[data-theme="dark"] .quotation-summary{background:#1d2127}
html[data-theme="dark"] .cost-grid>div{background:#1c2026;border-color:#303740}
html[data-theme="dark"] .internal-cost{background:#131b24;border-color:#263e55}
html[data-theme="dark"] .cost-action{background:#1c2026;border-color:#315a7b}
html[data-theme="dark"] .success-note{background:#14251b;color:#91d6a8}
html[data-theme="dark"] .muted-note{background:#1d2127;color:#8f98a5}
html[data-theme="dark"] .ledger-payment-item{background:#1c2026;border-color:#30363e;box-shadow:none}
html[data-theme="dark"] .ledger-payment-method{color:#e5e7eb;border-bottom-color:#30363e}
html[data-theme="dark"] .ledger-payment-net{border-top-color:#30363e}
html[data-theme="dark"] .account-bar{background:rgba(23,26,31,.9);border-color:#30363e;box-shadow:0 4px 18px rgba(0,0,0,.18)}
html[data-theme="dark"] .account-avatar{background:#32191b;color:#ff6668}
html[data-theme="dark"] .account-details span,html[data-theme="dark"] .account-label{color:#858e9a}
html[data-theme="dark"] .account-separator{background:#30363e}
html[data-theme="dark"] .branch-switch select,html[data-theme="dark"] .branch-badge,html[data-theme="dark"] .account-action{background:#1c2026;border-color:#353b43;color:#d2d7de}
html[data-theme="dark"] .account-action:hover{background:#252a31;border-color:#414952;color:#fff}
html[data-theme="dark"] .account-action-logout:hover{background:#301a1c;border-color:#5b3033;color:#ff6668}
html[data-theme="dark"] .document-card,html[data-theme="dark"] .quotation-document-card,html[data-theme="dark"] .invoice-card,html[data-theme="dark"] .receipt-document-card{background:transparent}
html[data-theme="dark"] .quotation-template{background:#fff;color:#171a1f}
html[data-theme="dark"] .quotation-template .quotation-header{border-bottom-color:#e2e6ea}
html[data-theme="dark"] .quotation-template .document-company-kicker{color:#20242a}
html[data-theme="dark"] .quotation-template .document-company-name{color:#171a1f}
html[data-theme="dark"] .quotation-template .document-company-address{color:#7d8793}
html[data-theme="dark"] .quotation-template .quotation-title strong{color:#171a1f}
html[data-theme="dark"] .quotation-template .quotation-title span{color:#7d8790}
html[data-theme="dark"] .quotation-template .quotation-info,html[data-theme="dark"] .quotation-template .quotation-info strong{color:#171a1f}
html[data-theme="dark"] .quotation-template .info-title{color:#9aa1ab}
html[data-theme="dark"] .quotation-template .items-table th{background:#f8fafb;color:#66717d;border-color:#e5e8ec}
html[data-theme="dark"] .quotation-template .items-table td{color:#171a1f;border-bottom-color:#edf0f2}
html[data-theme="dark"] .quotation-template .item-specification{color:#737b87}
html[data-theme="dark"] .quotation-template .summary,html[data-theme="dark"] .quotation-template .summary strong,html[data-theme="dark"] .quotation-template .summary span{color:#171a1f}
html[data-theme="dark"] .quotation-template .quotation-terms{color:#171a1f;border-top-color:#e2e6ea}
html[data-theme="dark"] .quotation-template .quotation-terms-title{color:#171a1f}
html[data-theme="dark"] .receipt-template{background:#fff;color:#171a1f}
html[data-theme="dark"] .receipt-template strong{color:#171a1f}

/* Profit Snapshot dark-mode refinement */
html[data-theme="dark"] .profit-snapshot>div{
    background:#1c2026;
    border-color:#30363e;
}
html[data-theme="dark"] .profit-snapshot span{
    color:#9da6b2;
}
html[data-theme="dark"] .profit-snapshot strong{
    color:#f3f4f6;
}
html[data-theme="dark"] .profit-snapshot .profit-total{
    background:#14251b!important;
    border-color:#2b4b36!important;
}
html[data-theme="dark"] .profit-snapshot .profit-total span{
    color:#9fc8aa;
}
html[data-theme="dark"] .profit-snapshot .profit-total strong{
    color:#35a85c;
}

/* Theme toggle */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;margin-left:6px;padding:0;border:1px solid #dfe3e8;border-radius:9px;background:#fff;color:#4f5863;cursor:pointer;font-size:18px;line-height:1;transition:background .15s,border-color .15s,color .15s,transform .15s}
.theme-toggle:hover{background:#f7f8fa;border-color:#d5dbe1;color:#171a1f}
.theme-toggle:active{transform:scale(.95)}
.theme-toggle-icon{display:block;line-height:1}
html[data-theme="dark"] .theme-toggle{background:#1c2026;border-color:#353b43;color:#e8ebef}
html[data-theme="dark"] .theme-toggle:hover{background:#252a31;border-color:#444b55}
@media(max-width:900px){.theme-toggle{margin-left:4px}}
@media(max-width:760px){.sidebar{gap:8px}.theme-toggle{flex:0 0 36px;width:36px;height:36px;margin-left:2px}}

/* Global print exclusions */
@media print{
    .no-print{display:none}
    html[data-theme="dark"] body{background:#fff;color:#171a1f}
    html[data-theme="dark"] .quotation-template,
    html[data-theme="dark"] .receipt-template{background:#fff;color:#171a1f}
}

/* V44.1 — dark mode profit snapshot + logo */
.system-logo-dark {
    display: none;
}

html[data-theme="dark"] .system-logo-light {
    display: none;
}

html[data-theme="dark"] .system-logo-dark {
    display: block;
}

html[data-theme="dark"] .profit-snapshot > div {
    background: #1c2026;
    border-color: #30363e;
}

html[data-theme="dark"] .profit-snapshot > div span {
    color: #9da6b2;
}

html[data-theme="dark"] .profit-snapshot > div strong {
    color: #f3f4f6;
}

html[data-theme="dark"] .profit-snapshot > div.profit-total {
    background: #14251b !important;
    border-color: #2b4b36 !important;
}

html[data-theme="dark"] .profit-snapshot > div.profit-total span {
    color: #9fc8aa;
}

html[data-theme="dark"] .profit-snapshot > div.profit-total strong {
    color: #35a85c;
}

@media print {
    .system-logo-dark {
        display: none !important;
    }

    .system-logo-light {
        display: block !important;
    }
}



/* V45 — clean document printing */
@media print {
    html, body {
        background: #fff;
        color: #171a1f;
    }

    .sidebar,
    .account-bar,
    .page-header,
    .theme-toggle,
    .actions,
    .no-print,
    .internal-cost {
        display: none;
    }

    .main {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .card {
        box-shadow: none;
    }

    .document-card,
    .invoice-card,
    .quotation-document-card,
    .receipt-document-card {
        border: 0;
        margin: 0;
        padding: 0;
    }
}


/* V45.1 — document print cleanup */
@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    html,
    body {
        width: 210mm;
        min-height: 297mm;
        margin: 0;
        padding: 0;
        background: #fff;
        color: #171a1f;
    }

    .app {
        min-height: 0;
        width: 210mm;
    }

    .main {
        width: 210mm;
        max-width: 210mm;
        margin: 0;
        padding: 0;
    }

    /* Hide system UI / internal information */
    .sidebar,
    .account-bar,
    .page-header,
    .theme-toggle,
    .actions,
    .no-print,
    .internal-cost,
    .detail-hero {
        display: none;
    }

    /* Keep only the actual customer document */
    .quotation-document-card,
    .invoice-card,
    .receipt-document-card {
        width: 210mm;
        max-width: 210mm;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
    }

    .quotation-template {
        width: 210mm;
        max-width: 210mm;
        min-height: 297mm;
        height: 297mm;
        margin: 0;
        padding: 14mm 15mm 12mm;
        box-sizing: border-box;
        background: #fff;
    }

    .quotation-template .quotation-header {
        margin: 0;
    }

    .quotation-template .quotation-company-logo,
    .quotation-template .quotation-company-logo img {
        width: 170px;
        max-width: 170px;
    }

    .quotation-template .quotation-company-logo {
        margin-top: 0;
    }

    .quotation-template .quotation-footer {
        margin-top: auto;
    }

    .receipt-template {
        width: 297mm;
        max-width: 297mm;
        min-height: 210mm;
        height: 210mm;
        padding: 10mm 12mm 9mm;
    }
}
