/* ===== Sistema Municipal Integrado · PROAUDIH — letra grande y en negrita, para celular y computadora ===== */
@font-face { font-family: Montserrat; src: url(/fonts/montserrat.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Montserrat; src: url(/fonts/montserrat-ext.woff2) format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --marino: #14203B; --marino-2: #1d2d52; --azul: #3B71FB; --azul-suave: #e8efff; --cian: #3DE0FF;
  --fondo: #f2f5fb; --blanco: #fff; --texto: #14203B; --texto-2: #4a5570; --linea: #dfe5f1;
  --verde: #12a150; --amarillo: #f2a900; --rojo: #e5484d; --gris: #9aa3b5;
  --radio: 16px; --sombra: 0 6px 24px rgba(20, 32, 59, .09);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Montserrat, Arial, sans-serif; font-size: 18px; font-weight: 600; line-height: 1.45; color: var(--texto); background: var(--fondo); }
h1, h2, h3 { font-weight: 900; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(26px, 4vw, 36px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 20px; }
button, input, select, textarea { font: inherit; }
.i { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }
.cargando { padding: 40vh 0; text-align: center; font-size: 22px; }
.grande { font-size: 20px; }
.chico { font-size: 15px; color: var(--texto-2); }
.ejemplo { display: inline-block; background: #fff4cc; color: #7a5600; border-radius: 8px; padding: 2px 10px; font-size: 14px; font-weight: 800; }

/* ---------- entrada ---------- */
.entrada { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, var(--marino) 0%, var(--marino-2) 60%, #23408f 100%); }
.entrada__caja { width: min(440px, 100%); background: var(--blanco); border-radius: 24px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); border-top: 8px solid var(--cian); }
.entrada__caja img { height: 48px; margin-bottom: 18px; }
.entrada__caja h1 { font-size: 28px; }

/* ---------- armazón ---------- */
.marco > div { min-width: 0; } /* deja que las tablas anchas se desplacen dentro de su caja y no empujen la página */
.marco { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.menu { background: var(--marino); color: #fff; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.menu img { height: 34px; margin: 0 8px 14px; align-self: flex-start; }
.menu__muni { font-size: 15px; color: var(--cian); font-weight: 800; padding: 0 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, .15); margin-bottom: 8px; }
.menu a { display: flex; gap: 12px; align-items: center; color: #dfe7ff; text-decoration: none; padding: 13px 12px; border-radius: 12px; font-size: 18px; font-weight: 700; }
.menu a:hover { background: rgba(255, 255, 255, .08); }
.menu a.activo { background: var(--azul); color: #fff; }
.menu__pie { margin-top: auto; font-size: 15px; color: #b8c4e4; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .15); }
.menu__pie b { color: #fff; display: block; font-size: 17px; }
.contenido { padding: 28px clamp(16px, 3vw, 40px) 80px; min-width: 0; }
.cabeza { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.cabeza h1 { margin: 0; }
.acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.barra-movil { display: none; }

/* ---------- tarjetas y cifras ---------- */
.cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 22px; }
.cifra { background: var(--blanco); border-radius: var(--radio); padding: 20px 22px; box-shadow: var(--sombra); border-left: 8px solid var(--azul); container-type: inline-size; min-width: 0; }
.cifra small { display: block; font-size: 15px; color: var(--texto-2); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.cifra b { display: block; font-size: clamp(18px, 10.5cqi, 32px); font-weight: 900; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cifra span { font-size: 15px; color: var(--texto-2); }
.cifra--rojo { border-left-color: var(--rojo); } .cifra--verde { border-left-color: var(--verde); } .cifra--cian { border-left-color: var(--cian); } .cifra--amarillo { border-left-color: var(--amarillo); }
.tarjeta { background: var(--blanco); border-radius: var(--radio); padding: 22px; box-shadow: var(--sombra); margin-bottom: 20px; overflow: hidden; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.vacio { text-align: center; color: var(--texto-2); padding: 28px 10px; }
.vivo { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--texto-2); }
.vivo::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--verde); animation: latido 1.6s infinite; }
@keyframes latido { 50% { opacity: .3; } }

/* ---------- semáforo y barras ---------- */
.luz { display: inline-block; width: 22px; height: 22px; border-radius: 50%; vertical-align: -5px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.luz--verde { background: var(--verde); } .luz--amarillo { background: var(--amarillo); } .luz--rojo { background: var(--rojo); } .luz--gris { background: var(--gris); }
.barra { display: block; height: 12px; background: #e9edf6; border-radius: 99px; overflow: hidden; min-width: 90px; }
.barra__llena { display: block; height: 100%; border-radius: 99px; }
.barra--azul { background: var(--azul); } .barra--verde { background: var(--verde); } .barra--amarillo { background: var(--amarillo); } .barra--rojo { background: var(--rojo); } .barra--cian { background: var(--cian); }

/* ---------- tablas ---------- */
.tabla-caja { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { text-align: left; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); padding: 10px 12px; border-bottom: 2px solid var(--linea); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--linea); vertical-align: top; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.total td { font-weight: 900; border-top: 2px solid var(--marino); }

/* ---------- pestañas ---------- */
.pestanas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.pestanas button { border: 2px solid var(--linea); background: var(--blanco); color: var(--texto); border-radius: 999px; padding: 10px 18px; font-weight: 800; cursor: pointer; }
.pestanas button.activo { background: var(--marino); color: #fff; border-color: var(--marino); }

/* ---------- avisos de control ---------- */
.aviso-ci { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 16px; border-radius: 14px; background: var(--blanco); box-shadow: var(--sombra); margin-bottom: 12px; border-left: 8px solid var(--azul); }
.aviso-ci--rojo { border-left-color: var(--rojo); } .aviso-ci--amarillo { border-left-color: var(--amarillo); }
.aviso-ci h3 { margin: 0 0 4px; font-size: 19px; }
.aviso-ci p { margin: 0; }
.aviso-ci .norma { font-size: 14px; color: var(--azul); font-weight: 800; margin-top: 6px; }
.aviso-ci .revision { font-size: 14px; color: var(--verde); font-weight: 800; margin-top: 6px; }
.lista-avisos { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.lista-avisos li { display: flex; gap: 10px; background: #fff8e1; border-radius: 12px; padding: 12px 14px; }
.chip { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: 14px; font-weight: 800; background: var(--azul-suave); color: var(--azul); white-space: nowrap; }
.chip--pagado { background: #dcf5e7; color: #0b7a3c; } .chip--devengado { background: #fff4cc; color: #7a5600; } .chip--anulado { background: #eee; color: #777; }

/* ---------- botones y formularios ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 13px 20px; background: var(--azul); color: #fff; font-weight: 800; font-size: 17px; cursor: pointer; min-height: 50px; text-decoration: none; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn--sec { background: var(--blanco); color: var(--marino); border: 2px solid var(--linea); }
.btn--negro { background: var(--marino); }
.btn--rojo { background: var(--rojo); }
.btn--chico { min-height: 40px; padding: 8px 14px; font-size: 15px; }
.btn--fantasma { background: transparent; color: inherit; }
.btn--icono { padding: 8px; min-height: 0; }
.btn--ancho { width: 100%; }
.formulario { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.formulario .ancho, .formulario > p, .formulario > div.ancho { grid-column: 1 / -1; }
.campo { display: grid; gap: 6px; }
.campo span { font-size: 16px; font-weight: 800; }
.campo small { font-size: 14px; color: var(--texto-2); font-weight: 600; }
.campo input, .campo select, .campo textarea { width: 100%; border: 2px solid var(--linea); border-radius: 12px; padding: 12px 14px; font-size: 18px; font-weight: 700; color: var(--texto); background: #fff; min-height: 52px; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 3px solid var(--cian); border-color: var(--azul); }
.check { display: flex; gap: 10px; align-items: center; font-size: 17px; }
.check input { width: 24px; height: 24px; }
.error-form { color: var(--rojo); font-weight: 800; margin: 0; }
.buscador { display: flex; gap: 10px; flex-wrap: wrap; }
.buscador input { flex: 1; min-width: 220px; border: 2px solid var(--linea); border-radius: 12px; padding: 12px 14px; font-size: 20px; font-weight: 800; min-height: 54px; }

/* firma y foto */
.firma { width: 100%; height: 190px; border: 2px dashed var(--azul); border-radius: 12px; background: #fbfcff; touch-action: none; display: block; }
.foto-previa { max-width: 100%; max-height: 220px; border-radius: 12px; display: block; margin-top: 8px; }

/* ---------- ventanas y avisos ---------- */
.modal-fondo { position: fixed; inset: 0; background: rgba(10, 18, 36, .55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 20px; width: min(620px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal--ancho { width: min(900px, 100%); }
.modal__cab { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--linea); }
.modal__cab h3 { margin: 0; font-size: 22px; }
.modal__cuerpo { padding: 20px 22px; overflow-y: auto; }
.modal__pie { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--linea); }
#avisos { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 10px; z-index: 60; width: min(520px, 92vw); }
.aviso { display: flex; gap: 10px; align-items: center; background: var(--marino); color: #fff; padding: 14px 18px; border-radius: 14px; font-weight: 800; box-shadow: var(--sombra); }
.aviso--error { background: var(--rojo); }

/* ---------- celular ---------- */
@media (max-width: 900px) {
  .marco { grid-template-columns: 1fr; }
  .menu { position: fixed; inset: 0 30% 0 0; z-index: 40; transform: translateX(-105%); transition: transform .2s; height: 100%; }
  .menu.abierto { transform: none; box-shadow: 0 0 0 100vmax rgba(10, 18, 36, .5); }
  .barra-movil { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--marino); color: #fff; padding: 10px 14px; position: sticky; top: 0; z-index: 30; }
  .barra-movil img { height: 28px; }
  .barra-movil button { background: transparent; border: 0; color: #fff; padding: 8px; }
  .barra-movil .i { width: 30px; height: 30px; }
  .contenido { padding: 18px 14px 80px; }
  .dos, .formulario { grid-template-columns: 1fr; }
  .aviso-ci { grid-template-columns: auto 1fr; }
  .aviso-ci > :last-child { grid-column: 1 / -1; }
}
@media print {
  .menu, .barra-movil, .acciones, .pestanas, #avisos { display: none !important; }
  .marco { display: block; }
  body { background: #fff; }
}
.nowrap { white-space: nowrap; }

/* Frase de «para qué sirve esta pantalla» y glosario plegable */
.intro { margin: -4px 0 18px; font-size: clamp(17px, 1.7vw, 21px); font-weight: 600; color: #3a4a68; max-width: 70ch; }
.glosario { margin: 0 0 18px; font-size: 17px; }
.glosario summary { cursor: pointer; font-weight: 700; color: #3B71FB; }
.glosario ul { margin: 10px 0 0; padding-left: 22px; line-height: 1.55; }
