:root { --paper: #f4f2eb; --surface: #fff; --ink: #13251f; --muted: #68756f; --line: #dce1dc; --green: #176b4d; --green-soft: #e1f1e8; --red: #a43d32; --red-soft: #fae8e5; --amber: #9a6111; --amber-soft: #fff0d4; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(circle at 80% 0, #dfe9df 0, transparent 30%), var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86); backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand span { display: grid; place-items: center; width: 34px; height: 34px; background: var(--ink); color: white; font: 800 18px "Manrope"; }
.icon-button { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.icon-button svg { width: 18px; }
main { max-width: 1180px; margin: 0 auto; padding: 44px 24px 80px; }
h1, h2 { margin: 0; font-family: "Manrope", sans-serif; letter-spacing: 0; }
h1 { font-size: 30px; }
.eyebrow { margin: 0 0 7px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.auth-panel { max-width: 420px; margin: 12vh auto 0; padding: 30px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 18px 60px rgba(19,37,31,.08); }
.auth-panel form { display: grid; gap: 16px; margin-top: 30px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }
input { min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--ink); outline: none; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
button:not(.icon-button):not(.secondary) { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border: 0; border-radius: 5px; background: var(--green); color: white; font-weight: 700; }
button svg { width: 17px; }
.error { min-height: 20px; color: var(--red); font-size: 12px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.month-control { min-width: 170px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 34px 0 24px; border: 1px solid var(--line); background: var(--surface); }
.stats div { display: grid; gap: 8px; padding: 20px; border-right: 1px solid var(--line); }
.stats div:last-child { border: 0; }
.stats small { color: var(--muted); }
.stats strong { font: 800 28px "Manrope"; }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
.search { position: relative; flex: 1; }
.search svg { position: absolute; left: 12px; top: 12px; width: 18px; color: var(--muted); }
.search input { padding-left: 40px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 11px 14px; background: #edf0ec; color: var(--muted); text-align: left; font-size: 10px; text-transform: uppercase; }
td { padding: 14px; border-top: 1px solid var(--line); vertical-align: middle; }
td b, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.badge.paid { background: var(--green-soft); color: var(--green); }
.badge.unpaid { background: var(--amber-soft); color: var(--amber); }
.row-action { min-height: 34px !important; white-space: nowrap; font-size: 11px; }
.row-action.revert { border: 1px solid #efc7c1 !important; background: var(--red-soft) !important; color: var(--red) !important; }
.empty { padding: 50px 20px; color: var(--muted); text-align: center; }
dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); box-shadow: 0 22px 80px rgba(19,37,31,.24); }
dialog::backdrop { background: rgba(19,37,31,.52); backdrop-filter: blur(2px); }
dialog form { display: grid; gap: 20px; padding: 24px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; }
.dialog-heading h2 { font-size: 20px; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; }
.secondary { min-height: 42px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--ink); }
.toast { position: fixed; right: 22px; bottom: 22px; transform: translateY(80px); padding: 12px 16px; border-radius: 5px; background: var(--ink); color: white; opacity: 0; transition: .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
@media (max-width: 680px) { main { padding: 28px 14px 70px; } .page-heading { align-items: stretch; flex-direction: column; } .stats { grid-template-columns: 1fr; } .stats div { border-right: 0; border-bottom: 1px solid var(--line); } th:nth-child(3), td:nth-child(3), th:nth-child(5), td:nth-child(5) { display: none; } }