:root {
  /* Paleta Elegante y Sobria Solicitada: Negro Ónix, Lila y Oro */
  --bg-onyx: #0a0a0c;        /* Negro Ónix Profundo */
  --bg-onyx-card: #121217;   /* Tarjetas Ónix Pulido */
  --bg-onyx-hover: #1b1b22;  /* Hover Ónix */
  --bg-onyx-darker: #060608;

  --border-color: rgba(212, 175, 55, 0.22); /* Borde sutil Oro */
  --border-lila: rgba(192, 132, 252, 0.35);  /* Borde Lila */

  --text-white: #ffffff;      /* Fuentes Blancas Nítidas */
  --text-muted: #e2e8f0;      /* Blanco Grisáceo Suave */

  /* Colores Secundarios */
  --lila: #c084fc;            /* Lila Radiante */
  --lila-deep: #9333ea;       /* Lila Profundo */
  --lila-glow: rgba(192, 132, 252, 0.25);

  --gold: #f59e0b;            /* Oro Brillante */
  --gold-metallic: #d4af37;   /* Oro Metálico */
  --gold-glow: rgba(212, 175, 55, 0.3);

  /* Semáforos */
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.16);
  --yellow: #fbbf24;
  --yellow-bg: rgba(251, 191, 36, 0.16);
  --red: #f43f5e;
  --red-bg: rgba(244, 63, 94, 0.2);
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-onyx);
  color: var(--text-white);
  line-height: 1.55;
  padding-bottom: 100px;
  min-height: 100vh;
  letter-spacing: -0.01em;
}

/* Scrollbar Personalizado Elegante */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-onyx);
}
::-webkit-scrollbar-thumb {
  background: #2a2a38;
  border-radius: 99px;
  border: 1px solid var(--border-color);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-metallic);
}

/* Top Navbar Optimizada para PC y Gran Pantalla */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 12, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.75);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 16px var(--lila-glow), 0 0 8px var(--gold-glow);
  border: 1px solid var(--border-color);
}

.brand-title {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--text-white);
}

.brand-title span {
  background: linear-gradient(135deg, var(--lila), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-tab {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-tab:hover {
  color: var(--text-white);
  background: rgba(192, 132, 252, 0.08);
  border-color: rgba(192, 132, 252, 0.3);
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.16), rgba(212, 175, 55, 0.12));
  color: #fff;
  border-color: var(--gold-metallic);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.2);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Controles de Selección e Input */
.select-control, .input-control, textarea.input-control {
  background: #14141c;
  color: var(--text-white);
  border: 1px solid var(--border-color);
  padding: 0.52rem 0.85rem;
  border-radius: 10px;
  font-size: 0.86rem;
  outline: none;
  transition: all 0.2s;
}

.select-control:focus, .input-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}

/* Contenedor PC con Ancho Completo Optimizado */
.container {
  max-width: 1560px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

/* Tarjetas en Negro Ónix con Borde Oro / Lila */
.card {
  background: var(--bg-onyx-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.35rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
  transition: border-color 0.25s ease;
}

.card:hover {
  border-color: rgba(192, 132, 252, 0.35);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.5rem;
}

.kpi-title {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-metallic);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.02em;
}

.kpi-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-gold {
  background: rgba(212, 175, 55, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.badge-lila {
  background: var(--lila-glow);
  color: #e9d5ff;
  border: 1px solid rgba(192, 132, 252, 0.45);
}

.badge-green {
  background: var(--green-bg);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-yellow {
  background: var(--yellow-bg);
  color: #fde047;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.badge-red {
  background: var(--red-bg);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.5);
  animation: pulseRed 1.6s infinite;
}

@keyframes pulseRed {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4); }
  50% { box-shadow: 0 0 20px 4px rgba(244, 63, 94, 0.3); }
}

/* Botones con Estética Zilliad */
.btn {
  border: none;
  border-radius: 10px;
  padding: 0.55rem 1.05rem;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--lila-deep), #6b21a8);
  color: #fff;
  border: 1px solid rgba(192, 132, 252, 0.5);
  box-shadow: 0 4px 14px rgba(147, 51, 234, 0.35);
}
.btn-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(147, 51, 234, 0.5);
}

.btn-gold {
  background: linear-gradient(135deg, #d4af37, #b45309);
  color: #000;
  font-weight: 800;
  border: 1px solid #fef08a;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}
.btn-gold:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.55);
}

