﻿/* Google Fonts: JetBrains Mono para código/archivos */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

/* Estilos bÃ¡sicos para el dashboard de login */
* {
  box-sizing: border-box
}

/* ===== MICRO-INTERACCIONES GLOBALES ===== */
button, [role="button"], .clickable {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
button:active:not(:disabled), [role="button"]:active:not(:disabled) {
  transform: scale(0.97);
}
button:focus-visible, [role="button"]:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent-primary, #8b5cf6);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Utilidad global */
.hidden {
  display: none !important;
}

html,
body {
  height: 100%;
}

:root {
  /* 2025 Premium Violet/Magenta/Orange Palette */
  --bg-dark: #0a0e1a;
  --bg-card: rgba(20, 24, 36, 0.7);
  --bg-card-hover: rgba(30, 35, 50, 0.85);

  --text-main: #f0fdfa;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-primary: #8b5cf6;
  --accent-secondary: #ec4899;
  --accent-tertiary: #f97316;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-info: #3b82f6;

  --glass-border: 1px solid rgba(139, 92, 246, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(139, 92, 246, 0.1);

  /* ===== DESIGN SYSTEM TOKENS ===== */

  /* Spacing scale (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Type scale */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;

  /* Border radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Surfaces */
  --surface-0: rgba(10, 14, 26, 0.95);
  --surface-1: rgba(15, 23, 42, 0.7);
  --surface-2: rgba(20, 28, 50, 0.6);
  --surface-3: rgba(30, 38, 60, 0.5);
  --surface-hover: rgba(139, 92, 246, 0.08);
  --surface-active: rgba(139, 92, 246, 0.15);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow-primary: 0 0 20px rgba(139, 92, 246, 0.25);
  --shadow-glow-success: 0 0 20px rgba(16, 185, 129, 0.25);
  --shadow-glow-danger: 0 0 20px rgba(239, 68, 68, 0.25);

  /* Legacy variables */
  --primary: var(--accent-primary);
  --secondary: var(--accent-secondary);
  --accent-1: var(--accent-primary);
  --accent-2: var(--accent-secondary);
  --text: var(--text-main);
  --bg-glass: var(--bg-card);

  /* Theme panel variables (light defaults) */
  --panel: #ffffff;
  --panel-2: #f4f6f9;
  --hover: #eef2f7;
  --border: #d7dde5;
  --muted: var(--text-muted);

  /* Landing page fonts & colors */
  --font-primary: 'Outfit', sans-serif;
  --font-tech: 'Rajdhani', sans-serif;
  --cyber-bg: #1a0b2e;
  --cyber-panel: rgba(255, 255, 255, 0.98);
  --cyber-border: rgba(139, 92, 246, 0.15);
  --neon-magenta: #ec4899;
  --neon-purple: #a78bfa;
  --neon-violet: #8b5cf6;
  --neon-coral: #f472b6;
  --neon-mint: #34d399;
  --neon-orange: #fb923c;
  --glass-shine: rgba(255, 255, 255, 0.1);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== PALETA 1: NEGRO (default) ===== */
html.theme-dark {
  --bg-dark: #0a0e1a;
  --bg-card: rgba(20, 24, 36, 0.75);
  --bg-card-hover: rgba(30, 35, 50, 0.9);
  --text-main: #f0fdfa;
  --text-muted: #94a3b8;
  --accent-primary: #8b5cf6;
  --accent-secondary: #ec4899;
  --glass-border: 1px solid rgba(139, 92, 246, 0.15);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 24px rgba(139,92,246,0.1);
  --surface-0: rgba(10, 14, 26, 0.95);
  --surface-1: rgba(15, 23, 42, 0.7);
  --surface-2: rgba(20, 28, 50, 0.6);
  --surface-hover: rgba(139, 92, 246, 0.08);
  --surface-active: rgba(139, 92, 246, 0.15);
  --shadow-glow-primary: 0 0 20px rgba(139, 92, 246, 0.25);
  --scrollbar-thumb: rgba(139, 92, 246, 0.3);
  --scrollbar-thumb-hover: rgba(139, 92, 246, 0.55);
  --theme-body-bg: #0a0e1a;
  --sidebar-bg: #0d1117;
  --sidebar-border: rgba(139, 92, 246, 0.12);
  /* Panel variables (módulos que usan --panel) */
  --panel: #0f1120;
  --panel-2: #131726;
  --hover: rgba(139, 92, 246, 0.08);
  --border: rgba(139, 92, 246, 0.15);
  --text: #f0fdfa;
  --muted: #94a3b8;
}

/* ===== PALETA 2: AZUL MEDIANOCHE ===== */
html.theme-blue {
  --bg-dark: #0d1b2a;
  --bg-card: rgba(13, 30, 50, 0.8);
  --bg-card-hover: rgba(18, 40, 65, 0.9);
  --text-main: #e0f4ff;
  --text-muted: #7eb8d4;
  --accent-primary: #06b6d4;
  --accent-secondary: #3b82f6;
  --glass-border: 1px solid rgba(6, 182, 212, 0.18);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 24px rgba(6,182,212,0.12);
  --surface-0: rgba(13, 27, 42, 0.95);
  --surface-1: rgba(10, 22, 40, 0.75);
  --surface-2: rgba(14, 30, 54, 0.65);
  --surface-hover: rgba(6, 182, 212, 0.08);
  --surface-active: rgba(6, 182, 212, 0.15);
  --shadow-glow-primary: 0 0 20px rgba(6, 182, 212, 0.28);
  --scrollbar-thumb: rgba(6, 182, 212, 0.3);
  --scrollbar-thumb-hover: rgba(6, 182, 212, 0.55);
  --theme-body-bg: #0d1b2a;
  --sidebar-bg: #0a1628;
  --sidebar-border: rgba(6, 182, 212, 0.14);
  /* Panel variables (módulos que usan --panel) */
  --panel: #0a1628;
  --panel-2: #0d1e35;
  --hover: rgba(6, 182, 212, 0.08);
  --border: rgba(6, 182, 212, 0.15);
  --text: #e0f4ff;
  --muted: #7eb8d4;
  /* Legacy */
  --accent-1: #06b6d4;
  --accent-2: #3b82f6;
  --neon-purple: #38bdf8;
  --neon-violet: #06b6d4;
  --cyber-border: rgba(6, 182, 212, 0.15);
}

/* ===== PALETA 3: VERDE MATRIX ===== */
html.theme-green {
  --bg-dark: #050f08;
  --bg-card: rgba(5, 18, 10, 0.82);
  --bg-card-hover: rgba(8, 28, 14, 0.92);
  --text-main: #d1fae5;
  --text-muted: #6ee7b7;
  --accent-primary: #10b981;
  --accent-secondary: #34d399;
  --glass-border: 1px solid rgba(16, 185, 129, 0.18);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.45), 0 0 24px rgba(16,185,129,0.12);
  --surface-0: rgba(5, 15, 8, 0.95);
  --surface-1: rgba(5, 20, 12, 0.75);
  --surface-2: rgba(8, 26, 16, 0.65);
  --surface-hover: rgba(16, 185, 129, 0.08);
  --surface-active: rgba(16, 185, 129, 0.15);
  --shadow-glow-primary: 0 0 20px rgba(16, 185, 129, 0.28);
  --scrollbar-thumb: rgba(16, 185, 129, 0.3);
  --scrollbar-thumb-hover: rgba(16, 185, 129, 0.55);
  --theme-body-bg: #050f08;
  --sidebar-bg: #040d06;
  --sidebar-border: rgba(16, 185, 129, 0.14);
  /* Panel variables (módulos que usan --panel) */
  --panel: #04100a;
  --panel-2: #061410;
  --hover: rgba(16, 185, 129, 0.08);
  --border: rgba(16, 185, 129, 0.15);
  --text: #d1fae5;
  --muted: #6ee7b7;
  /* Legacy */
  --accent-1: #10b981;
  --accent-2: #34d399;
  --neon-purple: #34d399;
  --neon-violet: #10b981;
  --cyber-border: rgba(16, 185, 129, 0.15);
}

/* Transición suave al cambiar de paleta */
html {
  transition: background-color 0.4s ease, color 0.3s ease;
}

body {
  background: transparent;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb, rgba(148, 163, 184, 0.3));
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover, rgba(148, 163, 184, 0.5));
}

