:root {
  --pri: #0b4f6c;
  --pri-osc: #073a50;
  --acento: #f2a541;
  --fondo: #f3f5f4;
  --tarjeta: #ffffff;
  --texto: #1c2a33;
  --muted: #64748b;
  --borde: #dfe5e8;
  --ok: #16a34a;
  --error: #dc2626;
  --radio: 14px;
  --sombra: 0 1px 2px rgba(16, 40, 55, .06), 0 4px 16px rgba(16, 40, 55, .06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--fondo); color: var(--texto); font-size: 16px; line-height: 1.5;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--pri); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.05rem; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.chico { font-size: .875rem; }
.centro { text-align: center; }

/* ---------- Barra superior ---------- */
.barra { background: var(--pri); color: #fff; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.barra-in { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; }
.marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.marca-ico { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.marca-txt { display: flex; flex-direction: column; min-width: 0; }
.marca-txt small { opacity: .8; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marca-txt strong { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-menu { background: rgba(255,255,255,.14); border: 0; color: #fff; font-size: 1.4rem; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.menu { display: none; flex-direction: column; padding: 0 12px 12px; max-width: 1200px; margin: 0 auto; }
.menu.abierto { display: flex; }
.menu a { color: #fff; text-decoration: none; padding: 11px 12px; border-radius: 10px; font-weight: 500; }
.menu a:hover, .menu a.act { background: rgba(255,255,255,.14); }
.menu a.destacado { background: var(--acento); color: #2b1d05; font-weight: 700; }
@media (min-width: 900px) {
  .barra { display: flex; }
  .barra { padding: 0 max(16px, calc((100vw - 1200px) / 2)); align-items: center; justify-content: space-between; }
  .barra-in { margin: 0; padding: 10px 0; max-width: none; }
  .btn-menu { display: none; }
  .menu { display: flex; flex-direction: row; padding: 0; margin: 0; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
  .menu a { padding: 8px 12px; font-size: .94rem; }
}

/* ---------- Contenido ---------- */
.contenido { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px 16px 40px; }
.tarjeta { background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); padding: 20px; margin-bottom: 18px; }
.tarjeta.sin-pad { padding: 0; overflow: hidden; }
.form-angosto { max-width: 560px; margin-left: auto; margin-right: auto; }
.form-medio { max-width: 760px; }
.tit-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tit-fila h1, .tit-fila h2 { margin: 0; }
.dos-col { display: grid; gap: 18px; }
@media (min-width: 900px) {
  .dos-col { grid-template-columns: 1fr 1fr; align-items: start; }
  .dos-col-ancha { grid-template-columns: 1.5fr 1fr; }
}

/* ---------- Avisos ---------- */
.aviso { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; }
.aviso-ok { background: #dcfce7; color: #14532d; }
.aviso-error { background: #fee2e2; color: #7f1d1d; }
.aviso-info { background: #e0f2fe; color: #0c4a6e; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--pri); color: #fff; border: 0; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; min-height: 44px; }
.btn:hover { background: var(--pri-osc); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-sec { background: #e6eef2; color: var(--pri); }
.btn-sec:hover { background: #d5e3ea; }
.btn-peligro { background: #fee2e2; color: #b91c1c; }
.btn-peligro:hover { background: #fecaca; }
.btn-wa { background: #25d366; color: #063; }
.btn-wa:hover { background: #1fbe5b; }
.btn-grande { padding: 14px 22px; font-size: 1.05rem; }
.btn-chico { padding: 6px 12px; min-height: 36px; font-size: .875rem; }
.btn-ancho { width: 100%; }
.fila-acc { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fila-acc form { margin: 0; }

/* ---------- Formularios ---------- */
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 14px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; color: var(--texto);
  padding: 11px 12px; border: 1.5px solid var(--borde); border-radius: 10px; background: #fff; min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px rgba(11,79,108,.15); }
input[type=color] { padding: 4px; height: 44px; }
input[type=file] { padding: 8px; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.check input { width: auto; min-height: 0; margin: 0; }
.fila2, .fila3 { display: grid; gap: 0 12px; }
@media (min-width: 600px) {
  .fila2 { grid-template-columns: 1fr 1fr; }
  .fila3 { grid-template-columns: 1fr 1fr 1fr; }
}
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend { font-weight: 800; font-size: 1.1rem; margin-bottom: 12px; color: var(--pri); }

/* ---------- Inicio ---------- */
.hero {
  background: linear-gradient(135deg, var(--pri) 0%, #0f6e8f 100%); color: #fff; border-radius: 20px;
  padding: 28px 22px; margin-bottom: 26px; display: grid; gap: 24px; position: relative; overflow: hidden;
}
.hero::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(242,165,65,.18); }
.hero h1 { font-size: 1.9rem; margin-bottom: .4em; }
.hero-sup { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; opacity: .85; margin: 0 0 6px; font-weight: 700; }
.hero-txt { opacity: .92; margin: 0 0 18px; max-width: 520px; }
.hero-acc { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn { background: var(--acento); color: #2b1d05; }
.hero .btn:hover { background: #f5b55f; }
.hero .btn-sec { background: rgba(255,255,255,.16); color: #fff; }
.hero .btn-sec:hover { background: rgba(255,255,255,.26); }
.hero-num { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: relative; z-index: 1; }
.hero-num div { background: rgba(255,255,255,.12); border-radius: 14px; padding: 12px; text-align: center; }
.hero-num b { display: block; font-size: 1.6rem; font-weight: 800; }
.hero-num span { font-size: .78rem; opacity: .85; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 40px; }
  .hero h1 { font-size: 2.4rem; }
}
.tit-sec { font-size: 1.3rem; }
.grilla-serv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 28px; }
@media (min-width: 600px) { .grilla-serv { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grilla-serv { grid-template-columns: repeat(4, 1fr); } }
.serv {
  background: #fff; border-radius: var(--radio); padding: 16px; text-decoration: none; color: var(--texto);
  box-shadow: var(--sombra); border-top: 4px solid var(--c); display: flex; flex-direction: column; gap: 4px; transition: transform .15s;
}
.serv:hover { transform: translateY(-2px); }
.serv-ico { font-size: 1.8rem; }
.serv small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.pasos ol { counter-reset: p; list-style: none; padding: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { .pasos ol { grid-template-columns: repeat(3, 1fr); } }
.pasos li { counter-increment: p; background: #fff; border-radius: var(--radio); padding: 16px 16px 16px 60px; position: relative; box-shadow: var(--sombra); }
.pasos li::before { content: counter(p); position: absolute; left: 16px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--acento); color: #2b1d05; display: grid; place-items: center; font-weight: 800; }

/* ---------- Nuevo reclamo ---------- */
.selector-serv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
@media (min-width: 600px) { .selector-serv { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .selector-serv { grid-template-columns: repeat(4, 1fr); } }
.opc-serv { margin: 0; font-weight: 500; }
.opc-serv input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opc-serv span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 2px solid var(--borde); border-radius: 12px; cursor: pointer; min-height: 52px; font-size: .9rem; }
.opc-serv i { font-style: normal; font-size: 1.3rem; }
.opc-serv input:checked + span { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); font-weight: 700; }
.opc-serv input:focus-visible + span { box-shadow: 0 0 0 3px rgba(11,79,108,.25); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1.5px solid var(--borde); border-radius: 999px; margin: 0; font-weight: 500; cursor: pointer; }
.chip input { width: auto; min-height: 0; margin: 0; }
.mapa-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mapa { height: 320px; border-radius: 12px; border: 1.5px solid var(--borde); z-index: 1; }
.mapa-chico { height: 240px; margin-top: 14px; }
.mapa-grande { height: 70vh; min-height: 420px; }
.prev-fotos, .galeria { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.prev-fotos img, .galeria img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--borde); }
.pin-mapa span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.pin-mapa i { transform: rotate(45deg); font-style: normal; font-size: 16px; line-height: 1; }

/* ---------- Detalle reclamo ---------- */
.rec-cab { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.rec-cab h1, .rec-cab h2 { margin: 0; }
.rec-cab small { color: var(--muted); font-weight: 600; }
.rec-cab > div:nth-child(2) { flex: 1; min-width: 140px; }
.rec-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; background: color-mix(in srgb, var(--c) 15%, #fff); flex: none; }
.rec-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); }
.prio { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: .78rem; font-weight: 700; }
.prio-baja { background: #f1f5f9; color: #475569; }
.prio-media { background: #e0f2fe; color: #075985; }
.prio-alta { background: #ffedd5; color: #9a3412; }
.prio-urgente { background: #fee2e2; color: #991b1b; }
.datos { display: grid; grid-template-columns: 1fr; gap: 2px 16px; margin: 0 0 12px; }
.datos dt { font-weight: 700; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 8px; }
.datos dd { margin: 0; }
@media (min-width: 600px) {
  .datos { grid-template-columns: 140px 1fr; }
  .datos dt { margin-top: 0; padding-top: 2px; }
}
.progreso { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.progreso li { font-size: .74rem; text-align: center; color: var(--muted); padding-top: 10px; border-top: 5px solid var(--borde); font-weight: 600; }
.progreso li.hecho { border-color: var(--ok); color: var(--texto); }
.tiempo { list-style: none; padding: 0; margin: 0; }
.tiempo li { position: relative; padding: 0 0 18px 22px; border-left: 2px solid var(--borde); margin-left: 6px; }
.tiempo li::before { content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--pri); }
.tiempo li.t-vecino::before { background: var(--acento); }
.tiempo li.t-interna::before { background: #94a3b8; }
.tiempo li.t-interna { opacity: .85; }
.tiempo p { margin: 6px 0 0; }
.t-cab { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .85rem; }
.t-quien { font-weight: 700; }
.t-cab time { color: var(--muted); }
.t-estado { margin-top: 4px; }
.t-nota { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.t-foto { width: 140px; border-radius: 10px; margin-top: 8px; }
.form-coment { background: #f8fafb; padding: 14px; border-radius: 12px; margin-bottom: 18px; }
.form-coment label { margin-bottom: 10px; }
.form-coment input[type=file] { flex: 1; min-width: 180px; margin: 0; }

/* ---------- Mis reclamos ---------- */
.lista-rec { display: grid; gap: 10px; }
.item-rec { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: var(--radio); padding: 14px; box-shadow: var(--sombra); text-decoration: none; color: var(--texto); border-left: 4px solid var(--c); }
.item-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.vacio { text-align: center; padding: 40px 20px; }

/* ---------- Panel ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.kpi { background: #fff; border-radius: var(--radio); padding: 16px; box-shadow: var(--sombra); text-decoration: none; color: var(--texto); }
.kpi b { display: block; font-size: 1.9rem; font-weight: 800; color: var(--pri); line-height: 1.1; }
.kpi span { font-size: .82rem; color: var(--muted); font-weight: 600; }
.kpi-alerta b { color: #c2410c; }
.barras { display: grid; gap: 8px; margin-bottom: 20px; }
.barra-fila { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr auto; gap: 10px; align-items: center; text-decoration: none; color: var(--texto); font-size: .88rem; }
.barra-fila > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-pista { height: 10px; background: #edf1f3; border-radius: 99px; overflow: hidden; }
.barra-pista i { display: block; height: 100%; border-radius: 99px; min-width: 2px; }
.columnas { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 170px; align-items: end; }
.col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: .78rem; }
.col i { display: block; width: 70%; background: var(--pri); border-radius: 6px 6px 0 0; min-height: 3px; }
.col span { color: var(--muted); }
.filtros { display: grid; grid-template-columns: 1fr; gap: 8px; background: #fff; padding: 14px; border-radius: var(--radio); box-shadow: var(--sombra); margin-bottom: 16px; }
.filtros input, .filtros select { margin: 0; }
.filtros .f-fecha { margin: 0; font-size: .8rem; color: var(--muted); }
.filtros .f-fecha input { margin-top: 2px; }
.filtros-acc { display: flex; gap: 8px; }
@media (min-width: 700px) { .filtros { grid-template-columns: repeat(3, 1fr); } .filtros > input:first-child { grid-column: span 3; } }
@media (min-width: 1100px) { .filtros { grid-template-columns: repeat(5, 1fr); } .filtros > input:first-child { grid-column: span 2; } }
.filtros-corto { grid-template-columns: 1fr auto !important; }
.filtros-corto > input:first-child { grid-column: auto !important; }
.tabla-env { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabla { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabla th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 14px; background: #f8fafb; border-bottom: 1px solid var(--borde); white-space: nowrap; }
.tabla td { padding: 12px 14px; border-bottom: 1px solid #eef2f4; vertical-align: top; }
.tabla tr[data-href] { cursor: pointer; }
.tabla tbody tr:hover { background: #f8fbfc; }
.tabla tr.inactivo td { opacity: .55; }
.tabla .acciones { white-space: nowrap; }
.tabla .acciones form { display: inline; margin: 0; }
.tabla .acciones .btn { margin: 2px 0; }
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.paginas { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.paginas a { padding: 8px 13px; background: #fff; border-radius: 8px; text-decoration: none; box-shadow: var(--sombra); }
.paginas a.act { background: var(--pri); color: #fff; }
.pestanas { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; }
.pestanas a { padding: 10px 16px; border-radius: 10px; background: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; box-shadow: var(--sombra); }
.pestanas a.act { background: var(--pri); color: #fff; }

/* ---------- Pie ---------- */
.pie { background: #0d2633; color: #c7d4db; padding: 22px 16px; font-size: .88rem; text-align: center; }
.pie-datos { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin-bottom: 14px; }
.pie-datos strong { color: #fff; width: 100%; }
.credito { opacity: .85; font-size: .8rem; }
.credito a { color: var(--acento); text-decoration: none; font-weight: 600; }
.wa-flotante { position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: grid; place-items: center; font-size: 1.6rem; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.25); z-index: 900; }

/* ---------- Impresión ---------- */
@media print {
  .barra, .pie, .no-imprimir, .wa-flotante { display: none !important; }
  body { background: #fff; }
  .tarjeta { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .dos-col { display: block; }
  .mapa { display: none; }
}

/* ---------- Publicaciones ---------- */
.aviso-dest { display: flex; align-items: center; gap: 12px; background: #fff; border-left: 5px solid var(--c); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; text-decoration: none; color: var(--texto); box-shadow: var(--sombra); }
.aviso-dest-ico { font-size: 1.6rem; flex: none; }
.aviso-dest > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.aviso-dest small { color: var(--c); font-weight: 800; text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; }
.aviso-dest-ir { color: var(--c); font-weight: 700; white-space: nowrap; }
.grilla-pub { display: grid; gap: 14px; margin-bottom: 28px; }
@media (min-width: 640px) { .grilla-pub { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grilla-pub { grid-template-columns: repeat(3, 1fr); } }
.pub { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; text-decoration: none; color: var(--texto); display: flex; flex-direction: column; transition: transform .15s; }
.pub:hover { transform: translateY(-2px); }
.pub-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.pub-sin-img { aspect-ratio: 16 / 5; display: grid; place-items: center; font-size: 2.6rem; background: color-mix(in srgb, var(--c) 12%, #fff); }
.pub-cuerpo { padding: 14px 16px 16px; }
.pub-cuerpo h3 { margin: 8px 0 6px; font-size: 1.05rem; }
.pub-cuerpo p { margin: 0; color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pub-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.articulo { max-width: 780px; margin-left: auto; margin-right: auto; }
.articulo h1 { margin-top: 12px; font-size: 1.8rem; }
.bajada { font-size: 1.1rem; color: var(--muted); margin-top: 0; }
.articulo-img { width: 100%; border-radius: 12px; margin: 6px 0 16px; }
.articulo-txt { font-size: 1.04rem; line-height: 1.7; margin-bottom: 18px; overflow-wrap: anywhere; }
.pub-fila { display: flex; gap: 10px; align-items: center; }
.pub-fila img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; flex: none; }
.caja-opciones { background: #f8fafb; border-radius: 12px; padding: 14px 14px 2px; margin-bottom: 16px; }

/* ---------- Acceso municipal ---------- */
.acceso-admin { margin-top: 30px; text-align: center; }
.acceso-admin form { text-align: left; }
.acceso-ico { font-size: 2.4rem; }
.modo-admin .barra { background: #0d2633; }
