/**
 * X-Panel — tema LATAM DOMINIOS
 * Paleta del sitio público aplicada al panel (auth + dashboard).
 */
:root {
  --bg: #090B16;
  --bg-2: #0E1122;
  --surface: #12152A;
  --surface-2: #181C36;
  --purple: #7928FF;
  --purple-2: #9B5CFF;
  --blue: #2563EB;
  --cyan: #06B6D4;
  --white: #FFFFFF;
  --muted: #94A3B8;
  --light: #F7F8FC;
  --line: rgba(255, 255, 255, 0.08);
  --grad: linear-gradient(135deg, #7928FF 0%, #2563EB 50%, #06B6D4 100%);
  --logo-tile: linear-gradient(135deg, #4C0FD4 0%, #7C1AFF 50%, #A855F7 100%);
  --logo-magenta: linear-gradient(90deg, #FF6BF1 0%, #C026D3 100%);
  color-scheme: dark;
}

html {
  background-color: var(--bg);
}

body.font-inter,
body {
  background-color: var(--bg);
  color: var(--white);
}

/* ── Fondos Tailwind (slate → marca) ───────────────────────── */
.bg-slate-950,
.bg-gray-950 {
  background-color: var(--bg) !important;
}
.bg-slate-900,
.bg-gray-900 {
  background-color: var(--surface) !important;
}
.bg-slate-900\/95 {
  background-color: rgba(18, 21, 42, 0.95) !important;
}
.bg-slate-900\/80 {
  background-color: rgba(18, 21, 42, 0.8) !important;
}
.bg-slate-900\/60,
.bg-slate-900\/50,
.bg-slate-900\/40 {
  background-color: rgba(18, 21, 42, 0.55) !important;
}
.bg-slate-800,
.bg-gray-800 {
  background-color: var(--surface-2) !important;
}
.bg-slate-800\/50 {
  background-color: rgba(24, 28, 54, 0.55) !important;
}
.bg-slate-800\/40 {
  background-color: rgba(24, 28, 54, 0.4) !important;
}
.bg-slate-700,
.bg-slate-700\/55,
.bg-slate-700\/80 {
  background-color: rgba(24, 28, 54, 0.85) !important;
}
.bg-black\/50,
.bg-black\/60 {
  background-color: rgba(9, 11, 22, 0.72) !important;
}

/* Auth pages: fondo de marca en lugar del degradado slate/indigo genérico */
body.bg-gradient-to-br.from-slate-900,
body.from-slate-900 {
  background-image: radial-gradient(1200px 600px at 50% -10%, rgba(121, 40, 255, 0.28) 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 20%, rgba(37, 99, 235, 0.18) 0%, transparent 50%),
    radial-gradient(800px 400px at 0% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 45%, #0a0d1a 100%) !important;
  background-color: var(--bg) !important;
}

/* ── Bordes ────────────────────────────────────────────────── */
.border-slate-800,
.border-slate-700,
.border-slate-700\/80,
.border-slate-700\/70,
.border-slate-600,
.border-slate-600\/50 {
  border-color: var(--line) !important;
}
.border-blue-500\/20,
.border-blue-500\/25,
.border-blue-400\/55,
.border-blue-500\/30 {
  border-color: rgba(121, 40, 255, 0.28) !important;
}
.border-purple-500\/25,
.border-purple-500\/40,
.border-violet-500\/35,
.border-indigo-500\/40 {
  border-color: rgba(155, 92, 255, 0.35) !important;
}

/* ── Texto ─────────────────────────────────────────────────── */
.text-slate-400,
.text-slate-500 {
  color: var(--muted) !important;
}
.text-slate-300 {
  color: #cbd5e1 !important;
}
.text-blue-300,
.text-blue-400 {
  color: var(--purple-2) !important;
}
.text-cyan-300,
.text-cyan-400,
.text-cyan-400\/90 {
  color: var(--cyan) !important;
}
.text-purple-300,
.text-violet-300 {
  color: var(--purple-2) !important;
}

/* ── Acentos / focus / botones marca ───────────────────────── */
.focus\:border-blue-400:focus,
.focus\:border-amber-400:focus {
  border-color: var(--purple-2) !important;
}
.ring-blue-400\/20:focus,
.focus\:ring-blue-400\/20:focus {
  --tw-ring-color: rgba(121, 40, 255, 0.25) !important;
}

.bg-blue-500,
.bg-blue-600,
.hover\:bg-blue-600:hover,
.bg-amber-500,
.hover\:bg-amber-600:hover,
.bg-amber-500\/90 {
  background-color: var(--purple) !important;
  color: var(--white) !important;
}
.hover\:bg-amber-500:hover,
.hover\:bg-blue-500:hover {
  background-color: var(--purple-2) !important;
}

.bg-gradient-to-r.from-blue-500,
.from-blue-500 {
  --tw-gradient-from: #7928FF !important;
  --tw-gradient-to: #06B6D4 !important;
  --tw-gradient-stops: var(--tw-gradient-from), #2563EB, var(--tw-gradient-to) !important;
}
.to-purple-600,
.to-indigo-600 {
  --tw-gradient-to: #06B6D4 !important;
}
.hover\:from-blue-600:hover {
  --tw-gradient-from: #9B5CFF !important;
}
.hover\:to-purple-700:hover {
  --tw-gradient-to: #06B6D4 !important;
}

/* CTAs con clase explícita de marca */
.panel-btn-brand,
button.panel-btn-brand,
a.panel-btn-brand {
  background-image: var(--grad) !important;
  color: var(--white) !important;
  border: none !important;
}
.panel-btn-brand:hover {
  filter: brightness(1.08);
}

/* Badges / pills azules → púrpura marca */
.bg-blue-500\/10,
.bg-blue-500\/15,
.bg-blue-500\/20,
.bg-sky-500\/10,
.bg-sky-500\/15 {
  background-color: rgba(121, 40, 255, 0.14) !important;
}
.text-sky-200,
.text-sky-300,
.text-amber-300,
.text-amber-400 {
  color: var(--purple-2) !important;
}
.border-sky-500\/40,
.border-sky-500\/45,
.border-amber-500\/25,
.border-amber-500\/30,
.border-amber-500\/45 {
  border-color: rgba(121, 40, 255, 0.35) !important;
}
.bg-amber-500\/10,
.bg-amber-500\/15,
.bg-amber-500\/20 {
  background-color: rgba(121, 40, 255, 0.14) !important;
}

/* ── Shell dashboard ───────────────────────────────────────── */
#panelShell,
#panelMainColumn {
  background-color: var(--bg);
}
#panelSidebar {
  background-color: var(--surface) !important;
  border-color: var(--line) !important;
}
#panelSidebar .sidebar-link:hover {
  background-color: rgba(121, 40, 255, 0.1) !important;
}
#panelSidebar .sidebar-link.active {
  background: rgba(121, 40, 255, 0.18) !important;
  color: var(--white) !important;
  border-color: rgba(155, 92, 255, 0.45) !important;
}
header.bg-slate-900\/95,
header.backdrop-blur {
  background-color: rgba(18, 21, 42, 0.92) !important;
  border-color: var(--line) !important;
}

