/* =========================================================================
   SIAF 4 (SIAFWEB) CORPORATE DESIGN SYSTEM - TELEMETRY DASHBOARD THEME
   Auditado e Integrado de: http://192.168.139.55/ (Intergas SIAF 4)
   Estándar UI/UX 2026: Micro-interacciones, neumorfismo sutil, glassmorphism limpio,
   tokenización semántica y consistencia tipográfica 100% Montserrat & JetBrains Mono.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');

:root {
  /* =========================================================================
     1. PALETA CORPORATIVA PRINCIPAL (BRAND IDENTITY 2026)
     ========================================================================= */
  --siaf-primary: #1B2654;           /* Azul Marino Profundo Institucional */
  --siaf-primary-hover: #263570;     /* Azul Marino Hover */
  --siaf-primary-dark: #111A3E;      /* Azul Marino Noche */
  --siaf-primary-light: #EEF2FF;     /* Highlight Índigo Suave */
  --siaf-primary-border: rgba(27, 38, 84, 0.15);

  --siaf-accent: #FC4C02;            /* Naranja Vibrante Corporativo Intergas */
  --siaf-accent-hover: #E03E00;      /* Naranja Profundo Hover */
  --siaf-accent-active: #C43400;     /* Naranja Presionado */
  --siaf-accent-light: #FFF0EB;      /* Tinte Naranja Suave */
  --siaf-accent-gradient: linear-gradient(135deg, #FC4C02 0%, #E03E00 100%);
  --siaf-accent-gradient-hover: linear-gradient(135deg, #FF5B14 0%, #EA4300 100%);
  --siaf-accent-shadow: 0 4px 14px rgba(252, 76, 2, 0.28);
  --siaf-accent-shadow-hover: 0 6px 18px rgba(252, 76, 2, 0.40);

  --siaf-indigo: #6366F1;            /* Acento Índigo Secundario */
  --siaf-indigo-light: #C7D2FE;      /* Borde Foco / Ring */

  /* =========================================================================
     2. MODO CLARO CORPORATIVO (DEFAULT SIAFWEB CANVAS)
     ========================================================================= */
  --bg-base: #F8FAFC;                /* Canvas Base Claro Limpio */
  --bg-card: #FFFFFF;                /* Superficie Blanca Pura */
  --bg-card-hover: #F8FAFC;          /* Hover de Tarjeta */
  --bg-header: #1B2654;              /* Barra Superior Azul Marino */
  --bg-subtle: #F1F5F9;              /* Contenedores Auxiliares */
  --bg-nav-track: #EEF2F6;           /* Track Segmentado Gris Suave */
  --bg-table-th: #1B2654;            /* Encabezados de Tabla Azul Marino */
  --bg-table-th-light: #F8FAFC;      /* Encabezado alternativo claro */
  --bg-table-zebra: #FAFAFC;         /* Filas Pares Zebra Suave */
  --bg-table-hover: #EEF2FF;         /* Hover de Fila */

  --border-subtle: #E2E8F0;          /* Borde Fino Estándar */
  --border-card: rgba(226, 232, 240, 0.85); /* Borde Tarjeta */
  --border-focus: #FC4C02;           /* Foco Naranja */

  --text-main: #0F172A;              /* Texto Primario Carbón Oscuro */
  --text-muted: #475569;             /* Texto Secundario Nítido */
  --text-dim: #94A3B8;               /* Texto Tenue / Metadata */
  --text-header: #FFFFFF;            /* Texto de Barra Superior */

  /* =========================================================================
     3. SEMÁFORO DE ESTADO AUDITADO (CONTRASTES ACCESIBLES WCAG AAA)
     ========================================================================= */
  /* Éxito / Disponible / Atendida */
  --status-success: #10B981;
  --status-success-bg: #ECFDF5;
  --status-success-border: #A7F3D0;
  --status-success-text: #065F46;

  /* Alerta / En Espera / Moderado */
  --status-warning: #F59E0B;
  --status-warning-bg: #FFFBEB;
  --status-warning-border: #FDE68A;
  --status-warning-text: #92400E;

  /* Crítico / Abandono / Saturación */
  --status-danger: #EF4444;
  --status-danger-bg: #FEF2F2;
  --status-danger-border: #FECACA;
  --status-danger-text: #991B1B;

  /* Info / Conexión */
  --status-info: #3B82F6;
  --status-info-bg: #EFF6FF;
  --status-info-border: #BFDBFE;
  --status-info-text: #1E40AF;

  /* Neutro / Desconectado / Inactivo */
  --status-neutral: #64748B;
  --status-neutral-bg: #F1F5F9;
  --status-neutral-border: #CBD5E1;
  --status-neutral-text: #334155;

  /* Aliases de Compatibilidad */
  --accent-cyan: var(--siaf-primary);
  --accent-emerald: var(--status-success);
  --accent-amber: var(--status-warning);
  --accent-crimson: var(--status-danger);
  --accent-purple: var(--siaf-indigo);
  --accent-blue: var(--status-info);

  /* =========================================================================
     4. TIPOGRAFÍA CORPORATIVA ESTRICTA
     ========================================================================= */
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family: 'Montserrat', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* =========================================================================
     5. SOMBRAS, ELEVACIONES Y RADIOS MULTICAPA 2026
     ========================================================================= */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-pill: 9999px;

  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 6px -2px rgba(15, 23, 42, 0.02);
  --shadow-card-hover: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-header: 0 2px 10px rgba(15, 23, 42, 0.15);
  --shadow-dropdown: 0 10px 25px -5px rgba(15, 23, 42, 0.25), 0 8px 10px -6px rgba(15, 23, 42, 0.15);
}

/* =========================================================================
   MODO OSCURO EJECUTIVO (SIAF 4 DARK NOC / WALLBOARD)
   ========================================================================= */
body.theme-dark {
  --bg-base: #0F172A;                /* Fondo Noche Pizarra */
  --bg-card: #1E293B;                /* Superficie Pizarra Media */
  --bg-card-hover: #27354E;
  --bg-header: #0B1120;              /* Header Noche Profundo */
  --bg-subtle: #1E293B;
  --bg-nav-track: rgba(15, 23, 42, 0.85);
  --bg-table-th: #0F172A;
  --bg-table-th-light: #1E293B;
  --bg-table-zebra: #1A2333;
  --bg-table-hover: #29354F;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.10);
  --border-focus: #FC4C02;

  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --text-header: #FFFFFF;

  --status-success-bg: rgba(16, 185, 129, 0.18);
  --status-success-border: rgba(16, 185, 129, 0.35);
  --status-success-text: #34D399;

  --status-warning-bg: rgba(245, 158, 11, 0.18);
  --status-warning-border: rgba(245, 158, 11, 0.35);
  --status-warning-text: #FBBF24;

  --status-danger-bg: rgba(239, 68, 68, 0.20);
  --status-danger-border: rgba(239, 68, 68, 0.35);
  --status-danger-text: #F87171;

  --status-info-bg: rgba(59, 130, 246, 0.18);
  --status-info-border: rgba(59, 130, 246, 0.35);
  --status-info-text: #60A5FA;

  --status-neutral-bg: rgba(100, 116, 139, 0.18);
  --status-neutral-border: rgba(100, 116, 139, 0.35);
  --status-neutral-text: #CBD5E1;

  --accent-cyan: #38BDF8;
  --shadow-card: 0 2px 5px rgba(0, 0, 0, 0.45);
  --shadow-card-hover: 0 6px 14px rgba(0, 0, 0, 0.60);
  --shadow-header: 0 4px 14px rgba(0, 0, 0, 0.50);
}

/* =========================================================================
   REGLAS GLOBALES Y COMPONENTES
   ========================================================================= */
body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* BARRA DE NAVEGACIÓN SEGMENTADA MODERNA (SEGMENTED PILL CONTROLLER) */
.header-nav-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg-nav-track) !important;
  padding: 4px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  gap: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-sans);
  white-space: nowrap;
}