/* ===== NEO DESIGN SYSTEM — REUSABLE COMPONENTS ===== */

/* --- Neo Card --- */
.neo-card {
  background: var(--surface-1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.neo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.12);
}
.neo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity var(--duration-normal) ease;
  background: radial-gradient(circle at 30% 50%, currentColor, transparent 70%);
  pointer-events: none;
}
.neo-card:hover::before { opacity: 0.03; }

/* --- Neo Stat Card --- */
.neo-stat-card {
  background: var(--surface-1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.neo-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.neo-stat-card .neo-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.neo-stat-card .neo-stat-icon svg,
.neo-stat-card .neo-stat-icon i {
  width: 24px;
  height: 24px;
  color: #fff;
}
.neo-stat-card .neo-stat-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin-bottom: 2px;
}
.neo-stat-card .neo-stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.1;
}
.neo-stat-card .neo-stat-trend {
  font-size: var(--text-xs);
  font-weight: 500;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.neo-stat-card .neo-stat-trend.up { color: var(--accent-success); }
.neo-stat-card .neo-stat-trend.down { color: var(--accent-danger); }
.neo-stat-card.neo-stat-featured {
  grid-column: span 1;
  border-color: rgba(139, 92, 246, 0.25);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, var(--surface-1) 100%);
}
.neo-stat-card.neo-stat-featured .neo-stat-value {
  font-size: var(--text-3xl);
}

/* --- Neo Button --- */
.neo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-main);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.neo-btn:hover {
  background: var(--surface-hover);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}
.neo-btn:active { transform: translateY(0) scale(0.98); }
.neo-btn svg, .neo-btn i { width: 16px; height: 16px; flex-shrink: 0; }

.neo-btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
  border-color: rgba(139, 92, 246, 0.4);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
}
.neo-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.neo-btn-success {
  background: linear-gradient(135deg, var(--accent-success), #059669);
  border-color: rgba(16, 185, 129, 0.4);
  color: #fff;
  font-weight: 600;
}

.neo-btn-danger {
  background: linear-gradient(135deg, var(--accent-danger), #dc2626);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fff;
  font-weight: 600;
}

.neo-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.neo-btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

.neo-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.neo-btn-sm {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-xs);
  border-radius: 6px;
}
.neo-btn-sm svg, .neo-btn-sm i { width: 14px; height: 14px; }

/* --- Neo Table --- */
.neo-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}
.neo-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-sm);
}
.neo-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}
.neo-table thead::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--surface-0);
  backdrop-filter: blur(12px);
  z-index: -1;
}
.neo-table th {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-0);
  white-space: nowrap;
}
.neo-table td {
  padding: var(--sp-3) var(--sp-4);
  color: var(--text-main);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--duration-fast) ease;
}
.neo-table tbody tr {
  transition: background var(--duration-fast) ease;
}
.neo-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}
.neo-table tbody tr:hover {
  background: var(--surface-hover);
}
.neo-table tbody tr:hover td {
  color: #fff;
}
.neo-table .cell-truncate {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.neo-table .cell-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-xs);
}
.neo-table .cell-right {
  text-align: right;
}
.neo-table .cell-center {
  text-align: center;
}
.neo-table .cell-empty {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--text-dim);
  font-style: italic;
}

/* --- Neo Badge --- */
.neo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.5;
}
.neo-badge-primary {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.25);
}
.neo-badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.neo-badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.neo-badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.neo-badge-info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.neo-badge-neutral {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* --- Neo Section Header --- */
.neo-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.neo-section-header h3,
.neo-section-header h4 {
  margin: 0;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.neo-section-header h3 { font-size: var(--text-base); }
.neo-section-header h4 { font-size: var(--text-sm); }
.neo-section-header .neo-section-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.neo-section-header .neo-section-icon svg,
.neo-section-header .neo-section-icon i {
  width: 18px;
  height: 18px;
  color: #fff;
}

/* --- Neo Tooltip (for truncated text) --- */
[data-neo-tip] {
  position: relative;
}
[data-neo-tip]::after {
  content: attr(data-neo-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: rgba(0, 0, 0, 0.92);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: var(--text-xs);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-fast) ease, transform var(--duration-fast) ease;
  z-index: 100;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-neo-tip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* --- Neo Pagination --- */
.neo-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: var(--sp-3) 0;
}
.neo-pagination button {
  min-width: 32px;
  height: 32px;
  padding: 0 var(--sp-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.neo-pagination button:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text-main);
  border-color: rgba(139, 92, 246, 0.3);
}
.neo-pagination button.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}
.neo-pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ===== END NEO DESIGN SYSTEM ===== */

.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-image: url('/static/img/15570.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.container {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.card {
  width: 380px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  border-radius: 18px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card.hidden {
  display: none;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.title h1 {
  font-size: 18px;
  margin: 0;
}

.title span {
  font-size: 12px;
  color: var(--muted);
}

/* BotÃ³n de volver en modo ediciÃ³n de perfil */
.back-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: var(--hover);
  border-color: var(--accent-1);
  transform: translateX(-2px);
}

/* Neo-Ribbon: cintas animadas */
.ribbons .ribbon {
  animation: ribbon-flow 8s ease-in-out infinite;
}

.ribbons .r2 {
  animation-delay: 1.2s;
}

.ribbons .r3 {
  animation-delay: 2.0s;
}

@keyframes ribbon-flow {
  0% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-8px)
  }

  100% {
    transform: translateY(0)
  }
}

/* Headset guiÃ±o */
#headsetIcon {
  transition: transform 0.25s ease;
}

#headsetIcon.wink {
  transform: rotate(-12deg) scale(1.08);
  filter: drop-shadow(0 2px 6px rgba(255, 45, 181, 0.45));
}

.form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.field span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.input {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
}

.input .icon {
  opacity: 0.9;
}

.input input {
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  padding: 6px 4px;
}

.toggle {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
  border-left: 1px dashed var(--border);
}

.primary {
  margin-top: 4px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border: 0;
  color: white;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(255, 45, 181, 0.25);
}

.primary:hover {
  filter: brightness(1.08);
}

/* Pixel Burst */
.pixel {
  position: fixed;
  width: 8px;
  height: 8px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: burst 0.65s ease-out forwards;
  border-radius: 2px;
  z-index: 9999;
}

@keyframes burst {
  0% {
    opacity: 1;
    transform: translate(calc(-50% + 0px), calc(-50% + 0px)) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.6);
  }
}