#panelMainScroll::-webkit-scrollbar-track {
  background: rgba(9, 11, 22, 0.5);
}
#panelMainScroll::-webkit-scrollbar-thumb {
  background: rgba(121, 40, 255, 0.35);
}
#panelMainScroll::-webkit-scrollbar-thumb:hover {
  background: rgba(155, 92, 255, 0.55);
}

.dash-glow::before {
  background: linear-gradient(135deg, rgba(121, 40, 255, 0.45), rgba(37, 99, 235, 0.25), rgba(6, 182, 212, 0.2), transparent 62%) !important;
}
.dash-kpi:hover {
  box-shadow: 0 12px 40px -12px rgba(121, 40, 255, 0.35) !important;
}
.dash-chart-card {
  background: linear-gradient(160deg, rgba(24, 28, 54, 0.95) 0%, rgba(14, 17, 34, 0.98) 100%) !important;
  border-color: var(--line) !important;
}

/* Inputs / selects oscuros */
input.bg-slate-800,
select.bg-slate-800,
textarea.bg-slate-800,
input.bg-slate-900,
select.bg-slate-900,
textarea.bg-slate-900 {
  background-color: var(--bg-2) !important;
  border-color: var(--line) !important;
  color: var(--white) !important;
}
input::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

/* Cards de sección */
.rounded-2xl.border.bg-slate-800\/50,
.bg-slate-800\/50.rounded-2xl {
  background-color: rgba(18, 21, 42, 0.72) !important;
  border-color: rgba(121, 40, 255, 0.22) !important;
}

/* Links */
a.text-blue-400,
a.text-blue-400:hover,
.text-blue-400.hover\:text-blue-300:hover {
  color: var(--purple-2) !important;
}
a.text-blue-400:hover {
  color: #c4b5fd !important;
}

/* Settings tabs activos */
.settings-tab.active,
button.settings-tab.active {
  color: var(--purple-2) !important;
  border-color: var(--purple) !important;
  background-color: rgba(121, 40, 255, 0.12) !important;
}

/* Modales */
[id^="modal"] .bg-slate-900,
.fixed .bg-slate-900 {
  background-color: var(--surface) !important;
}
