:root{--teal:#02a9fe;--dk:#0b2a3d;--bd:#c9d3da;--bg:#f4f7f9;--txt:#1c2b36;--gris:#566873;--mal:#a61b1b}
*{box-sizing:border-box}
html,body{margin:0;max-width:100%;overflow-x:hidden}
body{font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--txt);display:flex;flex-direction:column;min-height:100vh}
h1{font-size:1.35rem;margin:.5rem 0 .75rem}h2{font-size:1.1rem;margin:1.25rem 0 .5rem}
a{color:#005f94}
:focus-visible{outline:3px solid #ffb703;outline-offset:2px}
main:focus{outline:none}
.salto{position:absolute;left:-999px;top:0;background:#fff;padding:.5rem;z-index:10}
.salto:focus{left:0}
.solo-lectores{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.cab{background:var(--dk);color:#fff;display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .9rem;padding:.55rem .8rem}
.marca{display:flex;align-items:center;gap:.5rem;color:#fff;text-decoration:none;font-weight:600}
.marca img{height:32px;width:auto;background:#fff;border-radius:4px;padding:2px 4px}
#nav{display:flex;flex-wrap:wrap;gap:.25rem;flex:1 1 auto;justify-content:flex-end}
#nav[hidden]{display:none}
#nav a,#nav .enlace{color:#e3f3fb;text-decoration:none;padding:.5rem .7rem;border-radius:6px;background:none;border:0;font:inherit;cursor:pointer}
#nav a.activo{background:var(--teal);color:#04202e;font-weight:600}
main{width:100%;max-width:760px;margin:0 auto;padding:1rem .9rem 2rem;flex:1}
.pie{text-align:center;font-size:.85rem;color:var(--gris);padding:1rem}
.vacio,.sub{color:var(--gris)}.sub{font-size:.88rem}
.fila{display:flex;flex-wrap:wrap;gap:.25rem .75rem;align-items:center;justify-content:space-between}
.num{font-weight:700}
.tarjeta{display:block;background:#fff;border:1px solid var(--bd);border-radius:10px;padding:.75rem .9rem;margin-bottom:.6rem;color:inherit;text-decoration:none;overflow-wrap:anywhere}
a.tarjeta:hover{border-color:var(--teal)}
.asunto{font-weight:600;margin:.2rem 0}
.visita{margin:.3rem 0;font-weight:600;color:#0b4f7a}
.estado{font-size:.8rem;font-weight:700;border-radius:999px;padding:.1rem .6rem;border:1px solid transparent;white-space:nowrap}
.est-recibido{background:#e8eef2;color:#2c3e4a;border-color:#b9c6cf}
.est-atencion{background:#dff1fd;color:#064a73;border-color:#8cc9ee}
.est-programado{background:#e6e4fb;color:#35288f;border-color:#b3acee}
.est-espera{background:#fff0d1;color:#6b4300;border-color:#e7b95a}
.est-resuelto{background:#dcf4e4;color:#0f5a2c;border-color:#8fd3a8}
.est-cerrado{background:#eceff1;color:#4a5963;border-color:#c3ccd1}
.est-cancelado{background:#f6e1e1;color:#7a1c1c;border-color:#e0a9a9}
.aviso{background:#fff0d1;border:1px solid #e7b95a;border-radius:8px;padding:.6rem .8rem}
.error{background:#fbe9e9;border:1px solid #e0a9a9;color:#7a1c1c;border-radius:8px;padding:.6rem .8rem;margin:.6rem 0}
.exito{background:#dcf4e4;border:1px solid #8fd3a8;color:#0f5a2c;border-radius:8px;padding:.6rem .8rem;margin:.6rem 0}
.descripcion,.texto{white-space:pre-wrap;overflow-wrap:anywhere;margin:.3rem 0}
.mensaje{background:#fff;border:1px solid var(--bd);border-radius:10px;padding:.55rem .8rem;margin:.5rem 0;max-width:92%}
.mensaje.cliente{margin-left:auto;background:#e3f3fb;border-color:#9fd3ee}
.archivos{padding-left:1.1rem;overflow-wrap:anywhere}
label{display:block;font-weight:600;margin:.8rem 0 .25rem}
.casilla{display:flex;align-items:center;gap:.5rem;font-weight:400}
.casilla input{width:1.25rem;height:1.25rem}
input[type=text],input[type=email],input[type=tel],select,textarea{width:100%;font:inherit;border:1px solid #7c8d98;border-radius:8px;padding:.6rem .65rem;background:#fff;color:inherit}
textarea{min-height:7rem}
.ayuda{font-size:.85rem;color:var(--gris);margin:.2rem 0}
button,.btn{font:inherit;border:1px solid #7c8d98;background:#fff;border-radius:8px;padding:.65rem 1rem;cursor:pointer;color:inherit;min-height:44px}
button.primario{background:var(--teal);border-color:#0287cc;color:#04202e;font-weight:700}
button:disabled{opacity:.6;cursor:not-allowed}
.acciones{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
.tipos{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.6rem}
.tipo{text-align:left;display:block;width:100%}
.tipo b{display:block}.tipo span{font-size:.85rem;color:var(--gris)}
.tipo[aria-pressed=true]{border:2px solid var(--teal);background:#e3f3fb}
.elegidos{list-style:none;padding:0;margin:.4rem 0}
.elegidos li{display:flex;justify-content:space-between;gap:.5rem;align-items:center;padding:.25rem 0;overflow-wrap:anywhere}
.caja{background:#fff;border:1px solid var(--bd);border-radius:12px;padding:1rem}
.doc h2{margin-top:1.5rem}
@media (min-width:600px){main{padding-top:1.5rem}}
