/* =========================================================
   S#1 - CRISTAL 3D + MOODS DIFERENCIADOS POR ROL
   ========================================================= */

/* ---------- 1. TUS VISTAS (ADMIN / CLIENT / FLUJO / AGENTE) ---------- */

/* 0. ORIGINAL (Blanco y Negro Cristal 3D) */
:root,
[data-theme="original"] {
  --bg: radial-gradient(circle at 50% 0%, #18181d 0%, #060608 60%, #000000 100%);
  --card: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(10, 10, 14, 0.88));
  --card-border: rgba(255, 255, 255, 0.16);
  --card-shadow: 0 18px 40px rgba(0, 0, 0, 0.8), inset 0 1px 1px rgba(255, 255, 255, 0.24);
  --card-blur: blur(18px);
  --inner-box: rgba(255, 255, 255, 0.04);
  --text: #ffffff;
  --sub: #a1a1aa;
  --btn-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.1) 100%);
  --btn-text: #ffffff;
  --btn-border: rgba(255, 255, 255, 0.55);
  --btn-glow: 0 0 24px rgba(255, 255, 255, 0.22), inset 0 1px 2px rgba(255, 255, 255, 0.75), inset 0 0 12px rgba(255, 255, 255, 0.2);
  --accent: #ffffff;
  --thumb-color: #ffffff;
}