.btn-reports-green {
  background: linear-gradient(135deg, #10b981, #047857) !important;
  color: #022c22 !important;
  font-weight: 800 !important;
  border: 1px solid #6ee7b7 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}
.btn-reports-green:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.65);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-white);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  background: rgba(192, 132, 252, 0.1);
  border-color: var(--lila);
}

.btn-danger {
  background: linear-gradient(135deg, #e11d48, #9f1239);
  color: #fff;
  border: 1px solid rgba(244, 63, 94, 0.5);
}

/* Tablas Optimizadas */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th, td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-metallic);
  background: rgba(0, 0, 0, 0.4);
  font-weight: 700;
}

tr:hover td {
  background: rgba(192, 132, 252, 0.03);
}

/* Progress Bar */
.progress-track {
  width: 100%;
  height: 8px;
  background: #1c1c26;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.35rem;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Grid Dividido Optimizada para PC (Dashboard del Cliente + Chat) */
.split-grid {
  display: grid;
  grid-template-columns: 410px 1fr;
  gap: 1.35rem;
}

@media (max-width: 1100px) {
  .split-grid {
    grid-template-columns: 1fr;
  }
}

.chat-box {
  display: flex;
  flex-direction: column;
  height: 540px;
  background: #0d0d12;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
}

.chat-header {
  padding: 1rem 1.25rem;
  background: #14141c;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chat-messages {
  flex: 1;
  padding: 1.15rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.msg {
  max-width: 82%;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.msg-customer {
  align-self: flex-start;
  background: #1c1c26;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 3px;
  color: var(--text-white);
}

.msg-ai {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.24), rgba(10, 10, 12, 0.85));
  border: 1px solid var(--border-lila);
  border-bottom-right-radius: 3px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.15);
}

.msg-human {
  align-self: flex-end;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-bottom-right-radius: 3px;
  color: #fff;
}

.msg-meta {
  font-size: 0.72rem;
  color: var(--gold-metallic);
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.chat-input-bar {
  padding: 0.85rem 1rem;
  background: #14141c;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.6rem;
}

/* Dock Flotante Inferior */
/* ========================================================================== */
/* DOCK FLOTANTE CON EL BOTÓN UNIFICADO DE AYUDA                              */
/* ========================================================================== */
.zilliad-help-dock {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 95;
  display: flex;
}

.dock-help-btn {
  background: linear-gradient(135deg, #1b1b26, #0e0e14);
  color: var(--text-white);
  border: 1px solid var(--gold-metallic);
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 18px rgba(212, 175, 55, 0.25);
  backdrop-filter: blur(12px);
  transition: all 0.22s ease;
  font-family: inherit;
}

.dock-help-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(212, 175, 55, 0.45);
  border-color: #fef08a;
}

.help-dock-icon {
  font-size: 1.15rem;
}

.help-dock-text {
  font-weight: 800;
  letter-spacing: 0.02em;
}

.help-dock-badge {
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
}

/* ========================================================================== */
/* CUADRÍCULA Y TARJETAS DEL CENTRO DE AYUDA                                  */
/* ========================================================================== */
.help-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.95rem;
  margin-top: 0.5rem;
}

.help-card {
  background: #111118;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.help-card:hover {
  background: #171722;
  border-color: var(--gold-metallic);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
}

.help-card-highlight {
  border-color: var(--gold-metallic);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(10, 10, 12, 0.9));
}

.help-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.help-option-icon {
  font-size: 1.6rem;
}

.help-option-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-white);
  line-height: 1.2;
}

.help-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0.85rem;
  flex: 1;
}

.help-card-action {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-metallic);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ========================================================================== */
/* BANNER DE COORDINACIÓN DE LLAMADA DE 20 MIN                                */
/* ========================================================================== */
.callout-call-assist {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(147, 51, 234, 0.08));
  border: 1px solid var(--gold-metallic);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* ========================================================================== */
/* STEPPER DEL FORMULARIO GUIADO DE CONFIGURACIÓN                             */
/* ========================================================================== */
.config-stepper {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.config-step-btn {
  background: #14141c;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.config-step-btn:hover {
  color: var(--text-white);
  border-color: rgba(192, 132, 252, 0.4);
}

.config-step-btn.active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(212, 175, 55, 0.15));
  color: #fff;
  border-color: var(--gold-metallic);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

