/* ══════════════════════════════════════════════════════════════════
   reporte.css — Línea de estilo única de los reporteadores GeoPerú
   Implementa el Design System GOB.PE (ver .claude/skills/design-system-gobpe)
   sobre los tokens de css/variables.css. Todos los reportes comparten
   esta hoja: un reporte nuevo NO define tipografía ni componentes propios.
   ══════════════════════════════════════════════════════════════════ */

/* ── Base tipográfica (Roboto, escala oficial) ──
   html+body y controles de formulario fijados a Roboto para que ningún
   framework externo (bulma, tooltips) imponga otra fuente. */
html,
body {
  font-family: var(--font-base);
}

body {
  margin: 0;
  font-size: var(--body-size);
  line-height: var(--body-lh);
  color: var(--color-text-strong);
  background: var(--color-bg);
}

button,
input,
select,
textarea,
[aria-label][data-balloon-pos]:after {
  font-family: var(--font-base);
}

h1 { font-size: var(--h1-size); font-weight: var(--h1-weight); line-height: var(--h1-lh); }
h2 { font-size: var(--h2-size); font-weight: var(--h2-weight); line-height: var(--h2-lh); }
h3 { font-size: var(--h3-size); font-weight: var(--h3-weight); line-height: var(--h3-lh); }
h4 { font-size: var(--h4-size); font-weight: var(--h4-weight); line-height: var(--h4-lh); }
h5 { font-size: var(--h5-size); font-weight: var(--h5-weight); line-height: var(--h5-lh); }

a { color: var(--color-link); }

/* ── Títulos de sección (H4 oficial) y subtítulos ── */
.rpt-section-title {
  font-family: var(--font-base);
  font-size: var(--h4-size);
  font-weight: var(--h4-weight);
  line-height: var(--h4-lh);
  color: var(--color-primary-dark);
}

.rpt-subtitle {
  font-family: var(--font-base);
  font-size: var(--tag-size);
  font-weight: 500;
  line-height: var(--tag-lh);
  color: var(--color-text-secondary);
}

/* Etiqueta TAG BOLD (14px/700) — labels de datos, p.ej. Departamento: */
.rpt-label {
  font-family: var(--font-base);
  font-size: var(--tag-size);
  font-weight: 700;
  line-height: var(--tag-lh);
  color: var(--color-accent);
}

/* ── Banda de ubicación (Departamento / Provincia / Distrito) ── */
.rpt-loc {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 18px;
  background: var(--color-bg-alt);
  font-family: var(--font-base);
}

.rpt-loc-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.rpt-loc-cell .lbl {
  font-size: var(--tag-size);
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
  margin: 0;
}

.rpt-loc-cell .val {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 2px;
}

/* ── Tarjeta (spec Cards GOB.PE) ── */
.rpt-card {
  background: var(--color-bg);
  border: 1px solid #E9EAEA;
  border-radius: 8px;
  padding: var(--sp-md);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.rpt-kpi {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px var(--sp-md);
  box-sizing: border-box;
}

/* ── Tabla de datos ── */
.rpt-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-base);
  font-size: var(--tag-size);
}

.rpt-table th {
  background: var(--color-primary-dark);
  color: #fff;
  font-weight: 700;
  padding: 8px 6px;
}

.rpt-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--color-border-light);
}

.rpt-table tbody tr:nth-child(even) {
  background: var(--color-bg-alt);
}

/* ── Botón primario (spec Primary Button) ── */
.rpt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 var(--sp-lg);
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-base);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.rpt-btn:hover { background: var(--color-primary-dark); }

.rpt-btn:disabled,
.rpt-btn.disabled {
  background: #DEE3EA;
  color: #656A8A;
  cursor: not-allowed;
}

/* ── Pastillas (selector de año, filtros) ── */
.rpt-pill {
  cursor: pointer;
  font-family: var(--font-base);
  font-size: var(--tag-size);
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 5px 14px;
  transition: var(--transition);
}

.rpt-pill:hover { background: var(--color-bg-blue); }

.rpt-pill--active,
.rpt-pill.active {
  color: #fff;
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

/* ── Inputs / selects (spec Input Text) ── */
.rpt-input,
.rpt-select {
  height: 40px;
  padding: 8px 12px;
  font-family: var(--font-base);
  font-size: 16px;
  color: var(--color-text-strong);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-sizing: border-box;
  outline: none;
}

.rpt-input:focus,
.rpt-select:focus { border-color: var(--color-primary); }

.rpt-input:disabled,
.rpt-select:disabled { background: #EDF0F4; }

/* ── Pie de página compartido (shared/pie.html) ── */
.rpt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
  font-family: var(--font-base);
  font-size: 11px;
  color: #6a7a99;
  border-top: 1px solid var(--color-border);
  padding: 4px 16px 6px;
  background: var(--color-bg);
  flex-shrink: 0;
}

.rpt-footer-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rpt-footer-link:hover { color: var(--color-primary); }

/* ── Notas al pie de los formularios (proy-act) ── */
.rpt-note {
  margin: 0 0 4px;
  font-size: var(--tag-size);
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.rpt-note--head {
  font-weight: 700;
  color: var(--color-text-strong);
}
