:root {
  color-scheme: light;
  --ground: #e7ecf0;
  --surface: #fff;
  --ink: #101a22;
  --ink-2: #3e4e5b;
  --muted: #637684;
  --line: #cbd6de;
  --blue: #17458f;
  --blue-soft: #dce6f7;
  --red: #a02121;
  --red-soft: #f7dede;
  --display: "Archivo", "Helvetica Neue", sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.55 var(--body); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: var(--blue); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.wrap { max-width: 1100px; min-height: 100vh; margin: auto; padding: 30px 24px 36px; display: flex; flex-direction: column; }
.masthead { border-bottom: 2px solid var(--ink); padding-bottom: 24px; display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.back { display: inline-block; margin-bottom: 34px; font-size: 14px; font-weight: 600; }
.eyebrow { margin: 0 0 9px; color: var(--muted); font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.eyebrow span { margin: 0 4px; color: var(--line); }
h1, h2, h3 { margin: 0; font-family: var(--display); line-height: 1.1; letter-spacing: -.025em; }
h1 { font-size: clamp(34px, 5vw, 52px); }
h2 { font-size: clamp(26px, 3vw, 34px); }
h3 { font-size: 21px; }
.lede { color: var(--ink-2); margin: 12px 0 0; }
main { flex: 1; padding: 42px 0 64px; }
.login { max-width: 650px; background: var(--surface); border: 1px solid var(--line); padding: clamp(24px, 4vw, 40px); }
.section-heading { display: flex; gap: 20px; }
.section-number { color: var(--blue); font: 500 12px/1.5 var(--mono); padding-top: 2px; }
.section-heading p:last-child, .overview p:last-child { color: var(--ink-2); margin: 10px 0 0; }
form { margin: 32px 0 0 38px; max-width: 390px; display: grid; gap: 10px; }
label { font-size: 14px; font-weight: 600; }
input { width: 100%; min-height: 48px; padding: 10px 12px; color: var(--ink); background: var(--surface); border: 1px solid #8598a6; border-radius: 3px; }
.button { min-height: 44px; padding: 10px 16px; border: 1px solid transparent; border-radius: 3px; font-weight: 600; }
.button-primary { margin-top: 8px; background: var(--blue); color: white; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.button-primary:hover { background: #103770; }
.button-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.button-secondary:hover { border-color: var(--blue); color: var(--blue); }
.overview { display: grid; grid-template-columns: 1fr minmax(180px, 260px); gap: 30px; align-items: end; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.total { background: var(--blue); color: white; padding: 20px 24px; display: flex; flex-direction: column; gap: 4px; }
.total-label { font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--blue-soft); }
.total strong { font: 700 clamp(36px, 5vw, 52px)/1.1 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.table-header { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 36px 0 18px; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 15px 20px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
th:last-child, td:last-child { width: 30%; text-align: right; font-variant-numeric: tabular-nums; }
td:last-child { font-weight: 600; }
.names-section { margin-top: 48px; border-top: 1px solid var(--line); }
.names-section .table-header p:last-child { color: var(--ink-2); margin: 10px 0 0; }
.names-table { overflow-x: auto; }
.names-table th:last-child, .names-table td:last-child { width: auto; text-align: left; }
.names-table td:last-child { font-weight: 400; white-space: nowrap; }
.danger-zone { margin-top: 28px; padding: 22px; border: 1px solid #d9a4a4; background: var(--red-soft); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.danger-zone h3 { font-size: 19px; }
.danger-zone p { max-width: 680px; margin: 8px 0 0; }
.button-danger { flex-shrink: 0; background: var(--red); color: #fff; }
.button-danger:hover { background: #761818; }
.empty, .message:not(:empty) { padding: 16px 20px; background: var(--surface); border-left: 3px solid var(--blue); color: var(--ink-2); }
.message:not(:empty) { margin: 24px 0 0; }
.message[data-error="true"] { background: var(--red-soft); border-color: var(--red); color: var(--red); }
footer { border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font: 500 11px/1.5 var(--mono); }
footer span { padding: 0 5px; }
@media (max-width: 600px) {
  .wrap { padding: 22px 16px 28px; }
  .masthead { align-items: start; flex-direction: column; }
  .back { margin-bottom: 25px; }
  main { padding: 28px 0 48px; }
  form { margin-left: 0; }
  .overview { grid-template-columns: 1fr; gap: 22px; }
  .total { max-width: none; }
  th, td { padding: 13px 14px; }
  .names-section .table-header, .danger-zone { align-items: stretch; flex-direction: column; }
}
.municipalities-section { margin-top: 48px; border-top: 1px solid var(--line); }
.municipalities-section .table-wrap { overflow-x: auto; }