/* Modales */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 6, 0.88);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: var(--bg-onyx-card);
  border: 1px solid var(--gold-metallic);
  border-radius: 20px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.6rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 35px var(--gold-glow);
}

.agent-switch-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.agent-tab-pill {
  background: #14141c;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.agent-tab-pill.active {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.25), rgba(212, 175, 55, 0.15));
  color: #fff;
  border-color: var(--gold-metallic);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
}

/* ========================================================================== */
/* PANTALLA DE LOGIN OPTIMIZADA, ELEGANTE Y RESPONSIVE EN MÓVILES Y DESKTOP  */
/* ========================================================================== */
.login-screen-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: radial-gradient(circle at 50% 15%, rgba(147, 51, 234, 0.14), transparent 75%), #0a0a0c;
}

.login-card {
  max-width: 460px;
  width: 100%;
  padding: 2rem 1.85rem;
  background: #111116;
  border: 1px solid var(--border-color);
  border-top: 2px solid var(--gold-metallic);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  transition: all 0.25s ease;
  position: relative;
}

.login-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.login-logo-img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.login-title-wrap {
  min-width: 0;
}

.login-brand-title {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.gold-gradient-text {
  background: linear-gradient(135deg, var(--lila), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle-text {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.login-lang-select {
  font-size: 0.8rem;
  padding: 0.38rem 0.6rem;
  font-weight: 700;
  flex-shrink: 0;
  border-radius: 10px;
  background: #181822;
}

.login-form {
  display: grid;
  gap: 0.95rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.form-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.input-touch {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.85rem;
  font-size: 15px;
  border-radius: 12px;
}

.password-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-field-wrapper input {
  padding-right: 44px;
}

.btn-toggle-eye {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.05rem;
  border-radius: 8px;
  transition: color 0.2s;
}

.btn-toggle-eye:hover {
  color: var(--text-white);
}

.login-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  gap: 0.5rem;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  color: var(--text-white);
  user-select: none;
}

.remember-checkbox {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.forgot-link {
  color: var(--gold-metallic);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: var(--gold);
  text-decoration: underline;
}

.login-error-box {
  background: var(--red-bg);
  border: 1px solid var(--red);
  color: #fda4af;
  padding: 0.65rem;
  border-radius: 10px;
  font-size: 0.82rem;
}

.btn-login-submit {
  justify-content: center;
  min-height: 46px;
  font-size: 0.94rem;
  width: 100%;
  margin-top: 0.2rem;
}

/* ========================================================================== */
/* DESPLEGABLE DE DEMOS (DESPLEGABLE ELEGANTE Y COMPACTO "DEMO")              */
/* ========================================================================== */
.demo-dropdown-wrapper {
  margin-top: 1.15rem;
}

.demo-accordion-card {
  background: #0d0d12;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.demo-accordion-card:hover {
  border-color: var(--gold-metallic);
}

.demo-accordion-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.95rem;
  background: rgba(212, 175, 55, 0.05);
  border: none;
  cursor: pointer;
  color: var(--text-white);
  font-family: inherit;
  transition: background 0.2s;
  text-align: left;
}

.demo-accordion-toggle:hover {
  background: rgba(212, 175, 55, 0.12);
}

.demo-toggle-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.demo-icon {
  font-size: 1rem;
}

.demo-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--gold-metallic);
  letter-spacing: 0.02em;
}

.demo-pill {
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
}

.demo-arrow {
  color: var(--gold-metallic);
  font-size: 0.75rem;
  transition: transform 0.25s ease;
  display: inline-block;
}

.demo-arrow.open {
  transform: rotate(180deg);
}

.demo-accordion-body {
  padding: 0.95rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  display: grid;
  gap: 0.8rem;
  background: #0c0c10;
}

.demo-field-row {
  display: grid;
  gap: 0.3rem;
}

.demo-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.demo-select-full {
  width: 100%;
  min-height: 42px;
  font-weight: 600;
  font-size: 0.84rem;
}

.demo-btn-launch {
  width: 100%;
  justify-content: center;
  min-height: 42px;
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

/* ========================================================================== */
/* OPTIMIZACIÓN RESPONSIVA PARA MÓVILES (NO SOBRESATURADO, AIREADO Y ÁGIL)   */
/* ========================================================================== */
@media (max-width: 768px) {
  body {
    padding-bottom: 90px;
  }

  .login-screen-wrap {
    padding: 1rem 0.75rem;
    align-items: center;
  }

  .login-card {
    padding: 1.35rem 1.1rem;
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85);
  }

  .login-brand-title {
    font-size: 1.15rem;
  }

  .login-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .login-subtitle-text {
    font-size: 0.72rem;
  }

  .input-touch {
    font-size: 16px; /* Evita zoom automático en Safari iOS */
    padding: 0.65rem 0.8rem;
    min-height: 44px;
  }

  .login-form {
    gap: 0.85rem;
  }

  .login-options-row {
    font-size: 0.75rem;
  }

  .demo-accordion-toggle {
    padding: 0.65rem 0.8rem;
  }

  .demo-title {
    font-size: 0.78rem;
  }

  /* Topbar en celulares: limpio, ordenado y tabs con scroll horizontal */
  .topbar {
    padding: 0.6rem 0.75rem;
    gap: 0.55rem;
  }

  .brand-title {
    font-size: 1.05rem;
  }

  .brand-img {
    width: 36px;
    height: 36px;
  }

  .nav-tabs {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding-bottom: 0.35rem;
    gap: 0.4rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    flex: 0 0 auto;
    padding: 0.42rem 0.7rem;
    font-size: 0.76rem;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
    gap: 0.35rem;
  }

  .top-actions .btn, .top-actions .select-control {
    font-size: 0.74rem;
    padding: 0.38rem 0.55rem;
  }

  /* Contenedor principal sin márgenes gigantescos */
  .container {
    padding: 0.75rem 0.6rem;
  }

  /* KPIs en 2 columnas legibles */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .kpi-title {
    font-size: 0.68rem;
  }

  .kpi-value {
    font-size: 1.35rem;
  }

  .kpi-sub {
    font-size: 0.72rem;
  }

  .card {
    padding: 1rem 0.85rem;
    border-radius: 14px;
  }

  /* Dock Flotante Móvil: Barra Unificada de Ayuda */
  .zilliad-help-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.45rem 0.65rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 10, 12, 0.98);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--gold-metallic);
    justify-content: center;
    z-index: 95;
  }

  .dock-help-btn {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
  }

  .help-options-grid {
    grid-template-columns: 1fr;
  }

  /* Chat Box Adaptado */
  .chat-box {
    height: 420px;
    border-radius: 14px;
  }

  .chat-messages {
    padding: 0.85rem;
    gap: 0.65rem;
  }

  .msg {
    max-width: 90%;
    font-size: 0.82rem;
    padding: 0.65rem 0.85rem;
  }

  /* Modales en teléfonos */
  .modal-card {
    padding: 1rem 0.85rem;
    max-width: 98%;
    border-radius: 16px;
    max-height: 88vh;
  }
}