.nav-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.4);
}

body.theme-dark .nav-tab-btn:hover {
  background: rgba(255, 255, 255, 0.07);
}

.nav-tab-btn.active {
  color: #FFFFFF !important;
  background: var(--siaf-primary) !important;
  box-shadow: 0 2px 8px rgba(27, 38, 84, 0.35);
  font-weight: 700;
}

body.theme-dark .nav-tab-btn.active {
  background: var(--siaf-accent) !important;
  box-shadow: var(--siaf-accent-shadow);
}

/* PÍLDORA CONTADORA EN PESTAÑA ACTIVA */
.badge-fop-live {
  font-size: 9.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

/* BOTONES PRIMARIOS Y CTA ACCIÓN (CLICK-TO-CALL, ACCIÓN RÁPIDA) */
.rec-btn-call,
.btn-cta-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-sans);
  background: var(--siaf-accent-gradient);
  border: 1px solid var(--siaf-accent);
  color: #FFFFFF !important;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(252, 76, 2, 0.25);
  transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}

.rec-btn-call:hover:not(:disabled),
.btn-cta-accent:hover:not(:disabled) {
  background: var(--siaf-accent-gradient-hover);
  transform: translateY(-1px);
  box-shadow: var(--siaf-accent-shadow);
}

.rec-btn-call:active:not(:disabled),
.btn-cta-accent:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(252, 76, 2, 0.3);
}