.hint {
  font-size: 11px;
  opacity: 0.8;
  padding: 0 18px 18px;
}

.actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 18px;
}

.actions .link {
  color: var(--accent-2);
  font-size: 12px;
  text-decoration: none;
  opacity: 0.9;
}

.actions .link:hover {
  text-decoration: underline;
}

@media (max-width: 420px) {
  .card {
    width: 94vw;
  }
}

/* MenÃº cuarto de cÃ­rculo (arriba a la izquierda) */
.quarter-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 220px;
  border-bottom-right-radius: 220px;
  background: radial-gradient(220px at 0 0, rgba(255, 255, 255, 0.04), rgba(14, 18, 28, 0.75));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 20;
  transform: translate(-100%, -100%);
  opacity: 0;
  pointer-events: none;
}

.quarter-menu.show {
  animation: q-enter 480ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes q-enter {
  0% {
    transform: translate(-100%, -100%) scale(0.9);
    opacity: 0;
  }

  60% {
    transform: translate(0, 0) scale(1.03);
    opacity: 1;
  }

  100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
}

.quarter-menu .options {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  gap: 12px;
}

.q-option {
  width: 170px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eaf2ff;
  background: linear-gradient(90deg, rgba(255, 45, 181, 0.22), rgba(0, 255, 240, 0.20));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}

.q-option:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.q1 {
  animation: opt-in 360ms 120ms ease-out both;
}

.q2 {
  animation: opt-in 360ms 220ms ease-out both;
}

@keyframes opt-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sidebar base */
.sidebar {
  position: fixed;
  top: 24px;
  left: 24px;
  width: 280px;
  height: calc(100vh - 48px);
  border-radius: 18px;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  background: linear-gradient(135deg,
      var(--surface-1) 0%,
      var(--surface-0) 100%);
  border: 1.5px solid var(--sidebar-border, rgba(139, 92, 246, 0.2));
  color: var(--text-main);
  box-shadow: var(--glass-shadow, 0 8px 32px rgba(0,0,0,0.4)),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.sidebar.hidden {
  display: none;
}

/* Header + collapse */
.sidebar .sb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.sb-title {
  font-weight: 600;
}

.sb-theme {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.sb-collapse {
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  margin-right: 8px;
}

/* User card */
.sb-user {
  display: flex;
  gap: 10px;
  padding: 12px;
  align-items: center;
}

.sb-user .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  box-shadow: 0 0 20px rgba(var(--accent-primary-rgb, 139, 92, 246), 0.4);
}

.sb-user .info {
  flex: 1;
}

.sb-user .info .name {
  font-weight: 600;
}

.sb-user .info .role {
  font-size: 12px;
  opacity: .7;
}

.sb-user .info .credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 4px 10px;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(37, 211, 102, 0.25));
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: #25d366;
  transition: all 0.3s ease;
}

.sb-user .info .credit-badge .credit-icon {
  font-size: 13px;
}

.sb-user .info .credit-badge .credit-amount {
  letter-spacing: 0.3px;
}

.sb-user .info .credit-badge.low-credit {
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.15), rgba(255, 77, 77, 0.25));
  border-color: rgba(255, 77, 77, 0.4);
  color: #ff4d4d;
  animation: pulse-credit 2s ease-in-out infinite;
}

@keyframes pulse-credit {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

/* Search */
.sb-search {
  padding: 10px 12px;
}

.sb-search input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
}

/* Nav */
.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  overflow-y: auto;
}

.sb-nav .section {
  margin: 12px 6px 6px;
  font-size: 12px;
  opacity: .65;
}

.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.sb-item:hover {
  background: var(--hover);
}

/* Accordion behavior */
.sb-item+.sb-sublist {
  display: none;
  padding-left: 18px;
}

.sb-item[aria-expanded="true"]+.sb-sublist {
  display: block;
}

/* Collapsed mode */
.sidebar.collapsed {
  width: 72px;
}

.sidebar.collapsed .sb-title {
  display: none;
}

.sidebar.collapsed .sb-user .info {
  display: none;
}

.sidebar.collapsed .sb-search {
  display: none;
}

.sidebar.collapsed .sb-nav .section {
  display: none;
}

.sidebar.collapsed .sb-item {
  justify-content: center;
}

.sidebar.collapsed .sb-item::before {
  content: attr(data-icon);
  font-size: 18px;
}

.sidebar.collapsed .sb-item {
  padding: 12px 0;
}

/* ========== SIDEBAR MOBILE RESPONSIVE ========== */
@media (max-width: 768px) {
  /* Sidebar base en mÃ³vil - siempre oculto por defecto */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 85vw !important;
    max-width: 320px !important;
    height: 100vh !important;
    border-radius: 0 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
    z-index: 1000 !important;
  }
  
  /* Sidebar abierto en mÃ³vil */
  .sidebar:not(.hidden):not(.collapsed) {
    transform: translateX(0) !important;
    width: 85vw !important;
    max-width: 320px !important;
    box-shadow: 4px 0 30px rgba(0,0,0,0.7);
  }
  
  /* Sidebar collapsed = oculto en mÃ³vil */
  .sidebar.collapsed {
    transform: translateX(-100%) !important;
    width: 85vw !important;
    max-width: 320px !important;
  }
  
  /* Asegurar que todos los elementos sean visibles cuando estÃ¡ abierto */
  .sidebar:not(.hidden):not(.collapsed) .sb-header,
  .sidebar:not(.hidden):not(.collapsed) .sb-title,
  .sidebar:not(.hidden):not(.collapsed) .sb-user,
  .sidebar:not(.hidden):not(.collapsed) .sb-user .info,
  .sidebar:not(.hidden):not(.collapsed) .sb-search,
  .sidebar:not(.hidden):not(.collapsed) .sb-nav,
  .sidebar:not(.hidden):not(.collapsed) .sb-nav .section,
  .sidebar:not(.hidden):not(.collapsed) .sb-sublist {
    display: block !important;
  }
  
  .sidebar:not(.hidden):not(.collapsed) .sb-user {
    display: flex !important;
  }
  
  .sidebar:not(.hidden):not(.collapsed) .sb-nav {
    display: flex !important;
    flex-direction: column !important;
  }
  
  .sidebar:not(.hidden):not(.collapsed) .sb-item {
    padding: 14px 16px !important;
    font-size: 14px !important;
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100% !important;
  }
}

/* Theme overrides (dark/light modes) */
html.theme-dark {
  --panel: #23262b;
  --panel-2: #2b2f36;
  --hover: #2f343c;
  --text: #e8edf5;
  --border: #3b414a;
  --bg-1: #0d0f14;
  --bg-2: #0a0f2b;
  --card-bg: rgba(16, 18, 40, 0.65);
}

html.theme-light {
  --panel: #ffffff;
  --panel-2: #f4f6f9;
  --hover: #eef2f7;
  --text: #20242a;
  --border: #d7dde5;
  --bg-1: #f3f6fb;
  --bg-2: #e8eef7;
  --card-bg: rgba(255, 255, 255, 0.8);
}

/* BotÃ³n de tema global siempre visible */
.global-theme-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  z-index: 1000;
}

.global-theme-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Neural Command Web - Red neuronal interactiva */
.neural-command-web {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.neural-command-web.active {
  opacity: 1;
  pointer-events: auto;
}

.neural-connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.neural-connection {
  stroke: #667eea;
  stroke-width: 2;
  fill: none;
  opacity: 0.3;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 4px rgba(102, 126, 234, 0.4));
}