@media (max-width: 380px) {
  .login-options-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .login-brand-title {
    font-size: 1.05rem;
  }
}

/* ========================================================================== */
/* PASARELA DE PAGOS STRIPE: MODAL Y ELEMENTOS DE TARJETA                    */
/* ========================================================================== */
.stripe-pack-option {
  position: relative;
  background: #101018;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.85rem 0.65rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stripe-pack-option:hover {
  border-color: rgba(99, 91, 255, 0.55);
  background: #141422;
  transform: translateY(-2px);
}

.stripe-pack-option.active {
  border-color: #635bff;
  background: linear-gradient(135deg, rgba(99, 91, 255, 0.22), rgba(212, 175, 55, 0.12));
  box-shadow: 0 0 16px rgba(99, 91, 255, 0.35);
}




/* ========================================================================== */
/* SISTEMA DE DISEÑO EJECUTIVO ZILLIAD 2026 (SÓLIDO, ALTO CONTRASTE, ESPACIOSO) */
/* ========================================================================== */

#app-shell {
  /* RE-MAPEO DE VARIABLES PARA 100% CONTRASTE EN ZONA BLANCA */
  --text-white: #090d16 !important;
  --text-muted: #475569 !important;
  --gold: #b45309 !important;
  --gold-metallic: #92400e !important;
  --border-color: #e2e8f0 !important;
  --bg-onyx-card: #ffffff !important;
  --bg-onyx: #f8fafc !important;
  --bg-onyx-darker: #f1f5f9 !important;

  background-color: #f8fafc !important;
  color: #0f172a !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -0.01em;
}

