:root{font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--accent:#3b82f6;--accent-hover:#2563eb;--success:#16a34a;--danger:#ef4444;--warning:#f59e0b;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}:root,:root[data-theme=light]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--bg:#f5f7fb;--surface:#fff;--surface-hover:#f1f5f9;--sidebar:#fff;--text:#172033;--text-muted:#64748b;--border:#e2e8f0;--shadow:0 4px 20px #0f172a0a;--panel:#fff;--primary:#3b82f6}:root[data-theme=dark]{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#0f172a;--surface:#182235;--surface-hover:#243147;--sidebar:#111c2e;--text:#f1f5f9;--text-muted:#94a3b8;--border:#29374c;--shadow:0 4px 20px #0000001f;--panel:#182235;--primary:#60a5fa}*{box-sizing:border-box}body{background:var(--bg);min-width:320px;min-height:100vh;color:var(--text);margin:0;font-size:14px}button{font:inherit;cursor:pointer}button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}#root{width:100%;min-height:100vh}.app-layout{min-height:100vh;display:flex}.sidebar{background:var(--sidebar);border-right:1px solid var(--border);flex-direction:column;width:250px;min-width:250px;min-height:100vh;padding:28px 18px;display:flex}.sidebar-brand{align-items:center;gap:12px;padding:0 10px 38px;display:flex}.brand-icon{background:var(--accent);color:#fff;border-radius:12px;place-items:center;width:42px;height:42px;display:grid}.sidebar-brand h2{color:var(--text);margin:0;font-size:17px;font-weight:750}.sidebar-brand span{color:var(--accent);letter-spacing:2px;font-size:10px;font-weight:800}.nav-heading{letter-spacing:1.5px;color:var(--text-muted);margin-bottom:12px;padding:0 12px;font-size:10px;font-weight:800}.sidebar-nav{flex-direction:column;gap:6px;display:flex}.nav-item{width:100%;color:var(--text-muted);text-align:left;background:0 0;border:0;border-radius:9px;align-items:center;gap:13px;padding:12px;transition:all .2s;display:flex}.nav-item:hover{background:var(--surface-hover);color:var(--text)}.nav-item.active{color:var(--accent);background:#3b82f61f;font-weight:700}.sidebar-bottom{margin-top:auto}.sidebar-version{border-top:1px solid var(--border);color:var(--text-muted);flex-direction:column;gap:5px;margin-top:20px;padding:20px 10px 0;font-size:11px;display:flex}.main-content{flex:1;min-width:0;padding:36px 42px}.dashboard{max-width:1500px;margin:0 auto}.page-header{justify-content:space-between;align-items:center;gap:20px;margin-bottom:30px;display:flex}.page-header h1{letter-spacing:-.7px;color:var(--text);margin:0 0 7px;font-size:28px;font-weight:750}.page-header p{color:var(--text-muted);font-size:13px}.primary-button{background:var(--accent);color:#fff;border:none;border-radius:9px;justify-content:center;align-items:center;gap:9px;padding:11px 18px;font-weight:650;transition:all .2s;display:inline-flex}.primary-button:hover{background:var(--accent-hover);transform:translateY(-1px)}.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:22px;display:grid}.stat-card{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:13px;min-width:0;padding:22px}.stat-icon{border-radius:11px;place-items:center;width:42px;height:42px;margin-bottom:17px;display:grid}.stat-icon.blue{color:#3b82f6;background:#3b82f621}.stat-icon.green{color:#22c55e;background:#16a34a21}.stat-icon.purple{color:#a78bfa;background:#8b5cf621}.stat-icon.orange{color:#f59e0b;background:#f59e0b21}.stat-card p{color:var(--text-muted);margin-bottom:9px;font-size:12px}.stat-card h2{color:var(--text);letter-spacing:-.5px;overflow-wrap:anywhere;margin:0 0 8px;font-size:clamp(20px,2vw,25px);font-weight:750}.stat-card>span{color:var(--text-muted);font-size:11px}.dashboard-grid{grid-template-columns:1.15fr .85fr;gap:20px;display:grid}.panel{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:13px;min-width:0;padding:24px}.panel-header{justify-content:space-between;align-items:center;margin-bottom:25px;display:flex}.panel-header h3{color:var(--text);margin:0 0 5px;font-size:15px;font-weight:750}.panel-header p{color:var(--text-muted);font-size:11px}.progress-details{justify-content:space-between;gap:20px;margin-bottom:20px;display:flex}.progress-details div{flex-direction:column;gap:8px;display:flex}.progress-details span{color:var(--text-muted);font-size:11px}.progress-details strong{color:var(--text);font-size:16px}.progress-track{background:var(--surface-hover);border-radius:20px;height:10px;overflow:hidden}.progress-fill{background:var(--success);border-radius:20px;height:100%;transition:width .4s}.progress-caption{color:var(--text-muted);margin-top:12px;font-size:11px}.chart-container{width:100%;height:220px}.creditor-legend{flex-direction:column;gap:13px;display:flex}.legend-item{align-items:center;gap:9px;min-width:0;font-size:11px;display:flex}.legend-item>span:nth-child(2){color:var(--text-muted);overflow-wrap:anywhere;flex:1}.legend-item strong{color:var(--text);font-size:11px}.legend-dot{border-radius:50%;flex-shrink:0;width:9px;height:9px}.payments-panel{grid-column:1/-1}.payment-list{flex-direction:column;display:flex}.payment-item{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:15px;padding:15px 0;display:flex}.payment-item:last-child{border-bottom:none}.payment-item div{flex-direction:column;gap:5px;display:flex}.payment-item div strong{color:var(--text);font-size:13px}.payment-item div span{color:var(--text-muted);font-size:11px}.payment-amount{color:var(--success);white-space:nowrap;font-size:13px}.empty-chart,.empty-state{min-height:160px;color:var(--text-muted);flex-direction:column;justify-content:center;align-items:center;gap:12px;display:flex}.empty-chart p,.empty-state p{font-size:12px}@media (width<=1100px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.main-content{padding:28px 24px}}@media (width<=760px){.app-layout{flex-direction:column}.sidebar{border-right:none;border-bottom:1px solid var(--border);width:100%;min-width:0;min-height:auto;padding:14px}.sidebar-brand{padding:0 5px 15px}.sidebar-nav{flex-direction:row;gap:5px;padding-bottom:5px;overflow-x:auto}.nav-heading{display:none}.nav-item{flex-direction:column;justify-content:center;gap:5px;min-width:75px;padding:10px 8px;font-size:10px}.sidebar-bottom{justify-content:space-between;align-items:center;margin-top:10px;display:flex}.sidebar-version{display:none}.main-content{padding:22px 15px}.dashboard-grid{grid-template-columns:1fr}.payments-panel{grid-column:auto}.page-header{align-items:flex-start}.page-header h1{font-size:23px}.primary-button{white-space:nowrap;padding:10px 12px;font-size:12px}}@media (width<=420px){.stats-grid{grid-template-columns:1fr}.stat-card{padding:18px}.progress-details{flex-direction:column}}.error-message{color:#ef4444;background:#ef44441f;border:1px solid #ef44444d;border-radius:9px;margin-bottom:20px;padding:14px 18px}.info-message{color:var(--text-muted);background:#3b82f61a;border:1px solid #3b82f640;border-radius:9px;margin-bottom:20px;padding:14px 18px}.loading-state,.page-placeholder{color:var(--text-muted);text-align:center;padding:40px}.page-placeholder h1{color:var(--text);font-size:28px}.auth-container{background:var(--bg);justify-content:center;align-items:center;min-height:100vh;padding:24px;display:flex}.auth-card{background:var(--panel);border:1px solid var(--border);border-radius:18px;width:100%;max-width:420px;padding:36px;box-shadow:0 20px 60px #0003}.auth-brand{text-align:center;margin-bottom:32px}.auth-brand .brand-icon{margin:0 auto 14px}.auth-brand h1{color:var(--text);font-size:25px}.auth-brand h1 span{color:var(--primary);font-size:13px}.auth-brand p,.auth-description{color:var(--text-muted)}.auth-card h2{color:var(--text);margin-bottom:8px}.auth-card label{color:var(--text);margin:18px 0 8px;font-size:14px;display:block}.auth-card input{border:1px solid var(--border);background:var(--bg);width:100%;color:var(--text);border-radius:9px;outline:none;padding:13px}.auth-card input:focus{border-color:var(--primary)}.auth-submit{justify-content:center;width:100%;margin-top:24px}.auth-switch{text-align:center;color:var(--text-muted);margin-top:24px;font-size:14px}.auth-switch button{color:var(--primary);cursor:pointer;background:0 0;border:none;margin-left:6px;font-weight:600}@media (width<=480px){.auth-card{padding:25px 20px}}.password-input-wrapper{width:100%;position:relative}.password-input-wrapper input{width:100%;padding-right:45px}.password-toggle{color:var(--text-muted);cursor:pointer;background:0 0;border:none;justify-content:center;align-items:center;display:flex;position:absolute;top:50%;right:12px;transform:translateY(-50%)}.secondary-button{border:1px solid var(--border);color:var(--text);background:var(--surface);border-radius:9px;justify-content:center;align-items:center;gap:8px;padding:10px 15px;font-weight:600;display:inline-flex}.secondary-button:hover{background:var(--surface-hover)}button:disabled{opacity:.6;cursor:not-allowed;transform:none!important}.table-wrap{overflow-x:auto}.data-table{border-collapse:collapse;width:100%;min-width:700px}.data-table th{text-align:left;color:var(--text-muted);white-space:nowrap;padding:0 12px 13px;font-size:11px;font-weight:700}.data-table td{border-top:1px solid var(--border);color:var(--text);vertical-align:middle;padding:14px 12px;font-size:12px}.subtext{color:var(--text-muted);margin-top:4px;display:block}.status-badge{text-transform:capitalize;background:var(--surface-hover);color:var(--text-muted);border-radius:20px;padding:5px 9px;font-size:11px;display:inline-block}.status-badge.open{color:#16a34a;background:#16a34a1f}.status-badge.disputed{color:#d97706;background:#f59e0b24}.status-badge.closed{color:#64748b}.row-actions{gap:4px;display:flex}.icon-button{color:var(--text-muted);background:0 0;border:0;border-radius:7px;justify-content:center;align-items:center;padding:7px;display:inline-flex}.icon-button:hover{background:var(--surface-hover);color:var(--text)}.danger-icon:hover{color:var(--danger)}.form-overlay{z-index:10;background:#0206179e;place-items:center;padding:20px;display:grid;position:fixed;inset:0;overflow:auto}.form-card{background:var(--surface);border:1px solid var(--border);border-radius:16px;width:min(100%,680px);max-height:calc(100vh - 40px);padding:25px;overflow:auto;box-shadow:0 24px 80px #0000004d}.form-header{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:22px;display:flex}.form-header h2{margin:0 0 6px;font-size:20px}.form-header p,.muted-copy{color:var(--text-muted);font-size:12px}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;display:grid}.form-field{flex-direction:column;gap:7px;min-width:0;display:flex}.form-field label{color:var(--text-muted);font-size:12px}.form-field input,.form-field select{width:100%;min-width:0;color:var(--text);background:var(--bg);border:1px solid var(--border);font:inherit;border-radius:8px;padding:11px 12px}.full-width{grid-column:1/-1}.balance-preview{background:var(--surface-hover);border-radius:10px;flex-direction:column;gap:6px;margin-top:20px;padding:15px;display:flex}.balance-preview span,.balance-preview small{color:var(--text-muted)}.balance-preview strong{font-size:20px}.form-actions{justify-content:flex-end;gap:10px;margin-top:22px;display:flex}.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;display:grid}.export-actions{flex-wrap:wrap;gap:10px;margin:18px 0;display:flex}.muted-copy{line-height:1.6}@media (width<=760px){.settings-grid{grid-template-columns:1fr}.form-card{padding:19px}.form-grid{grid-template-columns:1fr}.full-width{grid-column:auto}.form-actions{flex-wrap:wrap}.form-actions button{flex:1}}
