:root {
  --fg: #1a1d21;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f7f9;
  --accent: #2b5fcc;
}
* { box-sizing: border-box; }
body {
  font: 15px/1.5 -apple-system, system-ui, sans-serif;
  margin: 0; background: var(--bg); color: var(--fg);
}
header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--line);
}
header nav { display: flex; gap: 18px; }
header a { color: var(--muted); text-decoration: none; font-size: 14px; }
header a:hover { color: var(--accent); }
main { max-width: 1100px; margin: 0 auto; padding: 24px; }

h1 { font-size: 20px; }
h2 { font-size: 16px; margin-top: 28px; }
small { color: var(--muted); }
.hint, .vacio { color: var(--muted); }
.vacio { text-align: center; padding: 28px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.filtros { display: flex; gap: 10px; }
.filtros a { color: var(--muted); text-decoration: none; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.filtros a.on { background: #e7edfb; color: var(--accent); }
.filtro-vivo { display: flex; gap: 8px; }
.filtro-vivo input[type="search"] { min-width: 220px; }

button {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 9px 16px; font-size: 14px; cursor: pointer;
}
button:hover { filter: brightness(1.05); }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
th { background: #fafbfc; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #9ca3af; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.acciones { margin-top: 16px; }

.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.chip.alta { background: #e3f5e9; color: #1a7f43; }
.chip.media { background: #fff3da; color: #9a6700; }
.chip.baja { background: #eceef0; color: #6b7280; }
.veredicto { display: inline-block; padding: 8px 14px; font-size: 14px; font-weight: 600; border-radius: 8px; margin: 4px 0 12px; }
ul.docs { padding-left: 18px; }
ul.docs li { margin: 5px 0; font-size: 14px; }

table.kv { max-width: 720px; }
table.kv th { width: 160px; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--muted); background: #fff; }
pre.resumen { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; white-space: pre-wrap; font: 13px/1.6 -apple-system, system-ui, sans-serif; }

.form, .card { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.form .row { display: flex; gap: 14px; flex-wrap: wrap; }
.form .row label { flex: 1; min-width: 140px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input, select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--fg); background: #fff; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--fg); }
label.check input { width: auto; }
button.link { background: none; border: 0; color: #b42318; padding: 0; font-size: 13px; cursor: pointer; text-decoration: underline; }
.form h2 { margin-top: 24px; }

body.login { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
body.login .card { background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.08); width: 320px; }
body.login h1 { font-size: 18px; margin: 0 0 8px; }
.error { color: #b42318; font-size: 13px; margin: 0; }