/* Layout Principal WordPress */
.wp-admin-layout {
  display: flex !important;
  flex-direction: row !important;
  flex: 1 !important;
  min-height: calc(100vh - 48px);
  position: relative;
  background-color: #f8fafc;
  width: 100% !important;
  max-width: 100% !important;
}

/* Topbar Superior Ejecutiva */
.wp-topbar {
  background: #0b0f19 !important;
  color: #f8fafc;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.wp-topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wp-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #f8fafc;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.wp-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.wp-brand span.lila-pill {
  background: #4f46e5;
  color: #fff;
  font-size: 0.68rem;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.wp-mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 1.25rem;
  cursor: pointer;
}

.wp-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Sidebar Lateral Ejecutiva (Ancho compacto 210px para dar máximo espacio al contenido) */
.wp-sidebar {
  width: 265px !important;
  min-width: 215px !important;
  max-width: 215px !important;
  background: #0f172a !important;
  color: #f8fafc;
  flex-shrink: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  border-right: 1px solid #1e293b;
  position: sticky;
  top: 48px;
  height: calc(100vh - 48px);
  overflow-y: auto;
  z-index: 40;
}

.wp-sidebar-heading {
  padding: 0.85rem 1rem 0.35rem 1rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  font-weight: 800;
}

.wp-menu {
  display: flex;
  flex-direction: column;
  padding: 0.25rem 0;
}

.wp-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  color: #f1f5f9;
  border: none;
  border-left: 3px solid transparent;
  padding: 0.62rem 0.95rem;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.wp-menu-item-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wp-menu-icon {
  font-size: 1.05rem;
  width: 20px;
  display: inline-flex;
  justify-content: center;
  flex-shrink: 0;
}

.wp-menu-item:hover {
  background: #1e293b;
  color: #ffffff;
}

.wp-menu-item.active {
  background: #1e293b;
  color: #ffffff;
  border-left-color: #6366f1;
  font-weight: 700;
}

.wp-menu-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.12rem 0.45rem;
  border-radius: 99px;
  color: #fff;
  flex-shrink: 0;
}

.wp-menu-separator {
  height: 1px;
  background: #1e293b;
  margin: 0.4rem 0;
}

.wp-sidebar-footer {
  margin-top: auto;
  padding: 0.85rem 1rem;
  border-top: 1px solid #1e293b;
  font-size: 0.72rem;
  color: #64748b;
}

/* Área de Contenido Central - Espaciosa y Responsiva */
.wp-content-area {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  width: calc(100% - 215px) !important;
  max-width: calc(100% - 215px) !important;
  padding: 1.5rem 2rem !important;
  background-color: #f8fafc !important;
  color: #0f172a !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* Tarjetas y Contenedores */
#app-shell .card {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05), 0 1px 2px -1px rgba(15, 23, 42, 0.05) !important;
  padding: 1.25rem 1.5rem !important;
  margin-bottom: 1.25rem !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#app-shell .card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04) !important;
}

/* Tipografía de Alto Contraste */
#app-shell h1 {
  font-size: 1.45rem !important;
  font-weight: 800 !important;
  color: #090d16 !important;
  letter-spacing: -0.025em !important;
}

#app-shell h2 {
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
}

#app-shell h3 {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
}

#app-shell h4, #app-shell h5 {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
}

#app-shell p {
  color: #334155 !important;
  font-size: 0.86rem !important;
  line-height: 1.55 !important;
}

#app-shell .text-muted,
#app-shell span[style*="var(--text-muted)"] {
  color: #475569 !important;
}

/* KPI Cards (Métricas Rápidas) */
#app-shell .kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)) !important;
  gap: 1rem !important;
  margin-bottom: 1.25rem !important;
}

#app-shell .kpi-title {
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #475569 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin-bottom: 0.35rem !important;
}

#app-shell .kpi-value {
  font-size: 1.75rem !important;
  font-weight: 900 !important;
  color: #090d16 !important;
  line-height: 1.2 !important;
}

#app-shell .kpi-sub {
  font-size: 0.74rem !important;
  color: #475569 !important;
  font-weight: 600 !important;
  margin-top: 0.35rem !important;
}

/* Tablas Ejecutivas Limpias y Nítidas con Scroll Horizontal */
#app-shell .table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

#app-shell table {
  width: 100% !important;
  min-width: 880px !important;
  border-collapse: collapse !important;
  text-align: left !important;
}

#app-shell table thead tr {
  background: #f8fafc !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

