/* 
 * vfbEstilo.css — vexanor Panel
 * Diseño compacto tipo Excel, glassmorphism oscuro, transiciones suaves
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-principal: #050811;
  --bg-tarjeta: rgba(13, 19, 33, 0.55);
  --bg-tarjeta-hover: rgba(22, 32, 56, 0.7);
  --borde-glass: rgba(255, 255, 255, 0.06);
  --borde-tabla: rgba(255, 255, 255, 0.10);
  --color-texto: #f1f5f9;
  --color-mutado: #64748b;
  --color-mutado2: #94a3b8;

  --color-primario: #16848f;
  --color-primario-hover: #12707a;
  --color-primario-glow: rgba(22, 132, 143, 0.25);

  --color-exito: #10b981;
  --color-exito-glow: rgba(16, 185, 129, 0.12);

  --color-peligro: #ef4444;
  --color-peligro-glow: rgba(239, 68, 68, 0.12);

  --color-advertencia: #f59e0b;

  --sombra-premium: 0 4px 24px 0 rgba(0, 0, 0, 0.4);
  --transicion-suave: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --fuente-familia: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Dimensiones compactas */
  --sidebar-ancho: 190px;
  --fila-altura: 28px;
  --radio-tarjeta: 10px;
  --padding-celda: 4px 8px;
  --font-tabla: 0.79rem;
}

/* ==========================================
   TEMA CLARO — Estilo cPanel limpio
   ========================================== */
[data-theme="light"] {
  --bg-principal: #f0f0f0;
  --bg-tarjeta: #ffffff;
  --bg-tarjeta-hover: #fafafa;
  --borde-glass: rgba(0, 0, 0, 0.06);
  --borde-tabla: rgba(0, 0, 0, 0.08);
  --color-texto: #1a1a1a;
  --color-mutado: #6b7280;
  --color-mutado2: #9ca3af;
  --sombra-premium: 0 1px 3px rgba(0,0,0,0.06);

  --color-exito-soft: #ecfdf5;
  --color-exito-border: #a7f3d0;
  --color-info-soft: #eff6ff;
  --color-info-border: #bfdbfe;
  --color-advertencia-soft: #fffbeb;
  --color-advertencia-border: #fde68a;
}

html[data-theme="light"],
html[data-theme="light"] body {
  background: #f0f0f0 !important;
}

[data-theme="light"] body {
  background: #f0f0f0;
  background-image: none;
}

