/* =========================================================================
   PANEL ADMIN — Tema "Streaming Premium" (oscuro, cinematografico, interactivo)
   -------------------------------------------------------------------------
   TUTORIAL (para quien edite a futuro):
   - Este archivo SOLO define apariencia. NO cambia ninguna funcion PHP.
   - Los colores viven en :root. Cambia --primary y todo el panel se re-tinta.
   - Las clases (.card .btn .sidebar .table-wrap .badge ...) son las mismas que
     usan las paginas PHP. NO renombres, solo reestiliza. Aqui abajo se agregan
     ademas clases nuevas opcionales (.stat, .avatar, .searchbar, .grid-*) que
     dan el look premium sin tocar la logica.
   - Las animaciones e interacciones viven en /assets/js/panel.js
   ========================================================================= */

:root {
  --bg:        #050509;
  --bg-2:      #0c0c14;
  --panel:     rgba(19,19,30,.72);   /* vidrio de paneles */
  --panel-2:   rgba(28,28,44,.55);
  --stroke:    rgba(255,255,255,.08); /* borde sutil */
  --stroke-2:  rgba(255,255,255,.14);
  --text:      #f2f3f9;
  --muted:     #8f90ad;
  --muted-2:   #ababc9;

  --primary:      #e11d2a;
  --primary-2:    #ff5a67;
  --primary-hi:   #ff2f3d;
  --glow:         rgba(225,29,42,.5);
  --accent:       #7b5cff;   /* violeta */
  --accent-2:     #2ad4ff;   /* cian */
  --gold:         #ffc53d;

  --success: #2ee06a;
  --warn:    #ffb020;
  --danger:  #ff4d4d;
  --link:    #8bb8ff;

  --r:    18px;
  --r-sm: 12px;
  --r-xs: 9px;
  --shadow:    0 30px 70px rgba(0,0,0,.6);
  --shadow-sm: 0 10px 30px rgba(0,0,0,.4);
  --sidebar-w: 264px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* --- Fondo animado tipo "aurora" (capa fija detras de todo) --- */
body::before {
  content: "";
  position: fixed; inset: -20%;
  z-index: -2;
  background:
    radial-gradient(680px 420px at 82% 8%,  rgba(225,29,42,.22), transparent 60%),
    radial-gradient(620px 420px at 12% 92%, rgba(123,92,255,.20), transparent 60%),
    radial-gradient(560px 380px at 55% 50%, rgba(42,212,255,.08), transparent 60%);
  filter: blur(30px);
  animation: drift 22s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,5,9,.4), rgba(5,5,9,.85)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><rect width='40' height='40' fill='none'/><circle cx='1' cy='1' r='1' fill='rgba(255,255,255,0.02)'/></svg>");
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-3%,2%,0) scale(1.08); }
}

