:root{--bg:#f5f6f8;--surface:#fff;--border:#dde1e6;--text:#1f2933;--muted:#6b7684;--primary:#2563eb;--primary-hover:#1d4ed8;--danger:#c62828;--ok:#2e7d32;color:var(--text);background:var(--bg);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:15px}*{box-sizing:border-box}body{margin:0}h1{margin:0 0 1rem;font-size:1.5rem}h2{margin:1.5rem 0 .75rem;font-size:1.15rem}a{color:var(--primary);text-decoration:none}a:hover{text-decoration:underline}.topbar{background:var(--surface);border-bottom:1px solid var(--border);z-index:5;justify-content:space-between;align-items:center;height:52px;padding:0 1.5rem;display:flex;position:sticky;top:0}.topbar nav{gap:.25rem;display:flex}.topbar nav a{color:var(--text);border-radius:6px;padding:.5rem .75rem}.topbar nav a:hover{background:var(--bg);text-decoration:none}.topbar nav a.active{color:var(--primary);background:#e8efff;font-weight:600}.topbar .user{color:var(--muted)}main{max-width:1200px;margin:0 auto;padding:1.5rem}.page-head{justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem;display:flex}.page-head h1{margin:0}button{font:inherit;cursor:pointer;border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:6px;padding:.45rem .9rem}button:hover{background:var(--bg)}button:disabled{opacity:.6;cursor:default}button.primary{background:var(--primary);border-color:var(--primary);color:#fff}button.primary:hover{background:var(--primary-hover)}button.danger{color:var(--danger);border-color:#f0c4c4}button.link,button.icon{color:var(--primary);background:0 0;border:none;padding:0 .25rem}button.link.danger{color:var(--danger)}button.icon{color:var(--muted);font-size:1.5rem;line-height:1}table{border-collapse:collapse;background:var(--surface);border:1px solid var(--border);border-radius:8px;width:100%;overflow:hidden}th,td{text-align:left;border-bottom:1px solid var(--border);vertical-align:top;padding:.55rem .75rem}th{color:var(--muted);background:#fafbfc;font-size:.85rem;font-weight:600}tfoot td{background:#fafbfc;border-bottom:none;font-weight:600}td.num,th.num{text-align:right;white-space:nowrap}tr.clickable{cursor:pointer}tr.clickable:hover td{background:#f3f7ff}tr.archived td{color:var(--muted)}.row-actions{white-space:nowrap;text-align:right}.row-actions>*+*{margin-left:.5rem}.money.debt{color:var(--danger);font-weight:600}.money.overpaid{color:var(--ok)}form label,.filters label{color:var(--muted);flex-direction:column;gap:.25rem;margin-bottom:.75rem;font-size:.85rem;display:flex}label.inline{flex-direction:row;align-items:center;gap:.4rem;margin-bottom:.75rem;display:inline-flex}input,select{font:inherit;color:var(--text);border:1px solid var(--border);background:#fff;border-radius:6px;min-width:0;padding:.45rem .6rem}input:focus,select:focus{border-color:var(--primary);outline:2px solid #bcd0fb}.row{grid-template-columns:1fr 1fr;gap:.75rem;display:grid}.actions{justify-content:flex-end;gap:.5rem;display:flex}form .actions{margin-top:.5rem}.filters{flex-wrap:wrap;gap:.75rem;margin-bottom:.5rem;display:flex}.filters label{min-width:160px}.tabs{gap:.25rem;margin-bottom:1rem;display:flex}.tabs button.active{color:var(--primary);background:#e8efff;border-color:#bcd0fb;font-weight:600}.card{background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:1.25rem}.login{place-items:center;min-height:100vh;display:grid}.login form{width:340px}.login button{width:100%}.backdrop{z-index:10;background:#0f172a66;place-items:center;padding:1rem;display:grid;position:fixed;inset:0}.modal{background:var(--surface);border-radius:10px;width:min(560px,100%);max-height:90vh;padding:1.25rem 1.5rem;overflow:auto;box-shadow:0 20px 50px #0003}.modal header{justify-content:space-between;align-items:center;margin-bottom:1rem;display:flex}.modal h2{margin:0}.props{grid-template-columns:max-content 1fr;gap:.35rem 1.5rem;margin:0 0 1.25rem;display:grid}.props dt{color:var(--muted)}.props dd{margin:0}.stats{grid-template-columns:repeat(3,1fr);gap:1rem;margin-bottom:1rem;display:grid}.stat{background:var(--surface);border:1px solid var(--border);border-radius:8px;flex-direction:column;gap:.25rem;padding:1rem;font-size:1.35rem;display:flex}.stat span:first-child{color:var(--muted);font-size:.85rem}.two-cols{grid-template-columns:1fr 1fr;align-items:start;gap:1.5rem;display:grid}.two-cols section>h2:first-child{margin-top:0}.badge{color:var(--muted);background:#eceff3;border-radius:999px;margin-left:.35rem;padding:.05rem .45rem;font-size:.75rem;display:inline-block}.muted{color:var(--muted)}.small{font-size:.85rem}.center{text-align:center;margin-top:4rem}.error{color:var(--danger);margin:.5rem 0}.ok{color:var(--ok);margin:.5rem 0}@media (width<=800px){.two-cols,.row,.stats{grid-template-columns:1fr}.topbar{flex-wrap:wrap;height:auto;padding:.5rem 1rem}.topbar nav{flex-wrap:wrap}}
