:root { --ink:#1f2937; --muted:#6b7280; --line:#e5e7eb; --blue:#1e3a5f; --bg:#f7f8fa; --red:#b42318; --amber:#9a6700; --green:#3f6212; }
* { box-sizing: border-box; }
body { margin:0; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--ink); background:var(--bg); }
header { background:var(--blue); color:#fff; padding:12px 20px; display:flex; justify-content:space-between; align-items:center; }
header button { margin-left:12px; }
main { max-width:1180px; margin:20px auto; padding:0 16px; }
.card { background:#fff; border:1px solid var(--line); border-radius:8px; padding:16px 18px; margin-bottom:16px; }
h2 { font-size:17px; margin:0 0 12px; }
h3 { font-size:15px; margin:16px 0 8px; }
.muted { color:var(--muted); }
.error { color:var(--red); margin-top:8px; }
.ok { color:var(--green); margin-top:8px; }
label { display:block; margin:8px 0 3px; font-weight:600; font-size:13px; }
input, select { font:inherit; padding:6px 8px; border:1px solid #cbd5e1; border-radius:6px; min-width:220px; }
input[type=checkbox] { min-width:0; }
button { font:inherit; padding:6px 12px; border-radius:6px; border:1px solid #cbd5e1; background:#fff; cursor:pointer; }
button.primary { background:var(--blue); color:#fff; border-color:var(--blue); }
button.small { padding:3px 8px; font-size:12px; }
button:disabled { opacity:.5; cursor:default; }
.row { display:flex; gap:16px; flex-wrap:wrap; align-items:flex-end; }
.tabs { display:flex; gap:6px; margin-bottom:14px; }
.tabs button.on { background:var(--blue); color:#fff; border-color:var(--blue); }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:7px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
th { font-size:12px; color:var(--muted); font-weight:600; }
.tag { display:inline-block; padding:1px 8px; border-radius:10px; font-size:12px; font-weight:600; }
.tag.paid, .tag.open { background:#ecf5e1; color:var(--green); }
.tag.grace { background:#fff4d6; color:var(--amber); }
.tag.read_only, .tag.inactive { background:#fde8e7; color:var(--red); }
.qr { background:#fff; display:inline-block; padding:8px; border:1px solid var(--line); }
code { background:#f1f5f9; padding:2px 6px; border-radius:4px; }
@media (max-width: 700px) { input, select { min-width:0; width:100%; } table { font-size:12px; } }
