/* /fenia/reportes: el tablero público de los reportes ciudadanos (views/pages/fenia-reportes.ejs).
 *
 * Claro, como la página de reportar: es lo que la gente abre desde el celular.
 * Violeta = el color de los reportes en FENIA. Cada tipo tiene su color, el mismo
 * en el mapa, en las fichas y en las barras (js/fenia-reportes-tablero.js).
 */
.tr-cuerpo { margin: 0; background: #f6f5fb; color: #101828; font-family: Inter, -apple-system, 'Segoe UI', Arial, sans-serif; -webkit-text-size-adjust: 100%; }
.tr-barra { display: flex; align-items: center; gap: 12px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: #fff; border-bottom: 1px solid #e4e2ee; position: sticky; top: 0; z-index: 1000; }
.tr-volver { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; font-size: 16px; font-weight: 700; color: #0b6e64; text-decoration: none; }
.tr-marca { flex: 1; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6d28d9; }
.tr-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: #6d28d9; color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.tr { max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; }
.tr-cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.tr-h { margin: 0 0 8px; font-size: 30px; line-height: 1.15; letter-spacing: -.01em; }
.tr-sub { margin: 0; max-width: 62ch; font-size: 15.5px; line-height: 1.45; color: #475467; }
.tr-rangos { display: inline-flex; padding: 4px; border-radius: 12px; background: #e9e6f5; }
.tr-rangos button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 14.5px; font-weight: 600; color: #4c1d95; cursor: pointer; }
.tr-rangos button.on { background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.16); }
.tr-aviso { margin: 16px 0 0; padding: 11px 14px; border-radius: 12px; background: #fdf1f1; border: 1px solid #f0b8b8; font-size: 14.5px; line-height: 1.45; color: #7f1d1d; }
.tr-aviso a { color: #b91c1c; font-weight: 800; }

.tr-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.tr-kpi { padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid #e4e2ee; }
.tr-kpi b { display: block; font-size: 34px; line-height: 1.05; font-weight: 800; color: #4c1d95; font-variant-numeric: tabular-nums; }
.tr-kpi span { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.3; color: #475467; }
.tr-estado { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: #efe8fd; font-size: 15px; line-height: 1.45; color: #3b1a78; }
.tr-estado:empty { display: none; }

.tr-cuerpo2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.tr-mapa-caja { padding: 12px; border-radius: 16px; background: #fff; border: 1px solid #e4e2ee; }
.tr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.tr-chips:empty { display: none; }
.tr-chips button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1.5px solid #dcd9ea; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: #1d2939; cursor: pointer; }
.tr-chips button i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.tr-chips button.on { border-color: #4c1d95; background: #efe8fd; }
.tr-mapa { height: 520px; border-radius: 12px; background: #e8e6f2; z-index: 0; }
.tr-leyenda { margin: 10px 2px 0; font-size: 13px; line-height: 1.5; color: #475467; }
.tr-pto { display: inline-block; width: 12px; height: 12px; margin: 0 4px -1px 0; border-radius: 50%; border: 2px solid #6d28d9; background: rgba(109,40,217,.15); }
.tr-pto--lleno { background: #6d28d9; }
.tr-pto + .tr-pto, .tr-leyenda .tr-pto:nth-of-type(2) { margin-left: 12px; }

.tr-lado { display: grid; gap: 16px; }
.tr-tarjeta { padding: 16px; border-radius: 16px; background: #fff; border: 1px solid #e4e2ee; }
.tr-tarjeta h2, .tr-invita h2 { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6d28d9; }
.tr-barras { display: grid; gap: 10px; }
.tr-barra-f { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: 14.5px; }
.tr-barra-f span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-barra-f b { font-variant-numeric: tabular-nums; }
.tr-barra-f div { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: #eeecf6; overflow: hidden; }
.tr-barra-f i { display: block; height: 100%; border-radius: 4px; }
.tr-vacio { margin: 0; font-size: 14.5px; color: #667085; }

.tr-ultimos { margin-top: 16px; }
.tr-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tr-lista button { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid #e4e2ee; background: #fff; font: inherit; text-align: left; color: inherit; cursor: pointer; }
.tr-lista button:hover { border-color: #b9a7ea; }
.tr-lista .ico { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; font-size: 20px; }
.tr-lista .que { font-size: 15px; font-weight: 700; }
.tr-lista .donde { grid-column: 2; font-size: 13.5px; color: #475467; }
.tr-lista .niv { grid-row: 1 / 3; grid-column: 3; padding: 4px 10px; border-radius: 999px; background: #f2f4f7; font-size: 12.5px; font-weight: 600; color: #475467; white-space: nowrap; }
.tr-lista .niv.si { background: #e6f4f1; color: #0b6e64; }

.tr-invita { margin-top: 16px; padding: 20px 16px; border-radius: 16px; background: #efe8fd; text-align: center; }
.tr-invita p { margin: 0 auto 14px; max-width: 46ch; font-size: 15.5px; line-height: 1.45; color: #3b1a78; }
.tr-boton { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 26px; border-radius: 14px; background: #6d28d9; color: #fff; font-size: 17px; font-weight: 700; text-decoration: none; }
.tr-nota { margin: 16px 2px 0; font-size: 13px; line-height: 1.5; color: #667085; }
.tr-nota a { color: #4c1d95; }
.tr-pop b { font-size: 14.5px; }
.tr-pop small { display: block; margin-top: 6px; color: #667085; }
.tr-pop em { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: #f2f4f7; font-style: normal; font-size: 12px; font-weight: 600; }
.tr-pop em.si { background: #e6f4f1; color: #0b6e64; }
.tr-pop ul { margin: 6px 0 0; padding-left: 18px; }

@media (max-width: 860px) {
    .tr-cuerpo2 { grid-template-columns: 1fr; }
    .tr-kpis { grid-template-columns: 1fr 1fr; }
    .tr-mapa { height: 400px; }
    .tr-h { font-size: 25px; }
    .tr-marca { display: none; }
    .tr-volver { flex: 1; }
    .tr-lista button { grid-template-columns: auto minmax(0, 1fr); }
    .tr-lista .niv { grid-row: auto; grid-column: 2; justify-self: start; margin-top: 4px; }
}

/* El distrito de quien mira, compartir y lo que dijo después quien reportó (28 nov 2026). */
.tr-kpis[hidden], .tr-todo[hidden] { display: none; }
.tr-todo { min-height: 44px; padding: 0 14px; border-radius: 100px; border: 1.5px solid #6d28d9; background: #fff; color: #4c1d95; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.tr-estado a { color: #3b1a78; font-weight: 700; }
.tr-boton--wsp { background: #128c4a; margin-top: 10px; }
.tr-lista .sig { grid-column: 2 / -1; margin-top: 4px; font-size: 13px; font-style: italic; color: #475467; }
.tr-pop i { color: #475467; }

/* Las fotos de los reportes (28 nov 2026): miniaturas en el emergente y en «Lo último». */
.tr-fotos { display: flex; gap: 6px; margin: 6px 0; }
.tr-fotos img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; display: block; }
.tr-lista .fts { grid-column: 2 / -1; display: flex; gap: 6px; margin-top: 6px; }
.tr-lista .fts img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; }