.neural-connection.active {
  opacity: 0.8;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(102, 126, 234, 0.8));
}

.neural-sub-connection {
  stroke: #25D366;
  stroke-width: 2;
  opacity: 0.4;
  stroke-dasharray: 5, 5;
  filter: drop-shadow(0 0 4px rgba(37, 211, 102, 0.4));
}

.neural-sub-connection.active {
  opacity: 0.8;
  stroke-width: 3;
  filter: drop-shadow(0 0 8px rgba(37, 211, 102, 0.8));
}

.neural-pulse {
  fill: #00fff0;
  r: 3;
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(0, 255, 240, 0.8));
}

.neural-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  pointer-events: auto;
  cursor: pointer;
  z-index: 3;
}

.hub-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
  box-shadow:
    0 0 30px rgba(102, 126, 234, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.3);
  animation: neuralPulse 2s infinite ease-in-out;
  border: 3px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hub-core:hover {
  animation-duration: 1s;
  box-shadow:
    0 0 40px rgba(102, 126, 234, 0.8),
    0 12px 32px rgba(0, 0, 0, 0.4);
}

@keyframes neuralPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 30px rgba(102, 126, 234, 0.6),
      0 8px 24px rgba(0, 0, 0, 0.3);
  }

  50% {
    transform: scale(1.05);
    box-shadow:
      0 0 50px rgba(102, 126, 234, 0.8),
      0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

/* Nodos neuronales */
.neural-node {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  cursor: pointer;
  opacity: 0;
  transform: scale(0);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: auto;
  backdrop-filter: blur(10px);
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 0 20px rgba(0, 0, 0, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 2;
  animation: nodeIdle 3s infinite ease-in-out;
}

.neural-node.visible {
  opacity: 1;
  transform: scale(1);
}

.neural-node:hover {
  transform: scale(1.15);
  animation-duration: 1.5s;
  z-index: 4;
}

.neural-node.active {
  animation: nodeActive 0.8s ease-out;
  box-shadow:
    0 0 40px rgba(255, 255, 255, 0.8),
    0 12px 24px rgba(0, 0, 0, 0.4);
}

@keyframes nodeIdle {

  0%,
  100% {
    box-shadow:
      0 0 20px rgba(0, 0, 0, 0.3),
      0 8px 16px rgba(0, 0, 0, 0.2);
  }

  50% {
    box-shadow:
      0 0 30px rgba(255, 255, 255, 0.4),
      0 12px 20px rgba(0, 0, 0, 0.3);
  }
}

@keyframes nodeActive {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1.15);
  }
}

/* Tooltips estilo Floating UI */
.bubble-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1102;
}

.bubble-tooltip.visible {
  opacity: 1;
  transform: scale(1);
}

.bubble-tooltip::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 6px solid transparent;
}

/* Posicionamiento de tooltips */
.bubble-tooltip.top::after {
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: rgba(0, 0, 0, 0.9);
}

.bubble-tooltip.bottom::after {
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: rgba(0, 0, 0, 0.9);
}

.bubble-tooltip.left::after {
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: rgba(0, 0, 0, 0.9);
}

.bubble-tooltip.right::after {
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: rgba(0, 0, 0, 0.9);
}

/* Estilos especÃ­ficos para cada nodo neuronal */
.neural-call-center {
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #ff5722);
  box-shadow: 0 0 25px rgba(255, 107, 107, 0.6), 0 8px 16px rgba(0, 0, 0, 0.2);
}

.neural-marketing {
  background: radial-gradient(circle at 30% 30%, #4ecdc4, #26d0ce);
  box-shadow: 0 0 25px rgba(78, 205, 196, 0.6), 0 8px 16px rgba(0, 0, 0, 0.2);
}

.neural-user-profile {
  background: radial-gradient(circle at 30% 30%, #45b7d1, #3498db);
  box-shadow: 0 0 25px rgba(69, 183, 209, 0.6), 0 8px 16px rgba(0, 0, 0, 0.2);
}

.neural-whatsapp {
  background: radial-gradient(circle at 30% 30%, #25D366, #128C7E);
  box-shadow: 0 0 25px rgba(37, 211, 102, 0.6), 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Estado expandido removido - los sub-nodos ahora son siempre visibles */

/* Sub-nodos neuronales */
.neural-sub-node {
  width: 60px !important;
  height: 60px !important;
  font-size: 20px !important;
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 3;
}

.neural-sub-node:hover {
  transform: scale(1.2) !important;
  z-index: 5;
}

.neural-whatsapp-sub {
  background: radial-gradient(circle at 30% 30%, #34D366, #25A856);
  box-shadow: 0 0 20px rgba(52, 211, 102, 0.5), 0 6px 12px rgba(0, 0, 0, 0.2);
}

.neural-theme-toggle {
  background: radial-gradient(circle at 30% 30%, #a55eea, #8b5cf6);
  box-shadow: 0 0 25px rgba(165, 94, 234, 0.6), 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Trigger para activar la red neuronal */
.neural-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #667eea, #764ba2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  box-shadow:
    0 0 30px rgba(102, 126, 234, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 1100;
  animation: triggerPulse 3s infinite ease-in-out;
}

.neural-trigger:hover {
  transform: scale(1.1);
  animation-duration: 1.5s;
}

.neural-trigger.active {
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #ee5a24);
  animation: triggerActive 0.6s ease-out;
}

@keyframes triggerPulse {

  0%,
  100% {
    box-shadow:
      0 0 30px rgba(102, 126, 234, 0.6),
      0 8px 24px rgba(0, 0, 0, 0.3);
  }

  50% {
    box-shadow:
      0 0 45px rgba(102, 126, 234, 0.8),
      0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

@keyframes triggerActive {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1.1);
  }
}

/* WhatsApp Panel - Sistema multisesiÃ³n con QR */
.whatsapp-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.whatsapp-panel-overlay.active {
  opacity: 1;
  visibility: visible;
}

.whatsapp-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 95vw;
  max-width: 1400px;
  height: 85vh;
  background: white;
  border-radius: 16px;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.3),
    0 12px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-panel-overlay.active .whatsapp-panel {
  transform: translate(-50%, -50%) scale(1);
}

/* Header del panel WhatsApp */
.whatsapp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.whatsapp-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.whatsapp-icon {
  font-size: 28px;
}

.whatsapp-logo h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.whatsapp-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 14px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4757;
}

.status-dot.online {
  background: #2ed573;
}

.status-dot.offline {
  background: #ff4757;
}

.close-panel-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.close-panel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* Contenido principal del panel */
.whatsapp-content {
  display: flex;
  height: calc(100% - 72px);
  /* Altura total menos header */
}

/* Sidebar de sesiones - MÃS ANCHO */
.sessions-sidebar {
  width: 420px;
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.sessions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e9ecef;
}

.sessions-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

.add-session-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #25D366;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.add-session-btn:hover {
  background: #128C7E;
  transform: scale(1.1);
}

.sessions-list {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

/* Ãrea principal de contenido - MÃS COMPACTO */
.whatsapp-main-content {
  flex: 0 0 480px;
  display: flex;
  flex-direction: column;
  background: white;
}

/* QR Authentication Container */
.qr-auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.qr-section {
  text-align: center;
  max-width: 400px;
}

.qr-section h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
}

.qr-section p {
  margin: 0 0 32px;
  color: #6c757d;
  font-size: 16px;
}

.qr-code-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 32px;
}

#qrCodeCanvas {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  background: white;
}

.qr-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.qr-loading.hidden {
  display: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e9ecef;
  border-top: 4px solid #25D366;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.qr-instructions {
  text-align: left;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.qr-instructions ol {
  margin: 0;
  padding-left: 20px;
}

.qr-instructions li {
  margin-bottom: 8px;
  color: #495057;
}

.regenerate-qr-btn {
  padding: 12px 24px;
  border: none;
  background: #25D366;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.regenerate-qr-btn:hover {
  background: #128C7E;
  transform: translateY(-2px);
}

/* Chat Interface */
.chat-interface {
  flex: 1;
  display: flex;
  height: 100%;
}

.chat-interface.hidden {
  display: none;
}

.chat-sidebar {
  width: 350px;
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
}

.chat-search {
  padding: 16px;
  border-bottom: 1px solid #e9ecef;
}

.chat-search input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.chat-search input:focus {
  border-color: #25D366;
}

.chats-list {
  flex: 1;
  overflow-y: auto;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid #e9ecef;
  background: white;
}

.chat-contact-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
}

.contact-details h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

.contact-details p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #f8f9fa;
}

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e9ecef;
  background: white;
}