#app-shell table th {
  padding: 0.85rem 1rem !important;
  font-size: 0.74rem !important;
  font-weight: 800 !important;
  color: #334155 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  background: #f8fafc !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

#app-shell table td {
  padding: 0.85rem 1rem !important;
  font-size: 0.84rem !important;
  color: #0f172a !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
}

#app-shell table tbody tr:hover td {
  background-color: #f8fafc !important;
}

/* Badges Ejecutivos Sólidos con Alto Contraste */
#app-shell .badge-green {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
  font-weight: 800 !important;
}

#app-shell .badge-lila {
  background: #eef2ff !important;
  color: #3730a3 !important;
  border: 1px solid #c7d2fe !important;
  font-weight: 800 !important;
}

#app-shell .badge-gold {
  background: #fffbeb !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
  font-weight: 800 !important;
}

#app-shell .badge-danger, 
#app-shell .badge-red {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
  font-weight: 800 !important;
}

#app-shell .badge-outline {
  background: #f8fafc !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
}

/* Botones Sólidos Ejecutivos */
#app-shell .btn-primary {
  background: #4f46e5 !important;
  color: #ffffff !important;
  border: 1px solid #4338ca !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 2px 0 rgba(79, 70, 229, 0.25) !important;
  border-radius: 8px !important;
  padding: 0.55rem 1rem !important;
}

#app-shell .btn-primary:hover {
  background: #4338ca !important;
}

#app-shell .btn-outline {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  padding: 0.55rem 0.95rem !important;
}

#app-shell .btn-outline:hover {
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

/* Controles de Formulario */
#app-shell .input-control, 
#app-shell .select-control, 
#app-shell textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0.55rem 0.85rem !important;
  font-size: 0.86rem !important;
  transition: all 0.18s ease !important;
}

#app-shell .input-control:focus, 
#app-shell .select-control:focus, 
#app-shell textarea:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
  outline: none !important;
}

#app-shell pre {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
}

/* ANIMACION PARPADEANTE DEL SEMAFORO ROJO */
@keyframes pulseRedBlink {
  0%, 100% {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 0 16px #dc2626, 0 0 30px rgba(220, 38, 38, 0.85);
  }
  50% {
    opacity: 0.35;
    transform: scale(0.92);
    box-shadow: 0 0 4px #dc2626;
  }
}

.semaphore-light-red.active, 
.semaphore-dot.red.active,
.red-pulse-active {
  animation: pulseRedBlink 0.85s infinite ease-in-out !important;
  background-color: #dc2626 !important;
}

/* MODAL DE ALERTA ROJA EMERGENTE */
.red-alert-modal-card {
  max-width: 600px;
  border: 2px solid #dc2626 !important;
  background: #ffffff !important;
  box-shadow: 0 15px 50px rgba(220, 38, 38, 0.3) !important;
  padding: 1.5rem !important;
  border-radius: 16px;
}

.red-alert-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #fee2e2;
  padding-bottom: 1rem;
}

.red-alert-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fee2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  animation: pulseRedBlink 0.85s infinite ease-in-out;
  flex-shrink: 0;
}

.red-alert-title {
  font-size: 1.25rem;
  color: #991b1b !important;
  margin-top: 0.2rem;
  font-weight: 800;
}

.red-alert-subtitle {
  font-size: 0.82rem;
  color: #475569;
  margin-top: 0.2rem;
}

.red-alert-conflict-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.red-alert-conflict-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: #991b1b;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.red-alert-conflict-text {
  font-size: 0.9rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.45;
}

.red-alert-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 1.25rem;
}

.red-alert-detail-item {
  display: flex;
  flex-direction: column;
}

.red-alert-detail-item .detail-label {
  font-size: 0.7rem;
  color: #475569;
  font-weight: 600;
}

.red-alert-detail-item .detail-value {
  font-size: 0.85rem;
  color: #0f172a;
  font-weight: 700;
}

.red-alert-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* SECCION DE ROLES Y USUARIOS ESTILO WORDPRESS */
.wp-users-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.84rem;
  color: #475569;
}

.wp-users-filter-link {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.wp-users-filter-link.active {
  color: #0f172a;
  font-weight: 800;
}

.wp-bulk-actions-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.wp-user-row-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  border: 1px solid #c7d2fe;
}

.wp-row-actions {
  display: flex;
  gap: 0.45rem;
  font-size: 0.72rem;
  margin-top: 0.25rem;
}

