:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #18202a;
  --muted: #657080;
  --line: #d9dde5;
  --brand: #14233b;
  --accent: #0b6bcb;
  --good: #0b7a3b;
  --warn: #b36b00;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.topbar h1 { margin: 0; font-size: 34px; letter-spacing: .03em; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 18px; }
.badge {
  background: var(--brand);
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
}
.search-card, .evidence-card, .status {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(20,35,59,.06);
}
.search-card { padding: 18px; margin-bottom: 16px; }
label { display: block; font-weight: 800; margin-bottom: 10px; font-size: 18px; }
.search-row { display: flex; gap: 10px; }
input {
  flex: 1;
  font-size: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
button {
  border: 0;
  background: var(--accent);
  color: white;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}
button.secondary { background: var(--brand); }
button.ghost { background: #eef2f7; color: var(--brand); }
button:disabled { opacity: .55; cursor: not-allowed; }
.hint { color: var(--muted); margin-bottom: 0; }
.status { padding: 14px 16px; margin: 12px 0; font-weight: 700; }
.hidden { display: none; }
.results { display: grid; gap: 14px; }
.evidence-card { padding: 16px; }
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.type { font-size: 20px; font-weight: 900; }
.casilla { color: var(--muted); margin-top: 4px; }
.status-pill {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.status-pill.no { background: #eef2f7; color: var(--muted); }
.status-pill.yes { background: #e8f6ee; color: var(--good); }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.item { background: #f8fafc; padding: 10px; border-radius: 10px; }
.item b { display: block; color: var(--muted); font-size: 13px; margin-bottom: 3px; }
.note {
  background: #fff8e8;
  border: 1px solid #f0d49a;
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
}
.note b { color: var(--warn); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .search-row { flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
  button { width: 100%; }
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 30, .72);
  z-index: 1000;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden { display: none; }
.modal-panel {
  width: min(980px, 100%);
  max-height: 94vh;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-close {
  padding: 8px 12px;
  font-size: 14px;
  background: var(--brand);
}
.modal-body {
  max-height: calc(94vh - 64px);
  overflow: auto;
  padding: 12px;
  background: #f4f6f9;
  text-align: center;
}
.foto-preview {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: white;
}
.loading, .error-box {
  padding: 18px;
  font-weight: 800;
}
.error-box { color: #9b1c1c; }
