:root { --azul:#1f5f8b; --gris:#f3f5f7; --borde:#d8dde3; --texto:#1d2733; --rojo:#b3261e; --verde:#1e7a3c; --amarillo:#8a6100; }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--texto); background:#fff; }
header { background:var(--azul); color:#fff; padding:.6rem 1.2rem; display:flex; gap:1.2rem; align-items:center; flex-wrap:wrap; }
header a { color:#fff; text-decoration:none; }
header .marca { font-weight:700; font-size:1.1rem; margin-right:auto; }
header form { margin:0; }
header button { background:none; border:1px solid #fff8; color:#fff; padding:.25rem .7rem; border-radius:4px; cursor:pointer; }
.insignia { background:#ffd54f; color:#000; border-radius:10px; padding:0 .45rem; font-size:.8rem; font-weight:700; }
main { max-width:1150px; margin:1.2rem auto; padding:0 1rem; }
h1 { font-size:1.4rem; margin:.2rem 0 1rem; }
h2 { font-size:1.1rem; margin:1.5rem 0 .5rem; }
table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:.45rem .5rem; border-bottom:1px solid var(--borde); vertical-align:top; }
th { background:var(--gris); font-weight:600; }
tr:hover td { background:#fafbfc; }
a { color:var(--azul); }
.boton, button.boton { display:inline-block; background:var(--azul); color:#fff; border:0; padding:.4rem .85rem; border-radius:5px; text-decoration:none; cursor:pointer; font-size:.92rem; }
.boton.sec { background:#fff; color:var(--azul); border:1px solid var(--azul); }
.boton.chico { padding:.2rem .55rem; font-size:.85rem; }
.acciones { display:flex; gap:.4rem; flex-wrap:wrap; }
.buscador { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; margin-bottom:1rem; }
.buscador input[type=search] { flex:1; min-width:240px; padding:.5rem; border:1px solid var(--borde); border-radius:5px; font-size:1rem; }
.mensajes { list-style:none; padding:0; }
.mensajes li { padding:.55rem .8rem; border-radius:5px; margin-bottom:.4rem; background:var(--gris); }
.mensajes .success { background:#e6f4ea; color:var(--verde); }
.mensajes .error { background:#fdecea; color:var(--rojo); }
.mensajes .warning { background:#fff4d6; color:var(--amarillo); }
.ficha { background:var(--gris); border-radius:8px; padding:.8rem 1rem; display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:.4rem 1rem; }
.ficha span { display:block; font-size:.8rem; color:#5b6672; }
.visita { border:1px solid var(--borde); border-radius:8px; margin-bottom:1rem; overflow:hidden; }
.visita > div { background:var(--gris); padding:.5rem .8rem; display:flex; justify-content:space-between; align-items:center; gap:.5rem; flex-wrap:wrap; }
.visita table { margin:0; }
.visita td, .visita th { border-bottom:1px solid #eef0f2; }
.muted { color:#6b7580; font-size:.88rem; }
form.formulario p { margin:.7rem 0; }
form.formulario label { display:block; font-weight:600; margin-bottom:.2rem; }
form.formulario input:not([type=checkbox]), form.formulario select, form.formulario textarea { width:100%; max-width:520px; padding:.45rem; border:1px solid var(--borde); border-radius:5px; font:inherit; }
.helptext { display:block; color:#6b7580; font-size:.82rem; }
.errorlist { color:var(--rojo); padding-left:1rem; }
.visor { width:100%; height:calc(100vh - 170px); border:1px solid var(--borde); border-radius:6px; }
.paginacion { margin:1rem 0; display:flex; gap:.8rem; align-items:center; }
.login { max-width:360px; margin:4rem auto; }
