/* =============================================
   LOGIN PAGE — Estilos exclusivos
   Paleta: rojo suave · gris · tonos neutros
   ============================================= */

/* Hover para botones del modal de funciones */
#btnOptAdmin:hover {
  border-color: var(--brand-blue) !important;
  background: rgba(0, 61, 109, 0.06) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 61, 109, 0.12);
}
#btnOptOperador:hover {
  border-color: var(--brand-red) !important;
  background: rgba(220, 38, 38, 0.06) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.12);
}

/* =============================================
   FONDO — Zoom Ken Burns suave
   ============================================= */
.login-page {
  position: relative;
  overflow: hidden;
  z-index: 1;
  background: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100vw;
  box-sizing: border-box;
}
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(15, 15, 18, 0.75) 0%,
    rgba(28, 28, 32, 0.70) 100%
  ), url('/img/junta.jpg') no-repeat center center / cover;
  z-index: -1;
  animation: bgZoom 35s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes bgZoom {
  0%   { transform: scale(1); }
  100% { transform: scale(1.05); }
}

/* =============================================
   GLOWS DE FONDO — Solo rojo y gris, sin amarillo
   ============================================= */
.login-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.glow-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(180, 20, 20, 0.55) 0%, rgba(180, 20, 20, 0) 70%);
  top: -10%;
  left: -8%;
  opacity: 0.35;
  animation: floatGlow1 24s ease-in-out infinite alternate;
}
.glow-2 {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(90, 90, 100, 0.6) 0%, rgba(90, 90, 100, 0) 70%);
  bottom: -10%;
  right: -8%;
  opacity: 0.3;
  animation: floatGlow2 28s ease-in-out infinite alternate;
}
.glow-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(150, 30, 30, 0.35) 0%, rgba(150, 30, 30, 0) 70%);
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.25;
  animation: floatGlow3 32s ease-in-out infinite alternate;
}
.mouse-glow {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 30, 30, 0.12) 0%, rgba(80, 80, 90, 0.1) 45%, transparent 70%);
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  transform: translate(-50%, -50%);
  transition: top 0.15s ease-out, left 0.15s ease-out;
  opacity: 0.55;
  filter: blur(85px);
}

@keyframes floatGlow1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(100px, 70px) scale(1.12); }
  100% { transform: translate(30px, -50px) scale(0.92); }
}
@keyframes floatGlow2 {
  0%   { transform: translate(0, 0) scale(1.05); }
  50%  { transform: translate(-80px, -100px) scale(0.88); }
  100% { transform: translate(50px, 35px) scale(1.15); }
}
@keyframes floatGlow3 {
  0%   { transform: translate(-50%, -50%) translate(-50px, 30px) scale(0.88); }
  50%  { transform: translate(-50%, -50%) translate(60px, -60px) scale(1.08); }
  100% { transform: translate(-50%, -50%) translate(-30px, 50px) scale(0.95); }
}

/* =============================================
   SPLIT CONTAINER — Estilo de Pantalla Dividida
   ============================================= */
.split-container {
  display: flex;
  flex-direction: row;
  width: 90vw;
  max-width: 1000px;
  height: 80vh;
  min-height: 580px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  z-index: 2;
  box-shadow: 
    0 35px 85px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0;
  will-change: transform, opacity;
  animation: containerEntrance 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes containerEntrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =============================================
   PANEL IZQUIERDO — Branding y Lista de Turno
   ============================================= */
.panel-left {
  flex: 4;
  background: linear-gradient(
    140deg,
    rgba(130, 20, 20, 0.45) 0%,
    rgba(22, 22, 28, 0.9) 100%
  );
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

.logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.brand-logo:hover {
  transform: scale(1.08) rotate(5deg);
}

.logo-wrapper h2 {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.brand-subtitle {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 140, 140, 0.85);
  letter-spacing: 0px;
}

.live-shift-status {
  margin-top: 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.live-shift-status h3 {
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shift-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 16px;
}

.live-list {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  padding: 16px;
  height: 220px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 0;
  flex-shrink: 0;
}

.empty-state {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  margin: auto 0;
  padding: 0 20px;
  line-height: 1.6;
}

/* =============================================
   CHIPS DE OPERADORES
   ============================================= */
.operator-chip {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 8px 12px;
  animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.operator-chip:hover {
  transform: translateY(-1.5px);
  border-color: rgba(255, 255, 255, 0.2);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chip-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-right: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.chip-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.chip-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.chip-role {
  display: none;
}

.btn-remove-chip {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background-color 0.2s;
}
.btn-remove-chip:hover {
  color: #ff5c5c;
  background-color: rgba(255, 92, 92, 0.12);
}

/* =============================================
   PANEL DERECHO — Formularios y Controles
   ============================================= */
.panel-right {
  flex: 6;
  background: linear-gradient(
    145deg,
    rgba(30, 30, 35, 0.8) 0%,
    rgba(18, 18, 22, 0.95) 100%
  );
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  text-align: left;
}

.right-header {
  margin-bottom: 30px;
}

.right-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.right-header p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* =============================================
   CAMPOS — Select de Glassmorphism
   ============================================= */
.form-label {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 700 !important;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

.form-control {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f0f0f0 !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
}

.form-control option {
  background: #18181c;
  color: #f0f0f0;
  padding: 10px;
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(220, 38, 38, 0.65) !important;
  box-shadow:
    0 0 0 4px rgba(220, 38, 38, 0.16),
    inset 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  color: #ffffff !important;
  outline: none;
}

/* =============================================
   ACCIONES — Botones Premium
   ============================================= */
.operator-actions-wrapper, .admin-actions-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
  transition: all 0.3s ease;
}

.btn-lg {
  padding: 14px 24px !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  border-radius: 12px !important;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3) !important;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.45) !important;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  transform: translateY(-1.5px);
}
.btn-secondary:active {
  transform: translateY(0);
}

.btn-brand {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3) !important;
}
.btn-brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.45) !important;
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%) !important;
}

.hidden {
  display: none !important;
}

/* =============================================
   ERROR — Animación de Vibración
   ============================================= */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60%  { transform: translateX(-6px); }
  40%, 80%  { transform: translateX(6px); }
}
.login-error {
  animation: shake 0.4s ease-in-out;
  background: rgba(180, 25, 25, 0.28) !important;
  border: 1px solid rgba(200, 38, 38, 0.45) !important;
  color: #ffcfcf !important;
  backdrop-filter: blur(6px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  margin-bottom: 20px;
  text-align: left;
}

/* =============================================
   RESPONSIVE DESIGN — Media Queries
   ============================================= */
@media (max-width: 768px) {
  .split-container {
    flex-direction: column;
    height: auto;
    width: 90vw;
    margin: 30px auto;
  }
  
  .panel-left {
    padding: 30px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .panel-right {
    padding: 35px 30px;
  }
  
  .live-list {
    min-height: 140px;
  }
}
