:root {
  --bg: #f5f6f8; --surface: #fff; --line: #e6e8ec; --line-soft: #f0f1f4;
  --ink: #1b2130; --ink-2: #5b6374; --ink-3: #8a92a3;
  --brand: #1f3864; --brand-2: #16294d; --brand-soft: #eef1f7;
  --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.45; }
.boot { padding: 40px; color: var(--ink-3); }
a { color: var(--brand); text-decoration: none; }
h1 { font-size: 20px; margin: 0 0 2px; color: var(--brand); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 14px; margin: 0 0 14px; color: var(--brand); font-weight: 600; }
.muted { color: var(--ink-3); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }

/* shell */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 28px; height: 56px; }
.logo { font-weight: 700; color: var(--brand); letter-spacing: -.01em; }
.logo span { color: var(--ink-3); font-weight: 500; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 7px 12px; border-radius: 6px; color: var(--ink-2); font-weight: 500; font-size: 13px; }
.nav a.on, .nav a:hover { background: var(--brand-soft); color: var(--brand); }
.who { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 12px; align-items: center; }
main { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

/* blocks */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card { padding: 16px 18px; }
.card .label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 6px; }
.card .value { font-size: 23px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.card .value.bad { color: var(--bad); } .card .value.ok { color: var(--ok); }
.card .sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.panel { padding: 18px 20px; margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } .nav { overflow-x: auto; } .top-in { gap: 12px; } .who .email { display: none; } }

.tenant-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.tcard { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: inherit; transition: border-color .15s; }
.tcard:hover { border-color: var(--brand); }
.tcard .t-name { font-weight: 600; font-size: 15px; }
.tcard .t-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.tcard .t-row div { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.tcard .t-row b { display: block; font-size: 15px; color: var(--ink); text-transform: none; letter-spacing: 0; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* forms */
.form { display: grid; gap: 10px; align-items: end; }
.form.row { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.field label { display: block; font-size: 11.5px; color: var(--ink-2); margin-bottom: 4px; font-weight: 500; }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid #d3d7de; border-radius: 6px; font: inherit; font-size: 13px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
button { background: var(--brand); color: #fff; border: 0; border-radius: 6px; padding: 9px 16px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
button:hover { background: var(--brand-2); }
button.ghost { background: #fff; color: var(--brand); border: 1px solid #cfd5e1; }
button.ghost:hover { background: var(--brand-soft); }
button.link { background: none; color: var(--ink-3); padding: 2px 6px; font-weight: 500; font-size: 12px; }
button.link:hover { color: var(--bad); background: none; }
.err { color: var(--bad); font-size: 12.5px; min-height: 18px; margin-top: 6px; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--line-soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--ink-3); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; }
tfoot td { font-weight: 700; border-top: 2px solid var(--brand); border-bottom: 0; color: var(--brand); }
td.left, th.left { text-align: left; }
.empty { color: var(--ink-3); text-align: center; padding: 24px 0; font-size: 13px; }
.pill { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.pill.ok { background: #e8f5ec; color: var(--ok); }

.note { font-size: 12.5px; color: var(--ink-2); background: #f9fafb; border-radius: 6px; padding: 10px 12px; line-height: 1.55; margin-top: 12px; }
.note b { color: var(--brand); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .box { width: 100%; max-width: 360px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.login .box h1 { margin-bottom: 4px; }
.login .box .form { margin-top: 20px; }

/* print statement */
@media print {
  .top, .no-print, button { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .panel, .card { border-color: #ccc; break-inside: avoid; }
}
