@font-face { font-family: "Plus Jakarta Sans"; src: url("/PlusJakartaSans.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
:root {
  --marca: #1f3d7d; --oscuro: #12244f; --acento: #245bc4; --suave: #eef2f9; --linea: #b9c4d8; --texto: #0f1b33; --tenue: #47536b;
  --rojo: #b3121d; --rojo-suave: #fdeced; --verde: #0b6b3a; --verde-suave: #e6f4ec;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.4 "Plus Jakarta Sans", system-ui, sans-serif; color: var(--texto); background: var(--suave); }
h1, h2, h3 { color: var(--oscuro); margin: 0 0 12px; line-height: 1.2; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 15px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 1px; }

.cabecera { display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 20px; background: var(--oscuro); color: #fff; position: sticky; top: 0; z-index: 5; }
.cabecera img { height: 34px; background: #fff; border-radius: 6px; padding: 3px 6px; }
.cabecera .quien { margin-left: auto; font-weight: 600; }
.pastilla { padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; background: #fff; color: var(--verde); }
.pastilla.sin { color: var(--rojo); }
.boton { border: 0; border-radius: 6px; padding: 9px 16px; background: var(--marca); color: #fff; font-weight: 700; }
.boton:hover { background: var(--oscuro); }
.boton[disabled] { background: #8b96ab; cursor: not-allowed; }
.boton.secundario { background: #fff; color: var(--marca); box-shadow: inset 0 0 0 2px var(--marca); }
.boton.secundario:hover { background: var(--suave); }
.boton.peligro { background: var(--rojo); }
.boton.mini { padding: 5px 10px; font-size: 13px; }
.cabecera .boton.secundario { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px #fff; }

.tarjeta { background: #fff; border: 1px solid var(--linea); border-radius: 10px; padding: 18px 20px; margin-bottom: 14px; }
.acceso { max-width: 440px; margin: 7vh auto; }
.acceso img { display: block; height: 72px; margin: 0 auto 18px; }
.centro { max-width: 1040px; margin: 20px auto; padding: 0 20px; }
.editor { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 56px); }
.lateral { background: #fff; border-right: 1px solid var(--linea); padding: 14px 10px; position: sticky; top: 56px; height: calc(100vh - 56px); overflow: auto; }
.lateral button { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 9px 12px; margin-bottom: 2px; background: none; color: var(--texto); font-weight: 600; }
.lateral button:hover { background: var(--suave); }
.lateral button[aria-current="page"] { background: var(--marca); color: #fff; }
.lateral .titulo-exp { padding: 4px 12px 12px; font-weight: 800; color: var(--oscuro); }
.principal { padding: 18px 24px 40px; max-width: 1120px; }

.rejilla { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; }
.campo { display: flex; flex-direction: column; gap: 3px; font-weight: 600; font-size: 13px; color: var(--tenue); min-width: 0; }
.campo.ancho2 { grid-column: span 2; } .campo.ancho4 { grid-column: span 4; }
.campo input, .campo select, .campo textarea { font: inherit; font-weight: 500; color: var(--texto); padding: 7px 9px; border: 1.5px solid var(--linea); border-radius: 6px; background: #fff; width: 100%; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--acento); }
.campo input.bien { border-color: var(--verde); background: var(--verde-suave); }
.campo input.mal { border-color: var(--rojo); background: var(--rojo-suave); }
.campo input[readonly] { background: var(--suave); }
.casilla { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.casilla input { width: 18px; height: 18px; accent-color: var(--marca); }
.fila-titulo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.fila-titulo h3 { margin: 0; }
.rejilla > .boton { align-self: end; justify-self: start; }
.etiquetas { margin-bottom: 10px; }
.acciones { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.acciones.derecha { justify-content: flex-end; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: #fff; background: var(--marca); padding: 8px 10px; font-size: 13px; }
td { padding: 8px 10px; border-bottom: 1px solid var(--linea); }
.etiqueta { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--suave); color: var(--oscuro); }
.etiqueta.mal { background: var(--rojo-suave); color: var(--rojo); }
.etiqueta.bien { background: var(--verde-suave); color: var(--verde); }

.lista-inc { list-style: none; padding: 0; margin: 0 0 12px; }
.lista-inc li { padding: 7px 12px; border-left: 5px solid var(--acento); background: var(--suave); margin-bottom: 4px; border-radius: 0 6px 6px 0; }
.lista-inc.bloqueos li { border-color: var(--rojo); background: var(--rojo-suave); color: var(--rojo); font-weight: 600; }
.error-linea { color: var(--rojo); font-weight: 600; min-height: 1.3em; margin: 8px 0 0; }
.ayuda { color: var(--tenue); font-size: 13px; margin: 0 0 10px; }
.aviso { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-weight: 600; background: var(--suave); border: 1px solid var(--linea); color: var(--oscuro); }
.aviso.mal { background: var(--rojo-suave); border-color: var(--rojo); color: var(--rojo); }
.aviso.bien { background: var(--verde-suave); border-color: var(--verde); color: var(--verde); }

.valoracion { display: grid; grid-template-columns: 170px repeat(4, 1fr); gap: 4px 10px; align-items: center; font-size: 14px; }
.valoracion .cab { font-weight: 700; color: var(--oscuro); font-size: 13px; }
.etiquetas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.etiquetas .etiqueta button { border: 0; background: none; color: var(--rojo); font-weight: 800; padding: 0 0 0 6px; }
.resultados { max-height: 180px; overflow: auto; border: 1px solid var(--linea); border-radius: 6px; margin-top: 6px; }
.resultados button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--suave); background: #fff; padding: 6px 10px; }
.resultados button:hover { background: var(--suave); }
.firmas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.firmas img { width: 100%; height: 90px; object-fit: contain; border: 1px solid var(--linea); border-radius: 6px; background: #fff; }
.velo { position: fixed; inset: 0; background: rgb(12 26 60 / 70%); display: grid; place-items: center; z-index: 20; }
.dialogo { background: #fff; border-radius: 10px; padding: 20px; width: min(720px, 94vw); }
.lienzo { display: block; width: 100%; aspect-ratio: 64 / 26; border: 2px solid var(--marca); border-radius: 6px; background: #fff; touch-action: none; }
.qr img { width: 200px; display: block; margin: 8px auto; }
.codigo { font-family: ui-monospace, monospace; font-weight: 700; word-break: break-all; }