.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.chat-input-area input:focus {
  border-color: #25D366;
}

.send-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #25D366;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.send-btn:hover {
  background: #128C7E;
  transform: scale(1.1);
}

/* Session Cards */
.session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-bottom: 8px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.session-card:hover {
  border-color: #25D366;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.1);
}

.session-card.active {
  border-color: #25D366;
  background: rgba(37, 211, 102, 0.05);
}

.session-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.session-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 16px;
}

.session-details h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}

.session-status {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 500;
}

.session-status.connecting {
  color: #f39c12;
}

.session-status.connected {
  color: #27ae60;
}

.session-status.disconnected {
  color: #e74c3c;
}

.session-status.error {
  color: #c0392b;
}

.session-phone {
  margin: 0;
  font-size: 11px;
  color: #6c757d;
}

.session-actions {
  display: flex;
  gap: 4px;
}

.session-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(108, 117, 125, 0.1);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.session-btn:hover {
  background: rgba(108, 117, 125, 0.2);
}

.disconnect-btn:hover {
  background: rgba(255, 193, 7, 0.2);
}

.remove-btn:hover {
  background: rgba(220, 53, 69, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .whatsapp-panel {
    width: 95vw;
    height: 95vh;
  }

  .whatsapp-content {
    flex-direction: column;
  }

  .sessions-sidebar {
    width: 100%;
    height: 200px;
  }

  .chat-sidebar {
    width: 100%;
    height: 150px;
  }

  .qr-section {
    padding: 20px;
  }

  #qrCodeCanvas {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 480px) {
  .whatsapp-panel {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .whatsapp-header {
    padding: 12px 16px;
  }

  .whatsapp-logo h2 {
    font-size: 18px;
  }

  .sessions-sidebar {
    height: 150px;
  }

  #qrCodeCanvas {
    width: 200px;
    height: 200px;
  }
}

.command-trigger-tab:hover {
  transform: translateX(8px);
  background: linear-gradient(135deg, #764ba2, #667eea);
  box-shadow:
    4px 0 24px rgba(102, 126, 234, 0.4),
    0 6px 12px rgba(0, 0, 0, 0.3);
}

.sliding-command-bar.expanded .command-trigger-tab {
  transform: translateX(320px);
  border-radius: 12px 0 0 12px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

/* Panel deslizante de comandos */
.command-panel {
  width: 320px;
  height: 400px;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 0 16px 16px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  transform: translateX(-100%);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    4px 0 32px rgba(0, 0, 0, 0.4),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

.sliding-command-bar.expanded .command-panel {
  transform: translateX(0);
}

/* Header del panel de comandos */
.command-panel-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.command-panel-title {
  color: white;
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.command-panel-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin: 4px 0 0;
}

/* Lista de comandos en el panel */
.command-list {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.command-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.command-list-item:hover {
  background: rgba(102, 126, 234, 0.15);
  transform: translateX(4px);
}

.command-list-item.active {
  background: rgba(102, 126, 234, 0.25);
  border-right: 3px solid #667eea;
}

.command-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.command-info {
  flex: 1;
  min-width: 0;
}

.command-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  color: white;
}

.command-description {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.command-shortcut {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-family: monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Estilos especÃ­ficos para iconos de comandos */
.command-icon.call-center {
  background: linear-gradient(135deg, #ff6b6b, #ff5722);
}

.command-icon.marketing {
  background: linear-gradient(135deg, #4ecdc4, #26d0ce);
}

.command-icon.user-profile {
  background: linear-gradient(135deg, #45b7d1, #3498db);
}

.command-icon.audit {
  background: linear-gradient(135deg, #f9ca24, #f0932b);
}

.command-icon.theme-toggle {
  background: linear-gradient(135deg, #a55eea, #8b5cf6);
}

/* AnimaciÃ³n de entrada escalonada para los items */
.sliding-command-bar.expanded .command-list-item:nth-child(1) {
  animation: slideInCommand 0.3s ease forwards;
  animation-delay: 0.1s;
  opacity: 0;
}

.sliding-command-bar.expanded .command-list-item:nth-child(2) {
  animation: slideInCommand 0.3s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.sliding-command-bar.expanded .command-list-item:nth-child(3) {
  animation: slideInCommand 0.3s ease forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

.sliding-command-bar.expanded .command-list-item:nth-child(4) {
  animation: slideInCommand 0.3s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
}

.sliding-command-bar.expanded .command-list-item:nth-child(5) {
  animation: slideInCommand 0.3s ease forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

@keyframes slideInCommand {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.orbital-speed-dial.expanded .orbital-planet {
  opacity: 1;
  transform: scale(1) translate(-50%, -50%);
}

/* Ã“rbitas individuales con diferentes radios y Ã¡ngulos */
.orbital-planet:nth-child(1) {
  background: linear-gradient(135deg, #ff6b6b, #ff5722);
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.4);
}

.orbital-planet:nth-child(2) {
  background: linear-gradient(135deg, #4ecdc4, #26d0ce);
  box-shadow: 0 4px 16px rgba(78, 205, 196, 0.4);
}

.orbital-planet:nth-child(3) {
  background: linear-gradient(135deg, #45b7d1, #3498db);
  box-shadow: 0 4px 16px rgba(69, 183, 209, 0.4);
}

.orbital-planet:nth-child(4) {
  background: linear-gradient(135deg, #f9ca24, #f0932b);
  box-shadow: 0 4px 16px rgba(249, 202, 36, 0.4);
}

.orbital-planet:nth-child(5) {
  background: linear-gradient(135deg, #a55eea, #8b5cf6);
  box-shadow: 0 4px 16px rgba(165, 94, 234, 0.4);
}

/* Animaciones de Ã³rbita con delays escalonados */
.orbital-speed-dial.expanded .orbital-planet:nth-child(1) {
  animation: orbit-1 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  animation-delay: 0.1s;
}

.orbital-speed-dial.expanded .orbital-planet:nth-child(2) {
  animation: orbit-2 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  animation-delay: 0.2s;
}

.orbital-speed-dial.expanded .orbital-planet:nth-child(3) {
  animation: orbit-3 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  animation-delay: 0.3s;
}

.orbital-speed-dial.expanded .orbital-planet:nth-child(4) {
  animation: orbit-4 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  animation-delay: 0.4s;
}

.orbital-speed-dial.expanded .orbital-planet:nth-child(5) {
  animation: orbit-5 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  animation-delay: 0.5s;
}

/* Keyframes para las Ã³rbitas */
@keyframes orbit-1 {
  to {
    transform: scale(1) translate(-120px, -40px);
  }
}

@keyframes orbit-2 {
  to {
    transform: scale(1) translate(-100px, -100px);
  }
}

@keyframes orbit-3 {
  to {
    transform: scale(1) translate(-40px, -120px);
  }
}

@keyframes orbit-4 {
  to {
    transform: scale(1) translate(-140px, 20px);
  }
}

@keyframes orbit-5 {
  to {
    transform: scale(1) translate(-80px, -160px);
  }
}

/* Hover effects para planetas */
.orbital-planet:hover {
  transform: scale(1.15) translate(-50%, -50%) !important;
  filter: brightness(1.2);
  z-index: 3;
}

/* Tooltips flotantes para planetas */
.orbital-planet::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(10px);
}

.orbital-planet:hover::after {
  opacity: 1;
}

.moon-menu .moon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background:
    radial-gradient(40px 40px at 30% 30%, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.04) 60%, transparent 70%),
    linear-gradient(135deg, var(--panel), var(--panel-2));
  color: var(--text);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
}

.moon-menu .moon:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

.moon-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--ring);
  height: var(--ring);
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: transform .28s cubic-bezier(0.22, 1, 0.36, 1), opacity .2s ease;
  pointer-events: none;
}

.moon-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.08), transparent 70%);
  filter: blur(8px);
  opacity: .65;
  pointer-events: none;
}

.moon-menu.open .moon-ring {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

/* Abrir por hover/focus, sin requerir clase .open */
.moon-menu:hover .moon-ring,
.moon-menu:focus-within .moon-ring {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

/* Si no hay hover/focus, forzamos cerrado aunque exista .open */
.moon-menu.open:not(:hover):not(:focus-within) .moon-ring {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  pointer-events: none;
}

.moon-menu.open:not(:hover):not(:focus-within) .moon-item {
  transform: translate(-50%, -50%) rotate(0deg);
}

.moon-menu.open:not(:hover):not(:focus-within) .moon-item::after {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.9);
}

/* Mostrar etiquetas tambiÃ©n en hover/focus */
.moon-menu:hover .moon-item::after,
.moon-menu:focus-within .moon-item::after,
.moon-menu.open .moon-item::after {
  opacity: 0.95;
  transform: translate(-50%, -50%) scale(1);
}

/* Fallback de etiquetas por id (por si falta data-label en el DOM) */
#miCall::after {
  content: "CALL CENTER";
}

#miMarketing::after {
  content: "HERRAMIENTAS MARKETING";
}

#miUser::after {
  content: "USUARIO";
}

#miAudit::after {
  content: "AUDITORÃA";
}

#miTheme::after {
  content: "TEMA";
}

/* Ãcono central del morphing palette */
.palette-trigger {
  font-size: 32px;
  color: white;
  transition: all 0.3s ease;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.morphing-palette.expanded .palette-trigger {
  opacity: 0;
  transform: scale(0);
}

/* Contenido del command palette */
.palette-content {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.morphing-palette.expanded .palette-content {
  opacity: 1;
  transform: scale(1);
}

/* Search bar del command palette */
.palette-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
  color: white;
  font-size: 16px;
  outline: none;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.palette-search::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.palette-search:focus {
  border-color: rgba(102, 126, 234, 0.8);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Lista de comandos */
.palette-commands {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.command-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
}

.command-item:hover,
.command-item.selected {
  background: rgba(102, 126, 234, 0.3);
  border-color: rgba(102, 126, 234, 0.6);
  transform: translateX(4px);
}

.command-icon {
  width: 24px;
  height: 24px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.command-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.command-title {
  font-weight: 600;
  font-size: 14px;
}

.command-description {
  font-size: 12px;
  opacity: 0.7;
}

.command-shortcut {
  font-size: 11px;
  opacity: 0.5;
  font-family: monospace;
}

.dock-item::after {
  content: attr(aria-label);
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.dock-item:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.moon-menu.open .moon-item:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.12);
  filter: brightness(1.06);
}

/* MenÃº premium estilo Tabler - DisposiciÃ³n radial elegante */
.moon-menu.open .mi-1,
.moon-menu:hover .mi-1,
.moon-menu:focus-within .mi-1 {
  --pos: translate(-50%, -50%) translate(100px, 0px);
}

.moon-menu.open .mi-2,
.moon-menu:hover .mi-2,
.moon-menu:focus-within .mi-2 {
  --pos: translate(-50%, -50%) translate(70px, 70px);
}

.moon-menu.open .mi-3,
.moon-menu:hover .mi-3,
.moon-menu:focus-within .mi-3 {
  --pos: translate(-50%, -50%) translate(0px, 100px);
}

.moon-menu.open .mi-4,
.moon-menu:hover .mi-4,
.moon-menu:focus-within .mi-4 {
  --pos: translate(-50%, -50%) translate(-70px, 70px);
}

.moon-menu.open .mi-5,
.moon-menu:hover .mi-5,
.moon-menu:focus-within .mi-5 {
  --pos: translate(-50%, -50%) translate(-100px, 0px);
}

.moon-menu.open .moon-item,
.moon-menu:hover .moon-item,
.moon-menu:focus-within .moon-item {
  transform: var(--pos) rotate(0deg);
}

.moon-item:hover {
  transform: var(--pos) scale(1.1) translateZ(0);
  filter: brightness(1.1) saturate(1.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Dock Item Styles - Gradientes vibrantes */
.dock-call {
  background: linear-gradient(135deg, #ff2db5, #ff7ae6);
}

.dock-marketing {
  background: linear-gradient(135deg, #00fff0, #35d6ff);
}

.dock-user {
  background: linear-gradient(135deg, #1e90ff, #6fa8ff);
}

.dock-audit {
  background: linear-gradient(135deg, #ffd166, #ffe29a);
  color: #1f2328;
}

.dock-theme {
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
}

/* Efectos de glow al hover */
.dock-call:hover {
  box-shadow: 0 0 30px rgba(255, 45, 181, 0.6);
}

.dock-marketing:hover {
  box-shadow: 0 0 30px rgba(0, 255, 240, 0.6);
}

.dock-user:hover {
  box-shadow: 0 0 30px rgba(30, 144, 255, 0.6);
}

.dock-audit:hover {
  box-shadow: 0 0 30px rgba(255, 209, 102, 0.6);
}

.dock-theme:hover {
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

/* =============================================
   MENÃš DINÃMICO PROFESIONAL - Estilos
   ============================================= */

.dynamic-menu {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  transform: scale(0.75);
  transform-origin: top left;
}

/* MENÃš DINÃMICO RESPONSIVE PARA MÃ“VIL */
@media (max-width: 768px) {
  .dynamic-menu {
    transform: scale(1) !important;
    top: 8px;
    left: 8px;
  }
  
  .menu-trigger {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
  
  .menu-icon {
    width: 20px;
    height: 14px;
  }
  
  .menu-panel {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease !important;
  }
  
  .menu-panel.active {
    transform: translateX(0) !important;
  }
  
  .menu-content {
    height: calc(100vh - 120px);
    overflow-y: auto;
  }
  
  .menu-header {
    padding: 16px;
  }
  
  .menu-section {
    padding: 12px;
  }
  
  .menu-item {
    padding: 14px 12px;
  }
  
  .item-title {
    font-size: 15px;
  }
  
  .item-desc {
    font-size: 12px;
  }
}

/* BotÃ³n trigger del menÃº */
.menu-trigger {
  position: relative;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 32px rgba(102, 126, 234, 0.3),
    0 4px 16px rgba(118, 75, 162, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.menu-trigger:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow:
    0 12px 40px rgba(102, 126, 234, 0.4),
    0 6px 20px rgba(118, 75, 162, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.menu-trigger.active {
  transform: translateY(-2px) scale(0.95);
  box-shadow:
    0 6px 24px rgba(102, 126, 234, 0.5),
    inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.menu-trigger::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.menu-trigger:hover::before {
  left: 100%;
}

/* Ãcono hamburguesa */
.menu-icon {
  position: absolute;
  width: 24px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-trigger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-trigger.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.menu-trigger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Logo del menÃº */
.menu-logo {
  position: absolute;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.menu-trigger.active .menu-logo {
  opacity: 1;
  transform: scale(1);
}

.menu-trigger.active .menu-icon {
  opacity: 0;
  transform: scale(0.8);
}

/* Panel del menÃº */
.menu-panel {
  position: fixed;
  top: 20px;
  left: 100px;
  width: 380px;
  max-height: calc(100vh - 40px);
  background: var(--surface-0, rgba(16, 18, 40, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--glass-border, 1px solid rgba(255, 255, 255, 0.1));
  border-radius: 24px;
  box-shadow: var(--glass-shadow, 0 20px 60px rgba(0,0,0,0.3)),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  z-index: 10000;
  display: flex;
  flex-direction: column;
}

.menu-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
}

/* Header del panel */
.menu-header {
  padding: 24px 24px 20px;
  border-bottom: var(--glass-border, 1px solid rgba(255, 255, 255, 0.1));
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  flex-shrink: 0;
}

.menu-brand h3 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #667eea, #f093fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.menu-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.menu-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.menu-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: scale(1.1);
}

/* NavegaciÃ³n */
.menu-navigation {
  padding: 20px 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}

.menu-navigation::-webkit-scrollbar {
  width: 4px;
}

.menu-navigation::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.menu-navigation::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.menu-section {
  margin-bottom: 24px;
}

.section-title {
  margin: 0 0 12px 0;
  padding: 0 24px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
}

.menu-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Items del menÃº */
.menu-item {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  opacity: 0;
  transform: translateX(-20px);
}

.menu-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.2), rgba(240, 147, 251, 0.2));
  transition: width 0.3s ease;
}

.menu-item:hover::before {
  width: 100%;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(8px);
}

.menu-item:active {
  transform: translateX(4px) scale(0.98);
}

.item-icon {
  font-size: 20px;
  margin-right: 16px;
  width: 24px;
  text-align: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.item-content {
  flex: 1;
  text-align: left;
}

.item-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
  color: white;
}

.item-desc {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.item-arrow {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.menu-item:hover .item-arrow {
  color: rgba(255, 255, 255, 0.8);
  transform: translateX(4px);
}

/* Switch de tema */
.theme-indicator {
  margin-left: auto;
}

.theme-switch {
  width: 40px;
  height: 20px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  position: relative;
  transition: background 0.3s ease;
}

.theme-toggle:hover .theme-switch {
  background: rgba(255, 255, 255, 0.3);
}

.switch-handle {
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Footer del menÃº */
.menu-footer {
  padding: 20px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  flex-shrink: 0;
}

.user-info-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  margin-bottom: 2px;
}

.user-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.user-credit-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 10px;
  background: linear-gradient(135deg, rgba(0, 176, 155, 0.15), rgba(150, 201, 61, 0.15));
  border: 1px solid rgba(0, 176, 155, 0.3);
  border-radius: 8px;
}

.credit-icon {
  font-size: 14px;
}

.credit-amount {
  font-size: 13px;
  font-weight: 700;
  color: #00b09b;
}

/* BotÃ³n de recarga */
.recharge-btn {
  width: 100%;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.recharge-btn:hover {
  background: rgba(0, 176, 155, 0.15);
  border-color: rgba(0, 176, 155, 0.3);
  color: #00b09b;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 176, 155, 0.2);
}

.recharge-icon {
  font-size: 16px;
}

.recharge-text {
  font-size: 13px;
}

.menu-version {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}

/* Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-panel {
    left: 20px;
    right: 20px;
    width: auto;
    max-width: none;
  }

  .menu-trigger {
    width: 56px;
    height: 56px;
  }
}

@media (max-height: 600px) {
  .menu-panel {
    max-height: calc(100vh - 20px);
    top: 10px;
  }

  .menu-navigation {
    max-height: calc(100vh - 160px);
  }
}

/* Tema oscuro (negro) */
.theme-dark .menu-panel {
  background: rgba(8, 10, 20, 0.95);
  border-color: rgba(139, 92, 246, 0.18);
}
.theme-dark .menu-header {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(236, 72, 153, 0.10));
}

/* Tema azul medianoche */
.theme-blue .menu-panel {
  background: rgba(8, 18, 32, 0.96);
  border-color: rgba(6, 182, 212, 0.2);
}
.theme-blue .menu-header {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(59, 130, 246, 0.10));
}
.theme-blue .menu-item:hover::before {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.5), transparent);
}

/* Tema verde matrix */
.theme-green .menu-panel {
  background: rgba(3, 10, 5, 0.96);
  border-color: rgba(16, 185, 129, 0.2);
}
.theme-green .menu-header {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(52, 211, 153, 0.08));
}
.theme-green .menu-item:hover::before {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.5), transparent);
}

.theme-dark .menu-footer {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
}

/* Animaciones */
@keyframes menuItemSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.menu-panel.active .menu-item {
  animation: menuItemSlide 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.menu-panel.active .menu-item:nth-child(1) {
  animation-delay: 0.05s;
}

.menu-panel.active .menu-item:nth-child(2) {
  animation-delay: 0.1s;
}

.menu-panel.active .menu-item:nth-child(3) {
  animation-delay: 0.15s;
}

.menu-panel.active .menu-item:nth-child(4) {
  animation-delay: 0.2s;
}

.menu-panel.active .menu-item:nth-child(5) {
  animation-delay: 0.25s;
}

/* =============================================
   MEJORAS INTEGRALES DEL MENÃš - V2.0
   ============================================= */

/* Badge en botÃ³n principal */
.menu-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: badgePulse 2s ease-in-out infinite;
  z-index: 1;
}

@keyframes badgePulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  }

  50% {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
  }
}

/* BÃºsqueda rÃ¡pida */
.menu-search {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
  flex-shrink: 0;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text);
  opacity: 0.5;
  pointer-events: none;
}

.search-input {
  flex: 1;
  padding: 10px 12px 10px 36px;
  background: var(--panel);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: system-ui, -apple-system, sans-serif;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-input::placeholder {
  color: var(--text);
  opacity: 0.4;
}

.search-shortcut {
  position: absolute;
  right: 12px;
  padding: 2px 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  font-family: monospace;
  color: var(--text);
  opacity: 0.5;
  pointer-events: none;
}

/* Highlight de bÃºsqueda */
.search-highlight {
  background: rgba(102, 126, 234, 0.08);
  border-color: rgba(102, 126, 234, 0.3);
}

.search-highlight .item-title {
  color: #667eea;
  font-weight: 600;
}

/* Badges en items */
.item-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.item-badge.new {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  animation: badgeGlow 2s ease-in-out infinite;
}

.item-badge.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

@keyframes badgeGlow {

  0%,
  100% {
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
  }

  50% {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
  }
}

/* Iconos SVG en tÃ­tulos de secciÃ³n */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  opacity: 0.6;
  margin-bottom: 12px;
  padding: 0 16px;
}

.section-title svg {
  opacity: 0.7;
  stroke: currentColor;
}

/* Avatar con estado online */
.user-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.avatar-emoji {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.avatar-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid var(--panel);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.4);
  }
}

/* BotÃ³n de logout */
.logout-btn {
  width: 100%;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
  color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.logout-btn svg {
  stroke: currentColor;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.logout-text {
  font-size: 13px;
  font-weight: 500;
}

/* Indicador de atajos */
.menu-shortcuts {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--panel-2);
  text-align: center;
}

.shortcut-hint {
  font-size: 11px;
  color: var(--text);
  opacity: 0.5;
}

.shortcut-hint kbd {
  padding: 2px 6px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: monospace;
  font-size: 10px;
  margin: 0 2px;
}

/* Mejoras en menu-footer */
.menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  border-top: 1px solid var(--border);
  gap: 12px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--text);
  opacity: 0.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 3px 8px;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(37, 211, 102, 0.25));
  border: 1px solid rgba(37, 211, 102, 0.3);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #25d366;
  transition: all 0.3s ease;
  width: fit-content;
}

.user-credit-badge .credit-icon {
  font-size: 11px;
}

.user-credit-badge .credit-amount {
  letter-spacing: 0.3px;
}

.user-credit-badge.low-credit {
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.15), rgba(255, 77, 77, 0.25));
  border-color: rgba(255, 77, 77, 0.4);
  color: #ff4d4d;
  animation: pulse-credit 2s ease-in-out infinite;
}

/* Glassmorphism effect */
.menu-panel {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* Tema oscuro - Ajustes */
.theme-dark .menu-search {
  background: rgba(255, 255, 255, 0.03);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .search-input {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .search-input:focus {
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.08);
}

.theme-dark .logout-btn:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.3);
}

.theme-dark .menu-shortcuts {
  background: rgba(255, 255, 255, 0.03);
  border-top-color: rgba(255, 255, 255, 0.1);
}

/* Responsive - Ajustes para mÃ³vil */
@media (max-width: 768px) {
  .menu-search {
    padding: 12px 16px;
  }

  .search-shortcut {
    display: none;
  }

  .menu-shortcuts {
    display: none;
  }

  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .avatar-status {
    width: 10px;
    height: 10px;
  }
}

/* =============================================
   REGISTRO/PERFIL - DISEÃ‘O MODERNO
   ============================================= */

.reg-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px 16px;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reg-card {
  width: 100%;
  max-width: 520px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 100px rgba(102, 126, 234, 0.1);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.reg-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg,
      rgba(102, 126, 234, 0.05),
      rgba(118, 75, 162, 0.05));
  position: relative;
}

.reg-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.reg-icon-wrapper {
  position: relative;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

.reg-logo {
  filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.4));
  transition: all 0.3s ease;
}

.reg-logo:hover {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(0 6px 20px rgba(102, 126, 234, 0.6));
}

.reg-title-wrapper {
  flex: 1;
}

.reg-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  color: #f0f6ff;
  text-shadow: 0 2px 8px rgba(102, 126, 234, 0.5);
  letter-spacing: -0.3px;
}

.reg-subtitle {
  font-size: 13px;
  color: #c8d4e6;
  margin: 0;
  font-weight: 500;
}

.reg-back-btn {
  width: 100%;
  margin-top: 16px;
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
  color: #e8edf5;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.reg-back-btn:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.back-arrow {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.reg-back-btn:hover .back-arrow {
  transform: translateX(-4px);
}

/* Form */
.reg-form {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Secciones */
.reg-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: #e8edf5;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.section-icon {
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Fields */
.reg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: #e8edf5;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-style: italic;
}

.field-optional {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}

/* Input Wrapper */
.reg-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--panel-2);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 0 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.reg-input-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.reg-input-wrapper:focus-within {
  border-color: #667eea;
  background: var(--panel);
  box-shadow:
    0 0 0 4px rgba(102, 126, 234, 0.1),
    0 8px 24px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.reg-input-wrapper:focus-within::before {
  transform: scaleX(1);
}

.input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-right: 12px;
  transition: all 0.3s ease;
}

.reg-input-wrapper:focus-within .input-icon {
  color: #667eea;
  transform: scale(1.1);
}

.reg-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
}

.reg-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.reg-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Submit Button */
.reg-submit-btn {
  position: relative;
  margin-top: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  border: 0;
  color: white;
  padding: 14px 28px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  box-shadow:
    0 12px 32px rgba(102, 126, 234, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.reg-submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent);
  transition: left 0.6s ease;
}

.reg-submit-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 40px rgba(102, 126, 234, 0.5),
    0 8px 16px rgba(0, 0, 0, 0.3);
}

