:root {
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #5d6b7c;
  --primary: #1f3d63;      /* azul del logo */
  --primary-hover: #152c49;
  --border: #d4dbe4;
  --error: #c62828;
  --ok-bg: #e8f5e9;
  --ok: #1b5e20;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .07);
}

header { text-align: center; }
.logo { display: block; width: 100%; max-width: 440px; height: auto; margin: -8px auto 16px; }

h1 { margin: 0 0 4px; font-size: 1.6rem; color: var(--primary); }
.sub { margin: 0 0 24px; color: var(--muted); }

.field { margin-bottom: 18px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
label::after { content: " *"; color: var(--error); }

input, textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 61, 99, .15);
}
.invalid { border-color: var(--error); }
.error { display: block; min-height: 1em; margin-top: 4px; color: var(--error); font-size: .85rem; }

/* --- Fotos de evidencia --- */
.label-opcional { display: block; font-weight: 600; margin-bottom: 8px; }
.label-opcional small { font-weight: 400; color: var(--muted); }
.fotos-preview { display: flex; flex-wrap: wrap; gap: 10px; }
.fotos-preview:not(:empty) { margin-bottom: 10px; }
.foto-mini { position: relative; width: 88px; height: 88px; }
.foto-mini img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.foto-mini button {
  position: absolute; top: -8px; right: -8px;
  width: 26px; height: 26px; padding: 0;
  border-radius: 50%; background: var(--error); color: #fff;
  font-size: 15px; line-height: 26px;
}
.foto-mini button:hover { background: #a31f1f; }
.foto-mini.procesando { display: grid; place-items: center; border: 1px dashed var(--border); border-radius: 8px; color: var(--muted); font-size: .75rem; }
.boton-foto {
  display: inline-block; padding: 10px 14px;
  border: 1px dashed var(--primary); border-radius: 8px;
  color: var(--primary); font-weight: 600; cursor: pointer;
}
.boton-foto:hover { background: rgba(31, 61, 99, .05); }
.boton-foto[hidden] { display: none; }
.boton-foto::after { content: none; } /* no es campo obligatorio: sin asterisco */

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button {
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--primary-hover); }
button:disabled { opacity: .6; cursor: wait; }
button.secundario { background: transparent; color: var(--primary); border: 1px solid var(--primary); margin-top: 8px; }

.form-msg { margin: 12px 0 0; color: var(--error); text-align: center; min-height: 1em; }

.exito { text-align: center; }
.exito h2 { color: var(--ok); }
.folio {
  display: inline-block;
  margin: 4px 0 16px;
  padding: 10px 18px;
  background: var(--ok-bg);
  color: var(--ok);
  border-radius: 8px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .04em;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
