:root{--bg: #f6f5f2;--surface: #ffffff;--surface-muted: #faf9f7;--border: #e6e3dd;--border-strong: #d9d5ce;--text: #1c1b19;--text-muted: #6f6b64;--text-faint: #8f8a82;--accent: #1c1b19;--accent-text: #ffffff;--expense: #a8382c;--income: #2f6b45;--selected-bg: #fbe9e5;--selected-edge: #c0473a;--hover-bg: #f3f1ed;--shadow: 0 6px 24px rgb(28 27 25 / 10%);--font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;color-scheme:light;font-family:var(--font-sans);font-size:14px;color:var(--text);background:var(--bg);font-synthesis:none;-webkit-font-smoothing:antialiased}:root[data-theme=dark]{--bg: #161614;--surface: #1e1e1b;--surface-muted: #232320;--border: #31302c;--border-strong: #3d3c37;--text: #ebe8e2;--text-muted: #a29d94;--text-faint: #7e7a72;--accent: #ebe8e2;--accent-text: #161614;--expense: #e57b6c;--income: #6fbf8a;--selected-bg: #3a2420;--selected-edge: #e57b6c;--hover-bg: #262623;--shadow: 0 6px 24px rgb(0 0 0 / 45%);color-scheme:dark}*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--bg)}a{color:inherit}.mono{font-family:var(--font-mono);font-variant-numeric:tabular-nums}.muted{color:var(--text-muted)}.btn{height:30px;padding:0 .9rem;border:1px solid var(--border-strong);border-radius:4px;color:var(--text);background:var(--surface);font:inherit;font-size:13px;white-space:nowrap;cursor:pointer}.btn:hover:not(:disabled){background:var(--hover-bg)}.btn:disabled{opacity:.55;cursor:not-allowed}.btn-primary{border-color:var(--accent);color:var(--accent-text);background:var(--accent);font-weight:600}.btn-primary:hover:not(:disabled){background:var(--accent);opacity:.88}.link-button{margin-left:.5rem;padding:0;border:0;color:var(--text);background:none;font:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}input[type=search],input[type=date]{height:30px;padding:0 .65rem;border:1px solid var(--border-strong);border-radius:4px;color:var(--text);background:var(--surface);font:inherit;font-size:13px}input::placeholder{color:var(--text-faint)}:focus-visible{outline:2px solid var(--selected-edge);outline-offset:1px}.topbar{display:flex;align-items:center;gap:2rem;height:52px;padding:0 1.25rem;border-bottom:1px solid var(--border);background:var(--surface-muted)}.brand{display:flex;align-items:center;gap:.6rem;font-size:14px;font-weight:700;text-decoration:none}.brand-mark{display:grid;width:26px;height:26px;place-items:center;border-radius:5px;color:var(--accent-text);background:var(--accent);font-size:10px;font-weight:700}.brand-mark svg{width:20px;height:20px}.auth-card .brand-mark{width:34px;height:34px;border-radius:8px}.auth-card .brand-mark svg{width:24px;height:24px}.brand-logo{width:26px;height:26px;object-fit:contain;border-radius:5px}.company-option-name{display:inline-flex;align-items:center;gap:.55rem}.settings-page{display:grid;gap:1rem;max-width:760px}.settings-card{display:grid;gap:.75rem;padding:1.1rem 1.25rem 1.25rem;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.settings-card h2{margin:0;font-size:16px}.logo-row{display:flex;align-items:center;gap:1rem}.logo-preview{width:64px;height:64px;object-fit:contain;border:1px solid var(--border);border-radius:8px;background:var(--surface-muted)}.logo-fallback{width:64px;height:64px;border-radius:8px}.logo-fallback svg{width:42px;height:42px}.logo-actions{display:grid;justify-items:start;gap:.4rem}.logo-actions .btn{cursor:pointer}.form-ok{margin:0;color:var(--income);font-size:13px}.tabs{display:flex;align-self:stretch;gap:.25rem}.tab{display:flex;align-items:center;padding:0 .75rem;border-bottom:2px solid transparent;color:var(--text-muted);text-decoration:none}.tab:hover{color:var(--text)}.tab.active{border-bottom-color:var(--selected-edge);color:var(--text);font-weight:600}.topbar-right{display:flex;align-items:center;gap:1rem;margin-left:auto}.rates{color:var(--text-muted);font-size:12px;letter-spacing:.02em}.page{padding:1.5rem 1.5rem 1rem}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:2rem;margin-bottom:1.25rem}.page-head h1{margin:.35rem 0 0;font-size:22px;font-weight:700;letter-spacing:-.01em}.page-meta{margin:.4rem 0 0;color:var(--text-muted);font-size:13px}.totals{display:flex;gap:2.5rem;margin:0}.totals div{text-align:right}.totals dt{color:var(--text-muted);font-size:11px;letter-spacing:.08em;text-transform:uppercase}.totals dd{margin:.3rem 0 0;font-family:var(--font-mono);font-size:24px;font-variant-numeric:tabular-nums}.totals small{font-size:13px}.amount-expense{color:var(--expense)}.amount-income{color:var(--income)}.toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem;margin-bottom:.9rem}.filters,.actions{display:flex;flex-wrap:wrap;gap:.5rem}.search{width:280px}.dropdown{position:relative}.filter-button{display:inline-flex;align-items:center;gap:.3rem;height:30px;padding:0 .7rem;border:1px solid var(--border-strong);border-radius:4px;color:var(--text);background:var(--surface);font:inherit;font-size:13px;cursor:pointer}.filter-button:hover{background:var(--hover-bg)}.filter-label{color:var(--text-muted)}.caret{margin-left:.2rem;color:var(--text-muted);font-size:10px}.popover{position:absolute;z-index:20;top:calc(100% + 4px);left:0;display:grid;min-width:220px;max-height:320px;padding:.3rem;overflow-y:auto;border:1px solid var(--border-strong);border-radius:6px;background:var(--surface);box-shadow:var(--shadow)}.popover-search{width:100%;margin-bottom:.3rem}.option{padding:.45rem .6rem;border:0;border-radius:4px;color:var(--text);background:none;font:inherit;font-size:13px;text-align:left;cursor:pointer}.option:hover{background:var(--hover-bg)}.option.selected{font-weight:600}.option-empty{margin:.4rem .6rem;color:var(--text-faint);font-size:13px}.period-popover{gap:.5rem;min-width:280px;padding:.6rem}.period-inputs{display:grid;gap:.4rem}.period-inputs label{display:grid;grid-template-columns:1.5rem 1fr;align-items:center;color:var(--text-muted);font-size:13px}.period-presets{display:grid;grid-template-columns:1fr 1fr;padding-top:.4rem;border-top:1px solid var(--border)}.table-card{overflow-x:auto;border:1px solid var(--border);border-radius:6px;background:var(--surface)}.ledger{width:100%;border-collapse:collapse;font-size:13px}.ledger.stale tbody{opacity:.5}.ledger th{padding:.7rem .75rem;border-bottom:1px solid var(--border);color:var(--text-muted);background:var(--surface-muted);font-size:11px;font-weight:500;letter-spacing:.08em;text-align:left;text-transform:uppercase;white-space:nowrap}.ledger td{height:30px;padding:.3rem .75rem;border-bottom:1px solid var(--border);white-space:nowrap}.ledger tbody tr{cursor:pointer}.ledger tbody tr:hover{background:var(--hover-bg)}.ledger tbody tr.selected{background:var(--selected-bg);box-shadow:inset 2px 0 0 var(--selected-edge)}.ledger .col-date{width:1%;padding-left:1rem}.ledger .col-amount{width:1%;text-align:right}.ledger .col-pm{width:1%;text-align:center}.pm-select{width:52px;padding-right:.2rem;padding-left:.35rem;text-align:center}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;margin-bottom:1rem}.stat-card{padding:1rem 1.1rem;border:1px solid var(--border);border-radius:6px;background:var(--surface)}.stat-card dt{color:var(--text-muted);font-size:11px;letter-spacing:.08em;text-transform:uppercase}.stat-card dd{margin:.35rem 0 0;font-family:var(--font-mono);font-size:26px;font-variant-numeric:tabular-nums}.stat-card small{color:var(--text-muted)}.section-title{margin:0;padding:.9rem 1rem 0;font-size:14px}.activity{list-style:none;margin:0;padding:0}.activity li{display:grid;grid-template-columns:8.5rem 1fr auto;gap:1rem;align-items:start;padding:.75rem 1rem;border-top:1px solid var(--border)}.tickets-page{max-width:760px}.ticket-form{display:grid;gap:.75rem;margin-bottom:1rem;padding:1rem}.ticket-form textarea.input{height:auto;min-height:7rem;padding:.55rem .7rem;resize:vertical}.ticket-body{margin:.35rem 0 0;white-space:pre-wrap}.ledger .col-comment{width:100%}.sort{padding:0;border:0;color:inherit;background:none;font:inherit;letter-spacing:inherit;text-transform:inherit;cursor:pointer}.sort:hover{color:var(--text)}.table-state{display:flex;align-items:center;justify-content:center;gap:1rem;padding:3rem 1rem;color:var(--text-muted)}.table-state.error{color:var(--expense)}.table-footer{display:flex;justify-content:space-between;gap:1rem;padding:.9rem 0;color:var(--text-muted);font-size:12px}.table-footer strong{color:var(--text);font-size:13px;font-weight:500}.input{width:100%;height:34px;padding:0 .7rem;border:1px solid var(--border-strong);border-radius:4px;color:var(--text);background:var(--surface);font:inherit;font-size:14px}.input:disabled{color:var(--text-muted);background:var(--surface-muted)}select.input{padding-right:.4rem}.field{display:grid;gap:.35rem;margin-bottom:.9rem}.field>span{color:var(--text-muted);font-size:12px;font-weight:500}.field small{color:var(--text-faint);font-size:12px}.password-field{position:relative;display:block}.password-field .input{padding-right:5.2rem}.password-toggle{position:absolute;top:0;right:0;height:34px;padding:0 .7rem;border:0;color:var(--text-muted);background:none;font:inherit;font-size:12px;cursor:pointer}.password-toggle:hover{color:var(--text)}.remember{display:flex;align-items:center;gap:.5rem;margin:-.15rem 0 .9rem;font-size:13px;cursor:pointer}.remember input{margin:0}.form-error{margin:0 0 .9rem;color:var(--expense);font-size:13px}.btn-block{display:flex;width:100%;height:36px;align-items:center;justify-content:center;text-decoration:none}.auth-screen{display:grid;min-height:100vh;padding:1rem;place-items:center}.auth-card{width:min(380px,100%);padding:2rem;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.auth-card .brand{margin-bottom:1.75rem}.auth-card h1{margin:0 0 1.25rem;font-size:20px}.auth-text{margin:0 0 1.25rem;color:var(--text-muted);font-size:13px;line-height:1.5}.auth-hint{margin:1rem 0 0;color:var(--text-faint);font-size:12px;line-height:1.5;text-align:center}.invite-summary{display:grid;gap:.4rem;margin:0 0 1rem;padding:.8rem 1rem;border-radius:6px;background:var(--surface-muted);font-size:13px}.invite-summary div{display:flex;justify-content:space-between;gap:1rem}.invite-summary dt{color:var(--text-muted)}.invite-summary dd{margin:0;font-weight:500;text-align:right}.user-chip{display:inline-flex;align-items:center;gap:.5rem;padding:0;border:0;color:var(--text);background:none;font:inherit;font-size:13px;cursor:pointer}.avatar{display:grid;width:26px;height:26px;place-items:center;border-radius:50%;background:var(--border);font-size:10px;font-weight:700}.popover-right{right:0;left:auto}.menu-caption{margin:.2rem .6rem .4rem;padding-bottom:.5rem;border-bottom:1px solid var(--border);color:var(--text-muted);font-size:12px}a.option{display:block;text-decoration:none}.section-title{margin:1.75rem 0 .75rem;font-size:15px;font-weight:600}.ledger .col-first{padding-left:1rem}.ledger .col-last{padding-right:1rem;text-align:right}.ledger tbody tr.readonly{cursor:default}.ledger tbody tr.inactive td{color:var(--text-faint)}.ledger .expired{color:var(--expense)}.tag{margin-left:.4rem;padding:.05rem .4rem;border-radius:3px;color:var(--text-muted);background:var(--surface-muted);font-size:11px}.status{font-size:12px}.status-active{color:var(--income)}.status-disabled,.status-terminated{color:var(--text-faint)}.invite-link-card{display:grid;gap:.75rem;margin-bottom:1rem;padding:1rem 1.1rem;border:1px solid var(--income);border-radius:6px;background:var(--surface)}.invite-link-card p{margin:.3rem 0 0;color:var(--text-muted);font-size:13px;line-height:1.5}.invite-link-row{display:flex;gap:.5rem}.invite-link-row .input{flex:1;font-size:12px}.invite-link-row .btn{height:34px}.modal-backdrop{position:fixed;z-index:50;top:0;right:0;bottom:0;left:0;display:grid;padding:1rem;place-items:center;background:#00000059}.modal{width:min(440px,100%);max-height:calc(100vh - 2rem);padding:1.25rem 1.5rem 1.5rem;overflow-y:auto;border:1px solid var(--border);border-radius:8px;background:var(--surface);box-shadow:var(--shadow)}.modal-head{display:flex;align-items:center;justify-content:space-between}.modal-head h2{margin:0;font-size:17px}.modal-text{margin:.4rem 0 1.25rem;color:var(--text-muted);font-size:13px;line-height:1.5}.modal-actions{display:flex;justify-content:flex-end;gap:.5rem;margin-top:1.25rem}.modal-actions-left{display:flex;gap:.5rem;margin-right:auto}.btn-danger{color:var(--expense);border-color:var(--expense)}.btn-danger:disabled{color:var(--text-faint);border-color:var(--border)}.icon-button{padding:0 .3rem;border:0;color:var(--text-muted);background:none;font-size:22px;line-height:1;cursor:pointer}.btn-sm{height:26px;padding:0 .6rem;font-size:12px}.ledger tbody tr.new-row,.ledger tbody tr.new-row:hover{background:var(--surface-muted);cursor:default}.ledger tr.new-row td{padding:.35rem .3rem;border-bottom:0}.ledger tr.new-row td.col-date{padding-left:.6rem}.cell-input{width:100%;min-width:90px;height:28px;padding:0 .45rem;border:1px solid var(--border-strong);border-radius:4px;color:var(--text);background:var(--surface);font:inherit;font-size:13px}.cell-input[type=date]{width:130px}.amount-input{width:110px;text-align:right}.cell-input.is-new,.is-new-mark{box-shadow:inset 0 -2px 0 var(--income)}.new-row-last{display:flex;gap:.35rem;min-width:420px}.combo{min-width:130px}.combo-trigger{display:flex;align-items:center;justify-content:space-between;gap:.3rem;text-align:left;cursor:pointer}.combo-trigger:hover{background:var(--hover-bg)}.combo-trigger-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.combo-trigger-text.placeholder{color:var(--text-faint)}.combo-popover{min-width:220px;width:max-content;max-width:320px}.option.highlighted{background:var(--hover-bg)}.option-clear{color:var(--text-faint)}.option-create{margin-top:.2rem;padding-top:.55rem;border-top:1px solid var(--border);color:var(--income);font-weight:500}.ledger tbody tr.new-row-hint,.ledger tbody tr.new-row-hint:hover{background:var(--surface-muted);cursor:default}.ledger tr.new-row-hint td{height:auto;padding:0 .75rem .5rem;color:var(--text-faint);font-size:12px}.new-row-hint .form-error{margin:0}.notice-bar{margin:0 0 .75rem;padding:.55rem .8rem;border-left:3px solid var(--selected-edge);border-radius:3px;color:var(--text-muted);background:var(--surface);font-size:13px}.toasts{position:fixed;z-index:60;right:1.25rem;bottom:1.25rem;display:flex;flex-direction:column;gap:.5rem;width:min(360px,calc(100vw - 2.5rem));pointer-events:none}.toast{margin:0;padding:.75rem .9rem;border-radius:8px;background:var(--text);color:var(--bg);box-shadow:var(--shadow);font-size:13px;line-height:1.4}.context-menu{position:fixed;z-index:50;min-width:168px;padding:.3rem;border:1px solid var(--border-strong);border-radius:8px;background:var(--surface);box-shadow:var(--shadow)}.context-menu button{display:block;width:100%;padding:.45rem .65rem;border:0;border-radius:4px;color:var(--text);background:none;font:inherit;text-align:left;cursor:pointer}.context-menu button:hover{background:var(--hover-bg)}.context-menu button.danger{color:var(--expense)}.segmented{gap:0}.segmented button{height:30px;padding:0 .85rem;border:1px solid var(--border-strong);color:var(--text-muted);background:var(--surface);font:inherit;font-size:13px;cursor:pointer}.segmented button+button{margin-left:-1px}.segmented button:first-child{border-radius:4px 0 0 4px}.segmented button:last-child{border-radius:0 4px 4px 0}.segmented button.active{position:relative;color:var(--text);background:var(--hover-bg);font-weight:600}.segmented-sm button{height:26px;padding:0 .6rem;font-size:12px}.company-list{display:grid;gap:.4rem;margin:0 0 1rem;padding:0;list-style:none}.company-option{display:flex;width:100%;align-items:baseline;justify-content:space-between;gap:1rem;padding:.6rem .8rem;border:1px solid var(--border-strong);border-radius:6px;color:var(--text);background:var(--surface);font:inherit;text-align:left;cursor:pointer}.company-option:hover:not(:disabled){border-color:var(--selected-edge);background:var(--hover-bg)}.company-option:disabled{cursor:progress}.company-option small{color:var(--text-faint);font-size:12px}.menu-separator{margin:.35rem 0;border:0;border-top:1px solid var(--border)}.modal-wide{width:min(680px,100%)}.ag-name small{color:var(--text-faint);font-size:12px}.ag-tabs{display:flex;margin:.25rem 0 1rem}.ag-tabs button{flex:1}.ag-panel{display:grid;gap:1.1rem}.ag-block h3{margin:0 0 .35rem;font-size:13px;font-weight:600}.ag-inline{display:flex;align-items:center;justify-content:space-between;gap:1rem}.ag-inline h3{margin:0}.ag-hint{margin:0 0 .5rem;color:var(--text-faint);font-size:12px}.ag-table{width:100%;border-collapse:collapse}.ag-table td{padding:.3rem 0;border-top:1px solid var(--border)}.ag-table .ag-access{text-align:right}.ag-table .segmented{display:inline-flex}.ag-checks{display:flex;flex-wrap:wrap;gap:.4rem 1.1rem}.ag-check{display:inline-flex;align-items:center;gap:.35rem;cursor:pointer}.ag-module{display:flex;align-items:flex-start;gap:.6rem;cursor:pointer}.ag-module input{margin-top:.2rem}.ag-module small{display:block;color:var(--text-faint);font-size:12px}.ag-delete{margin-right:auto;color:var(--expense)}.ag-members{color:var(--text-muted)}.ledger .num{text-align:right}.cell-sub{color:var(--text-faint);font-size:12px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.field-row .field-code{max-width:140px}.field-row:has(.field-code){grid-template-columns:140px 1fr}@media(max-width:900px){.topbar{gap:1rem;height:auto;flex-wrap:wrap;padding:.5rem 1rem}.tabs{order:3;width:100%;overflow-x:auto}.tab{padding:.6rem .75rem}.page{padding:1rem}.stat-grid{grid-template-columns:1fr 1fr}.activity li{grid-template-columns:1fr;gap:.2rem}.page-head{flex-direction:column;gap:1rem}.totals div{text-align:left}.search,.actions{width:100%}.invite-link-row{flex-wrap:wrap}.user-chip span:last-child{display:none}}@media print{:root,:root[data-theme=dark]{--bg: #fff;--surface: #fff;--surface-muted: #fff;--border: #ccc;--text: #000;--text-muted: #444;--expense: #a8382c;color-scheme:light}.topbar,.toolbar,.link-button{display:none}.page{padding:0}.table-card{overflow:visible;border:0}.ledger tbody tr.selected{background:none;box-shadow:none}.ledger td{white-space:normal}}