a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: #b6d1ff; }
::selection { background: var(--glow); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #22223a; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #34345a; }
::-webkit-scrollbar-track { background: transparent; }

/* =========================================================================
   LOGIN
   ========================================================================= */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative;
}
.login-card {
  position: relative; z-index: 1; width: 100%; max-width: 430px;
  background: var(--panel);
  backdrop-filter: blur(26px) saturate(150%); -webkit-backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--stroke-2);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
  animation: pop .55s var(--ease);
}
@keyframes pop { from { opacity:0; transform: translateY(20px) scale(.97);} to { opacity:1; transform:none; } }
.login-card h1 { margin: 0 0 2px; font-size: 25px; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.login-card .sub { color: var(--muted); margin: 0 0 26px; font-size: 12px; text-transform: uppercase; letter-spacing: 2.5px; }
.brand { text-align: center; margin-bottom: 26px; }
.brand-logo {
  display: inline-block; font-weight: 900; font-size: 32px; letter-spacing: -.6px;
  background: linear-gradient(120deg, var(--primary), var(--primary-2) 55%, #ffd7db);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 22px var(--glow));
}
.brand-logo::after {
  content: ""; display: block; height: 3px; width: 60px; margin: 12px auto 0; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* =========================================================================
   LAYOUT — cascaron, sidebar, topbar
   ========================================================================= */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, rgba(16,16,28,.92), rgba(8,8,16,.94));
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--stroke);
  padding: 22px 14px 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 3px;
}
.sidebar .logo {
  padding: 4px 12px 22px; font-weight: 900; font-size: 21px; color: #fff; letter-spacing: -.5px;
  display: flex; align-items: center; gap: 11px;
}
.sidebar .logo::before {
  content: ""; width: 13px; height: 13px; border-radius: 5px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 16px var(--glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{ box-shadow:0 0 10px var(--glow);} 50%{ box-shadow:0 0 22px var(--glow);} }
.sidebar .logo span { color: var(--primary); }

/* etiqueta de grupo del menu (opcional) */
.nav-label { padding: 14px 14px 6px; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: #5f6080; font-weight: 700; }

.sidebar a {
  display: flex; align-items: center; gap: 13px; padding: 11px 14px;
  color: var(--muted); border-radius: var(--r-sm); font-weight: 500; position: relative;
  transition: background .18s, color .18s, transform .08s;
}
.sidebar a svg { width: 19px; height: 19px; flex: none; opacity: .82; transition: opacity .18s, transform .18s; }
.sidebar a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar a:hover svg { opacity: 1; transform: scale(1.08); }
.sidebar a.active { background: linear-gradient(90deg, rgba(225,29,42,.2), rgba(225,29,42,.02)); color: #fff; }
.sidebar a.active svg { opacity: 1; color: var(--primary-2); }
.sidebar a.active::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2)); box-shadow: 0 0 14px var(--glow);
}
.sidebar a .count {
  margin-left: auto; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
  padding: 1px 8px; border-radius: 999px; box-shadow: 0 0 12px var(--glow);
}
.sidebar hr.div { border: none; border-top: 1px solid var(--stroke); margin: 14px 6px; }

.main { flex: 1; padding: 24px 34px 44px; max-width: 100%; min-width: 0; animation: fadeUp .5s var(--ease); }
@keyframes fadeUp { from { opacity:0; transform: translateY(10px);} to { opacity:1; transform:none; } }

/* --- Topbar premium: titulo + buscador + acciones + usuario --- */
.topbar {
  display: flex; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap;
}
.topbar h1 { margin: 0; font-size: 25px; color: #fff; font-weight: 800; letter-spacing: -.6px; }
.topbar .spacer { flex: 1; }

.searchbar {
  display: flex; align-items: center; gap: 9px; min-width: 210px;
  background: rgba(0,0,0,.32); border: 1px solid var(--stroke); border-radius: 999px;
  padding: 8px 15px; color: var(--muted); transition: border-color .15s, box-shadow .15s;
}
.searchbar:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--glow); }
.searchbar svg { width: 16px; height: 16px; flex: none; }
.searchbar input { background: transparent; border: 0; outline: 0; color: var(--text); font-size: 13.5px; width: 100%; padding: 0; }
.searchbar input::placeholder { color: #61627f; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--stroke);
  background: var(--panel); color: var(--muted-2); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; transition: background .15s, color .15s, transform .08s;
}
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 8px var(--glow); }

.user-chip {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--stroke); backdrop-filter: blur(10px);
  padding: 6px 14px 6px 6px; border-radius: 999px; font-size: 13px; color: var(--muted-2);
  box-shadow: var(--shadow-sm);
}
.user-chip b { color: #fff; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 2px rgba(255,255,255,.08);
}

