:root{--bg: #faf9f7;--surface: #ffffff;--surface-2: #f4f2ee;--hairline: #e7e2d9;--hairline-strong: #d8d2c6;--text: #1c1a17;--text-2: #5f5a51;--text-3: #7d766b;--accent: #1a6b4a;--accent-soft: #e9f2ec;--accent-strong: #14573d;--accent-ring: rgba(26, 107, 74, .18);--danger: #b3452f;--danger-soft: #fbeae6;--warn: #8a5c14;--warn-soft: #f8efdc;--radius: 12px;--radius-sm: 8px;--radius-xs: 6px;--shadow: 0 1px 2px rgba(28, 26, 23, .04);--shadow-float: 0 8px 24px rgba(28, 26, 23, .1), 0 1px 2px rgba(28, 26, 23, .06);--border: var(--hairline);--muted: var(--text-3);--ease: cubic-bezier(.22, 1, .36, 1);--fast: .14s;--font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Inter", Roboto, "Noto Sans", sans-serif;--font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "IBM Plex Mono", Menlo, Consolas, monospace}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%}body{font-family:var(--font-ui);font-size:14px;line-height:1.5;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;caret-color:var(--accent)}::selection{background:var(--accent-soft);color:var(--accent-strong)}a{color:var(--accent-strong);text-underline-offset:3px}h1,h2,h3{text-wrap:balance}:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--radius-xs)}*{scrollbar-width:thin;scrollbar-color:var(--hairline-strong) transparent}button:disabled,.btn[aria-disabled=true]{opacity:.55;cursor:not-allowed}.shell{display:flex;min-height:100vh}.sidebar{width:240px;flex-shrink:0;background:var(--surface);border-right:1px solid var(--hairline);padding:20px 12px 24px;display:flex;flex-direction:column;gap:2px;position:sticky;top:0;height:100vh;overflow-y:auto}.sidebar>*{flex-shrink:0}.sidebar-brand{display:flex;align-items:center;gap:12px;padding:4px 8px 16px;min-width:0}.sidebar-brand>div{min-width:0}.sidebar-brand .brand-mark{width:32px;height:32px;border-radius:var(--radius-sm);background:var(--accent);color:#fff;font-weight:600;font-size:14px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.sidebar-brand img.brand-mark{background:var(--surface-2);border:1px solid var(--hairline);padding:2px}.sidebar-brand .brand-name{font-weight:600;font-size:14px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-brand .brand-sub{font-size:12px;line-height:16px;color:var(--text-3)}.nav-section{font-size:12px;font-weight:500;color:var(--text-3);padding:20px 12px 4px}.nav-link{display:flex;align-items:center;gap:10px;height:34px;padding:0 12px;border-radius:var(--radius-sm);color:var(--text-2);text-decoration:none;font-size:14px;font-weight:400;transition:background-color var(--fast) var(--ease),color var(--fast) var(--ease)}.nav-link:hover{background:var(--surface-2);color:var(--text)}.nav-link.active{background:var(--accent-soft);color:var(--accent-strong);font-weight:500}.nav-link svg{width:16px;height:16px;flex-shrink:0;color:var(--text-3);transition:color var(--fast) var(--ease)}.nav-link:hover svg{color:var(--text-2)}.nav-link.active svg{color:var(--accent)}.main{flex:1;min-width:0;padding:32px 32px 64px;max-width:1440px;animation:page-in .32s var(--ease) backwards}@keyframes page-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:24px;flex-wrap:wrap}.page-head>div:first-child{min-width:0}.page-head h1{font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.015em;overflow-wrap:anywhere}.page-head h1 a{color:var(--text-3);font-weight:400;text-decoration:none}.page-head h1 a:hover{color:var(--accent-strong)}.page-head .sub,.page-head>div>p.muted{color:var(--text-3);font-size:13px;margin-top:4px}.head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.btn-group{display:inline-flex}.btn-group .btn{border-radius:0;margin-left:-1px}.btn-group .btn:first-child{border-radius:var(--radius-sm) 0 0 var(--radius-sm);margin-left:0}.btn-group .btn:last-child{border-radius:0 var(--radius-sm) var(--radius-sm) 0}.btn-group .btn:hover,.btn-group .btn:focus-visible{position:relative;z-index:1}.head-divider{width:1px;height:20px;background:var(--hairline-strong);margin:0 4px}.breadcrumb{font-size:13px;color:var(--text-3);margin-bottom:4px}.breadcrumb a{color:var(--text-3);text-decoration:none}.breadcrumb a:hover{color:var(--accent-strong)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:34px;padding:0 14px;border-radius:var(--radius-sm);border:1px solid var(--hairline-strong);background:var(--surface);color:var(--text);font-family:var(--font-ui);font-size:13px;font-weight:500;cursor:pointer;transition:background-color var(--fast) var(--ease),border-color var(--fast) var(--ease),color var(--fast) var(--ease),transform var(--fast) var(--ease);text-decoration:none;white-space:nowrap}.btn:hover{background:var(--surface-2)}.btn:active:not(:disabled){transform:scale(.98)}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:hover{background:var(--accent-strong);border-color:var(--accent-strong)}.btn.ghost{border-color:transparent;background:transparent;color:var(--text-2)}.btn.ghost:hover{background:var(--surface-2);color:var(--text)}.btn.ghost.active{background:var(--surface-2);color:var(--text);border-color:var(--hairline)}.btn.danger{color:var(--danger);border-color:transparent;background:transparent}.btn.danger:hover{background:var(--danger-soft)}.btn.sm,.btn.small,.btn.icon{height:28px;padding:0 10px;font-size:12px}.row-actions{white-space:nowrap;text-align:right}.row-actions .btn+.btn{margin-left:4px}.card{background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius);box-shadow:var(--shadow);min-width:0}.card+.card{margin-top:16px}.card-pad{padding:20px 24px}.card-title,.card>h3,.card-pad>h3{font-size:14px;line-height:20px;font-weight:600;color:var(--text);margin-bottom:12px}.card>h3{padding:20px 24px 0}.card>p.muted{padding:0 24px 20px}.label-sm{font-size:12px;color:var(--text-3);margin-bottom:4px}.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}.grid-2>.card+.card{margin-top:0}.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:16px}.stat,.stat-card{background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius);padding:16px 20px;box-shadow:var(--shadow);min-width:0}.stat .label,.stat-card .label{font-size:13px;font-weight:400;color:var(--text-2);margin-bottom:8px}.stat .value,.stat-card .value{font-family:var(--font-mono);font-size:22px;line-height:28px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stat .value.pos{color:var(--accent-strong)}.stat .value.neg{color:var(--danger)}.stat .meta{font-size:12px;color:var(--text-3);margin-top:4px}.chart-head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px}.chart-legend{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:12px;color:var(--text-2)}.chart-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:6px;vertical-align:1px}.chart svg text{font-family:var(--font-mono);font-variant-numeric:tabular-nums}.chart .bar{transition:opacity var(--fast) var(--ease)}.chart g:hover .bar{opacity:.8}.share-bar{display:flex;gap:2px;height:12px;border-radius:4px;overflow:hidden;background:var(--surface-2)}.share-bar>span{display:block;height:100%}.share-legend{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px 24px;margin-top:16px}.share-legend div{display:flex;white-space:nowrap;justify-content:space-between;gap:8px;font-size:13px;color:var(--text-2)}.share-legend .num{font-family:var(--font-mono);font-variant-numeric:tabular-nums;color:var(--text)}.share-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:8px}.table-wrap{overflow-x:auto}.table-wrap>table{min-width:560px}table{width:100%;border-collapse:collapse}th{font-size:12px;font-weight:500;color:var(--text-3);text-align:left;padding:10px 16px;border-bottom:1px solid var(--hairline);white-space:nowrap;background:var(--surface)}td{padding:12px 16px;border-bottom:1px solid var(--hairline);font-size:14px;vertical-align:middle;overflow-wrap:anywhere}tbody tr:last-child td{border-bottom:none}tbody tr{transition:background-color var(--fast) var(--ease)}tbody tr:hover{background:var(--bg)}td.num,th.num{text-align:right;font-family:var(--font-mono);font-variant-numeric:tabular-nums;white-space:nowrap;overflow-wrap:normal}th.num{font-family:var(--font-ui)}td.num{font-size:13px}.strong,td.strong{font-weight:600;color:var(--text)}tr.total-row td{border-top:1px solid var(--hairline-strong);font-weight:600}.doc-link{color:var(--accent-strong);font-family:var(--font-mono);font-size:13px;text-decoration:none;font-weight:500;white-space:nowrap}.doc-link:hover{text-decoration:underline}.cell-muted{color:var(--text-3)}.tabs{display:flex;gap:4px;border-bottom:1px solid var(--hairline);margin-bottom:24px;overflow-x:auto}.tab{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:none;font:inherit;font-size:14px;color:var(--text-2);padding:8px 12px 10px;border-bottom:2px solid transparent;margin-bottom:-1px;cursor:pointer;white-space:nowrap;transition:color var(--fast) var(--ease),border-color var(--fast) var(--ease)}.tab:hover{color:var(--text)}.tab.active{color:var(--text);font-weight:500;border-bottom-color:var(--accent)}.pill,.badge{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 8px;border-radius:var(--radius-xs);font-size:12px;font-weight:500;white-space:nowrap;background:var(--surface-2);color:var(--text-2)}.pill:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.7}.pill.Draft,.pill.Converted,.pill.Void{background:var(--surface-2);color:var(--text-2)}.pill.Sent,.pill.Partial,.pill.Pending{background:var(--warn-soft);color:var(--warn)}.pill.Paid,.pill.Approved,.pill.Accepted,.pill.Active,.pill.Open,.badge.status-Paid{background:var(--accent-soft);color:var(--accent-strong)}.pill.Overdue,.pill.Declined,.pill.Rejected{background:var(--danger-soft);color:var(--danger)}.field,.form-field{display:flex;flex-direction:column;gap:6px;min-width:0}.field label,.form-field label{font-size:13px;font-weight:500;color:var(--text-2)}.field input,.field select,.field textarea,.form-field input,.form-field select,.form-field textarea{font-family:var(--font-ui);font-size:14px;color:var(--text);background:var(--surface);border:1px solid var(--hairline-strong);border-radius:var(--radius-sm);padding:0 12px;height:36px;outline:none;transition:border-color var(--fast) var(--ease),box-shadow var(--fast) var(--ease);width:100%}.field textarea,.form-field textarea{height:auto;padding:8px 12px;resize:vertical;min-height:72px;line-height:1.5}.field input[type=file],.form-field input[type=file]{padding:6px 8px;height:auto}.field input[type=checkbox],.form-field input[type=checkbox]{width:auto;height:auto}.field input:focus,.field select:focus,.field textarea:focus,.form-field input:focus,.form-field select:focus,.form-field textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.field input:invalid:not(:placeholder-shown),.form-field input:invalid:not(:placeholder-shown){border-color:var(--danger)}::placeholder{color:var(--text-3);opacity:1}.field .hint,.form-field .hint{font-size:12px;color:var(--text-3)}.form-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.form-grid.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.form-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.form-grid.cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.form-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.items-editor{border:1px solid var(--hairline);border-radius:var(--radius-sm);overflow:hidden}.items-editor .item-row{display:grid;grid-template-columns:minmax(0,1fr) 88px 120px 72px 120px 32px;gap:8px;padding:8px 12px;border-bottom:1px solid var(--hairline);align-items:center}.items-editor .item-row:last-child{border-bottom:none}.items-editor .item-head{background:var(--surface-2);font-size:12px;font-weight:500;color:var(--text-3);padding:8px 12px}.items-editor input,.items-editor select{width:100%;font-family:var(--font-ui);font-size:14px;height:34px;border:1px solid var(--hairline-strong);border-radius:var(--radius-xs);padding:0 8px;outline:none;background:var(--surface);color:var(--text);transition:border-color var(--fast) var(--ease),box-shadow var(--fast) var(--ease)}.items-editor input:focus,.items-editor select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.items-editor input.num{font-family:var(--font-mono);font-variant-numeric:tabular-nums;text-align:right}.items-editor .item-total{font-family:var(--font-mono);font-variant-numeric:tabular-nums;text-align:right;font-size:13px;color:var(--text-2)}.item-remove,.btn-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:14px;border-radius:var(--radius-xs);line-height:1;transition:background-color var(--fast) var(--ease),color var(--fast) var(--ease)}.item-remove:hover,.btn-icon:hover{background:var(--danger-soft);color:var(--danger)}.items-head{display:grid;grid-template-columns:minmax(0,1fr) 72px 96px 76px 96px 28px;gap:8px;font-size:12px;font-weight:500;color:var(--text-3);padding:0 8px 8px;border-bottom:1px solid var(--hairline)}.items-row{display:grid;grid-template-columns:minmax(0,1fr) 72px 96px 76px 96px 28px;gap:8px;align-items:center;padding:8px;border-bottom:1px solid var(--hairline)}.items-row:last-child{border-bottom:none}.items-row input,.items-row select{width:100%;height:34px;padding:0 8px;border:1px solid var(--hairline-strong);border-radius:var(--radius-xs);background:var(--surface);font:inherit;font-size:14px;color:var(--text)}.items-row input:focus,.items-row select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.items-amount{font-family:var(--font-mono);font-variant-numeric:tabular-nums;text-align:right;font-size:13px}.items-total,.totals-grand{display:flex;justify-content:space-between;padding:12px 8px 0;font-size:15px;font-weight:600;border-top:1px solid var(--hairline-strong);margin-top:4px}.items-total span:last-child,.totals-grand span:last-child{font-family:var(--font-mono);font-variant-numeric:tabular-nums}.btn-link{background:none;border:none;color:var(--accent-strong);font:inherit;font-size:13px;font-weight:500;cursor:pointer;padding:8px 8px 0}.btn-link:hover{text-decoration:underline}.totals-block{margin-left:auto;width:100%;max-width:320px}.totals-block .row{display:flex;justify-content:space-between;gap:16px;padding:4px 0;font-size:14px;color:var(--text-2)}.totals-block .row .num{font-family:var(--font-mono);font-variant-numeric:tabular-nums;color:var(--text)}.totals-block .row.grand{border-top:1px solid var(--hairline-strong);margin-top:8px;padding-top:12px;color:var(--text);font-weight:600;font-size:16px}.totals-block .row.grand .num{font-size:16px;color:var(--text)}.totals-block .row.due{color:var(--text);font-weight:500}.totals-block .row.due .num{color:var(--accent-strong)}.empty{text-align:center;padding:48px 24px;color:var(--text-3)}.empty .empty-title{font-size:14px;font-weight:500;color:var(--text-2);margin-bottom:4px}.loading{display:flex;align-items:center;gap:10px;padding:48px 0;color:var(--text-3);font-size:13px}.loading:before{content:"";width:14px;height:14px;border:2px solid var(--hairline-strong);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.error-banner,.error-state{background:var(--danger-soft);color:var(--danger);border:1px solid rgba(179,69,47,.18);border-radius:var(--radius-sm);padding:12px 16px;font-size:13px;margin-bottom:16px}.error-state{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.error-state strong{font-weight:600;display:block;margin-bottom:2px}pre.result{font-family:var(--font-mono);font-size:12px;background:var(--surface-2);border:1px solid var(--hairline);border-radius:var(--radius-sm);padding:12px 16px;overflow:auto;max-height:360px;margin-top:16px}.toolbar{display:flex;gap:8px;align-items:center;margin-bottom:16px;flex-wrap:wrap}.toolbar input,.toolbar select{font-family:var(--font-ui);font-size:14px;height:34px;border:1px solid var(--hairline-strong);border-radius:var(--radius-sm);padding:0 12px;outline:none;background:var(--surface);color:var(--text);transition:border-color var(--fast) var(--ease),box-shadow var(--fast) var(--ease)}.toolbar input:focus,.toolbar select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.toast-region{position:fixed;bottom:24px;right:24px;z-index:100;display:flex;flex-direction:column;gap:8px;max-width:min(420px,calc(100vw - 48px))}.toast{display:flex;align-items:flex-start;gap:12px;background:var(--text);color:var(--bg);padding:12px 16px;border-radius:var(--radius-sm);font-size:14px;box-shadow:var(--shadow-float);animation:toast-in .22s var(--ease) both}.toast.error{background:#6e2617;color:#fff}.toast button{margin-left:auto;background:none;border:none;color:inherit;opacity:.7;cursor:pointer;font:inherit;line-height:1;padding:2px}.toast button:hover{opacity:1}@keyframes toast-in{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.currency-chip{display:inline-flex;align-items:center;gap:6px;font-family:var(--font-mono);font-size:12px;color:var(--text-2);background:var(--surface-2);border:1px solid var(--hairline);border-radius:var(--radius-xs);padding:2px 8px}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#1c1a175c;display:flex;align-items:center;justify-content:center;z-index:50;padding:24px;animation:fade-in .18s var(--ease) both}.modal{background:var(--surface);border-radius:var(--radius);border:1px solid var(--hairline);box-shadow:var(--shadow-float);width:100%;max-width:480px;max-height:90vh;overflow:auto;padding:24px;animation:toast-in .22s var(--ease) both}.modal h3{font-size:16px;font-weight:600;margin-bottom:4px}.modal .modal-sub{font-size:13px;color:var(--text-3);margin-bottom:16px}.modal .modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.muted{color:var(--text-2)}.mono{font-family:var(--font-mono);font-variant-numeric:tabular-nums}.page{min-width:0}@media (max-width: 1100px){.form-grid.cols-4,.form-grid.cols-5{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 960px){.sidebar{width:64px;padding:16px 8px}.sidebar-brand{justify-content:center;padding:4px 0 12px}.sidebar-brand .brand-name,.sidebar-brand .brand-sub,.nav-link span{display:none}.nav-section{font-size:0;padding:12px 0 4px;border-top:1px solid var(--hairline);margin:8px 8px 0}.nav-link{justify-content:center;padding:0}.main{padding:24px 16px 48px}.grid-2{grid-template-columns:minmax(0,1fr)}.items-editor .item-row{grid-template-columns:minmax(0,1fr) 64px 96px 56px 32px}.items-editor .item-row>:nth-child(5){display:none}}@media (max-width: 760px){.form-grid.cols-2,.form-grid.cols-3,.form-grid.cols-4,.form-grid.cols-5{grid-template-columns:1fr}.page-head h1{font-size:20px;line-height:28px}.toast-region{left:16px;right:16px;bottom:16px;max-width:none}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:1ms!important;animation-iteration-count:1!important;transition-duration:1ms!important}.loading:before{animation:spin 1.6s linear infinite!important}}.rank-list{display:flex;flex-direction:column;gap:8px}.rank-row{display:grid;grid-template-columns:minmax(120px,240px) minmax(0,1fr) 128px;gap:16px;align-items:center;font-size:13px}.rank-label{color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rank-track{height:8px;background:var(--surface-2);border-radius:4px;overflow:hidden}.rank-track>span{display:block;height:100%;border-radius:4px}.rank-value{text-align:right;font-family:var(--font-mono);font-variant-numeric:tabular-nums}@media (max-width: 760px){.rank-row{grid-template-columns:minmax(0,1fr) 112px}.rank-track{grid-column:1 / -1;grid-row:2}}.dash-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:16px;margin-bottom:16px}.dash-grid>.card+.card{margin-top:0}@media (max-width: 1100px){.dash-grid{grid-template-columns:minmax(0,1fr)}}.kv{display:flex;flex-direction:column}.kv>div{display:flex;justify-content:space-between;gap:16px;padding:8px 0;border-bottom:1px solid var(--hairline);font-size:14px;color:var(--text-2)}.kv>div:last-child{border-bottom:none}.kv .num{font-family:var(--font-mono);font-variant-numeric:tabular-nums;color:var(--text)}.kv .num.warn{color:var(--danger)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}tr.editing-row,tr.editing-row:hover{background:var(--accent-soft)}tr.editing-row td{padding-top:8px;padding-bottom:8px}tr.editing-row input,tr.editing-row select{width:100%;min-width:0;height:32px;padding:0 8px;font:inherit;font-size:14px;color:var(--text);background:var(--surface);border:1px solid var(--hairline-strong);border-radius:var(--radius-xs);outline:none}tr.editing-row input.num{text-align:right;font-family:var(--font-mono);font-variant-numeric:tabular-nums}tr.editing-row input:focus,tr.editing-row select:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.inline-input{height:34px;min-width:0;padding:0 12px;font:inherit;font-size:14px;color:var(--text);background:var(--surface);border:1px solid var(--hairline-strong);border-radius:var(--radius-sm);outline:none;transition:border-color var(--fast) var(--ease),box-shadow var(--fast) var(--ease)}.inline-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}button.nav-link{width:100%;border:none;background:none;font:inherit;font-size:14px;cursor:pointer;text-align:left}.archive-banner{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:24px;padding:12px 16px;border-radius:var(--radius-sm);background:var(--warn-soft);border:1px solid rgba(138,92,20,.2);color:var(--warn);font-size:13px}.archive-banner strong{font-weight:600;margin-right:8px}.archive-banner .btn{color:var(--text)}.notice{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:16px;padding:10px 16px;background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius-sm);font-size:13px;color:var(--text-2)}.modal.wide{max-width:640px}.modal-head{margin-bottom:20px}.modal-head .modal-sub{margin-bottom:0;margin-top:4px}.modal-actions{display:flex;align-items:center;gap:8px;margin-top:24px;padding-top:16px;border-top:1px solid var(--hairline)}.form-field .optional{font-weight:400;color:var(--text-3)}.form-field .field-error{font-size:12px;color:var(--danger)}.form-field.has-error input,.form-field.has-error select,.form-field.has-error textarea{border-color:var(--danger)}.form-field.has-error input:focus,.form-field.has-error select:focus,.form-field.has-error textarea:focus{box-shadow:0 0 0 3px #b3452f26}.form-field input[readonly]{background:var(--surface-2);color:var(--text-2)}.form-field input.mono,.form-field input.upper{font-family:var(--font-mono);letter-spacing:.02em}.form-field input.upper{text-transform:uppercase}.form-field input.num{font-family:var(--font-mono);font-variant-numeric:tabular-nums;text-align:right}.modal .form-grid{gap:16px}tr.row-link{cursor:pointer}tr.row-link:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}@media (max-width: 760px){.modal{padding:20px}.modal .form-grid.cols-2{grid-template-columns:1fr}}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}label.check{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:var(--text-2);cursor:pointer}label.check input{width:16px;height:16px;accent-color:var(--accent)}label.btn input[type=file]{display:none}table.line-items{min-width:0;table-layout:fixed}table.line-items th:first-child,table.line-items td:first-child{width:auto}table.line-items th.num,table.line-items td.num{width:112px}table.line-items th:last-child,table.line-items td:last-child{width:88px}table.line-items td{padding:8px}table.line-items input{width:100%;min-width:0;height:34px;padding:0 8px;font:inherit;font-size:14px;color:var(--text);background:var(--surface);border:1px solid var(--hairline-strong);border-radius:var(--radius-xs);outline:none}table.line-items input.num{text-align:right;font-family:var(--font-mono);font-variant-numeric:tabular-nums}table.line-items input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}@media (max-width: 1200px){th,td{padding-left:12px;padding-right:12px}.hide-md{display:none}}.table-wrap{position:relative}.toolbar input.search,.toolbar input[type=search]{width:100%;max-width:360px}.main,.card,.page-head>div:first-child{min-width:0}.topbar,.nav-scrim{display:none}@media (max-width: 640px){.shell{flex-direction:column}.topbar{display:flex;align-items:center;gap:8px;position:sticky;top:0;z-index:40;height:56px;padding:0 8px 0 4px;background:var(--surface);border-bottom:1px solid var(--hairline)}.topbar-menu{height:40px;width:40px;padding:0}.topbar-title{font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}.topbar-fy{font-size:12px;color:var(--text-3);white-space:nowrap}.nav-scrim{display:block;position:fixed;top:0;right:0;bottom:0;left:0;z-index:55;background:#1c1a175c;animation:fade-in .16s var(--ease) both}.sidebar{position:fixed;top:0;left:0;bottom:0;z-index:60;width:min(280px,84vw);height:100%;padding:16px 12px 24px;transform:translate(-100%);transition:transform .22s var(--ease);box-shadow:var(--shadow-float)}.sidebar.open{transform:none}.sidebar-brand{justify-content:flex-start;padding:4px 8px 16px}.sidebar-brand .brand-name,.sidebar-brand .brand-sub,.nav-link span{display:initial}.sidebar-brand .brand-name,.sidebar-brand .brand-sub{display:block}.nav-section{font-size:12px;padding:20px 12px 4px;border-top:none;margin:0}.nav-link{justify-content:flex-start;padding:0 12px;height:40px}.main{padding:16px 16px 48px;max-width:none}.page-head{flex-direction:column;align-items:stretch;gap:12px;margin-bottom:16px}.page-head h1{font-size:20px;line-height:28px}.head-actions{width:100%}.head-actions>.btn,.head-actions>a.btn{flex:1 1 auto}.head-divider{display:none}.btn-group{flex:1 1 100%}.btn-group .btn{flex:1}.archive-banner{flex-direction:column;align-items:stretch}.card-pad{padding:16px}.card>h3{padding:16px 16px 0}.card>p.muted{padding:0 16px 16px}.stat-grid{grid-template-columns:1fr 1fr;gap:8px}.stat,.stat-card{padding:12px 14px}.stat .value,.stat-card .value{font-size:17px;line-height:24px}.stat .label,.stat-card .label{font-size:12px;margin-bottom:4px}.tabs{margin-bottom:16px}.toolbar>*{flex:1 1 100%;max-width:none!important}.table-wrap>table{min-width:0}th,td{padding:10px 8px;font-size:13px}td.num{font-size:12px}.hide-sm{display:none}.row-actions .btn{padding:0 8px}.form-grid,.form-grid.cols-2,.form-grid.cols-3,.form-grid.cols-4,.form-grid.cols-5{grid-template-columns:minmax(0,1fr)!important}.form-field input,.form-field select,.form-field textarea,.field input,.field select{font-size:16px}.totals-block{max-width:none}.modal-overlay{padding:8px;align-items:flex-end}.modal,.modal.wide{max-width:none;max-height:92vh;padding:20px 16px;border-radius:var(--radius) var(--radius) 0 0}.modal-actions{flex-wrap:wrap}.modal-actions .btn.primary{flex:1 1 auto}.rank-row{grid-template-columns:minmax(0,1fr) auto;gap:8px}.dash-grid{grid-template-columns:minmax(0,1fr)}.chart-legend{gap:4px 12px}}@media (max-width: 640px){.t-invoices th:nth-child(3),.t-invoices td:nth-child(3),.t-invoices th:nth-child(5),.t-invoices td:nth-child(5),.t-invoices th:nth-child(7),.t-invoices td:nth-child(7){display:none}.t-recent th:nth-child(3),.t-recent td:nth-child(3),.t-recent th:nth-child(5),.t-recent td:nth-child(5){display:none}.t-expenses th:nth-child(3),.t-expenses td:nth-child(3),.t-expenses th:nth-child(4),.t-expenses td:nth-child(4),.t-expenses th:nth-child(6),.t-expenses td:nth-child(6),.t-expenses th:nth-child(7),.t-expenses td:nth-child(7){display:none}.t-estimates th:nth-child(3),.t-estimates td:nth-child(3){display:none}.t-cn th:nth-child(2),.t-cn td:nth-child(2){display:none}.t-recurring th:nth-child(3),.t-recurring td:nth-child(3),.t-recurring th:nth-child(4),.t-recurring td:nth-child(4){display:none}.t-customers th:nth-child(2),.t-customers td:nth-child(2),.t-customers th:nth-child(4),.t-customers td:nth-child(4),.t-customers th:nth-child(5),.t-customers td:nth-child(5),.t-customers th:nth-child(6),.t-customers td:nth-child(6){display:none}.t-items th:nth-child(2),.t-items td:nth-child(2),.t-items th:nth-child(3),.t-items td:nth-child(3),.t-items th:nth-child(6),.t-items td:nth-child(6){display:none}.t-payments th:nth-child(3),.t-payments td:nth-child(3),.t-payments th:nth-child(4),.t-payments td:nth-child(4),.t-payments th:nth-child(5),.t-payments td:nth-child(5),.t-payments th:nth-child(7),.t-payments td:nth-child(7){display:none}.t-accounts th:nth-child(4),.t-accounts td:nth-child(4){display:none}.t-txns th:nth-child(3),.t-txns td:nth-child(3),.t-txns th:nth-child(5),.t-txns td:nth-child(5){display:none}.t-projects th:nth-child(3),.t-projects td:nth-child(3){display:none}.t-lines th:nth-child(1),.t-lines td:nth-child(1),.t-lines th:nth-child(5),.t-lines td:nth-child(5){display:none}.t-backups th:nth-child(2),.t-backups td:nth-child(2){display:none}}.table-wrap>table.wide{min-width:640px!important}@media (max-width: 640px){.doc-link{white-space:normal;overflow-wrap:normal;font-size:12px}.t-estimates th:nth-child(6),.t-estimates td:nth-child(6){display:none}table.line-items th.num,table.line-items td.num{width:64px}table.line-items th:last-child,table.line-items td:last-child{width:56px}table.line-items td{padding:6px 4px}table.line-items th{padding:8px 4px}table.line-items .btn{padding:0 6px;font-size:11px}}.auth-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px 16px;background:var(--bg)}.auth-card{width:100%;max-width:380px;display:flex;flex-direction:column;gap:16px;background:var(--surface);border:1px solid var(--hairline);border-radius:var(--radius);box-shadow:var(--shadow-float);padding:32px 28px;animation:toast-in .26s var(--ease) both}.auth-card h1{font-size:20px;line-height:28px;font-weight:600;margin:4px 0 -4px}.auth-lead{font-size:13px;color:var(--text-2);margin-top:-4px}.auth-brand{display:flex;align-items:center;gap:12px}.auth-brand .brand-mark{width:36px;height:36px;border-radius:var(--radius-sm);background:var(--accent);color:#fff;font-weight:600;display:flex;align-items:center;justify-content:center}.auth-brand-name{font-weight:600;font-size:15px}.auth-brand-sub{font-size:12px;color:var(--text-3)}.auth-submit{height:40px;width:100%;font-size:14px}.auth-foot{font-size:12px;color:var(--text-3);text-align:center}.auth-notice{font-size:13px;color:var(--text-2);background:var(--surface-2);border-radius:var(--radius-sm);padding:8px 12px}.sidebar-user{margin-top:auto;padding:12px 4px 0;border-top:1px solid var(--hairline);display:flex;align-items:center;justify-content:space-between;gap:8px}.sidebar-user-name{display:flex;align-items:center;gap:8px;min-width:0;color:var(--text);text-decoration:none;font-size:13px;font-weight:500}.sidebar-user-name>span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.avatar{width:26px;height:26px;flex-shrink:0;border-radius:50%;background:var(--accent-soft);color:var(--accent-strong);font-size:12px;font-weight:600;display:inline-flex;align-items:center;justify-content:center}.sidebar>.sidebar-user{flex-shrink:0}@media (max-width: 960px) and (min-width: 641px){.sidebar-user{flex-direction:column;padding:12px 0 0}.sidebar-user-name>span:last-child,.sidebar-user .btn{display:none}}