[data-theme="light"] input,
[data-theme="light"] textarea {
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid rgba(0,0,0,0.12);
}
[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus {
  border-color: var(--color-primario);
  box-shadow: 0 0 0 2px rgba(22,132,143,0.1);
}
[data-theme="light"] .input-control:focus {
  background: #ffffff;
}
[data-theme="light"] select,
[data-theme="light"] select.input-control {
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid rgba(0,0,0,0.12);
}
[data-theme="light"] select option {
  background: #ffffff;
  color: #1a1a1a;
}
[data-theme="light"] select option:checked {
  background: #e5f4f5;
  color: #0d4f57;
}
[data-theme="light"] select:focus,
[data-theme="light"] select.input-control:focus {
  border-color: var(--color-primario);
  box-shadow: 0 0 0 2px rgba(22,132,143,0.1);
}

[data-theme="light"] .barra-lateral {
  background: #ffffff;
  border-right: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: none;
}

[data-theme="light"] .logo-panel h2 { color: #16848f; }

[data-theme="light"] .item-menu a {
  color: #4b5563;
  background: transparent;
  border-color: transparent;
}
[data-theme="light"] .item-menu.activo a,
[data-theme="light"] .item-menu a:hover {
  color: #16848f;
  background: rgba(22,132,143,0.06);
}

[data-theme="light"] .icono-svg { stroke: #9ca3af; }
[data-theme="light"] .item-menu.activo .icono-svg,
[data-theme="light"] .item-menu a:hover .icono-svg { stroke: #16848f; filter: none; }

[data-theme="light"] .barra-lateral-usuario {
  background: #f9fafb;
  border: 1px solid rgba(0,0,0,0.06);
}
[data-theme="light"] .barra-lateral-usuario .nombre { color: #1a1a1a; }

/* Monitores admin — fondo blanco, texto oscuro */
[data-theme="light"] .admin-stats-barra {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
}
[data-theme="light"] .admin-stat-item { border-right-color: rgba(0,0,0,0.06); }
[data-theme="light"] .admin-stat-anillo { background: rgba(0,0,0,0.04); }
[data-theme="light"] .admin-stat-hueco { background: #f0f0f0; }
[data-theme="light"] .admin-stat-hueco span { color: #1a1a1a; }
[data-theme="light"] .admin-stat-label { color: #6b7280; }
[data-theme="light"] .admin-stat-detalle { color: #9ca3af; }

/* Tarjetas sección — fondo blanco, texto oscuro */
[data-theme="light"] .tarjeta-seccion {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
[data-theme="light"] .tarjeta-seccion h2 { color: #1a1a1a; }

/* Tabla */
[data-theme="light"] .tabla-premium thead { background: #f9fafb; }
[data-theme="light"] .tabla-premium th { color: #6b7280; font-weight: 600; }
[data-theme="light"] .tabla-premium td { color: #1a1a1a; }
[data-theme="light"] .tabla-premium tr:hover td { background: rgba(22,132,143,0.02); }

/* Tabla Excel */
[data-theme="light"] .tabla-excel {
  color: #1a1a1a;
  background: #ffffff;
}
[data-theme="light"] .tabla-excel th,
[data-theme="light"] .tabla-excel td {
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .tabla-excel th {
  background: #f3f4f6;
  color: #6b7280;
}
[data-theme="light"] .tabla-excel td:first-child { color: #1a1a1a; }
[data-theme="light"] .tabla-excel tr:hover td { background: rgba(22,132,143,0.03); }

/* Login */
[data-theme="light"] .tarjeta-login {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
[data-theme="light"] .tarjeta-login-cabecera h1 { background: linear-gradient(135deg, #16848f, #12707a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
[data-theme="light"] .tarjeta-login-cabecera p { color: #6b7280; }

/* Alertas */
[data-theme="light"] .alerta-peligro  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
[data-theme="light"] .alerta-exito    { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
[data-theme="light"] .alerta-advertencia { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* Badges */
[data-theme="light"] .badge-exito    { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
[data-theme="light"] .badge-peligro  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
[data-theme="light"] .badge-primario { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
[data-theme="light"] .badge-advertencia { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Botones */
[data-theme="light"] .boton-accion { color: #374151; background: #f9fafb; border-color: #d1d5db; }
[data-theme="light"] .boton-accion:hover { background: #f3f4f6; border-color: #9ca3af; }
[data-theme="light"] .boton-accion-peligro { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
[data-theme="light"] .boton-accion-peligro:hover { background: #fef2f2; border-color: #fca5a5; }
[data-theme="light"] .boton-principal { box-shadow: 0 2px 6px rgba(22,132,143,0.15); }

/* Tabs */
[data-theme="light"] .tabs-navegacion { border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .tab-boton { color: #6b7280; }
[data-theme="light"] .tab-boton:hover { color: #1a1a1a; background: rgba(0,0,0,0.02); }
[data-theme="light"] .tab-boton.activo { color: #fff; background: var(--color-primario); }

/* Stats bar cliente */
[data-theme="light"] .stats-barra-compacta { background: #ffffff; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .stat-item { border-right-color: rgba(0,0,0,0.06); }
[data-theme="light"] .stat-nombre { color: #6b7280; }
[data-theme="light"] .stat-valor { color: #111827; }
[data-theme="light"] .stat-barra { background: rgba(0,0,0,0.04); }

/* Monitor circular tarjetas */
[data-theme="light"] .monitor-interno { background: #f0f0f0; }
[data-theme="light"] .monitor-interno .porcentaje { color: #1a1a1a; }
[data-theme="light"] .monitor-interno .label { color: #9ca3af; }
[data-theme="light"] .tarjeta-monitor .detalles { color: #6b7280; }

/* Tarjetas stat */
[data-theme="light"] .tarjeta-stat { background: #ffffff; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .tarjeta-stat h3 { color: #6b7280; }
[data-theme="light"] .tarjeta-stat .valor { color: #1a1a1a; }
[data-theme="light"] .tarjeta-stat .descripcion { color: #9ca3af; }

/* Cliente tarjetas resumen */
[data-theme="light"] .cli-resumen-card { background: #ffffff; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .cli-card-valor { color: #1a1a1a; }
[data-theme="light"] .cli-card-titulo { color: #6b7280; }

/* Acciones rápidas cliente */
[data-theme="light"] .cli-btn-accion { background: #ffffff; border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .cli-btn-texto { color: #1a1a1a; }
[data-theme="light"] .cli-btn-accion:hover { border-color: rgba(22,132,143,0.3); background: rgba(22,132,143,0.02); }

/* File manager - Light Mode cPanel Pro */
[data-theme="light"] .vfb-editor-codigo { background: #ffffff; color: #1a1a1a; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .vfb-tree-item { color: #374151; }
[data-theme="light"] .vfb-tree-item:hover { background: rgba(22,132,143,0.06); color: #111827; }
[data-theme="light"] .vfb-tree-item.activo { background: rgba(22,132,143,0.10); color: #0e7490; font-weight: 600; box-shadow: inset 2px 0 0 #16848f; }
[data-theme="light"] .vfb-item-archivo { border-bottom-color: rgba(0,0,0,0.04); }
[data-theme="light"] .vfb-item-archivo:hover { background: rgba(0,0,0,0.015); }
[data-theme="light"] .vfb-item-archivo-cpanel { color: #1a1a1a; border-bottom-color: rgba(0,0,0,0.05); }
[data-theme="light"] .vfb-item-archivo-cpanel:hover { background: rgba(22,132,143,0.04); }
[data-theme="light"] .vfb-item-archivo-cpanel.seleccionado { background: rgba(22,132,143,0.08) !important; }
[data-theme="light"] .vfb-meta-archivo-cpanel { color: #6b7280; }
[data-theme="light"] .vfb-nombre-archivo { color: #0e7490; }
[data-theme="light"] .vfb-nombre-archivo:hover { color: #16848f; }
[data-theme="light"] .vfb-cpanel-filemanager { background: #ffffff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .vfb-cpanel-tree { background: #f8f9fb; border-right-color: rgba(0,0,0,0.06); }
[data-theme="light"] .vfb-cpanel-tree h4 { color: #6b7280; border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .vfb-cpanel-toolbar { background: #f8f9fb; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .vfb-cpanel-btn { color: #6b7280; }
[data-theme="light"] .vfb-cpanel-btn svg { stroke: #9ca3af; }
[data-theme="light"] .vfb-cpanel-btn:hover:not(:disabled) { background: rgba(22,132,143,0.08); color: #0e7490; border-color: rgba(22,132,143,0.2); }
[data-theme="light"] .vfb-cpanel-btn:hover:not(:disabled) svg { stroke: #16848f; }
[data-theme="light"] .vfb-lista-archivos { border-color: rgba(0,0,0,0.08); background: #ffffff; }
[data-theme="light"] .vfb-ruta-herramientas { background: #f8f9fb; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .vfb-ruta-actual { color: #374151; }
[data-theme="light"] .vfb-subir-nivel { color: #0e7490; }
[data-theme="light"] .vfb-context-menu { background: #ffffff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .vfb-context-menu-item { color: #374151; }
[data-theme="light"] .vfb-context-menu-item:hover { background: rgba(22,132,143,0.06); }

/* Modal */
[data-theme="light"] .modal-overlay { background: rgba(0,0,0,0.3); }
[data-theme="light"] .modal-contenedor { background: #ffffff; border-color: rgba(0,0,0,0.06); }

/* Recursos cliente */
[data-theme="light"] .vfb-medidor-recurso { background: #f9fafb; }
[data-theme="light"] .vfb-fila-recurso { color: #1a1a1a; }

/* Barra progreso */
[data-theme="light"] .barra-recurso-contenedor { background: rgba(0,0,0,0.04); }

/* Branding */
[data-theme="light"] .vfb-panel-brand { border-top-color: rgba(0,0,0,0.06); }

/* Menu toggle */
[data-theme="light"] .vfb-tema-toggle:hover { background: rgba(0,0,0,0.04); }

/* ==========================================
   BANNER DE IMPERSONACIÓN / SOPORTE
   ========================================== */
.impersonacion-banner {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; background: rgba(245, 158, 11, 0.15);
  border-left: 4px solid #f59e0b; padding: 12px 20px; border-radius: 8px;
}
.impersonacion-titulo { color: #fbbf24; }
.impersonacion-texto { color: #fef3c7; }
.alerta-advertencia.impersonacion-boton,
.impersonacion-banner .impersonacion-boton {
  background: rgba(245, 158, 11, 0.25); color: #fef3c7;
  border: 1px solid #d97706; text-decoration: none; font-weight: bold;
  padding: 8px 16px; border-radius: 6px; font-size: 0.85rem;
  cursor: pointer; transition: all 0.2s ease;
}
.alerta-advertencia.impersonacion-boton:hover,
.impersonacion-banner .impersonacion-boton:hover {
  background: rgba(245, 158, 11, 0.4); border-color: #f59e0b;
}
[data-theme="light"] .impersonacion-banner {
  background: #fffbeb; border-left-color: #d97706;
}
[data-theme="light"] .impersonacion-titulo { color: #92400e; }
[data-theme="light"] .impersonacion-texto { color: #78350f; }
[data-theme="light"] .impersonacion-banner .impersonacion-boton {
  background: #d97706; color: #ffffff; border-color: #b45309;
}
[data-theme="light"] .impersonacion-banner .impersonacion-boton:hover {
  background: #b45309;
}

/* ==========================================
   COMPACT MENU
   ========================================== */
.menu-navegacion .item-menu a {
  padding: 3px 10px;
  font-size: 0.88rem;
  gap: 6px;
}
.menu-navegacion .icono-svg {
  width: 16px;
  height: 16px;
}
.barra-lateral .logo-panel {
  padding: 12px 12px 6px;
}
.barra-lateral .logo-panel h2 {
  font-size: 1.4rem;
  font-weight: 700;
}
.barra-lateral .logo-panel span {
  font-size: 0.62rem;
}
.barra-lateral-usuario {
  padding: 6px 10px;
}
.barra-lateral-usuario .nombre {
  font-size: 0.82rem;
}

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

body {
  font-family: var(--fuente-familia);
  background-color: var(--bg-principal);
  background-image:
    radial-gradient(at 0% 0%, rgba(22,132,143,0.08) 0px, transparent 45%),
    radial-gradient(at 100% 100%, rgba(16,185,129,0.05) 0px, transparent 40%);
  background-attachment: fixed;
  color: var(--color-texto);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  font-size: 13px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(22,132,143,0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primario); }

/* ==========================================
   LOGIN
   ========================================== */
.contenedor-login {
  min-height: 100vh; width: 100vw;
  display: flex; justify-content: center; align-items: center; padding: 15px;
}
.tarjeta-login {
  background: var(--bg-tarjeta);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--borde-glass);
  box-shadow: var(--sombra-premium);
  border-radius: 20px;
  width: 100%; max-width: 390px;
  padding: 32px;
  animation: deslizarEntrada 0.4s cubic-bezier(0.16,1,0.3,1);
}
.tarjeta-login-cabecera { text-align: center; margin-bottom: 22px; }
.tarjeta-login-cabecera h1 {
  font-size: 1.75rem; font-weight: 700;
  background: linear-gradient(135deg, #5ad0d8 0%, #16848f 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 6px; letter-spacing: -0.02em;
}
.tarjeta-login-cabecera p { color: var(--color-mutado); font-size: 0.85rem; }
.tarjeta-login-cabecera .vfb-login-brand { font-size: 0.7rem; color: #16848f; font-weight: 600; margin-top: 8px; letter-spacing: 0.02em; }

/* ==========================================
   FORMULARIOS COMPACTOS
   ========================================== */
.grupo-control { margin-bottom: 10px; display: flex; flex-direction: column; }
.label-control { margin-bottom: 4px; font-size: 0.78rem; font-weight: 500; color: var(--color-mutado2); }

.input-control {
  background: rgba(10,15,28,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--color-texto);
  font-family: var(--fuente-familia);
  font-size: 0.83rem;
  transition: var(--transicion-suave);
  width: 100%;
}
.input-control:focus {
  outline: none;
  border-color: var(--color-primario);
  box-shadow: 0 0 0 2px var(--color-primario-glow);
  background: rgba(10,15,28,0.7);
}

/* Alertas */
.alerta {
  padding: 8px 12px; border-radius: 8px; margin-bottom: 12px;
  font-size: 0.82rem; display: flex; align-items: center;
  animation: sacudir 0.3s ease;
}
.alerta-peligro  { background: rgba(239,68,68,0.07);  border: 1px solid rgba(239,68,68,0.15);  color: #fca5a5; }
.alerta-exito    { background: rgba(16,185,129,0.07); border: 1px solid rgba(16,185,129,0.15); color: #a7f3d0; }
.alerta-advertencia { background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.15); color: #fde047; }

/* ==========================================
   PANEL LAYOUT
   ========================================== */
.contenedor-panel { display: flex; width: 100vw; min-height: 100vh; }

/* ==========================================
   SIDEBAR — Compacto, 1 línea por ítem
   ========================================== */
.barra-lateral {
  width: var(--sidebar-ancho);
  background: rgba(7,10,20,0.75);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--borde-glass);
  display: flex; flex-direction: column;
  padding: 14px 10px;
  position: fixed; height: 100vh; z-index: 100;
}

.logo-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin-bottom: 16px; padding: 8px 0 4px;
}
.logo-panel img {
  max-height: 64px; max-width: 170px; width: auto;
  display: block; margin: 0 auto;
}
.logo-panel h2 {
  font-size: 1.15rem; font-weight: 700;
  background: linear-gradient(135deg, #5ad0d8 0%, #16848f 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 150px; text-align: center;
}
.logo-panel span {
  font-size: 0.62rem;
  background: rgba(22,132,143,0.12); color: var(--color-primario);
  padding: 1px 5px; border-radius: 10px;
  border: 1px solid rgba(22,132,143,0.25); font-weight: 700;
  white-space: nowrap; flex-shrink: 0;
}

.menu-navegacion { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.item-menu a {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  color: var(--color-mutado);
  text-decoration: none; border-radius: 8px;
  font-weight: 500; font-size: 0.88rem;
  transition: var(--transicion-suave);
  border: 1px solid transparent;
  white-space: nowrap; overflow: hidden;
}
.item-menu a span.menu-texto { overflow: hidden; text-overflow: ellipsis; }

.item-menu.activo a, .item-menu a:hover {
  color: var(--color-texto);
  background: rgba(22,132,143,0.1);
  border-color: rgba(22,132,143,0.15);
}

/* Iconos SVG del menú */
.icono-svg {
  width: 16px; height: 16px;
  stroke: var(--color-mutado); fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transition: var(--transicion-suave); flex-shrink: 0;
}
.item-menu.activo .icono-svg, .item-menu a:hover .icono-svg {
  stroke: #5ad0d8;
  filter: drop-shadow(0 0 4px rgba(22,132,143,0.4));
}

/* Separador de menú */
.menu-separador {
  height: 1px; background: var(--borde-glass);
  margin: 6px 4px;
}

/* Usuario en sidebar */
.barra-lateral-usuario {
  margin-top: auto;
  padding: 10px;
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--borde-glass);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 3px;
}
.barra-lateral-usuario .nombre {
  font-weight: 600; font-size: 0.82rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff;
}
.barra-lateral-usuario .rol { font-size: 0.7rem; color: var(--color-mutado); }
.barra-lateral-usuario .logout {
  margin-top: 6px; color: #f87171; text-decoration: none;
  font-size: 0.76rem; font-weight: 500;
  display: flex; align-items: center; gap: 5px;
  transition: var(--transicion-suave);
}
.barra-lateral-usuario .logout:hover { opacity: 0.8; }

/* ==========================================
   CONTENIDO PRINCIPAL
   ========================================== */
.contenido-principal {
  margin-left: var(--sidebar-ancho);
  flex-grow: 1; padding: 16px 20px;
  width: calc(100vw - var(--sidebar-ancho));
}

.cabecera-pagina {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; animation: fadeIn 0.3s ease-out;
  gap: 16px;
}
.cabecera-pagina > div:first-child { flex-shrink: 0; }
.cabecera-pagina > div:last-child { flex-shrink: 0; }
.cabecera-pagina h1 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.cabecera-pagina p  { color: var(--color-mutado); margin-top: 3px; font-size: 0.85rem; }

/* ==========================================
   BARRA DE STATS COMPACTA (CLIENTE)
   ========================================== */
.stats-barra-compacta {
  display: flex; gap: 0; align-items: stretch;
  background: rgba(13,19,33,0.5);
  border: 1px solid var(--borde-glass);
  border-radius: 10px; margin-bottom: 14px;
  overflow: hidden;
}
.stat-item {
  display: flex; align-items: center; gap: 6px;
  flex: 1; padding: 6px 10px;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.stat-item:last-child { border-right: none; }
.stat-icono { font-size: 0.85rem; flex-shrink: 0; }
.stat-info { flex: 1; min-width: 0; }
.stat-fila { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.stat-nombre {
  font-size: 0.72rem; color: rgba(255,255,255,0.55);
  text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em;
}
.stat-valor { font-size: 0.82rem; color: #fff; font-weight: 700; font-family: 'SF Mono', monospace; }
.stat-barra {
  height: 2px; background: rgba(255,255,255,0.06);
  border-radius: 2px; overflow: hidden;
}
.stat-progreso { height: 100%; border-radius: 2px; transition: width 0.4s ease; }

/* ==========================================
   BARRA DE STATS COMPACTA (ADMIN)
   ========================================== */
.admin-stats-barra {
  display: flex; gap: 0; align-items: center;
  background: rgba(13,19,33,0.5);
  border: 1px solid var(--borde-glass);
  border-radius: 10px; margin-bottom: 14px;
  overflow: hidden;
}
.admin-stat-item {
  display: flex; align-items: center; gap: 8px;
  flex: 1; padding: 8px 16px;
  border-right: 1px solid rgba(255,255,255,0.04);
}
.admin-stat-item:last-child { border-right: none; }
.admin-stat-anillo {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  flex-shrink: 0;
  transition: background 0.6s ease;
}
.admin-stat-hueco {
  width: 40px; height: 40px; background: #0a0e1a; border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
}
.admin-stat-hueco span { font-size: 0.72rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.admin-stat-texto { display: flex; flex-direction: column; gap: 2px; }
.admin-stat-label { font-size: 0.7rem; color: rgba(255,255,255,0.55); text-transform: uppercase; font-weight: 700; letter-spacing: 0.04em; }
.admin-stat-detalle { font-size: 0.6rem; color: rgba(255,255,255,0.3); }

/* ==========================================
   CLIENTE — TARJETAS DE RESUMEN (cPanel moderno)
   ========================================== */
.cli-resumen-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px;
}
.cli-resumen-card {
  background: linear-gradient(135deg, rgba(13,19,33,0.6), rgba(13,19,33,0.4));
  border: 1px solid var(--borde-glass);
  border-radius: 14px; padding: 16px;
  display: flex; align-items: flex-start; gap: 14px;
  transition: all 0.25s ease; position: relative; overflow: hidden;
}
.cli-resumen-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent, #6366f1), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.cli-resumen-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
.cli-resumen-card:hover::before { opacity: 1; }
.cli-card-disco { --card-accent: #10b981; border-left: 3px solid #10b981; }
.cli-card-dom   { --card-accent: #6366f1; border-left: 3px solid #6366f1; }
.cli-card-bd    { --card-accent: #f59e0b; border-left: 3px solid #f59e0b; }
.cli-card-mail  { --card-accent: #ec4899; border-left: 3px solid #ec4899; }
.cli-card-icono { font-size: 1.8rem; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.cli-card-cuerpo { flex: 1; min-width: 0; }
.cli-card-titulo { font-size: 0.68rem; color: var(--color-mutado); text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em; }
.cli-card-valor { font-size: 1.35rem; font-weight: 800; display: block; margin: 3px 0 8px; letter-spacing: -0.02em; color: #f1f5f9; }
.cli-card-barra { height: 4px; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.cli-card-progreso { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.cli-card-disco .cli-card-progreso { background: linear-gradient(90deg, #10b981, #34d399); }
.cli-card-dom .cli-card-progreso   { background: linear-gradient(90deg, #6366f1, #818cf8); }
.cli-card-bd .cli-card-progreso    { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.cli-card-mail .cli-card-progreso  { background: linear-gradient(90deg, #ec4899, #f472b6); }
.cli-card-limite { font-size: 0.67rem; color: var(--color-mutado); }

/* ==========================================
   CLIENTE — ACCIONES RÁPIDAS
   ========================================== */
.cli-acciones-rapidas {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px;
}
.cli-btn-accion {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(13,19,33,0.5), rgba(13,19,33,0.3));
  border: 1px solid var(--borde-glass);
  border-radius: 12px; padding: 14px 18px; cursor: pointer;
  transition: all 0.25s ease; font: inherit; color: inherit; text-align: left; width: 100%;
}
.cli-btn-accion:hover {
  border-color: rgba(99,102,241,0.3);
  background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(99,102,241,0.02));
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.cli-btn-icon { font-size: 1.3rem; flex-shrink: 0; }
.cli-btn-texto { font-size: 0.85rem; font-weight: 500; flex: 1; color: #e2e8f0; }
.cli-btn-flecha { font-size: 1rem; color: var(--color-mutado); transition: all 0.25s; }
.cli-btn-accion:hover .cli-btn-flecha { transform: translateX(4px); color: var(--color-primario); }

/* ==========================================
   CLIENTE — SIDEBAR PHPMYADMIN BUTTON
   ========================================== */
.barra-lateral-usuario form button {
  transition: all 0.2s ease;
}
.barra-lateral-usuario form button:hover {
  background: rgba(16,185,129,0.25) !important;
  border-color: rgba(16,185,129,0.5) !important;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1100px) {
  .cli-acciones-rapidas { grid-template-columns: 1fr; }
  .stats-barra-compacta { flex-wrap: wrap; }
  .stat-item { flex: 1 1 45%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.04); }
  .stat-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.04); }
  .admin-stats-barra { flex-wrap: wrap; }
  .admin-stat-item { flex: 1 1 45%; border-right: none; }
  .admin-stat-item:first-child { flex: 1 1 100%; border-right: none; }
}
@media (max-width: 768px) {
  .stats-barra-compacta { flex-direction: column; }
  .stat-item { flex: 1 1 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.04); }
  .stat-item:last-child { border-bottom: none; }
  .admin-stats-barra { flex-direction: column; }
  .admin-stat-item { flex: 1 1 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.04); }
  .admin-stat-item:last-child { border-bottom: none; }
}

/* ==========================================
   MONITORES CIRCULARES (DASHBOARD)
   ========================================== */
.contenedor-monitores-aapanel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px; margin-bottom: 20px;
}
.tarjeta-monitor {
  background: linear-gradient(135deg, rgba(22,132,143,0.08), rgba(16,185,129,0.06));
  border: 1px solid rgba(22,132,143,0.2);
  border-radius: 16px; padding: 18px 12px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: all 0.3s ease; backdrop-filter: blur(16px);
}
.tarjeta-monitor:hover {
  border-color: rgba(22,132,143,0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(22,132,143,0.15);
}
.monitor-circular {
  width: 82px; height: 82px; border-radius: 50%;
  display: flex; justify-content: center; align-items: center;
  position: relative; margin-bottom: 10px;
  box-shadow: 0 0 20px rgba(22,132,143,0.12);
}
.monitor-interno {
  width: 68px; height: 68px; background: #0a0e1a; border-radius: 50%;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.4);
}
.monitor-interno .porcentaje { font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.monitor-interno .label { font-size: 0.6rem; color: rgba(255,255,255,0.4); text-transform: uppercase; font-weight: 700; letter-spacing: 0.06em; }
.tarjeta-monitor .detalles { font-size: 0.72rem; color: var(--color-mutado); margin-top: 2px; }

/* ==========================================
   STATS / CARDS
   ========================================== */
.seccion-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px; margin-bottom: 12px;
}
.tarjeta-stat {
  background: var(--bg-tarjeta); backdrop-filter: blur(12px);
  border: 1px solid var(--borde-glass); border-radius: var(--radio-tarjeta);
  padding: 10px 12px; transition: var(--transicion-suave);
}
.tarjeta-stat:hover { transform: translateY(-1px); border-color: rgba(22,132,143,0.25); }
.tarjeta-stat h3 { font-size: 0.68rem; color: var(--color-mutado); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; font-weight: 600; }
.tarjeta-stat .valor { font-size: 1.45rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.tarjeta-stat .descripcion { font-size: 0.7rem; color: var(--color-mutado); }

.barra-recurso-contenedor { width: 100%; height: 4px; background: rgba(255,255,255,0.03); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.barra-recurso-progreso { height: 100%; background: linear-gradient(90deg, #16848f, #10b981); border-radius: 3px; }
.barra-recurso-progreso.alerta-limite { background: linear-gradient(90deg, #f59e0b, #ef4444); }

/* ==========================================
   LAYOUT GRID
   ========================================== */
.cuadricula-contenido { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 1100px) {
  .cuadricula-contenido { grid-template-columns: 2fr 1fr; }
}

/* ==========================================
   TARJETAS SECCIÓN — Compactas
   ========================================== */
.tarjeta-seccion {
  background: linear-gradient(135deg, rgba(13,19,33,0.55), rgba(13,19,33,0.35));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--borde-glass); border-radius: 12px;
  padding: 16px 18px; box-shadow: var(--sombra-premium);
  animation: deslizarEntrada 0.35s ease-out;
}
.tarjeta-seccion h2 {
  font-size: 0.95rem; font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
  color: #e2e8f0;
}

/* ==========================================
   SUB-TAB BUTTONS (avanzada)
   ========================================== */
.subtab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-mutado);
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}
.subtab-btn:hover {
  color: var(--color-texto);
  background: rgba(255,255,255,0.04);
  border-color: var(--borde-glass);
}
.subtab-btn.activo {
  color: var(--color-primario);
  background: rgba(22,132,143,0.1);
  border-color: rgba(22,132,143,0.25);
  font-weight: 600;
}

/* ==========================================
   TABLA PREMIUM (datos principales)
   ========================================== */
.contenedor-tabla { width: 100%; overflow-x: auto; }

.tabla-premium { width: 100%; border-collapse: collapse; text-align: left; }
.tabla-premium th {
  padding: 5px 8px; border-bottom: 1px solid var(--borde-tabla);
  color: var(--color-mutado); font-size: 0.68rem; text-transform: uppercase;
  font-weight: 600; letter-spacing: 0.05em; white-space: nowrap;
}
.tabla-premium td {
  padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.025);
  font-size: 0.8rem; color: #cbd5e1; white-space: nowrap;
}
.tabla-premium tr:hover td { background: rgba(255,255,255,0.012); }

/* ==========================================
   TABLA EXCEL — Estilo hoja de cálculo
   ========================================== */
.tabla-excel {
  width: 100%; border-collapse: collapse;
  font-size: var(--font-tabla); color: #e2e8f0;
  background: rgba(10, 15, 28, 0.35);
}
.tabla-excel th, .tabla-excel td {
  border: 1px solid rgba(255,255,255,0.09);
  padding: var(--padding-celda);
  text-align: left; height: var(--fila-altura);
  vertical-align: middle; white-space: nowrap;
}
.tabla-excel th {
  background: rgba(20, 30, 55, 0.9);
  color: #94a3b8; font-weight: 600;
  text-transform: uppercase; font-size: 0.67rem; letter-spacing: 0.5px;
  position: sticky; top: 0; z-index: 1;
}
.tabla-excel tr:hover td { background: rgba(99,102,241,0.04); }
.tabla-excel td:first-child { font-weight: 500; color: #f1f5f9; }

/* ==========================================
   BADGES
   ========================================== */
.badge {
  display: inline-block; padding: 1px 5px;
  border-radius: 10px; font-size: 0.65rem; font-weight: 600;
  white-space: nowrap; line-height: 1.4;
}
.badge-exito   { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge-peligro { background: rgba(239,68,68,0.10);  color: #f87171; border: 1px solid rgba(239,68,68,0.25);  }
.badge-primario{ background: rgba(99,102,241,0.10); color: #818cf8; border: 1px solid rgba(99,102,241,0.25); }
.badge-advertencia { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }

/* ==========================================
   SWITCH TOGGLE (para servicios)
   ========================================== */
.switch {
  position: relative; display: inline-flex; align-items: center;
  width: 44px; height: 24px; cursor: pointer;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.1); border: 1px solid var(--borde-glass);
  border-radius: 24px; transition: var(--transicion-suave);
}
.slider:before {
  position: absolute; content: ""; height: 16px; width: 16px;
  left: 3px; bottom: 3px;
  background: var(--color-mutado); border-radius: 50%;
  transition: var(--transicion-suave); box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.switch input:checked + .slider { background: var(--color-primario); border-color: var(--color-primario); }
.switch input:checked + .slider:before { transform: translateX(20px); background: #fff; }
.switch input:focus-visible + .slider { outline: 2px solid var(--color-primario); outline-offset: 2px; }
[data-theme="light"] .slider { background: #e5e7eb; border-color: #d1d5db; }
[data-theme="light"] .slider:before { background: #9ca3af; }
[data-theme="light"] .switch input:checked + .slider { background: var(--color-primario); border-color: var(--color-primario); }

/* ==========================================
   BOTONES DE ACCIÓN COMPACTOS
   ========================================== */
.grupo-acciones { display: flex; gap: 4px; }

/* Botones de servicios (compactos para xs) */
.svc-acciones { display: flex; gap: 3px; justify-content: flex-start; }
.svc-btn {
  width: 28px; height: 28px; padding: 0;
  border-radius: 6px; border: 1px solid var(--borde-glass);
  background: rgba(255,255,255,0.03);
  color: var(--color-texto); cursor: pointer;
  font-size: 0.75rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  transition: var(--transicion-suave);
  flex-shrink: 0;
}
.svc-btn:hover { background: rgba(255,255,255,0.08); }
.svc-btn-start { border-color: rgba(16,185,129,0.3); color: #34d399; }
.svc-btn-start:hover { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.5); }
.svc-btn-stop { border-color: rgba(239,68,68,0.3); color: #f87171; }
.svc-btn-stop:hover { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.5); }
.svc-btn-restart { border-color: rgba(245,158,11,0.3); color: #fbbf24; }
.svc-btn-restart:hover { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.5); }

/* Tabla servicios responsive */
@media (max-width: 640px) {
  .vfb-table th, .vfb-table td { padding: 5px 6px; font-size: 0.72rem; }
  .svc-btn { width: 26px; height: 26px; font-size: 0.7rem; }
}

/* Grid de privilegios / checkboxes */
.privilegios-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  margin-top: 4px; padding: 6px; border-radius: 6px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--borde-glass);
}
.privilegios-grid label {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.75rem; color: var(--color-texto); cursor: pointer;
}
[data-theme="light"] .privilegios-grid {
  background: #f9fafb; border-color: rgba(0,0,0,0.08);
}

.boton-accion {
  padding: 3px 8px; border-radius: 5px;
  border: 1px solid var(--borde-glass);
  background: rgba(255,255,255,0.02);
  color: var(--color-texto); cursor: pointer;
  font-size: 0.74rem; font-weight: 500;
  transition: var(--transicion-suave);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 22px; line-height: 1;
}
.boton-accion:hover { background: rgba(255,255,255,0.05); border-color: rgba(22,132,143,0.3); }
.boton-accion-peligro:hover { background: rgba(239,68,68,0.08); border-color: var(--color-peligro); color: #f87171; }
.boton-accion-exito { border-color: rgba(16,185,129,0.3); color: #34d399; }
.boton-accion-exito:hover { background: rgba(16,185,129,0.08); }
.boton-accion-advertencia { border-color: rgba(245,158,11,0.3); color: #fbbf24; }
.boton-accion-advertencia:hover { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.5); }

/* ==========================================
   BOTONES ESTANDARIZADOS — Sistema de diseño
   ========================================== */
/* Primary: acciones principales (crear, guardar) */
.boton-principal {
  background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-primario-hover) 100%);
  color: #fff; border: none; border-radius: 6px;
  padding: 6px 14px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: var(--transicion-suave);
  box-shadow: 0 2px 8px var(--color-primario-glow);
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.boton-principal:hover { transform: translateY(-1px); box-shadow: 0 4px 14px var(--color-primario-glow); }
.boton-principal:active { transform: translateY(0); }

/* Grupo de botones semánticos — TAMAÑO ÚNICO COMPACTO */
.boton-exito,
.boton-info,
.boton-advertencia,
.boton-peligro {
  padding: 3px 8px; border-radius: 5px;
  font-size: 0.74rem; font-weight: 600;
  cursor: pointer; transition: var(--transicion-suave);
  display: inline-flex; align-items: center; gap: 4px;
  text-decoration: none; white-space: nowrap;
  border: 1px solid;
  min-height: 22px; line-height: 1;
}
.boton-exito    { background: rgba(16,185,129,0.10); color: #34d399; border-color: rgba(16,185,129,0.2); }
.boton-exito:hover    { background: rgba(16,185,129,0.18); border-color: rgba(16,185,129,0.35); }
.boton-info     { background: rgba(59,130,246,0.10); color: #60a5fa; border-color: rgba(59,130,246,0.2); }
.boton-info:hover     { background: rgba(59,130,246,0.18); border-color: rgba(59,130,246,0.35); }
.boton-advertencia   { background: rgba(245,158,11,0.10); color: #fbbf24; border-color: rgba(245,158,11,0.2); }
.boton-advertencia:hover { background: rgba(245,158,11,0.18); border-color: rgba(245,158,11,0.35); }
.boton-peligro  { background: rgba(239,68,68,0.10); color: #f87171; border-color: rgba(239,68,68,0.2); }
.boton-peligro:hover  { background: rgba(239,68,68,0.18); border-color: rgba(239,68,68,0.35); }

/* Botón sidebar (phpMyAdmin, etc.) */
.boton-sidebar {
  width: 100%;
  padding: 5px 10px; border-radius: 5px;
  font-size: 0.75rem; font-weight: 500;
  background: rgba(16,185,129,0.10); color: #34d399;
  border: 1px solid rgba(16,185,129,0.2);
  cursor: pointer; transition: var(--transicion-suave);
  display: flex; align-items: center; gap: 6px; justify-content: center;
}
.boton-sidebar:hover { background: rgba(16,185,129,0.18); border-color: rgba(16,185,129,0.35); }

/* Light mode — Botones estandarizados */
[data-theme="light"] .boton-exito {
  background: #ecfdf5; color: #047857; border-color: #a7f3d0;
}
[data-theme="light"] .boton-exito:hover { background: #d1fae5; border-color: #6ee7b7; }
[data-theme="light"] .boton-info {
  background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe;
}
[data-theme="light"] .boton-info:hover { background: #dbeafe; border-color: #93c5fd; }
[data-theme="light"] .boton-advertencia {
  background: #fffbeb; color: #92400e; border-color: #fde68a;
}
[data-theme="light"] .boton-advertencia:hover { background: #fef3c7; border-color: #fcd34d; }
[data-theme="light"] .boton-peligro {
  background: #fef2f2; color: #b91c1c; border-color: #fecaca;
}
[data-theme="light"] .boton-peligro:hover { background: #fee2e2; border-color: #fca5a5; }
[data-theme="light"] .boton-sidebar {
  background: #ecfdf5; color: #047857; border-color: #a7f3d0;
}
[data-theme="light"] .boton-sidebar:hover { background: #d1fae5; border-color: #6ee7b7; }

/* Input deshabilitado — unificado */
.input-control:disabled,
.input-control[disabled] {
  background: rgba(255,255,255,0.03) !important;
  color: var(--color-mutado) !important;
  opacity: 0.7;
}
[data-theme="light"] .input-control:disabled,
[data-theme="light"] .input-control[disabled] {
  background: #f9fafb !important;
  color: #9ca3af !important;
}

/* ==========================================
   TABS
   ========================================== */
.tabs-navegacion {
  display: flex; gap: 4px; margin-bottom: 14px;
  border-bottom: 1px solid var(--borde-glass); padding-bottom: 10px;
  flex-wrap: wrap;
}
.tab-boton {
  background: none; border: none; color: var(--color-mutado);
  padding: 4px 10px; font-size: 0.8rem; font-weight: 500;
  cursor: pointer; border-radius: 5px; transition: var(--transicion-suave);
  font-family: var(--fuente-familia);
}
.tab-boton:hover { color: var(--color-texto); background: rgba(255,255,255,0.02); }
.tab-boton.activo {
  color: #fff; background: var(--color-primario);
  box-shadow: 0 2px 6px var(--color-primario-glow);
}
.tab-contenido { display: none; }
.tab-contenido.activo { display: block; }

/* ==========================================
   FILE MANAGER
   ========================================== */
.vfb-explorador-archivos { display: flex; flex-direction: column; gap: 8px; }
.vfb-ruta-herramientas {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(10,15,28,0.3); border: 1px solid var(--borde-glass);
  padding: 7px 12px; border-radius: 8px;
}
.vfb-ruta-actual { font-family: monospace; font-size: 0.82rem; }
.vfb-lista-archivos { border: 1px solid var(--borde-glass); border-radius: 10px; background: rgba(10,15,28,0.1); }
.vfb-item-archivo {
  display: grid; grid-template-columns: 20px 1fr 90px 160px;
  align-items: center; gap: 8px; padding: 5px 10px;
  border-bottom: 1px solid var(--borde-glass);
  transition: var(--transicion-suave); font-size: 0.8rem;
}
.vfb-nombre-archivo { color: #5ad0d8; text-decoration: none; font-weight: 500; transition: var(--transicion-suave); }
.vfb-nombre-archivo:hover { color: #7edce2; text-decoration: underline; }
.vfb-item-archivo:hover { background: rgba(255,255,255,0.01); }
.vfb-icono-archivo { font-size: 1.1rem; width: 20px; }

.vfb-editor-codigo {
  width: 100%; height: 380px;
  background: #090d16; color: #e2e8f0;
  font-family: 'Fira Code', 'Courier New', monospace;
  border: 1px solid var(--borde-glass); border-radius: 10px;
  padding: 14px; font-size: 0.85rem; line-height: 1.5; resize: vertical; outline: none;
}
.vfb-editor-codigo:focus { border-color: var(--color-primario); box-shadow: 0 0 10px var(--color-primario-glow); }

/* ==========================================
   MODALES
   ========================================== */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(3,7,18,0.8); backdrop-filter: blur(8px);
  display: flex; justify-content: center; align-items: center; z-index: 2000;
}
.modal-contenedor {
  background: rgba(10,15,28,0.98); border: 1px solid var(--borde-glass);
  box-shadow: var(--sombra-premium); border-radius: 16px; padding: 22px;
  width: 90%; max-width: 460px; animation: deslizarEntrada 0.3s cubic-bezier(0.16,1,0.3,1);
}
.modal-cabecera {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; border-bottom: 1px solid var(--borde-glass); padding-bottom: 10px;
}
.modal-cabecera h3 { font-size: 1.05rem; font-weight: 600; color: #fff; }
.modal-cerrar { background: none; border: none; color: var(--color-mutado); font-size: 1.3rem; cursor: pointer; }
.modal-cerrar:hover { color: #fff; }

/* ==========================================
   CPANEL FILE MANAGER
   ========================================== */
.vfb-cpanel-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px;
  background: linear-gradient(135deg, rgba(13,19,33,0.5), rgba(13,19,33,0.3));
  border: 1px solid var(--borde-glass);
  padding: 10px 14px; border-radius: 10px 10px 0 0; align-items: center; margin-top: 12px;
}
.vfb-cpanel-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 12px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--color-mutado); font-size: 0.68rem;
  cursor: pointer; transition: all 0.2s ease; min-width: 68px;
  text-decoration: none; font-weight: 500;
}
.vfb-cpanel-btn svg { margin-bottom: 4px; width: 16px; height: 16px; stroke: var(--color-mutado); fill: none; transition: all 0.2s; }
.vfb-cpanel-btn:hover:not(:disabled) {
  background: rgba(22,132,143,0.12);
  color: #fff;
  border-color: rgba(22,132,143,0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.vfb-cpanel-btn:hover:not(:disabled) svg { stroke: #5ad0d8; }
.vfb-cpanel-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.vfb-item-archivo-cpanel {
  display: grid; grid-template-columns: 20px 20px 2.5fr 1fr 1.5fr 1fr 1.2fr;
  align-items: center; gap: 8px; padding: 7px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: all 0.15s ease; font-size: 0.79rem; cursor: pointer; user-select: none;
}
.vfb-item-archivo-cpanel:hover { background: rgba(22,132,143,0.04); }
.vfb-item-archivo-cpanel.seleccionado { background: rgba(22,132,143,0.12) !important; border-left: 3px solid var(--color-primario); padding-left: 11px; }
.vfb-meta-archivo-cpanel { color: var(--color-mutado); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vfb-meta-archivo-cpanel.permisos { font-family: monospace; }

.vfb-cpanel-filemanager {
  display: flex; gap: 0; min-height: 480px;
  background: linear-gradient(135deg, rgba(10,15,28,0.3), rgba(10,15,28,0.15));
  border: 1px solid var(--borde-glass);
  border-radius: 0 0 10px 10px; overflow: hidden;
}
.vfb-cpanel-tree {
  width: 230px; background: rgba(8,12,22,0.5); border-right: 1px solid var(--borde-glass);
  padding: 12px 10px; overflow-y: auto; font-size: 0.8rem; user-select: none;
}
.vfb-cpanel-tree h4 { font-size: 0.68rem; color: var(--color-mutado); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.06); padding-bottom: 6px; }
.vfb-cpanel-tree ul { list-style: none; padding-left: 12px; }
.vfb-cpanel-tree > ul { padding-left: 0; }
.vfb-cpanel-tree li { margin: 3px 0; position: relative; }
.vfb-tree-item {
  display: flex; align-items: center; gap: 6px;
  color: #cbd5e1; text-decoration: none; padding: 4px 8px;
  border-radius: 6px; transition: all 0.15s ease; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vfb-tree-item:hover { background: rgba(22,132,143,0.08); color: #e2e8f0; }
.vfb-tree-item.activo { background: rgba(22,132,143,0.18); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 var(--color-primario); }
.vfb-tree-toggle { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 12px; height: 12px; font-size: 0.65rem; color: var(--color-mutado); }
.vfb-cpanel-browser { flex-grow: 1; display: flex; flex-direction: column; background: transparent; }

/* Drag & drop */
.vfb-tree-item.drop-target,
.vfb-item-archivo-cpanel.drop-target { outline: 2px dashed var(--color-primario); outline-offset: -2px; background: rgba(22,132,143,0.12); border-radius: 6px; }
.vfb-item-archivo-cpanel.arrastrando { opacity: 0.5; }
.vfb-subir-nivel.drop-target { outline: 2px dashed var(--color-primario); outline-offset: 2px; background: rgba(22,132,143,0.1); border-radius: 6px; }

/* Context menu */
.vfb-context-menu {
  position: fixed; background: rgba(10,15,28,0.98);
  border: 1px solid var(--borde-glass); box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  border-radius: 8px; padding: 4px 0; z-index: 3000; display: none;
  min-width: 150px; backdrop-filter: blur(10px);
}
.vfb-context-menu-item {
  padding: 6px 14px; font-size: 0.78rem; color: #cbd5e1;
  cursor: pointer; display: flex; align-items: center; gap: 7px; transition: var(--transicion-suave);
}
.vfb-context-menu-item:hover { background: rgba(22,132,143,0.15); color: #fff; }
.vfb-context-menu-item.disabled { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

/* ==========================================
   SQLITE ADMIN
   ========================================== */
.vfb-sqlite-layout {
  display: flex; gap: 0; height: calc(100vh - 100px);
  border: 1px solid var(--borde-glass); border-radius: 10px; overflow: hidden;
}

/* ==========================================
   ANIMACIONES
   ========================================== */
/* ==========================================
   BRANDING
   ========================================== */
.logo-empresa { color: #16848f !important; }

.vfb-panel-brand {
  padding: 6px 10px;
  margin-top: auto;
  border-top: 1px solid var(--borde-glass);
  display: flex; flex-direction: column; gap: 1px;
  text-align: center;
}
.vfb-panel-brand-nombre {
  font-size: 0.65rem;
  font-weight: 700;
  color: #16848f;
  letter-spacing: 0.03em;
}
.vfb-panel-brand-ver {
  font-size: 0.55rem;
  color: var(--color-mutado);
  font-weight: 500;
}

[data-theme="light"] .vfb-panel-brand { border-top-color: rgba(0,0,0,0.04); }

@keyframes deslizarEntrada {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes sacudir {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-3px); }
  75%       { transform: translateX(3px); }
}

/* ==========================================
   TEMA TOGGLE
   ========================================== */
.vfb-tema-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; margin: 4px 10px;
  font-size: 0.72rem; color: var(--color-mutado);
  cursor: pointer; border-radius: 6px;
  transition: var(--transicion-suave);
  user-select: none;
}
.vfb-tema-toggle:hover {
  background: rgba(255,255,255,0.04);
  color: var(--color-texto);
}
.vfb-tema-toggle svg {
  width: 14px; height: 14px;
}
.vfb-tema-toggle .vfb-tema-icono-luna { display: none; }
[data-theme="light"] .vfb-tema-toggle .vfb-tema-icono-sol { display: none; }
[data-theme="light"] .vfb-tema-toggle .vfb-tema-icono-luna { display: block; }
[data-theme="light"] .vfb-tema-toggle:hover { background: rgba(0,0,0,0.04); }

/* ==========================================
   APP INSTALLER CARDS
   ========================================== */
.vfb-app-card:hover {
  border-color: var(--color-primario);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

/* ==========================================
   RESPONSIVO — Mobile-first
   ========================================== */

/* Mobile header (hamburger + logo) */
.vfb-mobile-header {
  display: none;
}

/* Sidebar overlay backdrop */
.vfb-sidebar-overlay {
  display: none;
}

@media (max-width: 768px) {
  /* === SIDEBAR OFF-CANVAS === */
  .barra-lateral {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 200;
  }
  .barra-lateral.visible {
    transform: translateX(0);
  }

  .vfb-sidebar-overlay {
    display: block; position: fixed; inset: 0; z-index: 150;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .vfb-sidebar-overlay.visible {
    opacity: 1; pointer-events: auto;
  }

  .contenido-principal {
    margin-left: 0; width: 100vw; padding: 8px 10px;
  }

  /* === MOBILE HEADER BAR === */
  .vfb-mobile-header {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 6px; margin-bottom: 8px;
    background: var(--bg-tarjeta);
    border: 1px solid var(--borde-glass);
    border-radius: 10px;
    position: sticky; top: 6px; z-index: 50;
    backdrop-filter: blur(12px);
  }
  .vfb-mobile-header .vfb-hamburger {
    background: none; border: none; color: var(--color-texto);
    font-size: 1.5rem; cursor: pointer; padding: 4px 8px;
    display: flex; align-items: center; line-height: 1;
  }
  .vfb-mobile-header .vfb-mobile-logo {
    font-size: 0.85rem; font-weight: 600; color: var(--color-texto);
    flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }

  /* === LAYOUT === */
  .cuadricula-contenido { grid-template-columns: 1fr !important; }

  .tarjeta-seccion h2 {
    flex-direction: column; align-items: flex-start; gap: 6px;
  }
  .tarjeta-seccion h2 .boton-principal,
  .tarjeta-seccion h2 button {
    align-self: stretch; width: 100%;
  }

  /* === STATS === */
  .seccion-stats { grid-template-columns: 1fr; }
  .contenedor-monitores-aapanel { grid-template-columns: 1fr; }
  .monitor-circular { width: 68px; height: 68px; }
  .monitor-interno { width: 56px; height: 56px; }
  .monitor-interno .porcentaje { font-size: 0.95rem; }

  /* === GRIDS a 1 columna === */
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  .admin-plan-cards { grid-template-columns: 1fr; }
  .grupo-control div[style*="display: grid"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* === FORMULARIOS === */
  .grupo-control { flex-direction: column; align-items: stretch !important; }
  .grupo-control select,
  .grupo-control input { width: 100% !important; flex-grow: 1 !important; }
  .grupo-control label { margin-bottom: 4px; }

  /* === TABLAS: scroll horizontal === */
  .contenedor-tabla {
    overflow-x: auto; display: block;
    -webkit-overflow-scrolling: touch;
  }
  .contenedor-tabla table { min-width: 600px; }

  /* === TABS === */
  .tabs-navegacion {
    overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
  }
  .tabs-navegacion::-webkit-scrollbar { height: 3px; }
  .tab-boton { white-space: nowrap; font-size: 0.72rem; padding: 4px 8px; }

  /* === FILE MANAGER mobile === */
  .vfb-cpanel-filemanager { flex-direction: column; }
  .vfb-cpanel-tree {
    width: 100%; border-right: none;
    border-bottom: 1px solid var(--borde-glass);
    max-height: 180px; overflow-y: auto;
  }
  .vfb-item-archivo-cpanel {
    grid-template-columns: 20px 20px 2fr 1fr 1fr !important;
    font-size: 0.7rem;
  }
  .vfb-item-archivo-cpanel > div:nth-child(6),
  .vfb-item-archivo-cpanel > div:nth-child(7) {
    display: none;
  }
  .vfb-cpanel-toolbar { padding: 6px 8px; gap: 2px; }
  .vfb-cpanel-btn { min-width: 54px; font-size: 0.6rem; padding: 4px 6px; }

  /* === MODALS full-screen mobile === */
  .modal-contenedor {
    width: 100%; max-width: 100%; border-radius: 0;
    height: 100vh; overflow-y: auto;
    padding: 16px; margin: 0;
  }
  .modal-overlay { align-items: flex-end; }
  .modal-cabecera h3 { font-size: 0.9rem; }

  /* === IMPERSONATION BANNER === */
  .impersonacion-banner {
    flex-direction: column; gap: 10px; align-items: stretch;
  }
  .impersonacion-banner .impersonacion-boton {
    text-align: center; width: 100%;
  }

  /* === BADGES === */
  .badge { font-size: 0.65rem; padding: 2px 7px; }

  /* === TARJETA-ACCION === */
  .tarjeta-accion { padding: 8px; }
  .tarjeta-accion div[style*="display: flex"] {
    flex-direction: column; gap: 6px;
  }

  /* === CONTEXT MENU === */
  .vfb-context-menu { font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .contenido-principal { padding: 6px 6px; }
  .tarjeta-seccion { padding: 10px 12px; border-radius: 8px; }
  .tarjeta-seccion h2 { font-size: 0.85rem; }
  .vfb-cpanel-btn { min-width: 46px; font-size: 0.55rem; padding: 3px 4px; }
  .vfb-mobile-header { padding: 6px 4px; }
  .vfb-mobile-header .vfb-mobile-logo { font-size: 0.78rem; }
  .modal-contenedor { padding: 12px; }
  .item-menu a { padding: 6px 10px; font-size: 0.82rem; }
  .barra-lateral { width: 220px; }
  .grupo-control div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }
  .privilegios-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Scroll horizontal suave para tablas en desktop */
.contenedor-tabla {
  overflow-x: auto;
}
.contenedor-tabla::-webkit-scrollbar { height: 4px; }
.contenedor-tabla::-webkit-scrollbar-thumb { background: var(--color-mutado); border-radius: 4px; }

/* ==========================================
   NOTIFICACIONES UNIFICADAS
   ========================================== */

/* Flash messages con cierre */
.alerta-flash-cierre {
  display: flex; align-items: center; justify-content: space-between;
}
.alerta-cerrar-btn {
  background: none; border: none; color: inherit; font-size: 1.25rem;
  cursor: pointer; line-height: 1; font-weight: bold; margin-left: 12px;
  opacity: 0.6; transition: opacity 0.15s; flex-shrink: 0;
}
.alerta-cerrar-btn:hover { opacity: 1; }

/* Toast notification */
.toast-entrada { animation: toastSlideDown 0.35s cubic-bezier(0.16,1,0.3,1); }
@keyframes toastSlideDown {
  from { transform: translateY(-20px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Confirm modal */
.vfb-confirm-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(3,7,18,0.8); backdrop-filter: blur(8px);
  display: none; justify-content: center; align-items: center; z-index: 10000;
}
[data-theme="light"] .vfb-confirm-overlay { background: rgba(0,0,0,0.3); }
.vfb-confirm-box {
  background: rgba(10,15,28,0.98); border: 1px solid var(--borde-glass);
  box-shadow: var(--sombra-premium); border-radius: 16px; padding: 24px;
  width: 90%; max-width: 400px; text-align: center;
  animation: deslizarEntrada 0.3s cubic-bezier(0.16,1,0.3,1);
}
[data-theme="light"] .vfb-confirm-box { background: #ffffff; border-color: rgba(0,0,0,0.06); }
.vfb-confirm-icono { font-size: 2rem; margin-bottom: 12px; }
.vfb-confirm-mensaje { font-size: 0.88rem; color: var(--color-texto); margin-bottom: 20px; line-height: 1.5; }
.vfb-confirm-botones { display: flex; gap: 10px; justify-content: center; }
.vfb-confirm-btn {
  padding: 8px 20px; border-radius: 8px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; border: none; transition: all 0.15s;
}
.vfb-confirm-btn-cancelar {
  background: rgba(255,255,255,0.06); color: var(--color-texto);
  border: 1px solid var(--borde-glass);
}
[data-theme="light"] .vfb-confirm-btn-cancelar { background: #f1f5f9; color: #334155; border-color: #e2e8f0; }
.vfb-confirm-btn-cancelar:hover { background: rgba(255,255,255,0.12); }
.vfb-confirm-btn-aceptar {
  background: #ef4444; color: #fff;
}
.vfb-confirm-btn-aceptar:hover { background: #dc2626; }
.vfb-confirm-btn-aceptar.confirm-exito { background: #10b981; }
.vfb-confirm-btn-aceptar.confirm-exito:hover { background: #059669; }

@media (max-width: 768px) {
  .vfb-confirm-box { padding: 18px; }
  .vfb-confirm-botones { flex-direction: column; }
}

/* Tabla corporativa — estilo Excel */
.vfb-table {
  width: 100%; border-collapse: collapse; font-size: 0.79rem;
}
.vfb-table thead th {
  text-align: left; padding: 6px 10px;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--color-mutado);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--borde-tabla, rgba(255,255,255,0.08));
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.vfb-table tbody td {
  padding: 5px 10px; color: var(--color-texto, #e2e8f0);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap;
}
.vfb-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.vfb-table tbody tr:last-child td { border-bottom: none; }

[data-theme="light"] .vfb-table thead th {
  background: #f9fafb; color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}
[data-theme="light"] .vfb-table tbody td {
  color: #1f2937; border-bottom: 1px solid #f3f4f6;
}
[data-theme="light"] .vfb-table tbody tr:hover { background: #f9fafb; }

/* Avanzada + Ajustes tab navigation — aaPanel full-width style */
.avanzada-tabs {
  display: flex; gap: 2px; padding: 4px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--borde-glass);
  border-radius: 10px; margin-bottom: 20px;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.avanzada-tab {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border: none; background: transparent;
  color: var(--color-mutado); font-size: 0.82rem; font-weight: 500;
  cursor: pointer; border-radius: 8px; white-space: nowrap;
  transition: all 0.2s ease; font-family: var(--fuente-familia);
  flex: 1 0 auto; justify-content: center;
}
.avanzada-tab:hover {
  color: var(--color-texto); background: rgba(255,255,255,0.06);
}
.avanzada-tab.activo {
  color: #fff; background: var(--color-primario);
  box-shadow: 0 2px 8px var(--color-primario-glow);
  font-weight: 600;
}
[data-theme="light"] .avanzada-tabs { background: #f3f4f6; border-color: #e5e7eb; }
[data-theme="light"] .avanzada-tab { color: #6b7280; }
[data-theme="light"] .avanzada-tab:hover { color: #374151; background: rgba(0,0,0,0.04); }
[data-theme="light"] .avanzada-tab.activo { color: #fff; background: var(--color-primario); box-shadow: 0 2px 8px var(--color-primario-glow); }

/* Password validation indicators */
#pw-requisitos { margin: 6px 0 0; padding: 0; list-style: none; }
#pw-requisitos li {
  transition: color 0.2s ease; font-size: 0.73rem; line-height: 1.6;
  padding-left: 0; font-weight: 500;
}
#pw-match { transition: color 0.2s ease; font-size: 0.73rem; font-weight: 500; }

/* Password field with eye toggle */
.pw-field {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--borde-glass); border-radius: 8px;
  background: rgba(255,255,255,0.03);
  transition: border-color 0.2s ease; overflow: hidden;
}
.pw-field:focus-within { border-color: var(--color-primario); }
.pw-field .input-control {
  border: none !important; border-radius: 0 !important;
  background: transparent !important; flex: 1;
}
.pw-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; cursor: pointer; font-size: 1rem;
  color: var(--color-mutado); user-select: none;
  transition: color 0.2s ease;
}
.pw-toggle:hover { color: var(--color-texto); }
[data-theme="light"] .pw-field { border-color: #e5e7eb; background: #fff; }
[data-theme="light"] .pw-field:focus-within { border-color: var(--color-primario); }

/* Ajustes / Avanzada forms: compactos y centrados */
#tab-ajustes .avz-subtab .tarjeta-seccion,
#tab-avanzada .subtab-contenido .tarjeta-seccion {
  max-width: 720px; margin-left: auto; margin-right: auto;
}
/* La barra de tabs SIEMPRE full-width */
#tab-ajustes .avanzada-tabs,
#tab-avanzada .avanzada-tabs {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#tab-ajustes .avz-subtab .grupo-control,
#tab-avanzada .subtab-contenido .grupo-control {
  max-width: 500px;
}
#tab-ajustes .avz-subtab .grupo-control input[type="text"],
#tab-ajustes .avz-subtab .grupo-control input[type="email"],
#tab-ajustes .avz-subtab .grupo-control input[type="number"],
#tab-ajustes .avz-subtab .grupo-control select,
#tab-ajustes .avz-subtab .grupo-control textarea {
  width: 100%;
}
/* Grid alertas: no wrap */
#a-alertas div[style*="grid-template-columns"] {
  gap: 6px !important;
}
#a-alertas div[style*="grid-template-columns"] .grupo-control input {
  min-width: 0;
}

/* Subtab content: padding limpio */
.subtab-contenido {
  padding-top: 4px;
}
.subtab-contenido h2,
.subtab-contenido h3 {
  font-weight: 600;
  color: var(--color-texto);
}

/* Tablas Avanzada: estilo aaPanel limpio */
.tab-avanzada-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--borde-glass);
  font-size: 0.82rem;
}
.tab-avanzada-table thead th {
  background: rgba(255,255,255,0.03);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-mutado2);
  border-bottom: 1px solid var(--borde-glass);
  white-space: nowrap;
}
.tab-avanzada-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--color-texto);
  vertical-align: middle;
}
.tab-avanzada-table tbody tr:last-child td { border-bottom: none; }
.tab-avanzada-table tbody tr:hover { background: var(--bg-tarjeta-hover); }
[data-theme="light"] .tab-avanzada-table { border-color: #e5e7eb; }
[data-theme="light"] .tab-avanzada-table thead th { background: #f9fafb; color: #6b7280; border-bottom-color: #e5e7eb; }
[data-theme="light"] .tab-avanzada-table tbody td { border-bottom-color: #f3f4f6; color: #1f2937; }
[data-theme="light"] .tab-avanzada-table tbody tr:hover { background: #f9fafb; }

/* Badges para versión PHP: estilo pills */
.badge-php {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 10px;
  font-size: 0.72rem; font-weight: 600;
  white-space: nowrap;
}
.badge-php-default { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-php-activo  { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-php-inactivo { background: rgba(239,68,68,0.15); color: #f87171; }
.badge-php-instalando { background: rgba(245,158,11,0.15); color: #fbbf24; }
[data-theme="light"] .badge-php-default { background: #dbeafe; color: #2563eb; }
[data-theme="light"] .badge-php-activo  { background: #d1fae5; color: #059669; }
[data-theme="light"] .badge-php-inactivo { background: #fee2e2; color: #dc2626; }
[data-theme="light"] .badge-php-instalando { background: #fef3c7; color: #d97706; }

/* Badges para servicios */
.badge-svc { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:10px; font-size:0.72rem; font-weight:600; }
.badge-svc-active { background:rgba(16,185,129,0.15); color:#34d399; }
.badge-svc-inactive { background:rgba(239,68,68,0.15); color:#f87171; }
[data-theme="light"] .badge-svc-active { background:#d1fae5; color:#059669; }
[data-theme="light"] .badge-svc-inactive { background:#fee2e2; color:#dc2626; }

/* Botones de acción compactos en tabla */
.btn-action-sm {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border: 1px solid var(--borde-glass);
  border-radius: 6px; font-size: 0.73rem; font-weight: 500;
  background: transparent; color: var(--color-texto);
  cursor: pointer; transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-action-sm:hover { background: rgba(255,255,255,0.05); border-color: var(--color-primario); color: var(--color-primario); }
.btn-action-sm.danger { color: var(--color-peligro); border-color: rgba(239,68,68,0.3); }
.btn-action-sm.danger:hover { background: rgba(239,68,68,0.1); border-color: var(--color-peligro); }
.btn-action-sm.primary { color: var(--color-primario); border-color: rgba(22,132,143,0.3); }
.btn-action-sm.primary:hover { background: rgba(22,132,143,0.1); }
[data-theme="light"] .btn-action-sm { border-color: #e5e7eb; color: #374151; }
[data-theme="light"] .btn-action-sm:hover { background: #f3f4f6; }
[data-theme="light"] .btn-action-sm.danger { color: #dc2626; border-color: #fca5a5; }
[data-theme="light"] .btn-action-sm.danger:hover { background: #fef2f2; }

/* Card para logs */
.log-card {
  background: #0f172a;
  border: 1px solid var(--borde-glass);
  border-radius: 8px;
  padding: 14px;
  font-size: 0.73rem;
  line-height: 1.6;
  max-height: 500px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  color: #a7f3d0;
  font-family: 'Fira Code', 'SF Mono', 'Consolas', monospace;
}
[data-theme="light"] .log-card { background: #f8fafc; color: #1e293b; border-color: #e2e8f0; }

/* Header barra: flex wrap responsive */
.avz-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 10px; flex-wrap: wrap;
}
.avz-header h2 { margin: 0; font-size: 1rem; font-weight: 600; }

/* Controles del header */
.avz-controls {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}

/* ==========================================
   SUBTABS COMPARTIDOS (Avanzada + Ajustes)
   ========================================== */
.avz-subtab { padding-top: 4px; }

@media (max-width: 768px) {
  .avanzada-tabs { flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .avanzada-tab { padding: 8px 12px !important; font-size: 0.76rem !important; }
  .avz-header { flex-direction: column; align-items: flex-start; }
  .avz-controls { width: 100%; }
  .tab-avanzada-table { font-size: 0.76rem; }
  .tab-avanzada-table thead th,
  .tab-avanzada-table tbody td { padding: 8px 10px; }
}
@media (max-width: 480px) {
  .avanzada-tab svg { display: none; }
  .avanzada-tab { gap: 0 !important; padding: 8px 10px !important; }
}
