:root { font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif; color: #20293a; background: #f5f7fa; font-size: 15px; line-height: 1.45; }
* {box-sizing:border-box}
body {margin:0}
a {color:#2159a8;text-decoration:none}
a:hover {text-decoration:underline}
h1,h2,p {margin-top:0}
h1 {font-size:1.95rem;letter-spacing:-.045em;line-height:1.18;margin-bottom:8px}
h2 {font-size:1.14rem;letter-spacing:-.02em;margin-bottom:16px}
.shell {max-width:1170px; padding:0 22px; margin:auto}
.topbar {background:#fff;border-bottom:1px solid #e4e9ef;}
.nav {display:flex;gap:22px;align-items:center;min-height:71px}
.logo {font-weight:780;color:#182b4c;font-size:1.14rem;white-space:nowrap;display:flex;gap:9px;align-items:center}
.logo-mark {display:inline-flex;align-items:center;justify-content:center;background:#1d69c9;color:#fff;width:30px;height:30px;border-radius:9px;font-weight:700}
.nav nav {display:flex;gap:7px;flex:1;flex-wrap:wrap}
.nav nav a {padding:9px 12px;border-radius:8px;color:#5d6878;font-size:.92rem;font-weight:600}
.nav nav a:hover,.nav nav .active {background:#edf4fe;color:#165eae;text-decoration:none}
.logout {margin:0}.logout-button {background:transparent;border:0;cursor:pointer;font-weight:650;color:#626d7a;font-size:.91rem;padding:9px}
.main {padding-top:31px;padding-bottom:35px;min-height:calc(100vh - 141px)}
.footer {border-top:1px solid #e5e9ef;color:#8993a0;font-size:.78rem;padding-top:15px;padding-bottom:22px}
.page-head {display:flex;gap:20px;align-items:flex-start;justify-content:space-between;margin:0 0 22px}
.page-head h1 {margin-bottom:6px}
.eyebrow {letter-spacing:.12em;font-size:.7rem;font-weight:800;color:#2d70bf;margin:0 0 7px}
.muted {color:#748092}.small {font-size:.79rem}.crumb {margin-bottom:20px}
.panel {background:#fff;border:1px solid #e5eaf0;border-radius:14px;padding:22px;box-shadow:0 4px 18px rgba(25,52,88,.035)}
.period-control {display:flex;align-items:end;gap:14px;margin-bottom:21px;flex-wrap:wrap;padding:14px 19px}
.period-control label {max-width:200px}.period-control .muted {padding-bottom:11px}
.btn {display:inline-flex;align-items:center;justify-content:center;border:1px solid #dbe2eb;background:#fff;color:#26394f;padding:10px 16px;border-radius:9px;font-size:.88rem;font-weight:700;cursor:pointer;white-space:nowrap;min-height:40px}
.btn:hover {background:#f4f6fa;text-decoration:none}.btn.primary {background:#206ac6;color:#fff;border-color:#206ac6}.btn.primary:hover {background:#155baf}
.btn.secondary {background:#f7f9fc}.btn:disabled {opacity:.45;cursor:not-allowed}
.stats {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:13px;margin-bottom:22px}
.stats.four {grid-template-columns:repeat(4,minmax(0,1fr))}
.stat {background:#fff;border:1px solid #e5eaf0;border-radius:12px;padding:17px 16px;min-height:125px;display:flex;flex-direction:column;justify-content:space-between;gap:8px}
.stat span {font-size:.79rem;font-weight:650;color:#66758a}.stat strong {font-size:1.42rem;letter-spacing:-.045em;white-space:nowrap;font-variant-numeric:tabular-nums}.stat small {color:#8692a2;font-size:.71rem}
.stat.green strong,.settled {color:#137d57}.stat.blue strong {color:#286ac4}.stat.orange strong,.due {color:#cb7432}
.two-columns {display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:20px;align-items:start;margin-bottom:20px}
.two-columns.customer-layout {grid-template-columns:minmax(240px, .7fr) minmax(0,1.5fr)}
.section-head {display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 12px}
.section-head h2 {margin:0}.section-head a:not(.btn) {font-size:.85rem;font-weight:600}
.table-wrap {overflow-x:auto;width:100%}
table {border-collapse:collapse;width:100%;font-size:.86rem}th {text-align:left;color:#8a95a4;font-size:.75rem;font-weight:650;white-space:nowrap;border-bottom:1px solid #e8edf2;padding:12px 9px}
td {border-bottom:1px solid #f0f2f6;padding:13px 9px;vertical-align:middle}tbody tr:last-child td {border-bottom:none}
.numeric {text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.cell-primary {color:#22374e;font-weight:700}.empty {text-align:center;color:#8792a1;padding:35px 10px 18px;margin:0}
.debtors {display:flex;flex-direction:column}.debtor {display:flex;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid #edf0f4;font-weight:600;color:#334155}
.debtor:last-child {border:0}.debtor strong {white-space:nowrap;color:#c4763b;font-variant-numeric:tabular-nums}
.stack {display:flex;flex-direction:column;gap:15px}.stack > .btn {align-self:start}
label {display:flex;flex-direction:column;gap:7px;font-size:.82rem;font-weight:700;color:#53647a}
input,select,textarea {display:block;width:100%;font:inherit;color:#25354b;background:#fff;border:1px solid #cfd9e5;border-radius:9px;padding:10px 12px;min-height:41px;outline:none}
input:focus,select:focus,textarea:focus {border-color:#2273cf;box-shadow:0 0 0 3px #e5f0ff}
textarea {resize:vertical}.search-form {display:flex;gap:9px;margin-bottom:12px}.form-panel {max-width:740px}.form-grid {display:grid;grid-template-columns:1fr 1fr;gap:15px;align-items:end}
.form-grid .helper-text {border-radius:9px;background:#f5f8fc;padding:11px 14px;font-size:.81rem;color:#58677a}.helper-text p {margin:3px 0 0}
.actions {display:flex;gap:10px;margin-top:8px}.notice {padding:13px 16px;border-radius:9px;margin-bottom:20px;font-weight:600;font-size:.88rem}
.notice.error {background:#fff0ee;color:#a03527;border:1px solid #f0c5be}.notice.success {background:#ebf8f2;color:#217251;border:1px solid #c5ebd8}
.gap-panel {margin-bottom:20px}.delete-form {margin-top:20px}.text-danger {font:inherit;font-size:.82rem;color:#bd4949;background:none;border:0;padding:5px 0;cursor:pointer;text-decoration:underline}
.pill {padding:6px 12px;border-radius:30px;font-size:.78rem;font-weight:700}.pill.success {background:#e8f6ef;color:#1a8058}
.payment-due {background:#f6f9fd;border:1px solid #e2ebf5;padding:18px;border-radius:10px;margin-bottom:22px;display:flex;align-items:center;justify-content:space-between}.payment-due span {color:#5a6677}.payment-due strong {font-size:1.5rem;color:#c4763b}
.export-list {display:flex;align-items:start;flex-direction:column;gap:9px;margin-bottom:20px}
.tabs {display:flex;gap:9px;margin-bottom:12px;flex-wrap:wrap}.tabs a {border-radius:8px;padding:8px 13px;color:#62738b;font-weight:700;font-size:.84rem}.tabs .selected {background:#edf4ff;color:#1f64bb}
.login-wrap {display:flex;justify-content:center;margin-top:min(12vh,110px)}.login-panel {width:100%;max-width:410px;padding:34px}.login-panel p {margin-bottom:24px}.login-panel .btn {width:100%}.error-panel {max-width:600px;margin:50px auto}
@media(max-width:1000px) {.stats {grid-template-columns:repeat(3,minmax(0,1fr))}.stats.four {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px) {
 .shell {padding-left:13px;padding-right:13px}.nav {padding-top:12px;padding-bottom:11px;gap:6px;flex-wrap:wrap}.logo {width:calc(100% - 58px)}.nav nav {order:3;width:100%;flex:unset;justify-content:space-between;gap:2px}.nav nav a {padding:8px 7px;font-size:.78rem}.main {padding-top:25px}
 .stats,.stats.four {grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.stat {min-height:110px;padding:13px 11px}.stat strong {font-size:1.16rem}.stat span {font-size:.75rem}.stat small {font-size:.68rem}
 .two-columns,.two-columns.customer-layout {grid-template-columns:1fr;gap:14px}.panel {padding:16px;border-radius:12px}.page-head {align-items:start}.page-head h1 {font-size:1.65rem}.page-head .btn {font-size:.77rem;padding:8px 11px}
 .form-grid {grid-template-columns:1fr}.period-control .muted {padding:0}.section-head h2 {font-size:1.02rem}td,th {padding:11px 8px}
}
@media(max-width:410px) {.stats,.stats.four {grid-template-columns:1fr 1fr}.stat strong {font-size:1.06rem}.period-control label {flex:1}}

.confirm summary {cursor:pointer;color:#b64e49;font-size:.82rem;font-weight:650;list-style:revert}
.confirm[open] {min-width:140px}.confirm form {padding:7px 0}
