:root { --ink: #243b35; --muted: #687971; --green: #266a54; --line: #dde5df; --cream: #f5f7f2; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--cream); font: 15px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; }
button, .button-link { border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); padding: 9px 15px; cursor: pointer; }
button:hover:not(:disabled), .button-link:hover { border-color: var(--green); }
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #9bc9b5; outline-offset: 3px; }
.primary { background: var(--green); color: white; border-color: var(--green); }
.full { width: 100%; margin-top: 12px; }
.topbar { min-height: 82px; padding: 16px 6%; background: white; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.brand { font-size: 21px; font-weight: 750; }
.brand span { font-size: 12px; display: block; letter-spacing: .12em; font-weight: 500; text-transform: uppercase; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.public-layout { max-width: 1150px; margin: 75px auto; padding: 0 25px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 65px; align-items: start; }
.intro { padding: 25px 0; }
.eyebrow { display: block; color: var(--green); font-size: 11px; font-weight: 750; letter-spacing: .14em; margin-bottom: 12px; }
h1, h2 { line-height: 1.2; margin: 0 0 20px; }
h1 { font-size: 34px; letter-spacing: -.035em; }
.intro h1 { font-size: clamp(36px, 4.4vw, 54px); margin-bottom: 25px; }
h2 { font-size: 23px; }
.intro p { font-size: 17px; }
.subtle { color: var(--muted); font-size: 13px; }
.steps { padding-left: 24px; margin: 30px 0; }
.steps li { margin: 15px 0; padding-left: 8px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: 0 6px 25px #243b3505; }
label { display: block; font-weight: 600; margin: 18px 0 7px; }
input, textarea { width: 100%; border: 1px solid #c9d6cd; border-radius: 9px; padding: 12px 14px; color: var(--ink); background: white; }
textarea { resize: vertical; }
.person-option { display: block; width: 100%; text-align: left; margin: 8px 0; }
.person-option small, td small { display: block; }
.selected { background: #eaf4ee; padding: 14px; border-radius: 9px; margin: 15px 0; border: 1px solid #bcd8c8; }
.message { padding: 14px 18px; border-radius: 9px; margin: 20px 0; overflow-wrap: anywhere; }
.message.error { background: #fff0ec; color: #963f2a; border: 1px solid #ecc9bf; }
.message.success { background: #eaf4ee; color: var(--green); border: 1px solid #c2ddcc; }
dl { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; overflow-wrap: anywhere; }
dt { color: var(--muted); } dd { margin: 0; font-weight: 600; }
footer { text-align: center; color: var(--muted); padding: 30px 20px; font-size: 12px; }
.login-layout { max-width: 470px; margin: 65px auto; }
.dashboard { max-width: 1450px; margin: 40px auto; padding: 0 30px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.section-heading h1, .section-heading h2 { margin-bottom: 8px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 26px 0; }
.card { background: white; border: 1px solid var(--line); padding: 23px; border-radius: 14px; }
.card span, .card small { display: block; }
.card strong { display: block; font-size: 38px; margin: 9px 0; line-height: 1.2; }
.card small { color: var(--muted); }
.pending { background: #fff7df; }
.paid { background: #eaf4ee; }
.unknown { background: #f2f0f7; }
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.filters .active { background: var(--green); color: white; border-color: var(--green); }
.inline-label { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; }
.inline-label input { max-width: 260px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); background: #f8faf7; font-weight: 600; white-space: nowrap; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td small { color: var(--muted); margin-top: 6px; }
.badge { display: inline-block; border-radius: 6px; padding: 4px 8px; font-weight: 650; font-size: 11px; border: 1px solid #00000012; }
.row-actions { min-width: 145px; }
.row-actions button, .row-actions a { display: inline-block; font-size: 12px; margin: 0 0 6px; padding: 6px 10px; white-space: nowrap; }
.management-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-top: 24px; }
.management-grid .table-scroll { margin-top: 25px; max-height: 420px; }
[hidden] { display: none !important; }
@media (max-width: 900px) {
    .public-layout { grid-template-columns: 1fr; gap: 25px; margin: 30px auto; max-width: 640px; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .management-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-wrap: wrap; }
}
@media (max-width: 520px) {
    .topbar { padding: 15px 20px; }
    .brand { font-size: 18px; }
    .header-actions { flex-wrap: wrap; gap: 8px; justify-content: flex-end; font-size: 12px; }
    .panel { padding: 22px; }
    .dashboard { padding: 0 15px; }
    .cards { gap: 10px; }
    .card { padding: 16px; }
    .card span { font-size: 12px; }
    .login-layout { margin: 35px 20px; }
    h1 { font-size: 28px; }
}
@media print {
    .topbar, .intro, footer, #print-receipt, #message { display: none; }
    body { background: white; }
    .public-layout { display: block; margin: 0; }
    .panel { box-shadow: none; border: none; }
}