/* BOTONES DE EXPORTACIÓN (EXCEL & PDF) */
.reports-btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.reports-btn-export:hover {
  transform: translateY(-1px);
}

.reports-btn-export:active {
  transform: translateY(0);
}

.btn-export-excel {
  background: linear-gradient(135deg, #107C41 0%, #0B5B2E 100%);
  color: #FFFFFF;
}

.btn-export-excel:hover {
  box-shadow: 0 4px 12px rgba(16, 124, 65, 0.35);
}

.btn-export-pdf {
  background: linear-gradient(135deg, #D83B01 0%, #A92E01 100%);
  color: #FFFFFF;
}

.btn-export-pdf:hover {
  box-shadow: 0 4px 12px rgba(216, 59, 1, 0.35);
}

/* PÍLDORAS SEMÁFORO (STATUS BADGES) */
.pill-badge, .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}

.pill-success {
  background: var(--status-success-bg);
  color: var(--status-success-text);
  border-color: var(--status-success-border);
}

.pill-warning {
  background: var(--status-warning-bg);
  color: var(--status-warning-text);
  border-color: var(--status-warning-border);
}

.pill-danger {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
  border-color: var(--status-danger-border);
}

.pill-neutral {
  background: var(--status-neutral-bg);
  color: var(--status-neutral-text);
  border-color: var(--status-neutral-border);
}

/* =========================================================================
   6. ARQUITECTURA RESPONSIVA TOTAL (ZERO OVERFLOW / VIEWPORT FIT 2026)
   Soporte para 1366x768 (Laptops), 1920x1080 (FHD) y Ultra-Wide (21:9 / 32:9)
   ========================================================================= */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.app-viewport {
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Grid Fluido de Tarjetas KPI Superiores (Estándar 2026) */
.kpi-quick-strip {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  gap: 8px !important;
}

/* Panel FOP (Extensiones): repeat(auto-fill, minmax(210px, 1fr)) */
.fop-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
  gap: 8px !important;
}

/* Contenedores de Tablas Responsivas con Scrollbar Sutil */
.table-responsive-wrapper,
.reports-table-wrap,
.recovery-table-container,
.outbound-table-container,
.reports-heatmap-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

/* Scrollbars personalizados sutiles */
.table-responsive-wrapper::-webkit-scrollbar,
.reports-heatmap-wrapper::-webkit-scrollbar,
.reports-body-container::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.table-responsive-wrapper::-webkit-scrollbar-track,
.reports-heatmap-wrapper::-webkit-scrollbar-track,
.reports-body-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
}

body.theme-dark .table-responsive-wrapper::-webkit-scrollbar-track,
body.theme-dark .reports-heatmap-wrapper::-webkit-scrollbar-track,
body.theme-dark .reports-body-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.table-responsive-wrapper::-webkit-scrollbar-thumb,
.reports-heatmap-wrapper::-webkit-scrollbar-thumb,
.reports-body-container::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb:hover,
.reports-heatmap-wrapper::-webkit-scrollbar-thumb:hover,
.reports-body-container::-webkit-scrollbar-thumb:hover {
  background: var(--siaf-accent);
}

.table-responsive-wrapper table,
.reports-table-agents,
.reports-table-heatmap,
.recuperacion-table,
.outbound-table {
  width: 100%;
  table-layout: auto;
}

