/* Panel de seguridad · pestana ESTADISTICAS (6.8.59) - ver estadisticas.js */
.es-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.es-caja { background: #16171b; border: 1px solid #2a2c31; border-radius: 8px; padding: 16px 18px; min-width: 0; }
.es-caja h3 { margin: 0 0 12px; font: 700 12px/1 Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8b9099; }
.es-c12 { grid-column: span 12; } .es-c8 { grid-column: span 8; } .es-c6 { grid-column: span 6; } .es-c4 { grid-column: span 4; }
@media (max-width: 1100px) { .es-c8, .es-c6, .es-c4 { grid-column: span 12; } }

/* Cifras */
.es-cifras { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .es-cifras { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.es-cifra { background: #16171b; border: 1px solid #2a2c31; border-left: 4px solid #4b5563; border-radius: 8px; padding: 14px 16px; }
.es-cifra strong { display: block; font: 800 34px/1.05 'Segoe UI', Arial, sans-serif; color: #f3f4f6; }
.es-cifra span { font-size: 13px; color: #9ea3ab; }
.es-cifra.total { border-left-color: #2563eb; } .es-cifra.hoy { border-left-color: #d97706; }
.es-cifra.bloq { border-left-color: #b3121f; } .es-cifra.vpn { border-left-color: #7c3aed; }

/* Mapa */
.es-mapa-caja { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .es-mapa-caja { grid-template-columns: 1fr; } }
#es-mapa { width: 100%; height: auto; display: block; background: #101115; border-radius: 6px; }
.es-pais { fill: #2a2d33; stroke: #101115; stroke-width: .5; cursor: pointer; }
.es-pais:hover { stroke: #f3f4f6; stroke-width: 1; }
.es-pais.n1 { fill: #5c2a2e; } .es-pais.n2 { fill: #7f2a31; } .es-pais.n3 { fill: #a3242f; }
.es-pais.n4 { fill: #c81e2c; } .es-pais.n5 { fill: #ef3340; }
.es-pais.bloqueado { fill: #111; stroke: #ef3340; stroke-width: 1.2; stroke-dasharray: 3 2; }
.es-pais.permitido { stroke: #22c55e; stroke-width: 1.4; }
.es-pais.elegido { stroke: #fbbf24; stroke-width: 1.8; }
.es-leyenda { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12px; color: #9ea3ab; }
.es-leyenda i { width: 22px; height: 10px; border-radius: 2px; display: inline-block; }
#es-pais-elegido { display: flex; flex-direction: column; gap: 10px; }
.es-pais-nombre { font: 800 20px/1.2 'Segoe UI', Arial, sans-serif; color: #f3f4f6; }
.es-pais-n { color: #9ea3ab; }
.es-ayuda { margin: 0; color: #9ea3ab; font-size: 13px; }

/* Graficos */
.es-svg { width: 100%; height: auto; display: block; }
.es-eje { stroke: #3a3d44; stroke-width: 1; }
.es-barra { fill: #c81e2c; } .es-barra.cero { fill: #2a2d33; }
.es-barra:hover, .es-punto:hover { fill: #fbbf24; }
.es-linea { fill: none; stroke: #2563eb; stroke-width: 2.5; }
.es-area { fill: rgba(37, 99, 235, .14); }
.es-punto { fill: #2563eb; stroke: #16171b; stroke-width: 1.5; }
.es-etq { fill: #8b9099; font: 9px Arial, sans-serif; text-anchor: middle; }
.es-etq.max { text-anchor: start; }
#es-mapa { overflow: hidden; }

/* Rankings */
.es-ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.es-ranking li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 6px; overflow: hidden; font-size: 14px; }
.es-ranking li span, .es-ranking li b { position: relative; z-index: 1; }
.es-ranking li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e5e7eb; }
.es-ranking li b { color: #f3f4f6; }
.es-ranking li i { position: absolute; inset: 0 auto 0 0; background: rgba(200, 30, 44, .22); border-radius: 6px; }
.es-vacio { color: #8b9099; font-size: 13px; list-style: none; }

/* IPs con acciones */
.es-ip { display: grid; grid-template-columns: 170px 120px 90px 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #23252a; }
.es-ip code { font: 700 15px Consolas, monospace; color: #f3f4f6; }
.es-ip-n { color: #c9ccd2; } .es-ip-estado { font-size: 12px; font-weight: 700; color: #22c55e; }
.es-ip.bloqueada .es-ip-estado { color: #ef3340; }
.es-acciones { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 700px) { .es-ip { grid-template-columns: 1fr 1fr; } .es-acciones { justify-content: flex-start; } }

/* Botones grandes */
.es-btn { min-height: 40px; padding: 9px 18px; border-radius: 8px; border: 1px solid #3a3d44; background: #23252b; color: #f3f4f6;
  font: 700 14px Arial, sans-serif; cursor: pointer; }
.es-btn:hover { background: #2d3037; }
.es-btn.peligro { background: #b3121f; border-color: #b3121f; color: #fff; }
.es-btn.peligro:hover { background: #8f0e19; }
.es-btn.ok { background: #1f6b43; border-color: #1f6b43; color: #fff; }
.es-btn.ok:hover { background: #185636; }
.es-pie { margin-top: 10px; font-size: 12px; color: #8b9099; text-align: right; }

/* Tema claro */
html.claro .es-caja, html.claro .es-cifra { background: #fff; border-color: #dfe2e7; }
html.claro .es-caja h3, html.claro .es-cifra span, html.claro .es-ayuda, html.claro .es-pais-n { color: #5b616b; }
html.claro .es-cifra strong, html.claro .es-pais-nombre, html.claro .es-ip code, html.claro .es-ranking li b { color: #14161a; }
html.claro .es-ranking li span, html.claro .es-ip-n { color: #2b2f36; }
html.claro #es-mapa { background: #eef1f5; }
html.claro .es-pais { fill: #cfd4db; stroke: #eef1f5; }
html.claro .es-pais.bloqueado { fill: #fff; }
html.claro .es-eje { stroke: #cfd4db; } html.claro .es-barra.cero { fill: #e5e7eb; }
html.claro .es-punto { stroke: #fff; } html.claro .es-ip { border-color: #eceef1; }
html.claro .es-btn { background: #f3f4f6; color: #14161a; border-color: #cfd3d9; }
html.claro .es-btn.peligro, html.claro .es-btn.ok { color: #fff; }
html.claro .es-btn.peligro { background: #b3121f; } html.claro .es-btn.ok { background: #1f6b43; }

/* ===== Avisos (6.8.60) - ver avisos.js ===== */
.av-campana { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 8px;
  border: 1px solid #3a3d44; background: #1c1d22; color: #c9ccd2; cursor: pointer; font: 700 13px Arial, sans-serif; }
.av-campana.activa { background: #b3121f; border-color: #b3121f; color: #fff; }
.av-pila { position: fixed; top: 76px; right: 18px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; width: min(380px, 92vw); }
.av-aviso { background: #1b1c21; color: #e9e9ea; border: 1px solid #34363c; border-left: 5px solid #6b7280; border-radius: 8px;
  padding: 12px 14px; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); display: grid; gap: 4px; animation: avEntra .25s ease-out; }
.av-aviso.grave { border-left-color: #ef3340; }
.av-aviso strong { font-size: 15px; }
.av-detalle { font-size: 13px; color: #c9ccd2; }
.av-fecha { font-size: 11px; color: #8b9099; }
.av-acciones { display: flex; gap: 8px; margin-top: 6px; }
.av-acciones button, .av-btn { min-height: 36px; padding: 7px 14px; border-radius: 7px; border: 1px solid #3a3d44; background: #23252b; color: #f3f4f6;
  font: 700 13px Arial, sans-serif; cursor: pointer; }
.av-acciones .peligro { background: #b3121f; border-color: #b3121f; }
.av-acciones .ok, .av-btn.ok { background: #1f6b43; border-color: #1f6b43; color: #fff; }
@keyframes avEntra { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.av-conf { background: #16171b; border: 1px solid #2a2c31; border-radius: 8px; padding: 18px 20px; margin-bottom: 18px; }
.av-conf h2 { margin: 0 0 6px; font-size: 18px; } .av-conf h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: #9ea3ab; }
.av-ayuda { margin: 0 0 14px; color: #9ea3ab; font-size: 13px; }
.av-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .av-grid { grid-template-columns: 1fr; } }
.av-col { display: flex; flex-direction: column; gap: 10px; }
.av-campo { display: grid; gap: 4px; font-size: 12px; color: #9ea3ab; }
.av-campo input { background: #0d0e11; color: #e9e9ea; border: 1px solid #34363c; border-radius: 6px; padding: 8px 10px; font: 14px Arial, sans-serif; }
.av-interruptor { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.av-fila { display: flex; gap: 8px; flex-wrap: wrap; }
.av-pasos { margin: 0; padding-left: 18px; font-size: 13px; color: #c9ccd2; display: grid; gap: 4px; }
.av-estado { color: #8b9099; } .av-mensaje { margin: 12px 0 0; font-weight: 700; color: #22c55e; }
html.claro .av-campana { background: #fff; border-color: #cfd3d9; color: #2b2f36; }
html.claro .av-campana.activa { background: #b3121f; color: #fff; }
html.claro .av-aviso, html.claro .av-conf { background: #fff; color: #14161a; border-color: #dfe2e7; }
html.claro .av-detalle, html.claro .av-pasos { color: #4a5059; }
html.claro .av-campo input { background: #fff; color: #14161a; border-color: #cfd3d9; }
html.claro .av-acciones button:not(.peligro):not(.ok), html.claro .av-btn:not(.ok) { background: #f3f4f6; color: #14161a; border-color: #cfd3d9; }