.reg-submit-btn:active {
  transform: translateY(-1px);
  box-shadow:
    0 8px 20px rgba(102, 126, 234, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-shine {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.6s ease;
}

.reg-submit-btn:hover .btn-shine {
  transform: translate(-50%, -50%) scale(2);
}

/* Hint */
.reg-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(102, 126, 234, 0.05);
  border: 1px solid rgba(102, 126, 234, 0.15);
  border-radius: 10px;
  font-size: 12px;
  color: #c8d4e6;
  line-height: 1.4;
}

.reg-hint svg {
  flex-shrink: 0;
  color: #667eea;
}

/* Responsive */
@media (max-width: 640px) {
  .reg-container {
    padding: 20px 16px;
  }

  .reg-card {
    max-width: 100%;
    border-radius: 20px;
  }

  .reg-header {
    padding: 24px 20px 20px;
  }

  .reg-brand {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .reg-title {
    font-size: 24px;
  }

  .reg-subtitle {
    font-size: 14px;
  }

  .reg-form {
    padding: 24px 20px;
    gap: 24px;
  }

  .section-title {
    font-size: 15px;
  }

  .reg-input {
    padding: 14px 0;
    font-size: 14px;
  }

  .reg-submit-btn {
    padding: 16px 28px;
    font-size: 15px;
  }
}

/* AnimaciÃ³n de carga */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.reg-input-wrapper.loading {
  background: linear-gradient(90deg,
      var(--panel-2) 0%,
      var(--hover) 50%,
      var(--panel-2) 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Estados de validaciÃ³n */
.reg-input-wrapper.success {
  border-color: #27ae60;
  background: rgba(39, 174, 96, 0.05);
}

.reg-input-wrapper.error {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.05);
  animation: shake 0.5s ease;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-8px);
  }

  75% {
    transform: translateX(8px);
  }
}

/* Tema oscuro - ajustes especÃ­ficos */
html.theme-dark .reg-card {
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 100px rgba(102, 126, 234, 0.15);
}

html.theme-dark .section-title {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

html.theme-dark .reg-hint {
  background: rgba(102, 126, 234, 0.08);
  border-color: rgba(102, 126, 234, 0.2);
}