/* 1. OSCURO PÚRPURA (Cristal 3D Neón) */
[data-theme="purple-dark"] {
  --bg: radial-gradient(circle at 80% 10%, #2b0f4c 0%, #090412 48%, #020105 100%);
  --card: linear-gradient(145deg, rgba(168, 85, 247, 0.12), rgba(12, 8, 22, 0.86));
  --card-border: rgba(192, 132, 252, 0.34);
  --card-shadow: 0 20px 45px rgba(0, 0, 0, 0.85), 0 0 24px rgba(168, 85, 247, 0.15), inset 0 1px 1px rgba(233, 213, 255, 0.32);
  --card-blur: blur(20px);
  --inner-box: rgba(168, 85, 247, 0.07);
  --text: #f5f3ff;
  --sub: #c4b5fd;
  --btn-bg: linear-gradient(135deg, rgba(168, 85, 247, 0.44) 0%, rgba(126, 34, 206, 0.24) 100%);
  --btn-text: #ffffff;
  --btn-border: rgba(216, 180, 254, 0.65);
  --btn-glow: 0 0 28px rgba(168, 85, 247, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.65), inset 0 0 14px rgba(192, 132, 252, 0.45);
  --accent: #c084fc;
  --thumb-color: #c084fc;
}

/* 2. TRANSPARENTE GLASS + VERDE MENTA (Cristal 3D) */
[data-theme="glass-mint"] {
  --bg: radial-gradient(circle at 15% 15%, #1e113a 0%, #061b20 50%, #03060a 100%);
  --card: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(0, 255, 204, 0.03));
  --card-border: rgba(0, 255, 204, 0.34);
  --card-shadow: 0 20px 45px rgba(0, 0, 0, 0.78), 0 0 22px rgba(0, 255, 204, 0.14), inset 0 1px 1px rgba(255, 255, 255, 0.32);
  --card-blur: blur(22px);
  --inner-box: rgba(0, 255, 204, 0.06);
  --text: #ffffff;
  --sub: #cbd5e1;
  --btn-bg: linear-gradient(135deg, rgba(0, 255, 204, 0.36) 0%, rgba(0, 180, 150, 0.2) 100%);
  --btn-text: #ffffff;
  --btn-border: rgba(0, 255, 204, 0.7);
  --btn-glow: 0 0 26px rgba(0, 255, 204, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.7), inset 0 0 14px rgba(0, 255, 204, 0.38);
  --accent: #00ffcc;
  --thumb-color: #00ffcc;
}

/* ---------- 2. SOLO VISTA SUPERVISOR (B&N -> ROJO/NEGRO -> ROJO/BLANCO) ---------- */

/* Clic 1 en Supervisor: Negro Carbón Puro + Rojo Láser Neón */
[data-theme="purple-dark"] body[data-role="supervisor"] {
  --bg: radial-gradient(circle at 85% 10%, rgba(255, 0, 43, 0.22) 0%, #070709 42%, #000000 100%);
  --card: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(8, 8, 11, 0.94));
  --card-border: rgba(255, 0, 43, 0.48);
  --card-shadow: 0 22px 48px rgba(0, 0, 0, 0.95), 0 0 28px rgba(255, 0, 43, 0.24), inset 0 1px 1px rgba(255, 255, 255, 0.18);
  --card-blur: blur(20px);
  --inner-box: rgba(12, 12, 16, 0.85);
  --text: #ffffff;
  --sub: #a1a1aa;
  --btn-bg: linear-gradient(135deg, rgba(255, 0, 43, 0.55) 0%, rgba(180, 0, 25, 0.35) 100%);
  --btn-text: #ffffff;
  --btn-border: rgba(255, 60, 90, 0.85);
  --btn-glow: 0 0 30px rgba(255, 0, 43, 0.72), inset 0 1px 2px rgba(255, 255, 255, 0.65), inset 0 0 14px rgba(255, 0, 43, 0.55);
  --accent: #ff002b;
  --thumb-color: #ff002b;
}

/* Clic 2 en Supervisor: Blanco Plata + Rojo Carmesí Intenso (Sin tonos marrones) */
[data-theme="glass-mint"] body[data-role="supervisor"] {
  --bg: linear-gradient(160deg, #ffffff 0%, #e5e7eb 100%);
  --card: linear-gradient(145deg, #ff002b 0%, #c8001e 55%, #6b0010 100%);
  --card-border: rgba(255, 255, 255, 0.42);
  --card-shadow: 0 20px 44px rgba(200, 0, 30, 0.34), inset 0 1px 2px rgba(255, 255, 255, 0.55);
  --card-blur: blur(18px);
  --inner-box: rgba(0, 0, 0, 0.28);
  --text: #ffffff;
  --sub: #ffe4e6;
  --btn-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.14) 100%);
  --btn-text: #ffffff;
  --btn-border: rgba(255, 255, 255, 0.75);
  --btn-glow: 0 8px 24px rgba(0, 0, 0, 0.28), inset 0 1px 2px rgba(255, 255, 255, 0.85);
  --accent: #ffffff;
  --thumb-color: #ff002b;
}

/* ---------- APLICACIÓN GLOBAL CRISTAL 3D ---------- */
body {
  background: var(--bg) !important;
  color: var(--text) !important;
  transition: background 0.35s ease, color 0.25s ease;
}

.card, .topbar, .call-stage, .sup-block {
  background: var(--card) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: var(--card-shadow) !important;
  backdrop-filter: var(--card-blur);
  -webkit-backdrop-filter: var(--card-blur);
  transition: all 0.3s ease;
}

/* Cajas internas (métricas, clientes, feed) integradas al vidrio */
.meta-grid, .kpi-box, .client-card, .pay-item, .camp-item, .status-row, .timer-display {
  background: var(--inner-box) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Botones principales: Cristal 3D translúcido + brillo neón */
.btn-white, .chip-btn.cta, .client-chip.active {
  background: var(--btn-bg) !important;
  color: var(--btn-text) !important;
  border: 1px solid var(--btn-border) !important;
  box-shadow: var(--btn-glow) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Botones secundarios: Vidrio ahumado con bisel */
.btn-outline, .client-chip {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text) !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.badge, .emblem-breath, .agent-orb, .emblem-sm {
  border-color: var(--accent) !important;
}

/* ---------- SWITCHER VERTICAL FLOTANTE ---------- */
.mood-vertical-rail {
  position: fixed;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 88px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 15, 20, 0.78);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  z-index: 9998;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.mood-vertical-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--thumb-color);
  box-shadow: 0 0 12px var(--thumb-color);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
}

[data-theme="original"] .mood-vertical-thumb { transform: translateY(0px); }
[data-theme="purple-dark"] .mood-vertical-thumb { transform: translateY(-30px); }
[data-theme="glass-mint"] .mood-vertical-thumb { transform: translateY(-60px); }
