* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; background: #f5f7fa; color: #222; }

.barra { background: #1a4a8a; color: #fff; padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.barra h1 { margin: 0; font-size: 20px; }
.estado { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { background: #e8eef6; color: #1a4a8a; padding: 6px 10px; border-radius: 16px; font-size: 13px; font-weight: 600; }
.badge.pasa { background: #dcfce7; color: #166534; }
.badge.fuera { background: #fee2e2; color: #991b1b; }
.badge.espera { background: #fef3c7; color: #92400e; }
.badge.pendiente { background: #e5e7eb; color: #6b7280; }
.btn { display: inline-block; background: #fff; border: 1px solid #cbd5e1; color: #1a4a8a; padding: 6px 12px; border-radius: 6px; font-size: 13px; text-decoration: none; cursor: pointer; }
.btn:hover { background: #f1f5f9; }
.btn.api { background: #1a4a8a; color: #fff; border-color: #1a4a8a; }
.btn-pdf { background: #f59e0b; color: #fff; border-color: #f59e0b; font-size: 12px; padding: 4px 8px; margin-left: 6px; }
.btn-pdf:hover { background: #d97706; }
.btn-pasa { background: #16a34a; color: #fff; border: none; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.btn-pasa:hover { background: #15803d; }
.btn-fuera { background: #dc2626; color: #fff; border: none; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.btn-fuera:hover { background: #b91c1c; }
.btn-espera { background: #d97706; color: #fff; border: none; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.btn-espera:hover { background: #b45309; }
.btn-detalle, .btn-detalle { background: #6b7280; color: #fff; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.btn-detalle:hover { background: #4b5563; }

.leyenda { background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 8px; padding: 16px 24px; margin-bottom: 12px; }
.leyenda h3 { margin: 0 0 10px 0; font-size: 15px; color: #1a4a8a; }
.leyenda p { margin: 6px 0; font-size: 13.5px; color: #334155; line-height: 1.5; }
.leyenda p b { color: #1a4a8a; }

.filtros { background: #fff; padding: 16px 24px; border-bottom: 1px solid #e5e7eb; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.filtros form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filtros label { font-size: 13px; color: #475569; display: flex; flex-direction: column; gap: 4px; }
.filtros select, .filtros input { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; }
.filtros button { background: #1a4a8a; color: #fff; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.filtros button:hover { background: #17437a; }
.btn.limpiar { background: #6b7280; color: #fff; }

.tabla-wrap { overflow-x: auto; padding: 16px 24px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
th { background: #f1f5f9; color: #475569; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover { background: #f8fafc; }
tr.fila-pasa td:first-child { border-left: 4px solid #16a34a; }
tr.fila-fuera td:first-child { border-left: 4px solid #dc2626; }
tr.fila-espera td:first-child { border-left: 4px solid #d97706; }
tr.fila-pendiente td:first-child { border-left: 4px solid #e5e7eb; }
td form { display: inline; margin: 0; }
td form button { padding: 4px 8px; font-size: 12px; margin: 1px; }
td .btn-detalle { margin-left: 4px; }
.chip { font-size: 12px; padding: 3px 8px; border-radius: 10px; color: #fff; }
.chip.pasa { background: #16a34a; }
.chip.fuera { background: #dc2626; }
.chip.espera { background: #d97706; }
.chip.pendiente { background: #9ca3af; }

.contenido { max-width: 980px; margin: 24px auto; padding: 0 20px; }
.tarjeta { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.tarjeta h2 { margin-top: 0; font-size: 18px; color: #1a4a8a; border-bottom: 2px solid #eef2f7; padding-bottom: 8px; }
.modelo { background: #f8fafc; border-radius: 6px; padding: 14px; margin: 12px 0; }
.modelo h3 { margin-top: 0; font-size: 15px; color: #1a4a8a; }
.modelo p { margin: 6px 0; font-size: 14px; }
.modelo ul { margin: 6px 0; padding-left: 20px; }
.modelo li { margin: 3px 0; font-size: 14px; }
.acciones { background: #f8fafc; }
.acciones label { display: block; margin: 8px 0; font-size: 14px; }
.acciones input[type="text"] { padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 6px; width: 260px; }

.pie { padding: 24px; color: #6b7280; font-size: 13px; text-align: center; border-top: 1px solid #e5e7eb; }

/* ---------------------------------------------------------------------------
   Mapa monopolio × sinergias
--------------------------------------------------------------------------- */
.mapa-seccion { background:#fff; border:1px solid #e5e7eb; border-radius:8px; margin:16px 24px 0; padding:18px 20px 10px; }
.mapa-cabecera { display:flex; gap:18px; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; }
.mapa-seccion h2 { margin:0 0 6px 0; font-size:17px; color:#1a4a8a; }
.mapa-sub { margin:0 0 10px; font-size:12.8px; color:#64748b; max-width:720px; line-height:1.5; }
.mapa-sub b { color:#334155; }
.mapa-leyenda { display:flex; gap:6px; flex-wrap:wrap; align-items:center; padding-top:4px; }
.mapa-leyenda .chip { font-size:12px; padding:5px 10px; }
.mapa-leyenda .chip b { margin-left:4px; }

.mapa-wrap { position:relative; margin-top:4px; }
.mapa-svg { width:100%; height:auto; display:block; }
.mapa-fondo { fill:#fbfdff; }
.mapa-zona-objetivo { fill:#dcfce7; opacity:.55; }
.mapa-grid { stroke:#e2e8f0; stroke-width:1; }
.mapa-umbral { stroke:#94a3b8; stroke-width:1.2; stroke-dasharray:5 4; }
.mapa-eje { stroke:#cbd5e1; stroke-width:1.4; }
.mapa-tick { font-size:12px; fill:#64748b; }
.mapa-tick-umbral { fill:#475569; font-weight:600; }
.mapa-eje-titulo { font-size:13px; fill:#334155; font-weight:600; }
.mapa-cuadrante { font-size:11px; fill:#9aa8bb; font-weight:600; letter-spacing:.02em; }

.mapa-punto { cursor:pointer; outline:none; }
.mapa-punto .punto-hit { fill:transparent; }
.mapa-punto .punto { stroke:#fff; stroke-width:1.6; transition:stroke .12s ease, stroke-width .12s ease; }
.mapa-punto:hover .punto,
.mapa-punto:focus .punto { stroke:#0f172a; stroke-width:2.2; }
.mapa-punto.punto-pasa .punto { fill:#16a34a; }
.mapa-punto.punto-fuera .punto { fill:#dc2626; }
.mapa-punto.punto-espera .punto { fill:#d97706; }
.mapa-punto.punto-pendiente .punto { fill:#94a3b8; }

.mapa-tooltip { position:absolute; z-index:20; background:#0f172a; color:#f8fafc; padding:10px 12px; border-radius:8px; font-size:12.5px; max-width:340px; pointer-events:none; box-shadow:0 8px 24px rgba(15,23,42,.28); }
.tip-cab { font-weight:700; margin-bottom:6px; line-height:1.35; }
.tip-rank { background:#334155; border-radius:6px; padding:1px 6px; margin-right:4px; font-size:11.5px; }
.tip-fila { margin-top:3px; color:#cbd5e1; }
.tip-fila b { color:#f8fafc; }
.mapa-vacio { padding:24px; color:#64748b; }

@media (max-width: 720px) {
  .mapa-seccion { margin:12px 10px 0; padding:14px 12px 6px; }
  .mapa-cuadrante { display:none; }
}