/* Truncado con Ellipsis en Celdas de Trazabilidad y Textos Largos */
.cell-ellipsis,
.reports-table-agents td.agent-name,
.recuperacion-table td.trace-cell {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Controlador Segmentado Moderno para Reportes (4 Dimensiones) */
.reports-segmented-controller {
  display: inline-flex;
  align-items: center;
  background: var(--bg-nav-track);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3px;
  gap: 3px;
  flex-wrap: wrap;
}

/* Media Queries para Pantallas Medianas / Laptop (1400px y 1200px) */
@media (max-width: 1400px) {
  .top-header-strip {
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 12px;
  }

  .header-nav-tabs,
  .reports-segmented-controller {
    flex-wrap: wrap;
  }

  .reports-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .reports-chart-card {
    min-height: 240px;
  }

  .mini-chart-container {
    height: 60px;
  }
}

@media (max-width: 1200px) {
  .kpi-quick-strip {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  }

  .reports-kpi-row {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
  }

  .reports-daily-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================================================
   ESTILOS DE IMPRESIÓN Y REGLAS EDITORIALES PDF
   ========================================================================= */
@media print {
  body {
    background: #FFFFFF !important;
    color: #0F172A !important;
    font-family: 'Montserrat', sans-serif !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .top-header-strip,
  .reports-toolbar,
  #theme-toggle-btn,
  .nav-tab-btn,
  .reports-btn-export,
  #toast-container {
    display: none !important;
  }

  .reports-body-container {
    overflow: visible !important;
    height: auto !important;
  }

  #pdf-header-institutional {
    display: block !important;
  }
}


/* =========================================================================
   MÓDULO DE AUTENTICACIÓN CORPORATIVA (FOLIO IT #064)
   ========================================================================= */

/* Pantalla completa de Login */
#auth-login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 30%, #1B2654 0%, #0F172A 70%, #080C14 100%);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.login-card-container {
  width: 100%;
  max-width: 440px;
  background: rgba(30, 41, 59, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 25px rgba(16, 185, 129, 0.15);
  padding: 36px 32px 28px;
  color: #F8FAFC;
  box-sizing: border-box;
  animation: loginFadeIn 0.35s ease-out;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #1B2654 0%, #0F172A 100%);
  border: 2px solid #10B981;
  border-radius: 14px;
  font-weight: 800;
  font-size: 22px;
  color: #FC4C02;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
  margin-bottom: 12px;
}

.login-title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #FFFFFF;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.login-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: #10B981;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
}

.login-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.5), transparent);
  margin: 18px 0 22px;
  border: none;
}

/* Alertas de Login */
.login-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 18px;
  display: none;
  animation: shakeAlert 0.3s ease-in-out;
}

@keyframes shakeAlert {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.login-alert.danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #EF4444;
  color: #FCA5A5;
}

.login-alert.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #F59E0B;
  color: #FCD34D;
}

.login-alert.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3B82F6;
  color: #93C5FD;
}

/* Campos de Formulario */
.login-form-group {
  margin-bottom: 18px;
  text-align: left;
}

.login-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 12px;
  color: #64748B;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.login-input {
  width: 100%;
  padding: 11px 40px 11px 38px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  color: #FFFFFF;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.login-input:focus {
  outline: none;
  border-color: #10B981;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.20);
}

.login-password-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: #94A3B8;
  padding: 4px;
  font-size: 15px;
  display: flex;
  align-items: center;
  user-select: none;
  transition: color 0.15s;
}

.login-password-toggle:hover {
  color: #10B981;
}

/* Botón de Acción */
.login-submit-btn {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border: none;
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.login-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.login-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.login-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-footer-security {
  margin-top: 22px;
  text-align: center;
  font-size: 11px;
  color: #64748B;
  line-height: 1.4;
}

/* =========================================================================
   BARRA SUPERIOR (TOP BAR) - CONTROL DE SESIÓN
   ========================================================================= */
.user-session-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 4px 8px 4px 10px;
  font-size: 11px;
  color: #FFFFFF;
}

body:not(.theme-dark) .user-session-pill {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: #A7F3D0;
}

.btn-logout-header {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-logout-header:hover {
  background: #EF4444;
  color: #FFFFFF;
  border-color: #EF4444;
}
