:root{--ink:#1b2535;--muted:#7e8897;--line:#e9edf1;--paper:#fff;--canvas:#f6f7f9;--teal:#147f72;--teal-dark:#11675d;--teal-soft:#e8f5f2;--orange:#d98b3a;--orange-soft:#fff4e8;--red:#c85d5d;--red-soft:#fff0ef;--blue:#5072c4;--blue-soft:#eef2ff;--shadow:0 12px 35px rgba(32,48,67,.08)}*{box-sizing:border-box}body{margin:0;background:var(--canvas);color:var(--ink);font-family:'DM Sans',sans-serif;font-size:14px;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh}.sidebar{width:252px;background:#fff;border-right:1px solid #edf0f3;position:fixed;inset:0 auto 0 0;padding:25px 16px 15px;display:flex;flex-direction:column;z-index:3}.brand{height:40px;display:flex;gap:10px;align-items:center;padding:0 12px;color:var(--ink);text-decoration:none}.brand-mark{width:31px;height:31px;border-radius:10px;background:#18796c;display:grid;place-items:center}.brand-mark svg{width:21px;height:21px;fill:#fff}.brand-name{font:800 22px 'Manrope',sans-serif;letter-spacing:-1.2px}.brand-name span{color:#1b9c8b}.workspace-switch{height:58px;margin:29px 5px 28px;border:1px solid var(--line);border-radius:11px;display:flex;align-items:center;padding:8px 10px;gap:10px}.workspace-avatar{height:32px;width:32px;border-radius:9px;background:#f0eee8;color:#786951;display:grid;place-items:center;font:700 15px 'Manrope',sans-serif}.workspace-copy,.profile-copy{display:flex;flex-direction:column;gap:2px;flex:1}.workspace-copy b,.profile-copy b{font-size:12px;font-weight:700}.workspace-copy small,.profile-copy small{font-size:10px;color:var(--muted)}.chevron{width:17px;height:17px;stroke:#8d96a2;stroke-width:1.7;fill:none}.nav-caption{padding:0 12px;color:#a0a8b3;font-size:9px;font-weight:700;letter-spacing:1.05px;margin-bottom:9px}.main-nav{display:flex;flex-direction:column;gap:3px}.nav-item{height:41px;border:0;background:transparent;border-radius:8px;padding:0 11px;display:flex;align-items:center;text-align:left;gap:11px;color:#687384;font-size:12px;font-weight:500;transition:.16s}.nav-item:hover{background:#f6f8f8;color:var(--ink)}.nav-item.active{background:#eaf5f2;color:#146f64;font-weight:700}.nav-icon{width:19px;height:19px;display:grid;place-items:center}.nav-icon svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round;stroke-linejoin:round}.nav-count{margin-left:auto;background:rgba(255,255,255,.85);color:#76818e;font-size:10px;min-width:20px;height:19px;border-radius:6px;display:grid;place-items:center}.nav-caption-spaced{margin-top:28px}.sidebar-bottom{margin-top:auto}.tip-card{border:1px solid #e8efed;background:#f7faf9;border-radius:10px;padding:13px 13px 11px;margin:10px 3px 15px}.tip-spark{color:#d79643;font-size:14px}.tip-card>b{font-size:11px;display:block;margin-top:7px}.tip-card p{font-size:10px;color:#788391;line-height:1.5;margin:5px 0 11px}.text-link{border:0;background:none;padding:0;color:#18786d;font-size:10px;font-weight:700}.text-link span{font-size:13px;margin-left:4px}.profile{border-top:1px solid var(--line);padding:14px 6px 0;display:flex;align-items:center;gap:9px}.profile-avatar{width:30px;height:30px;border-radius:50%;background:#e1eee9;color:#267165;display:grid;place-items:center;font-size:12px;font-weight:700}.more-btn{border:0;background:none;color:#929ba6;font-size:15px;letter-spacing:2px}.main-area{margin-left:252px;min-height:100vh}.topbar{height:61px;background:rgba(255,255,255,.93);border-bottom:1px solid #e9edf0;display:flex;align-items:center;justify-content:space-between;padding:0 42px;position:sticky;top:0;z-index:2}.breadcrumb{display:flex;gap:11px;align-items:center;color:#8b94a0;font-size:11px}.breadcrumb b{color:#364152;font-weight:600}.crumb-sep{color:#c6ccd2}.top-actions{display:flex;align-items:center;gap:17px}.icon-button{width:30px;height:30px;border:0;background:none;color:#8993a0;display:grid;place-items:center}.icon-button svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.6;fill:none;stroke-linecap:round}.top-divider{height:22px;border-left:1px solid var(--line)}.top-user{display:flex;align-items:center;gap:9px;font-size:11px;color:#4f5b6c}.profile-avatar.small{width:27px;height:27px;font-size:10px}.page-content{max-width:1310px;margin:0 auto;padding:37px 42px 60px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:27px}.eyebrow{font-size:10px;color:#99a2ae;letter-spacing:.7px;text-transform:uppercase;font-weight:700;margin:0 0 8px}.page-heading h1{font:700 27px 'Manrope',sans-serif;letter-spacing:-.7px;margin:0;color:#202b3b}.page-heading p{color:#8a94a1;font-size:12px;margin:7px 0 0}.heading-actions{display:flex;gap:9px;align-items:center}.button{border:1px solid var(--line);background:#fff;border-radius:7px;height:36px;padding:0 13px;color:#4e5a68;font-weight:600;font-size:11px;display:inline-flex;align-items:center;gap:7px;justify-content:center;transition:.16s}.button:hover{border-color:#bfcac9;background:#fbfdfc}.button.primary{border-color:var(--teal);background:var(--teal);color:#fff;box-shadow:0 2px 4px rgba(20,127,114,.14)}.button.primary:hover{background:var(--teal-dark)}.button svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}.button.danger{color:var(--red);border-color:#f0d4d4}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.metric-card{background:#fff;border:1px solid #e9edf0;border-radius:9px;padding:17px 17px 15px;min-height:122px;box-shadow:0 2px 6px rgba(21,39,53,.015)}.metric-top{display:flex;align-items:center;justify-content:space-between;color:#778291;font-size:10px;font-weight:600}.metric-icon{width:26px;height:26px;border-radius:7px;display:grid;place-items:center}.metric-icon svg{width:14px;height:14px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}.metric-icon.green{background:#e7f4f0;color:#268475}.metric-icon.orange{background:#fff2e4;color:#d48b40}.metric-icon.blue{background:#edf1ff;color:#5a70bd}.metric-icon.red{background:#fff0ed;color:#ce6f5e}.metric-value{font:700 22px 'Manrope',sans-serif;letter-spacing:-.5px;margin:13px 0 4px;color:#202a39}.metric-note{font-size:10px;color:#929ba6}.metric-note .positive{color:#268576;font-weight:700}.content-grid{display:grid;grid-template-columns:minmax(0,1.56fr) minmax(270px,1fr);gap:16px}.panel{background:#fff;border:1px solid #e9edf0;border-radius:9px;box-shadow:0 2px 6px rgba(21,39,53,.015)}.panel-head{display:flex;align-items:center;justify-content:space-between;padding:17px 19px 12px}.panel-title{font:700 13px 'Manrope',sans-serif;color:#293444;margin:0}.panel-subtitle{font-size:10px;color:#929ba6;margin:4px 0 0}.select-small{height:28px;border:1px solid var(--line);border-radius:6px;padding:0 8px;color:#6d7886;background:#fff;font-size:10px}.chart-wrap{padding:4px 17px 14px;height:210px}.chart-wrap svg{width:100%;height:100%;overflow:visible}.chart-grid{stroke:#edf0f2;stroke-width:1}.chart-label{fill:#a0a8b2;font:9px 'DM Sans',sans-serif}.chart-line{fill:none;stroke:#248879;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.chart-area{fill:url(#chart-gradient)}.chart-dot{fill:#fff;stroke:#258879;stroke-width:2}.list-panel .panel-head{padding-bottom:15px}.view-all{border:0;background:none;color:#177c70;font-weight:700;font-size:10px}.activity-list{padding:0 18px 6px}.activity-row{display:grid;grid-template-columns:33px minmax(0,1fr) auto;align-items:center;gap:9px;padding:11px 0;border-top:1px solid #f0f2f4}.activity-mark{width:31px;height:31px;border-radius:8px;display:grid;place-items:center;font-size:11px;font-weight:700}.activity-mark.quote{background:#f0efff;color:#7770be}.activity-mark.invoice{background:#e9f5f1;color:#438778}.activity-mark.payment{background:#fff3e7;color:#ce8b48}.activity-copy b{font-size:10px;font-weight:700;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.activity-copy small{display:block;color:#929ba6;font-size:9px;margin-top:4px}.activity-amount{font-size:10px;font-weight:700;text-align:right}.activity-amount small{display:block;font-weight:500;color:#98a1ab;font-size:9px;margin-top:3px}.status{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border-radius:5px;font-size:9px;font-weight:700;white-space:nowrap}.status:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}.status.paid{background:#e8f5f1;color:#278070}.status.pending{background:#fff4e6;color:#ba7a36}.status.overdue{background:#fff0ef;color:#c35959}.status.approved{background:#edf2ff;color:#5b70b7}.status.draft{background:#f0f2f4;color:#7e8996}.status.sent{background:#eef3fb;color:#6379ad}.status.rejected{background:#fff0ef;color:#c35959}.receivable-list{padding:0 19px 15px}.receivable-row{display:flex;align-items:center;justify-content:space-between;padding:11px 0;border-top:1px solid #f0f2f4;gap:10px}.receivable-row:first-child{border-top:0}.receivable-main b{font-size:10px;display:block}.receivable-main small{font-size:9px;color:#939ca7;display:block;margin-top:4px}.receivable-value{text-align:right;font-size:10px;font-weight:700}.receivable-value small{display:block;color:#b07a43;font-size:9px;font-weight:600;margin-top:4px}.full-panel{background:#fff;border:1px solid #e9edf0;border-radius:9px}.table-toolbar{padding:13px 16px;display:flex;align-items:center;gap:9px;border-bottom:1px solid #eef0f2}.search-box{height:34px;flex:1;max-width:310px;border:1px solid var(--line);border-radius:6px;display:flex;align-items:center;gap:8px;padding:0 10px;color:#97a0ac}.search-box svg{width:15px;height:15px;stroke:currentColor;stroke-width:1.7;fill:none}.search-box input{border:0;outline:0;width:100%;font-size:11px;color:var(--ink);background:transparent}.filter-select{height:34px;border:1px solid var(--line);border-radius:6px;background:white;padding:0 9px;color:#647080;font-size:10px}.toolbar-spacer{flex:1}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap}th{text-align:left;background:#fafbfc;color:#909aa6;text-transform:uppercase;letter-spacing:.5px;font-size:9px;font-weight:700;padding:12px 15px;border-bottom:1px solid #edf0f2}td{padding:13px 15px;border-bottom:1px solid #f0f2f4;color:#4d5969;font-size:10px}tbody tr:last-child td{border-bottom:0}.table-primary{font-size:11px;font-weight:700;color:#293444}.table-secondary{font-size:9px;color:#9aa3ae;margin-top:4px}.row-menu{border:0;background:none;color:#919ba7;letter-spacing:2px;font-size:14px}.empty-state{padding:48px 20px;text-align:center;color:#8b96a3}.empty-icon{width:40px;height:40px;margin:0 auto 12px;border-radius:12px;background:#eff6f4;color:#388579;display:grid;place-items:center;font-size:17px}.empty-state b{display:block;color:#435061;font-size:12px}.empty-state p{font-size:10px;margin:6px 0 14px}.section-note{font-size:10px;color:#9aa3ad}.modal-backdrop{position:fixed;inset:0;background:rgba(21,32,45,.35);z-index:10;display:grid;place-items:center;padding:20px}.modal{width:min(620px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:12px;box-shadow:0 22px 75px rgba(24,40,56,.22)}.modal.wide{width:min(780px,100%)}.modal-head{padding:19px 22px 15px;border-bottom:1px solid var(--line);display:flex;align-items:flex-start;justify-content:space-between}.modal-head h2{font:700 16px 'Manrope',sans-serif;margin:0}.modal-head p{font-size:10px;color:#8b95a1;margin:5px 0 0}.modal-close{border:0;background:#f5f6f7;width:27px;height:27px;border-radius:7px;color:#75808d;font-size:17px}.modal-body{padding:18px 22px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.field{display:flex;flex-direction:column;gap:6px}.field.full{grid-column:1/-1}.field label{font-size:10px;font-weight:700;color:#566171}.field input,.field select,.field textarea{height:36px;border:1px solid #e3e8eb;border-radius:6px;padding:0 10px;color:#344153;background:#fff;font-size:11px;outline:none}.field textarea{height:70px;padding:9px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:#78b7ac;box-shadow:0 0 0 3px #e9f5f2}.form-hint{color:#959eaa;font-size:9px}.modal-foot{border-top:1px solid var(--line);padding:13px 22px;display:flex;justify-content:flex-end;gap:8px}.line-items{border:1px solid var(--line);border-radius:7px;overflow:hidden;margin-top:15px}.line-head,.line-row{display:grid;grid-template-columns:minmax(180px,2fr) 70px 100px 100px 25px;gap:8px;align-items:center;padding:9px 10px}.line-head{background:#fafbfc;color:#939ca7;text-transform:uppercase;font-size:8px;font-weight:700;letter-spacing:.4px}.line-row{border-top:1px solid #f0f2f4}.line-row select,.line-row input{width:100%;height:31px;border:1px solid #e5e9eb;border-radius:5px;padding:0 7px;font-size:10px;min-width:0}.line-total{font-size:10px;text-align:right;font-weight:700}.remove-line{border:0;background:none;color:#b0b7bf;font-size:15px}.add-line{margin:9px 0 0;border:0;background:none;color:#197c70;font-size:10px;font-weight:700;padding:0}.doc-total{display:flex;justify-content:flex-end;align-items:center;gap:30px;padding:13px 0 2px;color:#778291;font-size:10px}.doc-total b{font:700 18px 'Manrope',sans-serif;color:#253143}.toast-root{position:fixed;right:22px;bottom:22px;z-index:20;display:flex;flex-direction:column;gap:8px}.toast{background:#1f2e3d;color:white;border-radius:8px;padding:11px 15px;font-size:11px;box-shadow:var(--shadow);animation:toastIn .2s ease}.toast.success:before{content:'✓';color:#75c4a6;font-weight:700;margin-right:8px}@keyframes toastIn{from{transform:translateY(8px);opacity:0}to{transform:translateY(0);opacity:1}}.print-root{display:none}.doc-actions{display:flex;gap:6px}.doc-actions .button{height:28px;padding:0 8px;font-size:9px}.muted{color:#929ba6}.nowrap{white-space:nowrap}.dashboard-bottom{margin-top:16px}.mobile-menu{display:none}
@media(max-width:1080px){.sidebar{width:218px}.main-area{margin-left:218px}.page-content{padding-left:26px;padding-right:26px}.topbar{padding:0 26px}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.content-grid{grid-template-columns:1fr}.chart-wrap{height:195px}}
@media(max-width:720px){.sidebar{width:68px;padding:17px 9px}.brand{padding:0 8px}.brand-name,.workspace-copy,.workspace-switch .chevron,.nav-caption,.nav-item:not(.active) .nav-count,.nav-item{font-size:0}.workspace-switch{justify-content:center;margin:22px 0;padding:7px 0}.workspace-avatar{flex:none}.nav-item{justify-content:center;padding:0;gap:0;height:42px}.nav-icon svg{width:20px;height:20px}.nav-item .nav-count{display:none}.nav-caption-spaced{display:none}.sidebar .tip-card,.profile-copy,.more-btn{display:none}.profile{justify-content:center;padding:13px 0 0}.main-area{margin-left:68px}.topbar{height:54px;padding:0 16px}.breadcrumb{font-size:10px;gap:7px}.top-user span,.top-user .chevron{display:none}.top-actions{gap:10px}.page-content{padding:25px 15px 35px}.page-heading{align-items:flex-start;gap:14px;flex-direction:column;margin-bottom:20px}.page-heading h1{font-size:23px}.heading-actions{width:100%}.heading-actions .button{flex:1}.metrics{gap:9px;margin-bottom:12px}.metric-card{padding:12px;min-height:108px}.metric-value{font-size:18px}.metric-top{font-size:9px}.metric-note{font-size:9px}.content-grid{gap:11px}.panel-head{padding:14px 14px 10px}.activity-list,.receivable-list{padding-left:13px;padding-right:13px}.table-toolbar{flex-wrap:wrap}.search-box{max-width:none;flex-basis:100%}.toolbar-spacer{display:none}.table-toolbar>.button{margin-left:auto}.line-head,.line-row{grid-template-columns:minmax(120px,2fr) 50px 73px 75px 19px;gap:4px;padding:8px 6px}.line-row select,.line-row input{font-size:9px;padding:0 4px}.modal-backdrop{padding:10px}.modal{max-height:calc(100vh - 20px)}.modal-body{padding:15px}.form-grid{gap:10px}.field input,.field select{font-size:10px}.table-wrap{margin:0 -1px}}
@media print{@page{size:A4;margin:16mm}.app-shell,.modal-backdrop,.toast-root{display:none!important}.print-root{display:block!important;font-family:Arial,sans-serif;color:#252c35}.print-document{max-width:100%;font-size:11px}.print-top{display:flex;justify-content:space-between;border-bottom:2px solid #18796c;padding-bottom:17px;margin-bottom:23px}.print-brand{font-size:23px;font-weight:bold;color:#18796c;letter-spacing:-1px}.print-type{text-align:right;color:#737d89;font-size:11px}.print-type strong{display:block;color:#263445;font-size:19px;margin-bottom:4px}.print-parties{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin:23px 0}.print-parties small,.print-label{color:#89919b;text-transform:uppercase;letter-spacing:.5px;font-size:9px}.print-parties b{display:block;margin:7px 0;font-size:12px}.print-parties p{line-height:1.6;color:#626d7b;margin:0}.print-table{width:100%;border-collapse:collapse;margin-top:17px}.print-table th{background:#f3f7f6!important;color:#5d6a76;padding:10px;text-align:left;font-size:9px;text-transform:uppercase}.print-table td{padding:11px 10px;border-bottom:1px solid #e8ecee;color:#364250;font-size:10px}.print-summary{margin:15px 0 0 auto;width:220px}.print-summary div{display:flex;justify-content:space-between;padding:6px 0;color:#687482}.print-summary .grand{border-top:1px solid #dfe5e6;margin-top:6px;padding-top:11px;color:#243244;font-weight:bold;font-size:14px}.print-note{margin-top:35px;padding-top:13px;border-top:1px solid #e3e7e9;color:#7f8994;font-size:9px;line-height:1.6}.print-footer{margin-top:45px;padding-top:10px;border-top:1px solid #e9edef;color:#9aa2ab;font-size:8px;display:flex;justify-content:space-between}}
.storage-status{font-size:9px;color:#388477;display:flex;align-items:center;gap:6px}.storage-status:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.storage-status.connecting{color:#a27d43}.storage-status.offline{color:#c35959}
@media(max-width:720px){.storage-status{display:none}}
:root{--ink:#1d1d1f;--muted:#777b80;--line:#e8e8e8;--canvas:#f5f5f5;--teal:#f26322;--teal-dark:#d94e0e;--teal-soft:#fff0e8;--orange:#f26322;--orange-soft:#fff0e8;--shadow:0 12px 35px rgba(24,24,24,.09)}
.brand{height:auto;padding:0 4px;justify-content:center}
.brand-logo{display:block;width:100%;max-width:218px;height:auto;object-fit:contain}
.brand-mobile-mark{display:none}
.workspace-avatar{background:#242424;color:#fff}
.nav-item.active{background:#fff0e8;color:#d94e0e}
.nav-item:hover{background:#f7f5f3}
.button.primary{border-color:#f26322;background:#f26322;box-shadow:0 2px 5px rgba(242,99,34,.2)}
.button.primary:hover{background:#d94e0e}
.metric-icon.green,.metric-icon.orange{background:#fff0e8;color:#e65a1b}
.metric-icon.blue{background:#f0f0f0;color:#333}
.chart-line{stroke:#f26322}
.chart-dot{stroke:#f26322}
.add-line,.text-link{color:#e65a1b}
.brand-mark{background:#1d1d1f}
.profile-avatar{background:#fff0e8;color:#d94e0e}
.storage-status{color:#e65a1b}
@media print{.print-top{border-bottom-color:#f26322}.print-brand{color:#f26322}.print-table th{background:#fff1e8!important}}
@media(max-width:720px){.brand{height:40px;padding:0}.brand-logo{display:none}.brand-mobile-mark{width:38px;height:38px;display:flex;align-items:center;justify-content:center;border-radius:10px;background:#1d1d1f;color:#fff;font:800 14px 'Manrope',sans-serif;letter-spacing:-1px}.brand-mobile-mark i{font-style:normal;color:#ff7138}}
@media print{.print-brand{font-size:0}.print-brand img{display:block;width:190px;height:auto;max-height:82px;object-fit:contain}}
.adjustment-fields{display:grid;grid-template-columns:minmax(180px,1fr) minmax(140px,.6fr);gap:13px;margin-top:16px;align-items:start}.doc-summary{width:min(360px,100%);margin:14px 0 0 auto;display:grid;gap:7px}.doc-summary-row{display:flex;justify-content:space-between;align-items:center;gap:16px;color:#6f7883;font-size:11px}.doc-summary-row b{font-size:11px;color:#374252}.doc-summary-row.adjustment-summary{color:#d94e0e}.doc-summary-row.adjustment-summary b{color:#d94e0e}.doc-summary-row.final{border-top:1px solid #e6e8ea;margin-top:2px;padding-top:10px;color:#1d1d1f;font-size:12px;font-weight:700}.doc-summary-row.final b{font:700 18px 'Manrope',sans-serif;color:#1d1d1f}
@media(max-width:720px){.adjustment-fields{grid-template-columns:1fr;gap:10px}}
[hidden]{display:none!important}
.auth-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(ellipse at top right,#fff0e8 0,transparent 42%),#f5f5f5}
.auth-card{width:min(420px,100%);padding:38px 40px 30px;border:1px solid #e7e7e7;border-radius:14px;background:#fff;box-shadow:0 18px 60px rgba(20,20,20,.09)}
.auth-logo{display:block;width:min(250px,90%);height:auto;margin:0 auto 31px}
.auth-eyebrow{margin:0 0 8px;text-align:center;color:#ed6020;font-size:9px;font-weight:700;letter-spacing:1.2px}
.auth-card h1{margin:0;text-align:center;color:#1d1d1f;font:700 25px 'Manrope',sans-serif;letter-spacing:-.6px}
.auth-description{margin:8px 0 24px;text-align:center;color:#7d8288;font-size:12px;line-height:1.55}
.auth-form{display:grid;gap:15px}
.auth-field{display:grid;gap:7px;color:#50545a;font-size:11px;font-weight:700}
.auth-field input{width:100%;height:42px;border:1px solid #e2e3e4;border-radius:7px;padding:0 12px;color:#25272a;background:#fff;font-size:13px;outline:none}
.auth-field input:focus{border-color:#f26322;box-shadow:0 0 0 3px #fff0e8}
.auth-message{display:none;margin:0;color:#b54235;font-size:11px;line-height:1.5}
.auth-message.visible{display:block}
.auth-submit{height:42px;border:0;border-radius:7px;background:#f26322;color:white;font-size:12px;font-weight:700;box-shadow:0 3px 8px rgba(242,99,34,.2)}
.auth-submit:hover{background:#d94e0e}
.auth-submit:disabled{opacity:.65;cursor:wait}
.auth-local-note{display:block;margin-top:22px;text-align:center;color:#9a9da1;font-size:10px}
.auth-logout{height:30px;padding:0 10px;color:#7b8188;font-size:10px}
@media(max-width:500px){.auth-card{padding:30px 22px 25px}.auth-logo{width:min(220px,90%);margin-bottom:25px}.auth-logout{padding:0 7px}}
.brand-logo{max-width:194px}
.auth-logo{width:min(220px,90%)}
.documents-table th{font-size:11px}
.documents-table td{font-size:12px}
.documents-table .table-primary{font-size:13px}
.documents-table .table-secondary{font-size:11px}
.documents-table .status{font-size:11px;padding:5px 8px}
.documents-table .doc-actions .button{height:32px;font-size:11px;padding:0 9px}
.print-brand img{width:172px}
@media print{.print-table th{font-size:11px}.print-table td{font-size:12px}}
/* Compact brand sizing and layouts for tablet and mobile screens. */
.brand-logo{max-width:154px}
.auth-logo{width:min(190px,90%)}
@media(max-width:900px) and (min-width:721px){
  .sidebar{width:196px;padding-left:12px;padding-right:12px}
  .main-area{margin-left:196px}
  .topbar{padding:0 18px}
  .top-actions{gap:10px}
  .page-content{padding:26px 20px 45px}
  .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .doc-actions{flex-wrap:wrap}
}
@media(max-width:720px){
  body{overflow-x:hidden}
  .app-shell{overflow-x:clip}
  .sidebar{inset:auto 0 0;width:100%;height:calc(68px + env(safe-area-inset-bottom));padding:4px 3px calc(4px + env(safe-area-inset-bottom));border-right:0;border-top:1px solid #e7e8e9;box-shadow:0 -5px 20px rgba(20,20,20,.07);background:#fff;z-index:5}
  .sidebar .brand,.sidebar .workspace-switch,.sidebar .nav-caption,.sidebar-bottom{display:none}
  .main-nav{width:100%;height:100%;flex-direction:row;align-items:stretch;justify-content:space-between;gap:1px}
  .nav-item,.nav-item.active{height:auto;min-width:0;flex:1;flex-direction:column;justify-content:center;align-items:center;gap:3px;padding:4px 1px;border-radius:7px;text-align:center;font-size:9px}
  .nav-item .nav-icon{width:22px;height:22px;flex:none}
  .nav-item .nav-icon svg{width:19px;height:19px}
  .nav-item .nav-label{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:7px;line-height:1.1;letter-spacing:-.1px}
  .nav-item .nav-count{display:none}
  .main-area{margin-left:0;min-height:100vh;padding-bottom:calc(68px + env(safe-area-inset-bottom))}
  .topbar{height:54px;padding:0 12px;gap:8px}
  .breadcrumb{min-width:0;gap:6px;font-size:9px}
  .breadcrumb>span:first-child,.crumb-sep{display:none}
  .breadcrumb b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .top-actions{gap:6px;flex-shrink:0}
  .top-actions .storage-status,.top-actions .icon-button,.top-divider,.top-user{display:none}
  .auth-logout{height:29px;padding:0 9px;font-size:10px}
  .page-content{padding:21px 13px calc(28px + env(safe-area-inset-bottom))}
  .page-heading{align-items:stretch;gap:12px;margin-bottom:17px}
  .page-heading h1{font-size:22px;line-height:1.2}
  .page-heading p{font-size:11px;line-height:1.45}
  .heading-actions{width:100%;flex-wrap:wrap}
  .heading-actions .button{flex:1 1 130px}
  .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:11px}
  .metric-card{min-width:0;padding:11px 10px;min-height:104px}
  .metric-value{font-size:17px;overflow-wrap:anywhere}
  .metric-top{font-size:9px;gap:5px}
  .metric-note{font-size:9px;line-height:1.35}
  .content-grid{grid-template-columns:minmax(0,1fr);gap:10px}
  .panel,.full-panel{min-width:0}
  .table-toolbar{padding:11px;gap:7px}
  .table-toolbar .filter-select{max-width:100%;flex:1}
  .table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
  .table-wrap:not(.documents-table) table{min-width:640px}
  .documents-table{overflow:visible;margin:0}
  .documents-table table,.documents-table tbody{display:block;width:100%;white-space:normal}
  .documents-table thead{display:none}
  .documents-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 12px;padding:9px 12px;border-bottom:1px solid #edf0f2}
  .documents-table tbody tr:last-child{border-bottom:0}
  .documents-table td{display:block;min-width:0;padding:7px 0;border:0;white-space:normal;overflow-wrap:anywhere;font-size:12px}
  .documents-table td:before{display:block;margin-bottom:3px;color:#929ba6;font-size:8px;font-weight:700;letter-spacing:.45px;text-transform:uppercase}
  .documents-table td:nth-child(1):before{content:'Número'}
  .documents-table td:nth-child(2){grid-column:1/-1}
  .documents-table td:nth-child(2):before{content:'Cliente'}
  .documents-table td:nth-child(3):before{content:'Emissão'}
  .documents-table td:nth-child(4):before{content:'Vencimento / validade'}
  .documents-table td:nth-child(5):before{content:'Valor'}
  .documents-table td:nth-child(6):before{content:'Status'}
  .documents-table td:nth-child(7){grid-column:1/-1;padding-top:9px}
  .documents-table td:nth-child(7):before{content:'Ações'}
  .documents-table .table-primary{font-size:13px;line-height:1.25;overflow-wrap:anywhere}
  .documents-table .table-secondary{font-size:10px;overflow-wrap:anywhere}
  .documents-table .doc-actions{display:flex;flex-wrap:wrap;gap:6px}
  .documents-table .doc-actions .button{height:32px;font-size:10px;padding:0 8px}
  .modal-backdrop{align-items:end;padding:8px}
  .modal,.modal.wide{width:100%;max-height:calc(100dvh - 16px);border-radius:12px 12px 8px 8px}
  .modal-head{padding:15px 16px 12px}
  .modal-body{padding:14px 15px}
  .modal-foot{padding:11px 15px;flex-wrap:wrap}
  .modal-foot .button{flex:1 1 125px}
  .modal .form-grid{grid-template-columns:1fr;gap:10px}
  .modal .field.full{grid-column:auto}
  .line-head{display:none}
  .line-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 26px;gap:7px;padding:10px 8px}
  .line-row input[name^="product-"]{display:none}
  .line-row input[name^="name-"]{grid-column:1/3;grid-row:1}
  .line-row input[name^="qty-"]{grid-column:1;grid-row:2}
  .line-row input[name^="price-"]{grid-column:2;grid-row:2}
  .line-row .line-total{grid-column:1/3;text-align:left;padding:2px 1px}
  .line-row .remove-line{grid-column:3;grid-row:1}
  .line-row select,.line-row input{height:36px;min-width:0;font-size:11px}
  .adjustment-fields{grid-template-columns:1fr;gap:10px}
  .doc-summary{width:100%}
  .toast-root{right:10px;bottom:calc(76px + env(safe-area-inset-bottom));left:10px}
  .toast{font-size:11px}
}
@media(max-width:380px){
  .page-content{padding-left:10px;padding-right:10px}
  .nav-item .nav-label{font-size:6.5px}
  .metric-card{padding:10px 8px}
  .metric-value{font-size:15px}
  .modal-body{padding:12px}
}
@media(max-width:720px){
  .mobile-menu{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;padding:0;border:1px solid #e8e8e8;border-radius:7px;background:#fff;color:#28292b}
  .mobile-menu svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
  .topbar{justify-content:flex-start}
  .breadcrumb{flex:1}
  .sidebar{inset:0 auto 0 0;width:min(300px,85vw);height:100vh;height:100dvh;padding:22px 14px 14px;display:flex;flex-direction:column;align-items:stretch;overflow-y:auto;overflow-x:hidden;border:0;border-right:1px solid #e8e8e8;box-shadow:8px 0 28px rgba(20,20,20,.12);transform:translateX(-105%);transition:transform .22s ease;z-index:5}
  .app-shell.nav-open .sidebar{transform:translateX(0)}
  .nav-backdrop{position:fixed;inset:0;width:100%;height:100%;padding:0;border:0;background:rgba(20,22,25,.43);z-index:4}
  .sidebar .brand{height:auto;min-height:42px;display:flex;justify-content:flex-start;padding:0 4px}
  .sidebar .brand-logo{display:block;width:100%;max-width:154px;height:auto}
  .sidebar .brand-mobile-mark{display:none}
  .sidebar .workspace-switch{height:58px;display:flex;justify-content:flex-start;margin:22px 3px 24px;padding:8px 10px}
  .sidebar .workspace-copy{display:flex}
  .sidebar .workspace-switch .chevron{display:block}
  .sidebar .nav-caption{display:block;font-size:9px;margin-bottom:9px}
  .sidebar .main-nav{width:100%;height:auto;display:flex;flex-direction:column;align-items:stretch;gap:3px}
  .sidebar .nav-item,.sidebar .nav-item.active{height:41px;min-width:0;flex:0 0 auto;flex-direction:row;justify-content:flex-start;align-items:center;gap:11px;padding:0 11px;text-align:left;font-size:12px}
  .sidebar .nav-item .nav-icon{width:19px;height:19px;flex:none}
  .sidebar .nav-item .nav-icon svg{width:18px;height:18px}
  .sidebar .nav-item .nav-label{display:inline;max-width:none;overflow:visible;text-overflow:clip;white-space:normal;font-size:12px;line-height:normal;letter-spacing:normal}
  .sidebar .nav-item .nav-count{display:grid;font-size:10px}
  .sidebar .nav-caption-spaced{display:block;margin-top:24px}
  .sidebar-bottom{display:block;margin-top:auto;padding-top:20px}
  .sidebar .tip-card{display:block}
  .sidebar .profile{display:flex;justify-content:flex-start;padding:14px 6px 0}
  .sidebar .profile-copy{display:flex}
  .sidebar .more-btn{display:block}
  .main-area{padding-bottom:0}
  .page-content{padding-bottom:35px}
}
body.theme-dark{color-scheme:dark;--ink:#eef0f3;--muted:#a2a7b0;--line:#363a41;--paper:#202328;--canvas:#141619;--teal:#f26322;--teal-dark:#d94e0e;--teal-soft:#38251d;--orange:#f26322;--orange-soft:#38251d;--shadow:0 14px 40px rgba(0,0,0,.34);background:var(--canvas);color:var(--ink)}
body.theme-dark .sidebar,body.theme-dark .topbar,body.theme-dark .panel,body.theme-dark .full-panel,body.theme-dark .metric-card,body.theme-dark .modal,body.theme-dark .auth-card,body.theme-dark .workspace-switch,body.theme-dark .line-items{background:#1e2126;border-color:var(--line);color:var(--ink)}
body.theme-dark .topbar{background:rgba(30,33,38,.96)}
body.theme-dark .sidebar{border-right-color:#30343a}
body.theme-dark .brand{color:var(--ink)}
body.theme-dark .workspace-switch{border-color:#363a41}
body.theme-dark .workspace-avatar,body.theme-dark .profile-avatar{background:#38251d;color:#ff8a55}
body.theme-dark .nav-item{color:#b3b8c0}
body.theme-dark .nav-item:hover{background:#292d33;color:#fff}
body.theme-dark .nav-item.active{background:#38251d;color:#ff8a55}
body.theme-dark .breadcrumb b,body.theme-dark .page-heading h1,body.theme-dark .panel-title,body.theme-dark .table-primary,body.theme-dark .modal-head h2{color:#f0f1f3}
body.theme-dark .breadcrumb,body.theme-dark .page-heading p,body.theme-dark .panel-subtitle,body.theme-dark .table-secondary,body.theme-dark .section-note{color:#a3a9b2}
body.theme-dark .profile-copy small,body.theme-dark .workspace-copy small{color:#969ca5}
body.theme-dark .table-toolbar{background:#1e2126;border-color:#34383e}
body.theme-dark th{background:#25292f;color:#b2b7bf;border-color:#383c43}
body.theme-dark td{background:#1e2126;color:#c6cad0;border-color:#34383e}
body.theme-dark tbody tr:hover td{background:#24282e}
body.theme-dark .search-box,body.theme-dark .filter-select,body.theme-dark .select-small,body.theme-dark .button:not(.primary):not(.danger),body.theme-dark .modal-close{background:#25292f;border-color:#3a3e45;color:#e5e7ea}
body.theme-dark .search-box input,body.theme-dark .field input,body.theme-dark .field select,body.theme-dark .field textarea,body.theme-dark .line-row input,body.theme-dark .line-row select,body.theme-dark .auth-field input{background:#171a1e;border-color:#3a3e45;color:#edf0f3}
body.theme-dark .field label,body.theme-dark .auth-field{color:#cbd0d7}
body.theme-dark .field input:focus,body.theme-dark .field select:focus,body.theme-dark .field textarea:focus,body.theme-dark .auth-field input:focus{border-color:#f26322;box-shadow:0 0 0 3px rgba(242,99,34,.16)}
body.theme-dark .form-hint,body.theme-dark .empty-state,body.theme-dark .metric-note{color:#a1a7b0}
body.theme-dark .tip-card{background:#22262b;border-color:#363a41}
body.theme-dark .tip-card p{color:#a8adb5}
body.theme-dark .status.paid{background:#18352f;color:#78c9b4}
body.theme-dark .status.pending{background:#392d1c;color:#edb86e}
body.theme-dark .status.overdue,body.theme-dark .status.rejected{background:#3a2222;color:#f08e89}
body.theme-dark .status.approved{background:#232d45;color:#9db3ff}
body.theme-dark .status.sent{background:#252d3a;color:#a7badf}
body.theme-dark .status.draft{background:#2a2d32;color:#bbc0c7}
body.theme-dark .status.partial{background:#38251d;color:#ff9a68}
body.theme-dark .metric-icon.green,body.theme-dark .metric-icon.orange{background:#38251d;color:#ff8a55}
body.theme-dark .metric-icon.blue{background:#292d33;color:#c1c7d1}
body.theme-dark .metric-icon.red{background:#3a2222;color:#f08e89}
body.theme-dark .doc-summary-row,body.theme-dark .doc-total{color:#b5bac2}
body.theme-dark .doc-summary-row b,body.theme-dark .doc-total b,body.theme-dark .doc-summary-row.final,body.theme-dark .doc-summary-row.final b{color:#f0f1f3}
body.theme-dark .doc-summary-row.final,body.theme-dark .modal-foot{border-color:#363a41}
body.theme-dark .line-head{background:#25292f;color:#b1b6be}
body.theme-dark .line-row{border-color:#363a41}
body.theme-dark .auth-screen{background:radial-gradient(ellipse at top right,#38251d 0,transparent 42%),#141619}
body.theme-dark .auth-description,body.theme-dark .auth-local-note{color:#a4aab2}
body.theme-dark .auth-eyebrow{color:#ff8a55}
body.theme-dark .auth-card h1{color:#f0f1f3}
body.theme-dark .auth-submit{background:#f26322;color:#fff}
body.theme-dark .mobile-menu{background:#25292f;color:#f0f1f3;border-color:#3a3e45}
body.theme-dark .due-alerts,body.theme-dark .settings-card{background:#1e2126;border-color:#363a41}
body.theme-dark .due-alert-row,body.theme-dark .settings-row{border-color:#363a41}
body.theme-dark .due-alert-copy small,body.theme-dark .settings-row small,body.theme-dark .settings-card-head p{color:#a4aab2}
body.theme-dark .settings-empty,body.theme-dark .due-alert-empty{color:#a4aab2}
@media(max-width:720px){body.theme-dark .sidebar{background:#1e2126;border-right-color:#363a41;border-top-color:#363a41}body.theme-dark .nav-backdrop{background:rgba(0,0,0,.62)}}
@media print{body.theme-dark .print-root,body.theme-dark .print-document{background:#fff!important;color:#252c35!important}body.theme-dark .print-table td{background:#fff!important;color:#364250!important}}
.status.partial{background:#fff0e8;color:#d94e0e}
.due-alerts{margin:0 0 16px;overflow:hidden}
.due-alert-list{padding:0 19px 12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:22px}
.due-alert-row,.settings-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 0;border-top:1px solid #edf0f2}
.due-alert-copy,.settings-row>div{min-width:0}
.due-alert-copy b,.settings-row b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:var(--ink)}
.due-alert-copy small,.settings-row small{display:block;margin-top:4px;color:#929ba6;font-size:9px;line-height:1.4}
.due-alert-value{text-align:right;flex:none}
.due-alert-value b{display:block;font-size:11px}
.due-alert-value span{display:block;margin-top:4px;font-size:9px;font-weight:700}
.due-alert-value .is-late{color:#c35959}
.due-alert-value .is-soon{color:#d28a39}
.due-alert-empty,.settings-empty{padding:12px 0;color:#929ba6;font-size:11px}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;align-items:start}
.settings-card{padding:18px;min-width:0}
.settings-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.settings-card-head h2{margin:0;color:var(--ink);font:700 14px 'Manrope',sans-serif}
.settings-card-head p{margin:5px 0 0;color:#8a94a1;font-size:10px;line-height:1.5}
.settings-form{display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin-bottom:14px}
.settings-form .field{flex:1 1 150px;min-width:0}
.settings-form .field>span{font-size:10px;font-weight:700;color:#566171}
.settings-form input,.settings-form select{height:35px;width:100%;border:1px solid #e3e8eb;border-radius:6px;padding:0 9px;background:#fff;color:#344153;font-size:11px}
.settings-form>.button{flex:none}
.settings-list{max-height:380px;overflow:auto}
.settings-row .button{flex:none}
@media(max-width:900px){.settings-grid{grid-template-columns:1fr}}
@media(max-width:720px){.due-alert-list{grid-template-columns:1fr;padding:0 13px 10px}.settings-card{padding:14px}.settings-card-head{flex-direction:column}.settings-card-head>.button{width:100%}.settings-form{display:grid;grid-template-columns:1fr;width:100%}.settings-form .field{width:100%}.settings-form>.button{width:100%}}
body[data-user-role="user"] .settings-row [data-action="restore-backup"]{display:none}
body.theme-dark .activity-row,body.theme-dark .receivable-row{border-color:#363a41}
body.theme-dark .activity-copy b,body.theme-dark .receivable-main b{color:#edf0f3}
body.theme-dark .activity-copy small,body.theme-dark .receivable-main small{color:#a1a7b0}
body.theme-dark .activity-mark.quote,body.theme-dark .activity-mark.invoice,body.theme-dark .activity-mark.payment{background:#2a2d33;color:#f7a276}
body.theme-dark .chart-grid{stroke:#363a41}
body.theme-dark .chart-label{fill:#a1a7b0}
body.theme-dark .view-all,body.theme-dark .add-line,body.theme-dark .text-link{color:#ff8a55}
body.theme-dark .empty-icon{background:#38251d;color:#ff8a55}
body.theme-dark .button.danger{background:#302224;border-color:#5a3336;color:#f08e89}
body.theme-dark .nav-caption{color:#858c96}
@media print{
  .print-table{width:100%;table-layout:fixed;white-space:normal}
  .print-table th,.print-table td{white-space:normal!important;overflow-wrap:anywhere;vertical-align:top}
  .print-table th:nth-child(1),.print-table td:nth-child(1){width:57%}
  .print-table th:nth-child(2),.print-table td:nth-child(2){width:9%;text-align:center}
  .print-table th:nth-child(3),.print-table td:nth-child(3){width:17%;text-align:right}
  .print-table th:nth-child(4),.print-table td:nth-child(4){width:17%;text-align:right}
}
body.theme-dark .metric-value{color:#f3f4f6}
body.theme-dark .metric-top{color:#c4c9d1}
body.theme-dark .metric-note .positive{color:#73d2b5}
body.theme-dark .top-user{color:#d0d4da}
body.theme-dark .nav-count{background:#343941;color:#e3e6ea}
body.theme-dark .workspace-copy b,body.theme-dark .profile-copy b{color:#edf0f3}
.report-filter{display:flex;gap:12px;align-items:end;padding:16px;margin-bottom:14px}
.report-filter .field{min-width:170px;margin:0}
.report-filter .field>span{display:block;margin-bottom:6px;color:var(--muted);font-size:11px}
.report-filter input{height:38px;border:1px solid var(--line);border-radius:7px;padding:0 10px;background:var(--surface-2);color:var(--ink)}
.report-metrics{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:14px}
.report-metrics .metric-value{font-size:20px}
.business-form textarea{width:100%;border:1px solid #e3e8eb;border-radius:6px;padding:9px;background:#fff;color:#344153;font:inherit;resize:vertical}
.business-form .field.full{flex-basis:100%}
.business-form .field>span{display:block;margin-bottom:6px}
.print-company{margin-top:5px;font-size:9px;line-height:1.45;color:#27313a}
.print-payment{margin:18px 0 8px;padding:12px;border:1px solid #d8dde1;border-radius:5px;font-size:11px;line-height:1.55;break-inside:avoid}
.print-payment p{margin:4px 0}
body.theme-dark .business-form textarea{border-color:#3b4149;background:#17191d;color:#edf0f3}
body.theme-dark .report-filter input{border-color:#3a4048;background:#17191d;color:#edf0f3;color-scheme:dark}
body.theme-dark .report-filter .field>span{color:#c2c7cf}
@media(max-width:800px){.report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.report-filter{align-items:stretch;flex-direction:column}.report-filter .field{min-width:0;width:100%}.report-filter input{width:100%}.report-metrics{grid-template-columns:1fr}.report-metrics .metric-value{font-size:18px}}
.files-upload{padding:18px;margin-bottom:15px}
.files-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:end}
.files-form .field{min-width:0;margin:0}
.files-form .field>span{display:block;margin-bottom:6px;color:var(--muted);font-size:11px;font-weight:700}
.files-form select,.files-form input:not([type=file]){height:38px;width:100%;border:1px solid var(--line);border-radius:7px;padding:0 10px;background:var(--surface-2);color:var(--ink)}
.files-form input[type=file]{width:100%;min-height:38px;color:var(--ink);font-size:11px}
.files-form>.button{min-height:38px}
.files-help{grid-column:1/-1;margin:0;color:var(--muted)}
.files-picker{grid-column:span 2}
.files-panel{min-width:0}
.files-slot .table-primary{overflow-wrap:anywhere}
.files-empty{padding:25px 14px;color:var(--muted);font-size:12px;text-align:center}
body[data-user-role="user"] .files-slot [data-action="delete-file"]{display:none}
body.theme-dark .files-form select,body.theme-dark .files-form input:not([type=file]){border-color:#3a4048;background:#17191d;color:#edf0f3;color-scheme:dark}
body.theme-dark .files-form input[type=file]{color:#d9dde2}
@media(max-width:800px){.files-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.files-upload{padding:14px}.files-form{grid-template-columns:1fr}.files-form .field,.files-picker{grid-column:1;width:100%}.files-form>.button{width:100%}.files-help{grid-column:1}}
.file-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:14px}
.file-card{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:11px;background:var(--paper);box-shadow:0 5px 18px rgba(0,0,0,.08);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.file-card:hover{transform:translateY(-2px);border-color:rgba(242,99,34,.42);box-shadow:0 10px 26px rgba(0,0,0,.14)}
.file-art{position:relative;display:grid;place-items:center;width:100%;height:126px;border:0;border-bottom:1px solid var(--line);background:linear-gradient(135deg,#25282d,#1b1d21);color:#f26322}
.file-art svg{width:48px;height:56px;fill:none;stroke:#ff8a55;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.file-art span{position:absolute;left:calc(50% - 8px);top:61px;padding:2px 5px;border-radius:3px;background:#f26322;color:#fff;font-size:8px;font-weight:800;letter-spacing:.5px}
.file-art i{position:absolute;right:10px;bottom:9px;color:#bcc2ca;font-size:10px;font-style:normal;opacity:0;transition:opacity .15s ease}
.file-card:hover .file-art i,.file-art:focus-visible i{opacity:1}
.file-card-body{padding:13px}
.file-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.file-category{display:inline-flex;align-items:center;min-height:22px;padding:3px 8px;border-radius:20px;background:#303239;color:#e9edf1;font-size:9px;font-weight:700}
.file-category.das{background:#39271f;color:#ffad7e}
.file-category.invoice{background:#292f39;color:#b8c7ff}
.file-size{color:var(--muted);font-size:10px;white-space:nowrap}
.file-card h3{min-height:36px;margin:10px 0 5px;color:var(--ink);font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.file-card-date,.file-card-client{margin:0;color:var(--muted);font-size:10px;line-height:1.5}
.file-card-client{min-height:16px;margin-top:3px}
.file-card-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.file-card-actions .button{min-height:30px;padding:0 9px;font-size:10px}
.file-preview-backdrop{z-index:21}
.modal.file-preview-modal{display:flex;flex-direction:column;width:min(1000px,calc(100vw - 36px));max-height:calc(100dvh - 32px);overflow:hidden;background:#202329;border:1px solid #3b4048}
.file-preview-modal .modal-head{flex:none;padding:14px 18px;border-color:#3b4048}
.file-preview-kicker{margin:0 0 4px;color:#ff8a55;font-size:9px;font-weight:800;letter-spacing:1px}
.file-preview-modal .modal-head h2{max-width:min(75vw,820px);margin:0;color:#f1f3f5;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.file-preview-modal .modal-head>div>p:last-child{margin:5px 0 0;color:#adb3bc;font-size:10px}
.file-preview-stage{flex:1;min-height:180px;background:#34373d;overflow:hidden}
.file-preview-stage iframe{display:block;width:100%;height:min(72vh,820px);border:0;background:#34373d}
.file-preview-foot{display:flex;flex:none;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid #3b4048;color:#aeb4bd;font-size:10px}
.file-preview-foot>div{display:flex;gap:8px}
body.theme-dark .file-card{border-color:#363b43;background:#202329;box-shadow:0 5px 18px rgba(0,0,0,.15)}
body.theme-dark .file-card:hover{border-color:#9a5637}
body.theme-dark .file-card h3{color:#eff1f4}
@media(max-width:1050px){.file-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.file-grid{grid-template-columns:1fr;gap:10px;padding:10px}.file-card{display:grid;grid-template-columns:90px minmax(0,1fr)}.file-art{height:100%;min-height:150px;border-right:1px solid var(--line);border-bottom:0}.file-art svg{width:40px}.file-art span{top:calc(50% + 5px)}.file-art i{display:none}.file-card-body{padding:11px}.file-card h3{min-height:0;font-size:11px}.file-card-actions .button{min-height:29px;padding:0 8px;font-size:9px}.modal.file-preview-modal{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.file-preview-modal .modal-head{padding:11px 13px}.file-preview-stage{min-height:140px}.file-preview-stage iframe{height:68vh}.file-preview-foot{align-items:flex-start;flex-direction:column;padding:9px 12px}.file-preview-foot>div{width:100%}.file-preview-foot .button{flex:1;justify-content:center}}

@media print{
  @page{size:A4;margin:14mm}
  html,body{background:#fff!important}
  .print-root{display:block!important;font-family:Arial,Helvetica,sans-serif;color:#24272c;background:#fff}
  .print-document{width:100%;max-width:none;margin:0;font-size:10pt;line-height:1.45;color:#24272c}
  .print-top{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:0 0 18px;padding:0 0 14px;border-bottom:2px solid #f26322}
  .print-brand{display:flex;align-items:flex-start;gap:14px;min-width:0;color:#24272c;font-size:10pt;letter-spacing:0}
  .print-brand img{display:block;width:150px;height:auto;max-height:64px;object-fit:contain;object-position:left top}
  .print-company{min-width:0;padding-top:2px;color:#555b63;font-size:8.5pt;line-height:1.45;overflow-wrap:anywhere}
  .print-company>b{display:block;margin-bottom:4px;color:#24272c;font-size:11pt}
  .print-company-details{display:grid;gap:2px}
  .print-company-details div{display:flex;gap:4px}
  .print-company-details span,.print-info-details span{color:#777e87}
  .print-company-details b{font-weight:400}
  .print-type{flex:none;min-width:170px;text-align:right;color:#666d76;font-size:9pt;line-height:1.4}
  .print-kicker{display:block;margin-bottom:2px;color:#e65a1b;font-size:8pt;font-weight:700;letter-spacing:.8px;text-transform:uppercase}
  .print-type strong{display:block;margin:0 0 5px;color:#24272c;font-size:17pt;line-height:1.2;overflow-wrap:anywhere}
  .print-doc-status{display:inline-block;padding:3px 8px;border:1px solid #e4e5e7;border-radius:20px;color:#4d535b;font-size:8pt;font-weight:700}
  .print-status-paid{border-color:#b9dfcf;background:#eff8f3;color:#23734e}
  .print-info-grid{display:grid;grid-template-columns:1.35fr .85fr;gap:11px;margin:0 0 17px;break-inside:avoid;page-break-inside:avoid}
  .print-info-card{min-width:0;padding:11px 13px;border:1px solid #e7e8ea;border-radius:6px;background:#fafafa}
  .print-section-title{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 7px;padding-bottom:6px;border-bottom:1px solid #e6e7e9;color:#e65a1b;font-size:8pt;font-weight:700;letter-spacing:.6px;text-transform:uppercase}
  .print-section-title small{color:#777e87;font-size:7.5pt;font-weight:400;letter-spacing:0;text-transform:none}
  .print-info-card h2,.print-receipt-intro h2{margin:0 0 6px;color:#24272c;font-size:12pt;line-height:1.3;overflow-wrap:anywhere}
  .print-info-details{display:grid;gap:3px;color:#454b53;font-size:8.5pt;line-height:1.4}
  .print-info-details div,.print-doc-details>div,.print-receipt-details>div{display:flex;justify-content:space-between;gap:12px;align-items:baseline}
  .print-info-details b,.print-doc-details b,.print-receipt-details b{color:#2b3036;font-weight:600;text-align:right;overflow-wrap:anywhere}
  .print-doc-details{display:grid;align-content:start;gap:7px;color:#777e87;font-size:8.5pt}
  .print-doc-details .print-section-title{display:block}
  .print-table{width:100%;margin:0 0 12px;border-collapse:collapse;table-layout:fixed;white-space:normal}
  .print-table thead{display:table-header-group}
  .print-table tr{break-inside:avoid;page-break-inside:avoid}
  .print-table th,.print-table td{padding:8px 9px;white-space:normal!important;vertical-align:top;overflow-wrap:anywhere}
  .print-table th{border-bottom:1px solid #dfe1e4;background:#f3f4f5!important;color:#555b63;font-size:8pt;text-transform:uppercase;letter-spacing:.35px}
  .print-table td{border-bottom:1px solid #e9eaec;background:#fff!important;color:#343a42;font-size:9pt;line-height:1.4}
  .print-table tbody tr:nth-child(even) td{background:#fafafa!important}
  .print-table th:nth-child(1),.print-table td:nth-child(1){width:52%;text-align:left}
  .print-table th:nth-child(2),.print-table td:nth-child(2){width:10%;text-align:center}
  .print-table th:nth-child(3),.print-table td:nth-child(3){width:19%;text-align:right}
  .print-table th:nth-child(4),.print-table td:nth-child(4){width:19%;text-align:right}
  .print-table .print-item-name{font-weight:600}
  .print-table .print-number,.print-table .print-money{white-space:nowrap!important}
  .print-table .print-line-total{font-weight:700}
  .print-summary{width:250px;max-width:100%;margin:0 0 14px auto;break-inside:avoid;page-break-inside:avoid}
  .print-summary>div{display:flex;justify-content:space-between;gap:15px;padding:4px 0;color:#555b63;font-size:9pt}
  .print-summary .print-summary-adjustment{color:#d94e0e}
  .print-summary .grand{margin-top:5px;padding:9px 0 0;border-top:1px solid #dfe1e4;color:#24272c;font-size:10pt;font-weight:700}
  .print-summary .grand span:last-child{color:#e65a1b;font-size:14pt}
  .print-payment{margin:12px 0;padding:11px 13px;border:1px solid #f1d5c6;border-left:3px solid #f26322;border-radius:5px;background:#fffaf7;break-inside:avoid;page-break-inside:avoid}
  .print-payment-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;color:#777e87;font-size:8.5pt}
  .print-payment-grid>div{display:flex;flex-direction:column;gap:2px;min-width:0}
  .print-payment-grid b{color:#2b3036;font-weight:600;overflow-wrap:anywhere}
  .print-payment-wide{grid-column:1/-1}
  .print-pix{display:grid;grid-template-columns:46mm minmax(0,1fr);align-items:center;gap:12px;margin-top:10px;padding-top:10px;border-top:1px dashed #e9cdbd;break-inside:avoid;page-break-inside:avoid}
  .print-pix-qr{display:grid;place-items:center;padding:0;background:#fff}
  .print-pix-qr svg{display:block;width:44mm;height:44mm;shape-rendering:crispEdges}
  .print-pix-copy{display:flex;flex-direction:column;gap:4px;min-width:0;color:#777e87;font-size:8.5pt}
  .print-pix-copy>b{color:#24272c;font-size:10pt}
  .print-pix-copy>strong{margin-top:3px;color:#e65a1b;font-size:8pt}
  .print-pix-copy code{color:#444a52;font-family:Consolas,monospace;font-size:7pt;line-height:1.35;overflow-wrap:anywhere;word-break:break-all}
  .print-note{margin:12px 0 0;padding:10px 12px;border:1px solid #e7e8ea;border-radius:5px;color:#555b63;font-size:9pt;line-height:1.5;break-inside:avoid;page-break-inside:avoid}
  .print-note>b{display:block;margin-bottom:4px;color:#24272c;font-size:9pt}
  .print-note p{margin:0;overflow-wrap:anywhere}
  .print-footer{display:flex;justify-content:space-between;gap:12px;margin-top:24px;padding-top:8px;border-top:1px solid #e4e5e7;color:#858b93;font-size:7.5pt;break-inside:avoid;page-break-inside:avoid}
  .print-receipt-intro{margin:24px 0 14px;padding:17px 19px;border:1px solid #f1d5c6;border-left:4px solid #f26322;border-radius:6px;background:#fffaf7;break-inside:avoid;page-break-inside:avoid}
  .print-receipt-intro>span{display:block;margin-bottom:5px;color:#777e87;font-size:9pt}
  .print-receipt-intro h2{margin-bottom:4px}
  .print-receipt-intro>p{margin:4px 0;color:#555b63;font-size:9pt;line-height:1.5}
  .print-receipt-amount{margin:12px 0 7px;color:#e65a1b;font-size:22pt;font-weight:700;letter-spacing:-.4px}
  .print-receipt-details{display:grid;gap:8px;margin-top:14px;color:#777e87;font-size:9pt;break-inside:avoid;page-break-inside:avoid}
  .print-receipt-details .print-section-title{display:block}
  .print-receipt-note{padding-top:7px;border-top:1px solid #e6e7e9}
  .print-signature{width:250px;max-width:80%;margin:65px 0 0;padding-top:8px;border-top:1px solid #9298a0;color:#777e87;text-align:center;font-size:8pt;break-inside:avoid;page-break-inside:avoid}
  body.theme-dark .print-root,body.theme-dark .print-document{background:#fff!important;color:#24272c!important}
}

/* Improve readability in document and other edit dialogs. */
.modal-head h2{font-size:18px}
.modal-head p{font-size:12px}
.modal .field label{font-size:12px}
.modal .field input,.modal .field select,.modal .field textarea{font-size:13px}
.line-head{font-size:10px}
.line-row select,.line-row input{height:36px;font-size:12px;padding:0 7px}
.line-total{font-size:12px}
.modal-foot .button{font-size:12px}
.doc-summary-row{font-size:13px}
.doc-summary-row b{font-size:13px}
.doc-summary-row.final{font-size:14px}
.doc-summary-row.final b{font-size:20px}

/* Bring the compact dashboard lists up to the same readable scale. */
.activity-copy b,.activity-amount,.receivable-main b,.receivable-value{font-size:12px}
.activity-copy small,.activity-amount small,.receivable-main small,.receivable-value small{font-size:11px}
@media(max-width:720px){.line-row select,.line-row input{font-size:13px}.line-total{font-size:13px}}

/* Service progress and customer access management. */
.service-create-panel{margin-bottom:22px;padding:20px}
.invoice-publish-note{margin:0;padding:13px 16px;color:var(--text-secondary,#c4c8ce);font-size:12px;border-bottom:1px solid var(--border,#353941)}
.service-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px;align-items:end}
.service-form .field,.service-update-form .field{display:grid;gap:7px;min-width:0;margin:0}
.service-form .field>span,.service-update-form .field>span{font-size:12px;font-weight:600;color:var(--text-secondary,#aeb4bd)}
.service-form input,.service-form select,.service-form textarea,.service-update-form select,.service-update-form textarea{width:100%;min-height:40px;border:1px solid var(--border,#3b4048);border-radius:7px;background:var(--surface-2,#191b1f);color:var(--text-primary,#f3f4f5);padding:9px 11px;font:inherit}
.service-form textarea,.service-update-form textarea{resize:vertical}
.service-form .full,.service-update-form .full{grid-column:1/-1}
.service-check{display:flex;align-items:center;gap:9px;color:var(--text-secondary,#bfc4cc);font-size:12px;grid-column:1/-1}
.service-check input{accent-color:#f26322;width:16px;height:16px}
.service-portal-admin,.service-record-list{margin:24px 0}
.service-portal-admin>.panel-head,.service-record-list>.panel-head{margin-bottom:12px}
.portal-account-list{margin-top:15px}
.service-portal-link{margin:14px 0 0;color:var(--text-secondary,#aeb4bd);font-size:12px;overflow-wrap:anywhere}
.service-portal-link a{color:#ff7a40}
.service-record{padding:19px;margin-bottom:13px}
.service-record-top{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}
.service-client{color:#ff7a40;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.service-record h3{margin:3px 0 0;font-size:17px}
.service-record-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:17px 0;padding:14px 0;border-top:1px solid var(--border,#353941);border-bottom:1px solid var(--border,#353941)}
.service-record-columns b{font-size:12px}.service-record-columns p{margin:6px 0;color:var(--text-secondary,#c2c7cf);font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.service-record-columns small{color:var(--text-secondary,#aeb4bd);white-space:pre-wrap}
.service-published{color:#53d2ad}
.service-update-form{display:grid;grid-template-columns:minmax(180px,.55fr) 1.45fr;gap:12px 15px;align-items:end}
.service-update-form .button{justify-self:start}
.service-history{margin-top:16px;color:var(--text-secondary,#aeb4bd);font-size:12px}
.service-history summary{cursor:pointer}.service-history ul{padding-left:20px}.service-history li{padding:6px 0;overflow-wrap:anywhere}
.service-edit{margin-top:11px;color:var(--text-secondary,#aeb4bd);font-size:12px}.service-edit summary{cursor:pointer}.service-edit-form{display:grid;gap:10px;margin-top:10px}
@media(max-width:720px){.service-form,.service-record-columns,.service-update-form{grid-template-columns:1fr}.service-form .full,.service-update-form .full,.service-check{grid-column:auto}.service-record-top{align-items:flex-start}.service-record h3{font-size:15px}.service-create-panel{padding:15px}}