.wp-row-actions a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.wp-row-actions a:hover {
  text-decoration: underline;
}

.wp-row-actions a.danger {
  color: #dc2626;
}

/* CENTRO DE ENTRENAMIENTO DE AGENTES */
.training-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 1.5rem;
}

.training-tab-btn {
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #475569;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.training-tab-btn:hover {
  color: #4f46e5;
}

.training-tab-btn.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
  background: #eef2ff;
  border-radius: 8px 8px 0 0;
}

/* GRÁFICOS DUALES RESPONSIVOS */
.charts-dual-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  gap: 1.25rem !important;
}

.chart-card-wp {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 1.25rem !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

@media (max-width: 992px) {
  .wp-content-area {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
  }
  .wp-sidebar {
    position: fixed;
    left: -230px;
    transition: left 0.25s ease;
  }
  .wp-sidebar.mobile-open {
    left: 0;
  }
  .wp-mobile-toggle {
    display: block;
  }
}


/* GARANTIZAR Z-INDEX MÁXIMO PARA EL MODAL DE ALERTA ROJA Y ANIMACIÓN DE PARPADEO */
#modal-red-semaphore-alert {
  z-index: 99999 !important;
}

#modal-red-semaphore-alert.open {
  display: flex !important;
}

@keyframes pulseRedBlink {
  0%, 100% {
    opacity: 1;
    transform: scale(1.06);
    box-shadow: 0 0 18px #dc2626, 0 0 35px rgba(220, 38, 38, 0.95);
  }
  50% {
    opacity: 0.25;
    transform: scale(0.94);
    box-shadow: 0 0 4px #dc2626;
  }
}

.semaphore-light-red.active, 
.semaphore-dot.red.active,
.red-pulse-active,
.blinking-red-light {
  animation: pulseRedBlink 0.8s infinite ease-in-out !important;
  background-color: #dc2626 !important;
}

/* WIDGET FÍSICO DE 3 LUCES DEL SEMÁFORO (VERDE, AMARILLO, ROJO) */
.traffic-light-widget {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: #0f172a;
  padding: 0.4rem 0.85rem;
  border-radius: 99px;
  border: 1px solid #334155;
}

.traffic-light-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.25;
  transition: all 0.2s ease;
}

.traffic-light-dot.green.active {
  background-color: #10b981;
  opacity: 1;
  box-shadow: 0 0 12px #10b981;
}

.traffic-light-dot.yellow.active {
  background-color: #f59e0b;
  opacity: 1;
  box-shadow: 0 0 12px #f59e0b;
}

.traffic-light-dot.red.active {
  background-color: #dc2626;
  opacity: 1;
  box-shadow: 0 0 18px #dc2626, 0 0 32px #ef4444;
  animation: pulseRedBlink 0.8s infinite ease-in-out !important;
}

/* ESTILOS PARA NUESTROS AGENTES (ECOSISTEMA PROPIO DE ZILLIAD) */
.prop-agent-card {
  background: #111118;
  border: 1px solid rgba(192, 132, 252, 0.22);
  border-radius: 14px;
  padding: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.prop-agent-card:hover {
  border-color: rgba(192, 132, 252, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(176, 38, 255, 0.22);
}

.prop-agent-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.prop-agent-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #181824;
}

.prop-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  color: var(--text-white);
}

.prop-interaction-item {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(192, 132, 252, 0.06);
  border-left: 2px solid #c084fc;
  padding: 0.25rem 0.5rem;
  border-radius: 0 4px 4px 0;
  margin-bottom: 0.25rem;
}

.prop-stat-pill {
  background: #0d0d12;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  text-align: center;
}

.prop-stat-val {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-white);
}

.prop-stat-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.agent-switch-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
  gap: 0.5rem;
  margin-bottom: 1rem;
}


/* ANCHO DE SIDEBAR MEJORADO Y ESPACIOS INDEPENDIENTES */
.wp-sidebar {
  width: 265px !important;
  min-width: 265px !important;
  max-width: 265px !important;
}

.wp-menu-item {
  padding: 0.65rem 1rem !important;
  gap: 0.75rem !important;
  font-size: 0.85rem !important;
}

.wp-menu-item-content {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  width: 100% !important;
  overflow: visible !important;
  white-space: normal !important;
}

.wp-menu-label {
  font-weight: 600;
  color: #cbd5e1;
}