/* =========================================================================
   FORMULARIOS
   ========================================================================= */
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
input[type="text"], input[type="password"], input[type="number"], input[type="url"],
input[type="email"], select, textarea {
  width: 100%; background: rgba(0,0,0,.34); color: var(--text);
  border: 1px solid var(--stroke); border-radius: var(--r-sm); padding: 11px 14px;
  font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #5a5b76; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); background: rgba(0,0,0,.5); box-shadow: 0 0 0 4px var(--glow); }
textarea { min-height: 112px; resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; }
.form-row { margin-bottom: 16px; }
.form-grid   { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 18px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

/* =========================================================================
   BOTONES (con destello al hover)
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; background: linear-gradient(135deg, var(--primary), var(--primary-hi));
  color: #fff; border: none; border-radius: var(--r-sm); font-weight: 700; font-size: 14px;
  cursor: pointer; font-family: inherit; text-decoration: none; position: relative; overflow: hidden;
  box-shadow: 0 10px 26px var(--glow); transition: transform .08s, box-shadow .2s, filter .2s;
}
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); transition: left .5s var(--ease);
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 14px 34px var(--glow); color: #fff; }
.btn:hover::after { left: 130%; }
.btn:active { transform: translateY(1px); }
.btn-block { display: flex; width: 100%; }
.btn-secondary { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--stroke); box-shadow: none; }
.btn-secondary::after { display: none; }
.btn-secondary:hover { background: rgba(255,255,255,.12); filter: none; box-shadow: none; }
.btn-danger { background: linear-gradient(135deg, var(--danger), #ff7a7a); box-shadow: 0 10px 26px rgba(255,77,77,.4); }
.btn-sm { padding: 7px 13px; font-size: 13px; box-shadow: none; }
.btn-sm::after { display: none; }

/* =========================================================================
   CARDS
   ========================================================================= */
.card {
  background: var(--panel); backdrop-filter: blur(18px) saturate(135%); -webkit-backdrop-filter: blur(18px) saturate(135%);
  border: 1px solid var(--stroke); border-radius: var(--r); padding: 22px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.card h2 { margin: 0 0 16px; font-size: 16px; color: #fff; font-weight: 700; }

/* --- STAT CARDS premium (dashboard). Se usan con la clase .stat --- */
.stat {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--stroke); border-radius: var(--r); padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.stat::before {  /* anillo de luz de color en la esquina */
  content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, var(--_c, var(--glow)), transparent 70%); opacity: .55; pointer-events: none;
}
.stat:hover { transform: translateY(-4px); border-color: var(--stroke-2); box-shadow: 0 22px 48px rgba(0,0,0,.5); }
.stat .stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat .stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .stat-ico {
  width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); border: 1px solid var(--stroke); color: #fff;
}
.stat .stat-ico svg { width: 20px; height: 20px; }
.stat .stat-num { font-size: 38px; font-weight: 800; color: #fff; line-height: 1; letter-spacing: -1px; }
.stat .stat-foot { margin-top: 10px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat .trend-up   { color: var(--success); font-weight: 700; }
.stat .trend-down { color: var(--danger);  font-weight: 700; }
/* variantes de color del anillo */
.stat.c-red    { --_c: var(--glow); }
.stat.c-violet { --_c: rgba(123,92,255,.5); }
.stat.c-cyan   { --_c: rgba(42,212,255,.45); }
.stat.c-gold   { --_c: rgba(255,197,61,.45); }
.stat.c-violet .stat-ico { color: #c3b4ff; }
.stat.c-cyan   .stat-ico { color: #9be9ff; }
.stat.c-gold   .stat-ico { color: #ffe08a; }

/* grillas utilitarias para cards */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 18px; margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap: 18px; }

/* =========================================================================
   TABLAS (data-grid)
   ========================================================================= */
.table-wrap { overflow-x: auto; border-radius: var(--r-sm); border: 1px solid var(--stroke); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--stroke); }
thead th {
  color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .7px;
  background: rgba(255,255,255,.025); position: sticky; top: 0;
}
tbody tr { transition: background .12s; }
tbody tr:hover td { background: rgba(255,255,255,.04); }
tbody tr:last-child td { border-bottom: none; }
td .thumb { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; background: var(--panel-2); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-active    { background: rgba(46,224,106,.14); color: var(--success); box-shadow: inset 0 0 0 1px rgba(46,224,106,.25); }
.badge-suspended { background: rgba(255,77,77,.14);  color: var(--danger);  box-shadow: inset 0 0 0 1px rgba(255,77,77,.25); }

/* =========================================================================
   ALERTAS
   ========================================================================= */
.alert { padding: 13px 16px; border-radius: var(--r-sm); margin-bottom: 18px; font-size: 13px; display: flex; align-items: center; gap: 10px; animation: alIn .35s var(--ease); }
@keyframes alIn { from { opacity:0; transform: translateY(-6px);} to { opacity:1; transform:none; } }
.alert-error   { background: rgba(255,77,77,.1);  border: 1px solid rgba(255,77,77,.3);  color: #ff9d9a; }
.alert-success { background: rgba(46,224,106,.1); border: 1px solid rgba(46,224,106,.3); color: #86efac; }
.alert-warn    { background: rgba(255,176,32,.1); border: 1px solid rgba(255,176,32,.3); color: #fcd34d; }

/* =========================================================================
   UTILIDADES
   ========================================================================= */
.muted { color: var(--muted); }
.right { text-align: right; }
.flex-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 14px; } .mt-4 { margin-top: 22px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 14px; }
code { background: rgba(255,255,255,.06); padding: 3px 8px; border-radius: 6px; font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; color: #d7d9ea; }
hr.div { border: none; border-top: 1px solid var(--stroke); margin: 16px 0; }
.lang-switch { display: inline-flex; gap: 3px; font-size: 12px; background: rgba(0,0,0,.32); padding: 3px; border-radius: 999px; border: 1px solid var(--stroke); }
.lang-switch a { padding: 3px 12px; border-radius: 999px; color: var(--muted); }
.lang-switch a.on { background: linear-gradient(135deg, var(--primary), var(--primary-hi)); color: #fff; }

/* entrada escalonada de cards (la aplica panel.js agregando .reveal) */
.reveal { opacity: 0; transform: translateY(14px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }

/* =========================================================================
   MODAL
   ========================================================================= */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4,4,10,.74); backdrop-filter: blur(5px); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-backdrop.open { display: flex; animation: alIn .2s var(--ease); }
.modal-card { background: var(--panel); backdrop-filter: blur(26px) saturate(140%); -webkit-backdrop-filter: blur(26px) saturate(140%); border: 1px solid var(--stroke-2); border-radius: 22px; width: 100%; max-width: 720px; max-height: 90vh; overflow: auto; padding: 24px 26px; box-shadow: var(--shadow); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-head h2 { color: #fff; margin: 0; }
.modal-close { background: transparent; border: 0; color: #888; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 6px; transition: color .15s; }
.modal-close:hover { color: #fff; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 960px) { .searchbar { display: none; } }
@media (max-width: 860px) {
  :root { --sidebar-w: 78px; }
  .sidebar .logo { font-size: 0; justify-content: center; padding: 4px 0 18px; }
  .sidebar .logo::before { margin: 0; }
  .nav-label { display: none; }
  .sidebar a { justify-content: center; padding: 12px; }
  .sidebar a span, .sidebar a .count { display: none; }
  .sidebar a.active::before { left: -6px; }
  .main { padding: 18px; }
  .form-grid-3 { grid-template-columns: 1fr; }
}

/* =========================================================================
   V2 "STREAMING PREMIUM 2.0" — drawer, toasts, tablas pro, health, graficas
   (solo apariencia + helpers de UI; la logica vive en panel.js y ajax.php)
   ========================================================================= */

/* --- Drawer lateral: agrega la clase .drawer al .modal-backdrop --- */
.modal-backdrop.drawer { justify-content: flex-end; align-items: stretch; padding: 0; }
.modal-backdrop.drawer .modal-card {
  max-width: 500px; width: 100%; height: 100vh; max-height: 100vh;
  border-radius: 0; border-top: none; border-bottom: none; border-right: none;
  border-left: 1px solid var(--stroke-2);
  animation: drawerIn .32s var(--ease);
}
@keyframes drawerIn { from { transform: translateX(60px); opacity: 0; } to { transform: none; opacity: 1; } }

/* --- Toasts flotantes (reemplazan a los .alert de flash) --- */
.toast-stack {
  position: fixed; right: 22px; bottom: 22px; z-index: 3000;
  display: flex; flex-direction: column; gap: 10px; max-width: 380px;
}
.toast {
  padding: 13px 18px; border-radius: var(--r-sm); font-size: 13px; color: #fff;
  background: var(--panel); border: 1px solid var(--stroke-2);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  border-left-width: 3px;
}
.toast.in { opacity: 1; transform: none; }
.toast.t-success { border-left-color: var(--success); }
.toast.t-error   { border-left-color: var(--danger); }
.toast.t-warn    { border-left-color: var(--warn); }

/* --- Tablas pro: cabeceras ordenables + barra de paginacion --- */
th.th-sort { cursor: pointer; user-select: none; transition: color .15s; }
th.th-sort:hover { color: #fff; }
th.th-sort::after { content: " ↕"; opacity: .35; font-size: 10px; }
th.th-sort.asc::after  { content: " ↑"; opacity: 1; color: var(--primary-2); }
th.th-sort.desc::after { content: " ↓"; opacity: 1; color: var(--primary-2); }

.tbl-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 4px 0; font-size: 12.5px; color: var(--muted);
}
.tbl-bar .spacer { flex: 1; }
.tbl-bar button {
  background: rgba(255,255,255,.05); border: 1px solid var(--stroke); color: var(--muted-2);
  border-radius: 9px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s;
}
.tbl-bar button:hover:not(:disabled) { background: rgba(255,255,255,.1); color: #fff; }
.tbl-bar button:disabled { opacity: .35; cursor: default; }
.tbl-bar button.pg-on { background: linear-gradient(135deg, var(--primary), var(--primary-hi)); color: #fff; border-color: transparent; }

/* --- Ping / salud de servidores --- */
.pdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: baseline; }
.pdot.ok   { background: var(--success); box-shadow: 0 0 8px rgba(46,224,106,.6); }
.pdot.bad  { background: var(--danger);  box-shadow: 0 0 8px rgba(255,77,77,.6); }
.pdot.wait { background: #55566e; animation: pulse 1.4s ease-in-out infinite; }
[data-dns-ping] { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
[data-dns-ping].p-bad { color: var(--danger); }

.health-list { display: flex; flex-direction: column; }
.health-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 4px;
  border-bottom: 1px solid var(--stroke); font-size: 13px;
}
.health-row:last-child { border-bottom: none; }
.health-row .h-name { font-weight: 700; color: #fff; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.health-row .h-url { color: var(--muted); font-size: 11.5px; font-family: ui-monospace, Menlo, Consolas, monospace; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Graficas del dashboard (SVG generado por dashboard) --- */
.grid-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }
.grid-charts .chart-wide { grid-column: auto; }
@media (max-width: 1100px) { .grid-charts { grid-template-columns: 1fr; } }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.chart-head h2 { margin: 0; font-size: 15px; }
.chart-head .chart-total { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.chart-box svg { width: 100%; height: auto; display: block; }
.chart-bar { fill: var(--primary); transition: opacity .15s; }
.chart-bar:hover { opacity: .75; }
.chart-bar.dim { fill: rgba(255,255,255,.14); }
.chart-axis { font-size: 9px; fill: var(--muted); }
.donut-flex { display: flex; align-items: center; gap: 22px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted-2); }
.donut-legend b { color: #fff; }
.leg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; }
