/* ===== HISTORIAL DE CAMPO ===== */
.campo-progreso-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.campo-progreso-titulo  { font-size: 0.8rem; font-weight: 700; color: #455a64; text-transform: uppercase; letter-spacing: .03em; }
.campo-progreso-global  { font-size: 0.85rem; font-weight: 600; color: #1565c0; }

.barra-global {
  width: 100%; height: 8px; background: #eceff1; border-radius: 4px; margin-bottom: 14px; overflow: hidden;
}
.barra-global-fill { height: 100%; background: linear-gradient(90deg,#1565c0,#42a5f5); border-radius: 4px; transition: width .4s; }

.zonas-progreso-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px;
}
.zona-prog { background: #f8fafc; border: 1px solid #e3eaf0; border-radius: 8px; padding: 10px 12px; }
.zona-prog-header { display: flex; justify-content: space-between; font-size: 0.78rem; font-weight: 600; color: #37474f; margin-bottom: 5px; }
.zona-prog-header small { font-weight: 400; color: #90a4ae; }
.barra-zona { width: 100%; height: 5px; background: #eceff1; border-radius: 3px; overflow: hidden; }
.barra-zona-fill { height: 100%; background: #1565c0; border-radius: 3px; transition: width .4s; }

.visita-admin-card {
  background: #f8fafc;
  border: 1px solid #e3eaf0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}
.visita-admin-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px;
}
.visita-admin-info { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.visita-admin-nombre { font-weight: 700; color: #1a2e44; }
.visita-admin-hora { font-size: 0.75rem; color: #90a4ae; white-space: nowrap; }
.visita-admin-meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 0.75rem; color: #607d8b; margin-bottom: 4px;
}
.visita-admin-obs {
  font-size: 0.8rem; color: #546e7a; font-style: italic; margin-top: 4px;
}
.visita-admin-foto-thumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  text-decoration: none;
  color: #1565c0;
  font-size: 0.78rem;
}
.visita-admin-foto-thumb img {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e3eaf0;
  display: block;
}
.visita-admin-foto-thumb:hover img { opacity: .85; }
.visita-admin-foto-thumb span { text-decoration: underline; }

/* Pendientes georef */
.pend-zona-grupo {
  margin-bottom: 16px;
}
.pend-zona-titulo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #37474f;
  background: #e3f2fd;
  padding: 6px 12px;
  border-radius: 8px 8px 0 0;
  flex-wrap: wrap;
}
.pend-zona-cnt {
  background: #1565c0;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
}
.pend-zona-font {
  margin-left: auto;
  font-weight: 400;
  color: #546e7a;
}
.pend-tabla tbody tr:hover { background: #f0f4ff; }

/* ===== ADMIN LAYOUT ===== */
.admin-main {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* ===== PESTAÑAS DE NAVEGACIÓN ===== */
.admin-tab-nav {
  display: flex;
  gap: 4px;
  background: #fff;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 10px 12px 0;
  border-bottom: 2px solid #e3eaf0;
  flex-wrap: wrap;
}

.admin-tab-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: none;
  border: none;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: #78909c;
  transition: color .15s, background .15s;
  font-family: inherit;
  position: relative;
  bottom: -2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.admin-tab-btn .tab-ico { font-size: 1rem; }
.admin-tab-btn:hover { color: #1565c0; background: #f0f4ff; }
.admin-tab-btn.activo {
  color: #1565c0;
  border-bottom: 2px solid #1565c0;
  background: #f0f4ff;
}

/* ===== PANELES DE CONTENIDO ===== */
.admin-tab-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
  padding-top: 20px;
}
.admin-tab-panel.activo { display: flex; }

/* ===== TARJETA ADMIN ===== */
.admin-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #eceff1;
}
.admin-card-icono {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}
.admin-card-header h2 {
  font-size: 1.1rem;
  color: #1c2b3a;
  margin-bottom: 4px;
}
.admin-card-header p {
  font-size: 0.8rem;
  color: #607d8b;
}

/* ===== ZONA DRAG & DROP ===== */
.upload-zona {
  border: 2.5px dashed #b0bec5;
  border-radius: 12px;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #f8fafc;
  text-align: center;
}
.upload-zona:hover,
.upload-zona.drag-over {
  border-color: #1a6fa0;
  background: #e3f2fd;
}
.upload-icono { font-size: 2.5rem; }
.upload-texto {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #455a64;
  font-size: 0.9rem;
}
.upload-texto strong { font-size: 1rem; color: #1c2b3a; }
.upload-formatos { font-size: 0.72rem; color: #90a4ae; margin-top: 4px; }

/* ===== ARCHIVO SELECCIONADO ===== */
.upload-archivo-seleccionado {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.85rem;
}
.archivo-icono { font-size: 1.3rem; }
.archivo-tamanio { color: #607d8b; margin-left: auto; font-size: 0.75rem; }
.btn-quitar {
  background: none;
  border: none;
  color: #c62828;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}
.btn-quitar:hover { background: #ffebee; }

/* ===== ACCIONES ===== */
.upload-acciones {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-primary {
  background: #1a6fa0;
  color: white;
  border: none;
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.btn-primary:hover:not(:disabled) { background: #1558a0; }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.upload-ayuda { font-size: 0.72rem; color: #90a4ae; }

/* ===== PROGRESO ===== */
.upload-progreso {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.progreso-barra {
  height: 10px;
  background: #eceff1;
  border-radius: 8px;
  overflow: hidden;
}
.progreso-fill {
  height: 100%;
  background: #1a6fa0;
  border-radius: 8px;
  transition: width 0.4s ease;
  width: 0%;
}
.progreso-fill.animando {
  animation: progreso-pulso 1.2s ease infinite;
}
@keyframes progreso-pulso {
  0%   { width: 20%; }
  50%  { width: 75%; }
  100% { width: 20%; }
}
#progreso-texto { font-size: 0.78rem; color: #607d8b; }

/* ===== RESULTADO ===== */
.upload-resultado {
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 0.85rem;
  line-height: 1.7;
}
.upload-resultado.exito {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
}
.upload-resultado.error {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #b71c1c;
}
.resultado-titulo {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.resultado-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.resultado-item {
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  padding: 8px 12px;
}
.resultado-item-label { font-size: 0.68rem; color: #2e7d32; font-weight: 600; text-transform: uppercase; }
.resultado-item-valor { font-size: 1.1rem; font-weight: 800; color: #1b5e20; }
.resultado-zonas { margin-top: 10px; }
.resultado-zona-fila {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* ===== HISTORIAL TABLA ===== */
.historial-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.historial-tabla th {
  background: #f0f4f8;
  color: #607d8b;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.4px;
  padding: 10px 14px;
  text-align: left;
}
.historial-tabla td {
  padding: 10px 14px;
  border-bottom: 1px solid #f5f5f5;
  color: #1c2b3a;
}
.historial-tabla tr:last-child td { border-bottom: none; }
.historial-tabla tr:hover td { background: #f8fafc; }
.badge-periodo {
  background: #e3f2fd;
  color: #1565c0;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.75rem;
}
.cargando { color: #90a4ae; font-size: 0.85rem; padding: 16px 0; text-align: center; }
.sin-datos { color: #90a4ae; font-size: 0.85rem; padding: 24px; text-align: center; }

/* ===== INSTRUCCIONES ===== */
.instrucciones.admin-card { background: #fafafa; }
.pasos-lista {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pasos-lista li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.paso-num {
  background: #1a6fa0;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}
.pasos-lista strong { font-size: 0.88rem; color: #1c2b3a; }
.pasos-lista p { font-size: 0.78rem; color: #607d8b; margin-top: 2px; }

/* ===== NAV TABS en header (reutiliza mapa.css pero lo redefinimos aquí también) ===== */
.nav-tabs { display: flex; gap: 8px; }
.nav-tab {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.2s;
}
.nav-tab:hover, .nav-tab.activo {
  background: rgba(255,255,255,0.2);
  color: white;
}

/* ===== FONTANEROS ===== */
.fontanero-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.fontanero-card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.fontanero-nombre { font-size: 0.92rem; font-weight: 600; color: #1c2b3a; }
.fontanero-user   { font-size: 0.75rem; color: #607d8b; margin-left: 6px; }
.fontanero-zonas-cnt {
  font-size: 0.72rem; font-weight: 700; background: #e3f2fd;
  color: #1565c0; border-radius: 10px; padding: 2px 10px;
}
.ruta-chks { display: flex; flex-wrap: wrap; gap: 8px; }
.ruta-chk {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.78rem; color: #37474f; cursor: pointer;
  background: #f5f5f5; border-radius: 6px; padding: 4px 10px;
  border: 1px solid #e0e0e0; transition: background 0.15s;
}
.ruta-chk:hover { background: #e3f2fd; }
.ruta-chk input { accent-color: #1565c0; cursor: pointer; }
.sin-datos-sm { font-size: 0.75rem; color: #90a4ae; font-style: italic; }

/* ===== ÓRDENES ===== */
.subseccion-titulo {
  font-size: 0.85rem; font-weight: 700; color: #37474f;
  margin-bottom: 14px; padding-bottom: 6px;
  border-bottom: 1px solid #e0e0e0;
}
.orden-form-wrapper { margin-bottom: 8px; }
.orden-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 12px;
}
.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-field.span2 { grid-column: span 2; }
.form-field label { font-size: 0.72rem; font-weight: 600; color: #607d8b; text-transform: uppercase; }
.form-field input,
.form-field select,
.form-field textarea {
  border: 1px solid #e0e0e0; border-radius: 6px;
  padding: 8px 10px; font-size: 0.88rem; color: #1c2b3a;
  background: #fafafa; outline: none; font-family: inherit;
  transition: border-color 0.2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: #1565c0; background: #fff; }
.form-field textarea { resize: vertical; }
.btn-admin-primary {
  background: #1565c0; color: white; border: none; border-radius: 8px;
  padding: 10px 24px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.btn-admin-primary:hover { background: #1976d2; }
.filtros-ordenes { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.filtros-ordenes select {
  border: 1px solid #e0e0e0; border-radius: 6px;
  padding: 6px 10px; font-size: 0.82rem; color: #37474f;
  background: #fafafa; outline: none; cursor: pointer;
}
.form-msg-admin {
  padding: 8px 12px; border-radius: 6px; font-size: 0.82rem;
  margin-bottom: 10px; text-align: center;
}
.form-msg-admin.ok    { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.form-msg-admin.error { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.badge-estado {
  font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}
.estado-pendiente  { background: #fff8e1; color: #f57f17; }
.estado-proceso    { background: #e3f2fd; color: #1565c0; }
.estado-completada { background: #e8f5e9; color: #2e7d32; }
.estado-cancelada  { background: #fce4ec; color: #c62828; }
.prior-urgente { background: #ffebee; color: #c62828; }
.prior-alta    { background: #fff8e1; color: #f57f17; }
.prior-normal  { background: #f5f5f5; color: #607d8b; }
.prior-baja    { background: #f5f5f5; color: #b0bec5; }
.cargando { font-size: 0.82rem; color: #90a4ae; text-align: center; padding: 16px; }

/* ===== ZONAS ASIGNACIÓN ===== */
.zonas-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.zona-fila {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f4f8;
}
.zona-badge {
  min-width: 72px;
  font-weight: 700;
  font-size: 0.82rem;
  color: #1565c0;
  background: #e3f2fd;
  padding: 4px 10px;
  border-radius: 12px;
  text-align: center;
}
.zona-select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  font-size: 0.85rem;
  background: #fafafa;
  outline: none;
  cursor: pointer;
}
.zona-select:focus { border-color: #1976d2; background: #fff; }

/* ===== GESTIÓN DE USUARIOS ===== */
.usuarios-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.usuarios-tabla th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  color: #607d8b;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 6px 10px;
  border-bottom: 2px solid #eceff1;
}
.usuarios-tabla td {
  padding: 9px 10px;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: middle;
}
.usuarios-tabla tr.inactivo td { opacity: .45; }
.u-rol-badge {
  font-size: 0.68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
  background: #e3f2fd; color: #1565c0;
}
.u-rol-badge.fontanero { background:#e8f5e9; color:#2e7d32; }
.u-rol-badge.admin     { background:#fce4ec; color:#c62828; }
.u-rol-badge.viewer    { background:#f5f5f5; color:#607d8b; }
.btn-icon {
  background: none; border: none; cursor: pointer;
  padding: 4px 6px; border-radius: 4px; font-size: 0.85rem;
  color: #607d8b; transition: background .15s;
}
.btn-icon:hover { background: #eceff1; color: #1565c0; }
.btn-icon.danger:hover { background: #ffebee; color: #c62828; }
.btn-secondary {
  background: #eceff1; color: #455a64; border: none;
  padding: 8px 18px; border-radius: 6px; font-size: 0.85rem;
  font-weight: 600; cursor: pointer;
}
.btn-secondary:hover { background: #cfd8dc; }

/* ===== PROGRESO GEOREF EN CATASTRO ===== */
.georef-global-wrap {
  background: #f5f7fa; border-radius: 8px;
  padding: 14px 16px; margin-bottom: 20px;
}
.georef-global-texto {
  display: flex; justify-content: space-between;
  font-size: 0.82rem; color: #546e7a; margin-bottom: 8px;
  flex-wrap: wrap; gap: 4px;
}
.georef-global-texto strong { color: #1a237e; }
.georef-barra-wrap {
  height: 8px; background: #e0e0e0; border-radius: 4px; overflow: hidden;
}
.georef-barra-wrap.global { height: 12px; }
.georef-barra-fill {
  height: 100%; background: linear-gradient(90deg, #1565c0, #42a5f5);
  border-radius: 4px; transition: width .5s ease;
}
.georef-fontaneros-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.georef-fontanero-card {
  background: #fff; border: 1px solid #e0e7ef; border-radius: 8px;
  padding: 14px 16px;
}
.georef-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.georef-nombre { font-weight: 600; font-size: 0.9rem; color: #1a237e; }
.georef-global-pct { font-size: 1rem; font-weight: 700; color: #1565c0; }
.georef-card-stat { font-size: 0.78rem; color: #607d8b; margin: 6px 0 10px; }
.georef-card-stat strong { color: #e65100; }
.georef-zonas-detalle { border-top: 1px solid #f0f0f0; padding-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.georef-zona-fila {
  display: grid; grid-template-columns: 60px 55px 1fr 70px;
  align-items: center; gap: 8px; font-size: 0.75rem; color: #546e7a;
}
.georef-mini-barra {
  height: 5px; background: #e0e0e0; border-radius: 3px; overflow: hidden;
}
.georef-mini-barra > div { height: 100%; background: #42a5f5; border-radius: 3px; }
.georef-pend { text-align: right; font-weight: 600; }
.georef-pend.hay { color: #e65100; }
.georef-pend.ok  { color: #2e7d32; }

/* ===== ESPECIFICACIÓN DE FORMATO DE ARCHIVO ===== */
.formato-spec {
  background: #f0f4ff; border: 1px solid #c5cae9;
  border-radius: 6px; padding: 10px 14px; margin-bottom: 14px;
}
.formato-spec-titulo {
  font-size: 0.75rem; font-weight: 700; color: #3949ab;
  margin-bottom: 5px; display: flex; align-items: center; gap: 10px;
}
.formato-spec code {
  display: block; font-size: 0.72rem; color: #283593;
  background: #e8eaf6; border-radius: 4px; padding: 5px 8px;
  word-break: break-all; margin-bottom: 4px;
}
.formato-spec-nota {
  font-size: 0.7rem; color: #5c6bc0; font-style: italic;
}
.btn-plantilla {
  font-size: 0.7rem; font-weight: 600; color: #1565c0;
  background: #e3f2fd; border-radius: 4px; padding: 2px 8px;
  text-decoration: none; border: 1px solid #90caf9;
}
.btn-plantilla:hover { background: #bbdefb; }

/* ===== ESTADÍSTICAS PQR ===== */

.est-filtros-card { padding: 14px 18px !important; }

.est-filtros-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.est-btns-rapidos {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.est-btn-periodo {
  background: #f0f4ff;
  border: 1px solid #90caf9;
  color: #1565c0;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.est-btn-periodo:hover  { background: #e3f2fd; }
.est-btn-periodo.activo { background: #1565c0; color: #fff; border-color: #1565c0; }

.est-filtros-fecha {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.82rem;
  color: #546e7a;
}
.est-filtros-fecha label { display: flex; align-items: center; gap: 6px; }

.est-export-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e8eaf0;
}
.est-btn-export {
  background: #fff;
  border: 1px solid #b0bec5;
  color: #37474f;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.est-btn-export:hover { background: #eceff1; border-color: #78909c; }

@media print {
  header, .admin-tabs, .est-filtros-card, footer,
  .est-export-row, .admin-card-header p { display: none !important; }
  body { background: white !important; color: black !important; }
  .admin-tab-panel { display: block !important; }
  .admin-tab-panel:not(#tab-estadisticas) { display: none !important; }
  .est-kpi-card { border: 1px solid #ccc !important; background: white !important; }
  .est-tabla th { background: #eee !important; color: black !important; }
  canvas { max-width: 100% !important; }
}
.est-filtros-fecha input[type="date"] {
  border: 1px solid #b0bec5;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.82rem;
  color: #263238;
}

.est-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.est-kpi-card {
  background: white;
  border: 1px solid #e3eaf0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.est-kpi-card.verde { border-top: 3px solid #2e7d32; }
.est-kpi-card.ambar { border-top: 3px solid #f9a825; }
.est-kpi-card.azul  { border-top: 3px solid #1565c0; }
.est-kpi-card.rojo  { border-top: 3px solid #c62828; }

.est-kpi-val {
  font-size: 2rem;
  font-weight: 700;
  color: #1a2e44;
  line-height: 1;
  margin-bottom: 6px;
}

.est-kpi-label {
  font-size: 0.72rem;
  color: #78909c;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}

.est-chart-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 18px;
}

.est-tabla-wrap { overflow-x: auto; }

.est-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.est-tabla th {
  background: #f0f4ff;
  color: #37474f;
  font-weight: 700;
  padding: 9px 12px;
  text-align: left;
  border-bottom: 2px solid #e3eaf0;
  white-space: nowrap;
}

.est-tabla td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f4ff;
  color: #37474f;
  vertical-align: middle;
}

.est-tabla tbody tr:hover { background: #f8fafc; }

.est-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
}
.est-badge.verde { background: #e8f5e9; color: #2e7d32; }
.est-badge.ambar { background: #fff8e1; color: #f57f17; }
.est-badge.rojo  { background: #ffebee; color: #c62828; }