.wp-menu-item:hover .wp-menu-label,
.wp-menu-item.active .wp-menu-label {
  color: #ffffff;
}

/* TARJETAS DE NUESTROS AGENTES REESTRUCTURADAS LIMPIAMENTE */
.prop-card-clean {
  background: #0f0f15;
  border: 1px solid rgba(192, 132, 252, 0.25);
  border-radius: 14px;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  transition: all 0.25s ease;
}

.prop-card-clean:hover {
  border-color: rgba(192, 132, 252, 0.65);
  box-shadow: 0 8px 32px rgba(176, 38, 255, 0.25);
}

.prop-section-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #c084fc;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.prop-box-clean {
  background: #14141d;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  color: #e2e8f0;
  line-height: 1.45;
  margin-bottom: 0.85rem;
}


/* MODAL CENTRO DE CONFIGURACION INTERNO BLINDADO */
#modal-proprietary-agent-config {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(4, 4, 8, 0.92) !important;
  backdrop-filter: blur(10px) !important;
  z-index: 999999 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.25rem !important;
}

#modal-proprietary-agent-config.open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.inline-config-tab {
  background: #12121a;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.inline-config-tab:hover, .inline-config-tab.active {
  background: #231638;
  color: #f3e8ff;
  border-color: #c084fc;
}


/* ==========================================================================
   CANAL DE CHAT INTERNO & ÓRDENES DE TRABAJO A AGENTES
   ========================================================================== */
.agent-chat-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  background: #12121a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.agent-chat-nav-item:hover {
  background: #1a1a26;
  border-color: rgba(192, 132, 252, 0.4);
  transform: translateX(2px);
}

.agent-chat-nav-item.active {
  background: #231638;
  border-color: #c084fc;
  box-shadow: 0 4px 15px rgba(192, 132, 252, 0.2);
}

.order-quick-chip {
  background: #141420;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  padding: 0.35rem 0.75rem;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.order-quick-chip:hover {
  background: #241638;
  color: #f3e8ff;
  border-color: #c084fc;
  transform: translateY(-1px);
}

.chat-bubble-user {
  background: #241638;
  border: 1px solid rgba(192, 132, 252, 0.3);
  color: #f3e8ff;
  border-radius: 10px 10px 2px 10px;
  padding: 0.75rem 1rem;
  max-width: 82%;
  align-self: flex-end;
  font-size: 0.84rem;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.chat-bubble-agent {
  background: #12121c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #10b981;
  color: #e2e8f0;
  border-radius: 10px 10px 10px 2px;
  padding: 0.85rem 1.1rem;
  max-width: 88%;
  align-self: flex-start;
  font-size: 0.84rem;
  line-height: 1.5;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.chat-bubble-agent.interno {
  border-left-color: #c084fc;
}

/* ==========================================================================
   OPTIMIZACIÓN MULTI-DISPOSITIVO: PORTAL DE AGENTES Y CONSOLA DE CHAT
   ========================================================================== */
@media (max-width: 900px) {
  .agent-chat-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  #agent-chat-sidebar-list {
    max-height: 220px !important;
  }
  #agent-chat-messages-stream {
    min-height: 280px !important;
    max-height: 380px !important;
  }
}

@media (max-width: 600px) {
  .prop-card-clean {
    padding: 0.85rem !important;
  }
  .agent-chat-nav-item {
    padding: 0.5rem !important;
  }
  #proprietary-agents-container {
    grid-template-columns: 1fr !important;
    gap: 0.85rem !important;
  }
}


/* ========================================================================== */
/* REGLAS DE ALTO CONTRASTE Y LEGIBILIDAD VISUAL 2026                         */
/* ========================================================================== */
.wp-menu-item {
  color: #e2e8f0 !important;
}
.wp-menu-item:hover, .wp-menu-item.active {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
.card {
  color: #f8fafc !important;
}
.card h1, .card h2, .card h3 {
  color: #ffffff !important;
}
.form-label, label {
  color: #cbd5e1 !important;
  font-weight: 600;
}
.text-muted, [style*="color:var(--text-muted)"], [style*="color:#94a3b8"], [style*="color:#8c8f94"] {
  color: #cbd5e1 !important;
}
.data-table th {
  color: #ffffff !important;
  background: #111827 !important;
}
.data-table td {
  color: #e2e8f0 !important;
}
.badge {
  font-weight: 700 !important;
  letter-spacing: 0.3px;
}

