@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;700&display=swap');

/* ══════════════════════════════════════════════════════════════
GENESYS QUEUE ASSIGNER — PREMIUM UI 
Colores Corporativos: Naranja #ff6600 + Blanco + Negro
   ══════════════════════════════════════════════════════════════ */

:root {
  /* ── COLORES CORPORATIVOS (MANTENIDOS) ── */
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface2: #fafafa;
  --surface3: #f0f0f0;
  --border: #e8e8e8;
  --border2: #d0d0d0;

  /* Acento NARANJA CORPORATIVO */
  --accent: #ff6600;
  --accent-light: #ff8c3a;
  --accent-lighter: #ffa366;
  --accent-dark: #e05500;
  --accent-bg: rgba(255, 102, 0, 0.06);
  --accent-bg-hover: rgba(255, 102, 0, 0.12);
  --accent-border: rgba(255, 102, 0, 0.25);
  --accent-glow: rgba(255, 102, 0, 0.25);

  /* Semánticos */
  --green: #16a34a;
  --green-light: #22c55e;
  --red: #dc2626;
  --red-light: #ef4444;
  --yellow: #d97706;
  --blue: #2563eb;
  --purple: #9333ea;

  /* Texto NEGRO (Corporativo) */
  --text: #111111;
  --text2: #555555;
  --text3: #888888;
  --text4: #ffffff;

  /* Tipografía */
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Space Grotesk', sans-serif;

  /* Espaciado y Radio */
  --radius: 10px;
  --radius-lg: 14px;
  --radius-sm: 6px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Sombras Premium */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10), 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);

  /* Transiciones suaves */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══ BASE RESET ═══ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.5;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent-bg);
  color: var(--text);
}

/* ═══ SCROLLBAR PERSONALIZADA ═══ */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

/* ═══ HEADER — Naranja Corporativo ═══ */
header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  height: 60px;
  background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  position: relative;
  z-index: 50;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, transparent 0%, #ff6600 20%, #ff8c3a 50%, #ff6600 80%, transparent 100%);
  background-size: 200% 100%;
  animation: headerGlow 6s ease-in-out infinite;
}

@keyframes headerGlow {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.logo-iceberg {
  position: relative;
  width: 50px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-right: 6px;
  margin-bottom: 9px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .3));
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.logo-iceberg:hover {
  transform: scale(1.05) rotate(-3deg);
}

.logo-iceberg svg {
  width: 100%;
  height: 100%;
  animation: icebergFloat 3s ease-in-out infinite;
}

header h1 {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .3);
  margin-left: 1px;
}

header span {
  font-size: 12px;
  font-weight: 400;
  color: #999;
  margin-left: 6px;
}

.proxy-badge {
  margin-left: auto;
  font-size: 11px;
  font-family: var(--mono);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(22, 163, 74, .12);
  border: 1px solid rgba(22, 163, 74, .3);
  color: #16a34a;
  font-weight: 600;
  letter-spacing: .03em;
  transition: all 0.2s ease;
}

.proxy-badge:hover {
  background: rgba(22, 163, 74, .2);
  box-shadow: 0 0 12px rgba(22, 163, 74, .2);
  transform: translateY(-1px);
}

/* ═══ SIDEBAR — Dark Profesional ═══ */
aside {
  display: flex;
  flex-direction: column;
  width: 260px;
  min-width: 260px;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 4px 0 24px rgba(0, 0, 0, .15);
}

.aside-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

.aside-scroll::-webkit-scrollbar {
  width: 5px;
}

.aside-scroll::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.section-label {
  font-size: 12px;
  font-family: var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #ffffff;
  padding: 20px 16px 10px;
  font-weight: 600;
}

.token-wrap {
  padding: 0 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.token-input {
  width: 100%;
  background: #222;
  border: 3px solid #333;
  border-radius: var(--radius);
  color: #eee;
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 13px;
  resize: none;
  height: 70px;
  line-height: 1.6;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2);
}

.token-input:hover {
  border-color: #555;
  background: #2a2a2a;
}

.token-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, .15), 0 0 16px rgba(255, 102, 0, .1), inset 0 2px 4px rgba(0, 0, 0, .2);
}

.token-input::placeholder {
  color: #666;
}

.token-hint {
  font-size: 10px;
  color: #777;
  margin-top: 8px;
  line-height: 1.5;
  font-family: var(--mono);
}

.token-hint code {
  color: var(--accent-light);
  background: rgba(255, 102, 0, .1);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 9px;
}

.token-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: var(--mono);
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #222;
  border: 1px solid #333;
  font-weight: 600;
  color: #ccc;
  transition: all 0.25s ease;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.dot.ok {
  background: var(--green-light);
  box-shadow: 0 0 10px rgba(34, 197, 94, .5), 0 0 4px rgba(34, 197, 94, .8);
  animation: pulseDot 2s infinite;
}

.dot.err {
  background: var(--red-light);
  box-shadow: 0 0 10px rgba(239, 68, 68, .5), 0 0 4px rgba(239, 68, 68, .8);
  animation: pulseDot 1s infinite;
}

.dot.checking {
  background: var(--yellow);
  box-shadow: 0 0 10px rgba(217, 119, 6, .5);
  animation: pulse 1s infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* Stats Grid - Cards Glass */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 14px 16px;
}

.stat-card {
  background: linear-gradient(135deg, #2a2a2a 0%, #222 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: default;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  background: linear-gradient(135deg, #333 0%, #2a2a2a 100%);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card .val {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  transition: all 0.3s ease;
}

.stat-card:hover .val {
  transform: scale(1.05);
}

.stat-card .lbl {
  font-size: 9px;
  color: #888;
  margin-top: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
}

.val.green {
  color: var(--green-light);
  text-shadow: 0 0 12px rgba(34, 197, 94, .3);
}

.val.red {
  color: var(--red-light);
  text-shadow: 0 0 12px rgba(239, 68, 68, .3);
}

.val.blue {
  color: var(--accent-light);
  text-shadow: 0 0 12px rgba(255, 140, 58, .4);
}

/* Progress Bar Premium */
.progress-bar-wrap {
  padding: 0 14px 14px;
  display: none;
}

.progress-bar-wrap.visible {
  display: block;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-bg {
  height: 6px;
  background: #222;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .3);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6600 0%, #22c55e 100%);
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(.25, .46, .45, .94);
  width: 0%;
  box-shadow: 0 0 14px rgba(255, 102, 0, .4), 0 0 28px rgba(34, 197, 94, .2);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent);
  animation: progressShine 2.5s ease-in-out infinite;
}

@keyframes progressShine {
  0% {
    left: -100%;
  }

  50%,
  100% {
    left: 100%;
  }
}

.progress-label {
  font-size: 10px;
  font-family: var(--mono);
  color: #777;
  margin-top: 6px;
  text-align: right;
}

/* ═══ BOTONES PREMIUM ═══ */
.btn-run-wrap {
  padding: 14px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, #151515 0%, #1a1a1a 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-run {
  width: 100%;
  padding: 12px 16px;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .08em;
  background: linear-gradient(135deg, #ff6600 0%, #ff8c3a 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(255, 102, 0, .35), 0 2px 6px rgba(255, 102, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .2);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.btn-run::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
  transition: left 0.5s ease;
}

.btn-run:hover:not(:disabled)::before {
  left: 100%;
}

.btn-run:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff7722 0%, #ffa055 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 102, 0, .45), 0 4px 12px rgba(255, 102, 0, .3);
}

.btn-run:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn-run:disabled {
  opacity: .35;
  cursor: not-allowed;
  filter: grayscale(.4);
}

.btn-run.running {
  background: #222;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  animation: btnPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(255, 102, 0, .2), inset 0 0 20px rgba(255, 102, 0, .05);
}

@keyframes btnPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 102, 0, .4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(255, 102, 0, 0);
  }
}

.btn-remove {
  background: transparent;
  border: 1.5px solid rgba(239, 68, 68, .35);
  color: #f87171;
  box-shadow: none;
}

.btn-remove:hover:not(:disabled) {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
  border-color: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(220, 38, 38, .4);
}

.btn-verify {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  font-size: 11px;
  font-family: var(--mono);
  background: #222;
  border: 1.5px solid var(--accent-border);
  color: var(--accent-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
  font-weight: 600;
}

.btn-verify:hover:not(:disabled) {
  background: rgba(255, 102, 0, .12);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(255, 102, 0, .15);
  transform: translateX(3px);
}

.btn-verify-users:hover:not(:disabled) {
  background: rgba(217, 119, 6, .12);
  border-color: var(--yellow);
  color: var(--yellow);
  transform: translateY(-1px);
}

.btn-disconnect {
  background: transparent;
  border: 1.5px solid rgba(239, 68, 68, .3);
  color: #f87171;
  box-shadow: none;
}

.btn-disconnect:hover:not(:disabled) {
  background: rgba(239, 68, 68, .1);
  border-color: var(--red-light);
  box-shadow: 0 0 12px rgba(239, 68, 68, .2);
}

#disconnectPanel {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(239, 68, 68, 0.2);
  animation: fadeInUp 0.2s ease;
}

#disconnectPanel.open {
  display: flex;
}

.disc-label {
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  color: #f87171;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.disc-input {
  width: 100%;
  background: #222;
  border: 1.5px solid #333;
  border-radius: var(--radius-sm);
  color: #eee;
  font-family: var(--mono);
  font-size: 11px;
  padding: 8px 11px;
  outline: none;
  transition: all 0.2s ease;
}

.disc-input:hover {
  border-color: #555;
}

.disc-input:focus {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.disc-input::placeholder {
  color: #555;
}

.disc-actions {
  display: flex;
  gap: 6px;
  align-items: stretch;
  width: 100%;
  overflow: hidden;
}

.disc-btn-check {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 600;
  background: transparent;
  border: 1.5px solid #444;
  border-radius: var(--radius-sm);
  color: #aaa;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.disc-btn-check:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(255, 102, 0, 0.08);
}

.disc-btn-check:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.disc-btn-go {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-sm);
  color: #f87171;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.disc-btn-go:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

.disc-btn-go:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.disc-btn-cancel {
  width: 28px;
  min-width: 28px;
  height: auto;
  min-height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid #333;
  border-radius: var(--radius-sm);
  color: #666;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.disc-btn-cancel:hover {
  border-color: #555;
  color: #aaa;
  background: #2a2a2a;
}

#discResult {
  font-size: 11px;
  font-family: var(--mono);
  color: #aaa;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ═══ MAIN CONTENT ═══ */
.main {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ═══ TABS ═══ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  background: var(--surface);
  flex-shrink: 0;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 0 16px;
  height: 52px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text3);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: all 0.25s ease;
  user-select: none;
  font-weight: 600;
  letter-spacing: .03em;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  position: relative;
}

.tab::after {
  content: '';
  position: absolute;
  bottom: -2.5px;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.tab:hover {
  color: var(--text2);
  background: rgba(255, 102, 0, .02);
}

.tab:hover::after {
  transform: scaleX(0.4);
}

.tab.active {
  color: var(--accent);
  background: linear-gradient(180deg, rgba(255, 102, 0, .03) 0%, transparent 100%);
}

.tab.active::after {
  transform: scaleX(1);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: var(--surface2);
  border-radius: var(--radius-full);
  font-size: 10px;
  color: var(--text3);
  padding: 0 6px;
  font-weight: 700;
  border: 1px solid var(--border);
  transition: all 0.25s ease;
}

.tab.active .tab-badge {
  background: rgba(255, 102, 0, .1);
  color: var(--accent);
  border-color: rgba(255, 102, 0, .25);
  box-shadow: 0 2px 8px rgba(255, 102, 0, .15);
}

/* ═══ PANELS ═══ */
.panel {
  flex: 1;
  overflow: auto;
  display: none;
  background: var(--bg);
}

.panel.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* ═══ SERVICIOS — REDESIGN PREMIUM ═══ */
.servicios-header {
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface2) 100%);
  position: relative;
  overflow: hidden;
}

.servicios-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 102, 0, .3), var(--accent), rgba(255, 102, 0, .3), transparent);
}

.servicios-header p {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  flex: 1;
}

.servicios-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  padding: 12px 20px 20px;
  min-height: 0;
}

/* ═══ TARJETA DE SERVICIO ═══ */
.servicio-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.servicio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3.5px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-light) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  z-index: 1;
}

.servicio-card:hover {
  border-color: rgba(255, 102, 0, .25);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 102, 0, .08);
}

.servicio-card:hover::before {
  opacity: 1;
}

.servicio-card.open {
  border-color: rgba(255, 102, 0, .35);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 102, 0, .12);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface2) 100%);
}

.servicio-card.open::before {
  opacity: 1;
}

/* ═══ CABECERA DEL SERVICIO ═══ */
.servicio-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 14px 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  position: relative;
}

.servicio-head:hover {
  background: rgba(255, 102, 0, .03);
}

/* Icono decorativo del servicio */
.servicio-head::before {
  content: '🗂';
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .1));
}

.servicio-card.open .servicio-head::before {
  transform: scale(1.15);
}

.servicio-name {
  font-size: 13.5px;
  font-weight: 700;
  flex: 1;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.servicio-card.open .servicio-name {
  color: var(--accent-dark);
}

/* Badge contador mejorado */
.servicio-count {
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(255, 102, 0, .08) 0%, rgba(255, 102, 0, .04) 100%);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(255, 102, 0, .2);
  letter-spacing: .03em;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(255, 102, 0, .08);
}

.servicio-card:hover .servicio-count {
  background: linear-gradient(135deg, rgba(255, 102, 0, .14) 0%, rgba(255, 102, 0, .08) 100%);
  border-color: rgba(255, 102, 0, .35);
  box-shadow: 0 3px 10px rgba(255, 102, 0, .15);
}

.servicio-card.open .servicio-count {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  border-color: var(--accent-dark);
  box-shadow: 0 3px 12px rgba(255, 102, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}

/* Chevron mejorado */
.servicio-chevron {
  color: var(--text3);
  font-size: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.servicio-card:hover .servicio-chevron {
  color: var(--accent);
  border-color: rgba(255, 102, 0, .2);
  background: rgba(255, 102, 0, .05);
}

.servicio-card.open .servicio-chevron {
  transform: rotate(90deg);
  color: var(--accent);
  border-color: rgba(255, 102, 0, .3);
  background: rgba(255, 102, 0, .08);
}

/* ═══ CUERPO DEL SERVICIO (expandido) ═══ */
.servicio-body {
  display: none;
  padding: 0 18px 18px 22px;
  background: transparent;
  border-top: 1px solid rgba(255, 102, 0, .1);
  margin-top: 0;
}

.servicio-card.open .servicio-body {
  display: block;
  animation: servicioExpand 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding-top: 16px;
}

@keyframes servicioExpand {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══ EDITAR NOMBRE ═══ */
.servicio-edit-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}

.edit-name-input {
  flex: 1;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--sans);
  padding: 8px 14px;
  outline: none;
  transition: all 0.25s ease;
  letter-spacing: -0.01em;
}

.edit-name-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, .1), var(--shadow-sm);
  background: var(--surface);
}

.btn-del-servicio {
  padding: 8px 14px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 600;
  background: transparent;
  border: 1.5px solid rgba(239, 68, 68, .25);
  color: var(--red);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-del-servicio:hover {
  border-color: var(--red);
  color: #fff;
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  box-shadow: 0 4px 14px rgba(220, 38, 38, .3);
  transform: translateY(-1px);
}

.btn-del-servicio:active {
  transform: translateY(0) scale(0.97);
}

/* ═══ LISTA DE COLAS ═══ */
.colas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  min-height: 38px;
  max-height: 130px;
  overflow-y: auto;
  padding: 12px;
  background: var(--surface);
  border: 1.5px dashed rgba(255, 102, 0, .15);
  border-radius: var(--radius);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.colas-list:empty::after {
  content: 'Sin colas asignadas — añade una abajo';
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text3);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-style: italic;
}

.borrar-token {
  background: linear-gradient(135deg, rgba(255, 102, 0, .1) 0%, rgba(255, 102, 0, 0.35) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 102, 0, 0.5);
  box-shadow: 0 4px 12px rgba(255, 102, 0, .15), inset 0 1px 0 rgba(255, 255, 255, .15);
  cursor: pointer;
  color: var(--text4);
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 15px;
  margin-top: 5px;
  width: 100%;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.borrar-token::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
  transform: skewX(-25deg);
  transition: left 0.5s ease;
  pointer-events: none;
}


.borrar-token:hover::before {
  left: 130%;
}


.borrar-token:hover {
  background: linear-gradient(rgba(255, 102, 0, 0.651), 135deg, rgba(255, 102, 0, .3) 0%, 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(255, 102, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .2);
  transform: translateY(-1px);
}

/* Efecto al hacer clic */
.borrar-token:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(255, 102, 0, .2);
}

.servicio-card.open .colas-list {
  border-color: rgba(255, 102, 0, .25);
  background: linear-gradient(135deg, rgba(255, 102, 0, .02) 0%, rgba(255, 102, 0, .01) 100%);
}

/* ═══ TAG DE COLA — REDESIGN ═══ */
.cola-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(255, 102, 0, .06) 0%, rgba(255, 102, 0, .02) 100%);
  border: 1.5px solid rgba(255, 102, 0, .2);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  padding: 5px 10px 5px 12px;
  border-radius: var(--radius-full);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.cola-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2.5px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.cola-tag span.cola-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.cola-tag:hover {
  background: linear-gradient(135deg, rgba(255, 102, 0, .12) 0%, rgba(255, 102, 0, .06) 100%);
  border-color: var(--accent);
  box-shadow: 0 3px 12px rgba(255, 102, 0, .18);
  transform: translateY(-2px) scale(1.02);
}

.cola-tag:hover::before {
  opacity: 1;
}

/* Botón quitar cola */
.cola-tag .rm {
  cursor: pointer;
  color: var(--text3);
  font-size: 14px;
  line-height: 1;
  transition: all 0.2s ease;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.cola-tag .rm:hover {
  color: #fff;
  background: var(--red);
  transform: scale(1.2) rotate(90deg);
  box-shadow: 0 2px 6px rgba(220, 38, 38, .4);
}

/* ═══ ACCIONES INFERIORES ═══ */
.servicio-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.add-cola-input {
  flex: 1;
  min-width: 200px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 9px 14px;
  outline: none;
  transition: all 0.25s ease;
}

.add-cola-input:hover {
  border-color: var(--border2);
  background: var(--surface2);
}

.add-cola-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, .1), var(--shadow-sm);
  background: var(--surface);
}

.add-cola-input::placeholder {
  color: var(--text3);
  font-style: italic;
}

.btn-add-cola {
  padding: 9px 16px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
  background: transparent;
  border: 1.5px solid rgba(22, 163, 74, .3);
  color: var(--green);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-add-cola:hover {
  border-color: var(--green);
  color: #fff;
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  box-shadow: 0 4px 14px rgba(22, 163, 74, .3);
  transform: translateY(-2px);
}

.btn-add-cola:active {
  transform: translateY(0) scale(0.97);
}

.btn-usar-servicio {
  padding: 9px 20px;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 700;
  background: linear-gradient(135deg, #ff6600 0%, #ff8c3a 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(255, 102, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .2);
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.btn-usar-servicio::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
  transition: left 0.5s ease;
}

.btn-usar-servicio:hover {
  background: linear-gradient(135deg, #e05500 0%, #ff7722 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 102, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.btn-usar-servicio:hover::before {
  left: 100%;
}

.btn-usar-servicio:active {
  transform: translateY(0) scale(0.98);
}

/* ═══ BOTÓN NUEVO SERVICIO ═══ */
.btn-nuevo {
  padding: 8px 18px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  overflow: hidden;
}

.btn-nuevo::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
  transition: left 0.5s ease;
}

.btn-nuevo:hover {
  background: rgba(255, 102, 0, .1);
  box-shadow: 0 4px 14px rgba(255, 102, 0, .2);
  transform: translateY(-2px);
}

.btn-nuevo:hover::before {
  left: 100%;
}

.btn-nuevo:active {
  transform: translateY(0) scale(0.97);
}

/* ═══ ESTADO VACÍO DEL PANEL ═══ */
.servicios-grid:empty::after {
  content: '📁 No hay servicios creados';
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
  color: var(--text3);
  font-size: 14px;
  font-weight: 500;
  width: 100%;
}

/* ═══ SCROLLBAR PERSONALIZADA PARA SERVICIOS ═══ */
.servicios-grid::-webkit-scrollbar {
  width: 6px;
}

.servicios-grid::-webkit-scrollbar-track {
  background: transparent;
}

.servicios-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 102, 0, .2), rgba(255, 102, 0, .4));
  border-radius: 3px;
}

.servicios-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 102, 0, .35), rgba(255, 102, 0, .6));
}

/* ═══ STAGGER ANIMATION PARA LAS TARJETAS ═══ */
.servicio-card {
  animation: cardFadeIn 0.3s ease-out both;
}

.servicio-card:nth-child(1) {
  animation-delay: 0.02s;
}

.servicio-card:nth-child(2) {
  animation-delay: 0.05s;
}

.servicio-card:nth-child(3) {
  animation-delay: 0.08s;
}

.servicio-card:nth-child(4) {
  animation-delay: 0.11s;
}

.servicio-card:nth-child(5) {
  animation-delay: 0.14s;
}

.servicio-card:nth-child(n+6) {
  animation-delay: 0.17s;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══ DATOS / PASTE ZONE ═══ */
.datos-header {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  background: var(--surface);
}

.add-single-wrap {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.add-single-input {
  flex: 1;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 12px;
  outline: none;
  transition: all 0.2s ease;
}

.add-single-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, .1);
}

.btn-add-single {
  padding: 6px 16px;
  font-size: 11px;
  font-family: var(--mono);
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-add-single:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 102, 0, .3);
}

.paste-zone {
  flex: 1;
  overflow: auto;
  padding: 0;
}

.paste-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 320px;
  gap: 16px;
  color: var(--text3);
  pointer-events: none;
}

.paste-placeholder .icon {
  font-size: 48px;
  opacity: .6;
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.paste-placeholder h3 {
  font-size: 17px;
  color: var(--text2);
  font-weight: 600;
}

.paste-placeholder p {
  font-size: 13px;
  color: var(--text3);
  max-width: 340px;
  line-height: 1.6;
  text-align: center;
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

/* ═══ TABLAS PREMIUM ═══ */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  font-family: var(--mono);
  background: var(--surface);
}

table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  padding: 7px 12px;
  line-height: 1.4;
}

/* Primera columna (checkbox) más estrecha */
table td:first-child,
table th:first-child {
  max-width: 50px;
  min-width: 50px;
  padding: 9px 8px;
  text-align: center;
}

/* Segunda columna (contador #) */
table td:nth-child(2),
table th:nth-child(2) {
  max-width: 45px;
  min-width: 45px;
  text-align: center;
  padding: 7px 6px;
}

/* Columnas de colas */
table td:nth-child(n+3),
table th:nth-child(n+3) {
  max-width: 160px;
  min-width: 80px;
  text-align: center;
}

/* ═══ CHECKBOXES PERSONALIZADOS ═══ */
.user-select-checkbox,
#selectAllUsers {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  border: 2px solid rgba(255, 102, 0, .4);
  border-radius: 4px;
  background: var(--surface2);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  vertical-align: middle;
}

.user-select-checkbox:hover,
#selectAllUsers:hover {
  border-color: var(--accent);
  background: rgba(255, 102, 0, .08);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, .1);
  transform: scale(1.05);
}

.user-select-checkbox:checked,
#selectAllUsers:checked {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border-color: var(--accent-dark);
  box-shadow: 0 2px 8px rgba(255, 102, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.user-select-checkbox:checked::after,
#selectAllUsers:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.user-select-checkbox:checked:hover,
#selectAllUsers:checked:hover {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  box-shadow: 0 3px 12px rgba(255, 102, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.user-select-checkbox:focus-visible,
#selectAllUsers:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.user-select-checkbox:active,
#selectAllUsers:active {
  transform: scale(0.95);
}

thead th {
  background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
  padding: 9px 12px;
  text-align: left;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffffff !important;
  border-bottom: 2.5px solid var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  position: sticky;
  top: 0;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

thead th:first-child {
  border-radius: var(--radius-lg) 0 0 0;
}

thead th:last-child {
  border-radius: 0 var(--radius-lg) 0 0;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: all 0.2s ease;
}

tbody tr:hover {
  background: rgba(255, 102, 0, .04);
  box-shadow: inset 4px 0 0 var(--accent-light);
}

tbody tr.ok {
  background: rgba(22, 163, 74, .04);
}

tbody tr.ok td:first-child {
  border-left: 3px solid var(--green);
  box-shadow: -2px 0 8px rgba(22, 163, 74, .15);
}

tbody tr.ok:hover {
  background: rgba(22, 163, 74, .08);
}

tbody tr.err {
  background: rgba(220, 38, 38, .04);
}

tbody tr.err td:first-child {
  border-left: 3px solid var(--red);
  box-shadow: -2px 0 8px rgba(220, 38, 38, .15);
}

tbody tr.err:hover {
  background: rgba(220, 38, 38, .08);
}

tbody tr.warn {
  background: rgba(217, 119, 6, .04);
}

tbody tr.warn td:first-child {
  border-left: 3px solid var(--yellow);
}

tbody td {
  padding: 7px 12px;
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

tbody td.email {
  color: var(--accent);
  font-weight: 500;
}

.row-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .02em;
  transition: all 0.25s ease;
}

.row-status.pending {
  background: rgba(150, 150, 150, .1);
  color: var(--text3);
}

.row-status.running {
  background: rgba(217, 119, 6, .12);
  color: var(--yellow);
  animation: pulse 1.2s ease-in-out infinite;
}

.row-status.done {
  background: rgba(22, 163, 74, .12);
  color: var(--green);
  box-shadow: 0 2px 8px rgba(22, 163, 74, .15);
}

.row-status.error {
  background: rgba(220, 38, 38, .12);
  color: var(--red);
  animation: shake 0.4s ease;
}

.row-status.skipped {
  background: rgba(150, 150, 150, .08);
  color: var(--text3);
}

.row-status.sin_cambios {
  background: rgba(100, 116, 139, .1);
  color: var(--text2);
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-2px);
  }

  75% {
    transform: translateX(2px);
  }
}

.delete-user-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text3);
  font-size: 12px;
  cursor: pointer;
  padding: 3px 7px;
  border-radius: 5px;
  transition: all 0.2s ease;
  line-height: 1;
}

.delete-user-btn:hover {
  background: rgba(220, 38, 38, .08);
  border-color: var(--red);
  color: var(--red);
  transform: scale(1.1);
}

/* ═══ MODALES GLASSMORPHISM ═══ */
.modal-bg {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 15, 20, .65);
  backdrop-filter: blur(8px) saturate(180%);
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-bg.open {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  min-width: 400px;
  max-width: 90vw;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, .5) inset, 0 25px 50px -12px rgba(0, 0, 0, .2);
  animation: modalSlideIn 0.3s cubic-bezier(.34, 1.56, .64, 1);
  position: relative;
  overflow: hidden;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--purple));
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(.96) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -.01em;
}

.modal p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal input[type="text"] {
  width: 100%;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  padding: 12px 16px;
  outline: none;
  margin-bottom: 20px;
  transition: all 0.25s ease;
  font-family: var(--sans);
}

.modal input[type="text"]:hover {
  border-color: var(--border2);
}

.modal input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 102, 0, .1), var(--shadow-sm);
}

.modal-btns {
  display: flex;
  gap: 12px;
}

.btn-modal-cancel {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
}

.btn-modal-cancel:hover {
  background: var(--surface3);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.btn-modal-ok {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  background: linear-gradient(135deg, #ff6600 0%, #ff8c3a 100%);
  border: none;
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 102, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.btn-modal-ok:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 102, 0, .4);
}

.btn-modal-ok:active {
  transform: translateY(0) scale(.98);
}

/* ═══ DASHBOARD KPIs ═══ */
.dashboard-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--bg);
}

.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 360px;
  gap: 16px;
  color: var(--text3);
  text-align: center;
  padding: 40px;
}

.dash-empty .icon {
  font-size: 56px;
  opacity: .5;
  animation: floatIcon 3s ease-in-out infinite;
}

.dash-empty h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text2);
}

.dash-empty p {
  font-size: 13px;
  color: var(--text3);
  max-width: 340px;
  line-height: 1.6;
}

.dash-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: var(--shadow-sm);
}

.dash-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--accent));
  opacity: .85;
}

.dash-kpi-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-xl), 0 0 40px rgba(0, 0, 0, .08);
  border-color: var(--border2);
}

.dash-kpi-icon {
  font-size: 26px;
  transition: transform 0.3s ease;
}

.dash-kpi-card:hover .dash-kpi-icon {
  transform: scale(1.2) rotate(-5deg);
}

.dash-kpi-num {
  font-family: var(--mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  margin-top: 6px;
  letter-spacing: -.02em;
  transition: all 0.3s ease;
}

.dash-kpi-card:hover .dash-kpi-num {
  transform: scale(1.05);
}

.dash-kpi-label {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}

.dash-kpi-bar-container {
  width: 100%;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 10px;
}

.dash-kpi-bar {
  height: 100%;
  background: var(--bar-color, var(--accent));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 0 10px currentColor;
}

.dash-kpi-blue {
  --card-accent: var(--blue);
  --bar-color: var(--blue);
}

.dash-kpi-green {
  --card-accent: var(--green);
  --bar-color: var(--green);
}

.dash-kpi-yellow {
  --card-accent: var(--yellow);
  --bar-color: var(--yellow);
}

.dash-kpi-red {
  --card-accent: var(--red);
  --bar-color: var(--red);
}

.dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .02em;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.dash-badge.ok {
  background: rgba(22, 163, 74, .1);
  color: var(--green);
  border-color: rgba(22, 163, 74, .25);
}

.dash-badge.err {
  background: rgba(220, 38, 38, .1);
  color: var(--red);
  border-color: rgba(220, 38, 38, .25);
}

.dash-badge.skip {
  background: rgba(150, 150, 150, .1);
  color: var(--text3);
}

.dash-badge.unchanged {
  background: rgba(217, 119, 6, .1);
  color: var(--yellow);
  border-color: rgba(217, 119, 6, .25);
}

.dash-badge.quitar {
  background: rgba(147, 51, 234, .1);
  color: var(--purple);
  border-color: rgba(147, 51, 234, .25);
}

/* ═══ LOG PANEL TERMINAL ═══ */
.log-panel {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  overflow-y: auto;
  padding: 12px 24px;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  color: #000000;
  position: relative;
}

.log-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: .4;
}

.log-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  transition: all 0.2s ease;
  border-radius: 4px;
  position: relative;
  z-index: 1;
}

.log-line:hover {
  background: rgba(255, 102, 0, .08);
  box-shadow: inset 3px 0 0 var(--accent-light);
}

.log-time {
  color: #64748b;
  flex-shrink: 0;
  font-size: 10px;
  min-width: 70px;
  letter-spacing: .03em;
}

.log-level {
  flex-shrink: 0;
  width: 42px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .05em;
  text-align: center;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  transition: all 0.25s ease;
}

.log-level.OK {
  color: #34d399;
  background: rgba(16, 185, 129, .15);
  box-shadow: 0 0 8px rgba(16, 185, 129, .2);
}

.log-level.ERR {
  color: #f87171;
  background: rgba(239, 68, 68, .15);
  box-shadow: 0 0 8px rgba(239, 68, 68, .2);
  animation: errorPulse 2s infinite;
}

.log-level.WARN {
  color: #fbbf24;
  background: rgba(245, 158, 11, .15);
  box-shadow: 0 0 8px rgba(245, 158, 11, .2);
}

.log-level.INFO {
  color: #ffa366;
  background: rgba(255, 102, 0, .12);
  box-shadow: 0 0 8px rgba(255, 102, 0, .15);
}

@keyframes errorPulse {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(239, 68, 68, .2);
  }

  50% {
    box-shadow: 0 0 15px rgba(239, 68, 68, .4);
  }
}

.log-msg {
  color: #000000;
  word-break: break-word;
  flex: 1;
}

.log-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 140, 58, .4), var(--accent), rgba(255, 140, 58, .4), transparent);
  margin: 10px 0;
  border: none;
  border-radius: 1px;
  box-shadow: 0 0 10px rgba(255, 102, 0, .3);
}

/* ═══ ALERTS & UTILIDADES ═══ */
.alert-box.warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left: 3.5px solid #f59e0b;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  color: #92400e;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(245, 158, 11, .1);
}

.upload-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.25s ease;
}

.upload-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border2);
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.card-header p {
  margin: 6px 0 0;
  color: var(--text2);
  font-size: 12px;
}

.drop-zone {
  margin: 24px;
  border: 2.5px dashed rgba(255, 102, 0, .3);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  background: var(--accent-bg);
  position: relative;
  overflow: hidden;
}

.drop-zone:hover {
  background: rgba(255, 102, 0, .1);
  border-color: var(--accent);
  box-shadow: 0 0 0 6px rgba(255, 102, 0, .07);
}

.upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
  animation: floatIcon 2s ease-in-out infinite;
}

.drop-zone p {
  font-size: 14px;
  color: var(--text2);
}

.drop-zone p span {
  color: var(--accent);
  font-weight: 700;
}

.file-example {
  margin-top: 16px;
  font-size: 11px;
  color: var(--text3);
  background: var(--surface2);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  display: inline-block;
  font-family: var(--mono);
  border: 1px solid var(--border);
}

/* ═══ PANEL RENOMBRAR ═══ */
.rename-section {
  padding: 24px 28px;
  flex-shrink: 0;
}

.rename-summary-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  padding: 10px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 600;
  flex-wrap: wrap;
}

.rename-preview-wrap {
  flex: 1;
  overflow: auto;
  min-height: 0;
  background: var(--bg);
}

.rename-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 14px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, .05);
}

.btn-rename-run {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: .07em;
  background: linear-gradient(135deg, #ff6600 0%, #ff8c3a 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(255, 102, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .2);
  position: relative;
  overflow: hidden;
}

.btn-rename-run::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
  transition: left 0.5s ease;
}

.btn-rename-run:hover:not(:disabled)::before {
  left: 100%;
}

.btn-rename-run:hover:not(:disabled) {
  background: linear-gradient(135deg, #ff7722 0%, #ffa055 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 102, 0, .45);
}

.btn-rename-run:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.btn-rename-run:disabled {
  opacity: .35;
  cursor: not-allowed;
  filter: grayscale(.4);
}

.btn-rename-clear {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 600;
  background: transparent;
  border: 1.5px solid var(--border2);
  color: var(--text2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-rename-clear:hover {
  border-color: var(--red-light);
  color: var(--red-light);
  background: rgba(239, 68, 68, .06);
  transform: translateY(-1px);
}

/* Reemplaza la clase .speed-select existente con esta: */
.speed-select {
  /* Fondo y Bordes */
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);

  /* Espaciado y Dimensiones */
  padding: 10px 36px 10px 14px;
  /* Más altura para mejor toque/clic */
  border-radius: 8px;
  /* Bordes ligeramente más redondeados */
  min-width: 180px;
  max-width: 220px;
  width: auto;

  /* Tipografía */
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 600;
  /* Un poco más grueso para legibilidad */
  letter-spacing: 0.5px;
  /* Espaciado estilo código/tech */
  text-transform: uppercase;
  /* Opcional: darle aire de etiqueta técnica */

  /* Comportamiento */
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;

  /* Icono de Flecha (SVG Optimizado) */
  /* Usamos un path más moderno y centrado */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;

  /* Utilidad de texto */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  /* Transiciones suaves */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  /* Sombra muy sutil por defecto */
}

/* Estado: Hover (Al pasar el mouse) */
.speed-select:hover {
  border-color: var(--border2);
  background-color: var(--surface2);
  /* Un ligero cambio de fondo */
  transform: translateY(-1px);
  /* Pequeña elevación */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Estado: Focus (Al hacer clic o navegar con teclado) */
.speed-select:focus {
  border-color: var(--accent);
  /* El "Doble Anillo" hace que se vea muy pro */
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 2px var(--accent);
}

/* Opciones del desplegable */
.speed-select option {
  font-family: var(--mono);
  font-size: 12px;
  padding: 12px;
  /* Nota: Muchos navegadores ignoran el padding en options, pero ayuda en algunos */
  background-color: var(--surface);
  /* IMPORTANTE: Evita texto blanco sobre fondo blanco en modo oscuro */
  color: var(--text);
}

.btn-clear {
  margin-left: auto;
  padding: 5px 12px;
  font-size: 11px;
  font-family: var(--mono);
  background: transparent;
  border: 1.5px solid var(--border2);
  color: var(--text2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-clear:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(220, 38, 38, .05);
}

.processing-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  animation: pulse 1.2s ease-in-out infinite;
  margin-right: 4px;
}

.success-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(22, 163, 74, .5);
  margin-right: 4px;
}

.error-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(220, 38, 68, .5);
  margin-right: 4px;
}

/* ═══ ANIMACIONES GLOBALES ═══ */
@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .4;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes icebergFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* ═══ SELECTOR DE COLUMNAS (modal mapeo) ═══ */
.col-select-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.col-select-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.col-select-group label {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
  color: var(--text2);
  letter-spacing: .03em;
  text-transform: uppercase;
}

.col-select-group select {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-family: var(--sans);
  padding: 9px 12px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.col-select-group select:hover {
  border-color: rgba(255, 102, 0, .3);
}

.col-select-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, .1);
}

.preview-table-wrap {
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
}

/* tabla generada por JS con class="preview-table" */
.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  min-width: max-content;
}

.preview-table th {
  background: var(--surface3);
  padding: 7px 12px;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.preview-table th.col-sel {
  background: rgba(255, 102, 0, .1);
  color: var(--accent);
  border-bottom-color: rgba(255, 102, 0, .3);
}

.preview-table td {
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  font-family: var(--mono);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-table tr:last-child td {
  border-bottom: none;
}

.preview-table tr:hover td {
  background: rgba(255, 102, 0, .03);
}

.preview-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.preview-table-wrap th {
  background: var(--surface3);
  padding: 7px 10px;
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.preview-table-wrap td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  font-family: var(--mono);
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-table-wrap tr:last-child td {
  border-bottom: none;
}

.preview-table-wrap td.col-highlight {
  color: var(--accent);
  font-weight: 600;
}

/* Colas list con scroll cuando hay muchas */
.colas-list {
  max-height: 140px;
  overflow-y: auto;
}

.cola-tag span.cola-text {
  max-width: 240px;
}

/* ═══ MODAL BARRIDO — CSS COMPLETO ═══ */
.barrido-modal {
  max-width: min(94vw, 860px);
  width: 95%;
}

.barrido-col-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.barrido-col-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.barrido-col-group label {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text2);
  letter-spacing: .04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}

.barrido-col-group select {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 12px;
  font-family: var(--sans);
  padding: 9px 12px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.barrido-col-group select:hover {
  border-color: rgba(255, 102, 0, .4);
  background-color: var(--surface);
}

.barrido-col-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, .12);
}

/* Indicador de columna activa */
.barrido-col-group.col-email label {
  color: var(--accent);
}

.barrido-col-group.col-email select {
  border-color: rgba(255, 102, 0, .3);
}

.barrido-col-group.col-sector label {
  color: var(--green);
}

.barrido-col-group.col-sector select {
  border-color: rgba(22, 163, 74, .3);
}

.barrido-col-group.col-cargo label {
  color: var(--yellow);
}

.barrido-col-group.col-cargo select {
  border-color: rgba(217, 119, 6, .3);
}

/* Filtro de cargo del modal Barrido Sector */
.barrido-filtro-cargo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.barrido-filtro-cargo span {
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
}

.barrido-filtro-cargo select {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 11px;
  font-family: var(--mono);
  padding: 5px 26px 5px 10px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.barrido-filtro-cargo select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, .1);
}

/* Lista de sectores del modal */
.barrido-sector-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
  margin-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 102, 0, .25) transparent;
}

.barrido-sector-list::-webkit-scrollbar {
  width: 5px;
}

.barrido-sector-list::-webkit-scrollbar-thumb {
  background: rgba(255, 102, 0, .3);
  border-radius: 3px;
}

/* Item del sector */
.barrido-sector-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.barrido-sector-item:hover {
  border-color: rgba(255, 102, 0, .3);
  background: rgba(255, 102, 0, .03);
}

.barrido-sector-item.selected {
  border-color: rgba(255, 102, 0, .4);
  background: rgba(255, 102, 0, .06);
  box-shadow: 0 0 0 1px rgba(255, 102, 0, .12);
}

.barrido-sector-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

.barrido-sector-item .sector-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.barrido-sector-item .sector-count {
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 102, 0, .08);
  border: 1px solid rgba(255, 102, 0, .2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

/* Info/resumen debajo de la lista de sectores */
.barrido-preview-info {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text3);
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  line-height: 1.6;
}

.barrido-preview-info strong {
  color: var(--accent);
  font-weight: 700;
}

/* Responsivo para barrido modal */
@media (max-width: 680px) {
  .barrido-col-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .barrido-modal {
    padding: 20px;
    margin: 12px;
  }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  aside {
    width: 100%;
    min-width: 100%;
    max-height: 280px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  header {
    padding: 0 16px;
    height: 56px;
  }

  header h1 span {
    display: none;
  }

  #header-kpi-bar {
    display: none !important;
  }

  .tabs {
    padding: 0 16px;
  }

  .tab {
    padding: 0 12px;
    font-size: 11px;
  }

  .dashboard-wrap {
    padding: 16px;
  }

  .dash-kpi-card {
    padding: 16px;
  }

  .dash-kpi-num {
    font-size: 28px;
  }

  .modal {
    margin: 16px;
    padding: 24px;
  }
}

@media (max-width: 680px) {

  /* Header de la lista de sectores - CORREGIDO */
  #barridoSectorBody>div:first-child>div:first-child {
    padding: 10px 16px !important;
    /* Más espacio */
    display: flex !important;
    justify-content: space-between !important;
    /* Alineación correcta */
  }

  #barridoSectorBody>div:first-child>div:first-child span {
    font-size: 11px !important;
    font-weight: 800 !important;
    /* Más negrita */
    letter-spacing: 0.12em !important;
    /* Espaciado entre letras */
    color: #6d28d9 !important;
    /* Púrpura más oscuro */
  }

  #modalRenombrarCols .col-select-wrap {
    flex-direction: column;
    gap: 12px;
  }

  #modalRenombrarCols .modal,
  #modalBarridoCols .modal {
    padding: 20px;
    margin: 12px;
  }
}

/* ══════════════════════════════════════════════════════════════
   PANEL DE SELECCIÓN POR SECTOR — REDESIGN PREMIUM
   Mejoras: Checkboxes custom, cards modernas, hover effects,
   mejor jerarquía visual, badges animados, scroll elegante
   ══════════════════════════════════════════════════════════════ */

/* Container principal del barrido inline */
#barridoSectorInlineRow {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface2) 100%);
  border-bottom: 2px solid rgba(167, 139, 250, 0.25);
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  position: relative;
  overflow: hidden;
}

/* Header del panel - Gradiente púrpura sutil */
#barridoSectorInlineRow>div:first-child {
  padding: 12px 20px !important;
  /* Más espacio generoso */
  gap: 10px !important;
  /* Espacio entre elementos */
  flex-wrap: wrap !important;
  /* Permite saltos de línea en móvil */
}

/* Barra lateral decorativa más gruesa (4px) */
#barridoSectorInlineRow>div:first-child::before {
  width: 4px;
  /* Era 3px, ahora más visible */
}

/* Título del panel */
#barridoSectorInlineRow>div:first-child span[style*="color:#a78bfa"] {
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: #7c3aed !important;
  text-shadow: 0 1px 2px rgba(124, 58, 237, 0.15);
}

#barridoArchivoNombre {
  max-width: 300px !important;
  /* Era 280px, ahora más espacio */
  padding: 4px 12px !important;
  /* Más padding interno */
  border-radius: 20px !important;
  /* Más redondeado tipo pill */
}

/* Selectores mejorados */
#bFiltrCargoInline {
  background: var(--surface) !important;
  border: 1.5px solid rgba(167, 139, 250, 0.3) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  padding: 5px 28px 5px 10px !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23a78bfa' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
}

#bFiltrCargoInline:hover {
  border-color: #a78bfa !important;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1) !important;
}

#bFiltrCargoInline:focus {
  outline: none !important;
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15) !important;
}

/* Input custom cargo */
#bFiltrCargoCustomInline {
  background: var(--surface) !important;
  border: 1.5px solid rgba(167, 139, 250, 0.3) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  padding: 5px 10px !important;
  transition: all 0.2s ease !important;
}

#bFiltrCargoCustomInline:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12) !important;
  outline: none !important;
}

/* Botones de acción del header */
#barridoSectorInlineRow>div:first-child button {
  font-size: 10px !important;
  font-family: var(--mono) !important;
  font-weight: 600 !important;
  padding: 4px 12px !important;
  border-radius: var(--radius-sm) !important;
  transition: all 0.2s ease !important;
}

/* Botón cambiar archivo */
#barridoSectorInlineRow>div:first-child button[onclick*="archivoUnificadoInput"] {
  background: rgba(167, 139, 250, 0.1) !important;
  border: 1.5px solid rgba(167, 139, 250, 0.35) !important;
  color: #7c3aed !important;
}

#barridoSectorInlineRow>div:first-child button[onclick*="archivoUnificadoInput"]:hover {
  background: rgba(167, 139, 250, 0.18) !important;
  border-color: #a78bfa !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(167, 139, 250, 0.2) !important;
}

/* Botón cerrar */
#barridoSectorInlineRow>div:first-child button[onclick*="cerrarBarridoInline"] {
  background: transparent !important;
  border: 1.5px solid var(--border2) !important;
  color: var(--text3) !important;
}

#barridoSectorInlineRow>div:first-child button[onclick*="cerrarBarridoInline"]:hover {
  border-color: var(--red) !important;
  color: var(--red) !important;
  background: rgba(220, 38, 38, 0.05) !important;
}

/* ═══ BODY DEL PANEL - LISTA DE SECTORES ═══ */
#barridoSectorBody {
  background: var(--bg) !important;
  gap: 0 !important;
}

#barridoSectorBody>div:last-child {
  min-width: 260px !important;
  /* Ancho mínimo garantizado */
  width: 260px !important;
  /* Ancho fijo */
  padding: 16px !important;
  /* Más espacio interno */
  gap: 12px !important;
  /* Mayor separación entre elementos */
}

/* Header de la lista de sectores */
#barridoSectorBody>div:first-child>div:first-child {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.04) 0%, transparent 100%) !important;
  border-bottom: 1.5px solid rgba(167, 139, 250, 0.15) !important;
  padding: 8px 14px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
}

#barridoSectorBody>div:first-child>div:first-child span {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  color: #7c3aed !important;
  text-transform: uppercase !important;
}

/* Botones Todos/Ninguno - Rediseño premium */
.barrido-select-all {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.1) 0%, rgba(167, 139, 250, 0.05) 100%) !important;
  border: 1.5px solid rgba(167, 139, 250, 0.3) !important;
  border-radius: var(--radius-full) !important;
  padding: 4px 12px !important;
  font-size: 10px !important;
  font-family: var(--mono) !important;
  font-weight: 600 !important;
  color: #7c3aed !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-transform: capitalize !important;
  white-space: nowrap !important;
  position: relative !important;
  overflow: hidden !important;
}

.barrido-select-all::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
  transition: left 0.5s ease !important;
}

.barrido-select-all:hover {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.18) 0%, rgba(167, 139, 250, 0.1) 100%) !important;
  border-color: #a78bfa !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(167, 139, 250, 0.25) !important;
  color: #6d28d9 !important;
}

.barrido-select-all:hover::before {
  left: 100% !important;
}

.barrido-select-all:active {
  transform: translateY(0) scale(0.97) !important;
}

/* Contenedor de la lista */
#barridoSectorInlineList {
  padding: 6px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

/* ═══ ITEM DE SECTOR - REDESIGN COMPLETO ═══ */
.barrido-sector-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 7px 10px !important;
  border-radius: var(--radius) !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background: var(--surface) !important;
  border: 1.5px solid transparent !important;
  position: relative !important;
  overflow: visible !important;
  min-width: 0 !important;
}

/* Efecto hover elegante */
.barrido-sector-item:hover {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08) 0%, rgba(167, 139, 250, 0.03) 100%) !important;
  border-color: rgba(167, 139, 250, 0.25) !important;
  transform: translateX(4px) !important;
  box-shadow: 0 2px 12px rgba(167, 139, 250, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

/* Estado seleccionado */
.barrido-sector-item.selected {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15) 0%, rgba(167, 139, 250, 0.06) 100%) !important;
  border-color: rgba(167, 139, 250, 0.45) !important;
  box-shadow: 0 2px 16px rgba(167, 139, 250, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

.barrido-sector-item.selected:hover {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.2) 0%, rgba(167, 139, 250, 0.1) 100%) !important;
  border-color: #a78bfa !important;
}

/* ═══ CHECKBOX CUSTOM - DISEÑO MODERNO ═══ */
.barrido-sector-item input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  border: 2px solid #d1d5db !important;
  border-radius: 4px !important;
  background: #fff !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

/* Checkbox hover */
.barrido-sector-item input[type="checkbox"]:hover {
  border-color: #a78bfa !important;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15) !important;
  transform: none !important;
}

/* Checkbox checked - Efecto premium */
.barrido-sector-item input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%) !important;
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.2), 0 2px 8px rgba(124, 58, 237, 0.3) !important;
  animation: checkboxPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes checkboxPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.18);
  }

  100% {
    transform: scale(1);
  }
}

/* Checkmark custom con SVG */
.barrido-sector-item input[type="checkbox"]:checked::after {
  content: '' !important;
  position: absolute !important;
  left: 4px !important;
  top: 1px !important;
  width: 5px !important;
  height: 9px !important;
  border: solid white !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) !important;
}

/* Focus state accesible */
.barrido-sector-item input[type="checkbox"]:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.3) !important;
}

/* ═══ NOMBRE DEL SECTOR ═══ */
.barrido-sector-name {
  font-size: 12px !important;
  font-weight: 500 !important;
  flex: 1 !important;
  min-width: 0 !important;
  color: var(--text) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-family: var(--sans) !important;
  letter-spacing: -0.01em !important;
  transition: color 0.2s ease !important;
  line-height: 1.3 !important;
}

/* Nombre cuando está seleccionado */
.barrido-sector-item.selected .barrido-sector-name {
  color: #6d28d9 !important;
  font-weight: 700 !important;
}

/* ═══ BADGE DE CONTADOR - REDESIGN ═══ */
.barrido-sector-count {
  font-size: 10px !important;
  font-family: var(--mono) !important;
  color: #7c3aed !important;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15) 0%, rgba(167, 139, 250, 0.08) 100%) !important;
  padding: 2px 8px !important;
  border-radius: var(--radius-full) !important;
  white-space: nowrap !important;
  border: 1.5px solid rgba(167, 139, 250, 0.3) !important;
  font-weight: 700 !important;
  min-width: 28px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 2px 6px rgba(167, 139, 250, 0.1) !important;
}

/* Badge hover */
.barrido-sector-item:hover .barrido-sector-count {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.22) 0%, rgba(167, 139, 250, 0.12) 100%) !important;
  border-color: #a78bfa !important;
  transform: scale(1.05) !important;
  box-shadow: 0 3px 10px rgba(167, 139, 250, 0.2) !important;
}

/* Badge cuando está seleccionado */
.barrido-sector-item.selected .barrido-sector-count {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%) !important;
  color: white !important;
  border-color: #7c3aed !important;
  box-shadow: 0 3px 12px rgba(167, 139, 250, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* ═══ PANEL DERECHO - PREVIEW ═══ */
#barridoSectorBody>div:last-child {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface2) 100%) !important;
  border-left: none !important;
  padding: 14px 16px !important;
  gap: 10px !important;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.03) !important;
}

/* Texto preview */
#barridoPreviewInline {
  font-size: 11px !important;
  font-family: var(--mono) !important;
  color: var(--text2) !important;
  flex: 1 !important;
  line-height: 1.7 !important;
  overflow-y: auto !important;
  background: rgba(167, 139, 250, 0.03) !important;
  padding: 12px !important;
  border-radius: var(--radius) !important;
  border: 1px dashed rgba(167, 139, 250, 0.2) !important;
}

/* Botón agregar agentes - Rediseño principal */
#btnBarridoInlineAgregar {
  width: 100% !important;
  /* ← Ocupa TODO el ancho disponible */
  padding: 12px 18px !important;
  /* Más padding vertical/horizontal */
  white-space: normal !important;
  /* ← Permite saltos de línea si es necesario */
  line-height: 1.3 !important;
  /* Interlineado cómodo */
  border-radius: 8px !important;
  /* Bordes más redondeados */
}

/* Efecto shine en hover */
#btnBarridoInlineAgregar::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -100% !important;
  width: 100% !important;
  height: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
  transition: left 0.5s ease !important;
}

#btnBarridoInlineAgregar:hover:not(:disabled) {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(167, 139, 250, 0.45), 0 4px 12px rgba(167, 139, 250, 0.3) !important;
}

#btnBarridoInlineAgregar:hover:not(:disabled)::before {
  left: 100% !important;
}

#btnBarridoInlineAgregar:active:not(:disabled) {
  transform: translateY(-1px) scale(0.98) !important;
}

/* Estado deshabilitado */
#btnBarridoInlineAgregar:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  filter: grayscale(0.3) !important;
  background: var(--border2) !important;
  box-shadow: none !important;
}

/* ═══ SCROLLBAR CUSTOM PARA LA LISTA ═══ */
#barridoSectorInlineList::-webkit-scrollbar {
  width: 6px !important;
}

#barridoSectorInlineList::-webkit-scrollbar-track {
  background: transparent !important;
  border-radius: 3px !important;
}

#barridoSectorInlineList::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.3) 0%, rgba(167, 139, 250, 0.5) 100%) !important;
  border-radius: 3px !important;
  transition: background 0.2s ease !important;
}

#barridoSectorInlineList::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.5) 0%, rgba(167, 139, 250, 0.7) 100%) !important;
}

/* ═══ ANIMACIONES ADICIONALES ═══ */
@keyframes sectorSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Aplicar animación a los items cuando se agregan */
.barrido-sector-item {
  animation: sectorSlideIn 0.25s ease-out !important;
}

/* Stagger animation para múltiples items */
.barrido-sector-item:nth-child(1) {
  animation-delay: 0.02s !important;
}

.barrido-sector-item:nth-child(2) {
  animation-delay: 0.04s !important;
}

.barrido-sector-item:nth-child(3) {
  animation-delay: 0.06s !important;
}

.barrido-sector-item:nth-child(4) {
  animation-delay: 0.08s !important;
}

.barrido-sector-item:nth-child(5) {
  animation-delay: 0.1s !important;
}

.barrido-sector-item:nth-child(n+6) {
  animation-delay: 0.12s !important;
}

/* ═══ RESPONSIVE MEJORADO ═══ */
@media (max-width: 768px) {
  #barridoSectorBody {
    flex-direction: column !important;
    max-height: 320px !important;
  }

  #barridoSectorBody>div:first-child {
    border-right: none !important;
    border-bottom: 2px solid rgba(167, 139, 250, 0.2) !important;
    max-height: 160px !important;
  }

  #barridoSectorBody>div:last-child {
    width: 100% !important;
    min-width: unset !important;
  }

  .barrido-sector-name {
    font-size: 11px !important;
  }

  .barrido-sector-count {
    font-size: 9px !important;
    padding: 2px 7px !important;
  }
}

/* ═══ INLINE SECTOR ITEMS — clases reales generadas por JS ═══ */
.barrido-sector-item-inline {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 10px !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  transition: background 0.15s ease, border-color 0.15s ease !important;
  background: transparent !important;
  border: 1.5px solid transparent !important;
  user-select: none !important;
  min-width: 0 !important;
}

.barrido-sector-item-inline:hover {
  background: rgba(167, 139, 250, 0.07) !important;
  border-color: rgba(167, 139, 250, 0.2) !important;
}

/* Checkbox dentro del item inline */
.barrido-sector-item-inline input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: 4px !important;
  background: #fff !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.2s ease !important;
}

.barrido-sector-item-inline input[type="checkbox"]:hover {
  border-color: #a78bfa !important;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.12) !important;
}

.barrido-sector-item-inline input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%) !important;
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.2) !important;
}

.barrido-sector-item-inline input[type="checkbox"]:checked::after {
  content: '' !important;
  position: absolute !important;
  left: 4px !important;
  top: 1px !important;
  width: 4px !important;
  height: 8px !important;
  border: solid white !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) !important;
}

/* Nombre del sector */
.bsi-name {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--text) !important;
  flex: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-family: var(--sans) !important;
}

/* Badge contador */
.bsi-count {
  font-size: 10px !important;
  font-family: var(--mono) !important;
  font-weight: 700 !important;
  color: #7c3aed !important;
  background: rgba(167, 139, 250, 0.12) !important;
  border: 1px solid rgba(167, 139, 250, 0.3) !important;
  padding: 1px 7px !important;
  border-radius: 999px !important;
  min-width: 24px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  white-space: nowrap !important;
}

.barrido-sector-item-inline:has(input:checked) .bsi-name {
  color: #6d28d9 !important;
  font-weight: 600 !important;
}

.barrido-sector-item-inline:has(input:checked) .bsi-count {
  background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%) !important;
  color: #fff !important;
  border-color: #7c3aed !important;
}

/* ═══ BOTONES FILTRO DASHBOARD ═══ */
.dash-filter-btn {
  padding: 5px 14px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 600;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text2);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.dash-filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
  transition: left 0.4s ease;
}

.dash-filter-btn:hover {
  background: var(--surface3);
  border-color: var(--border2);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.dash-filter-btn:hover::before {
  left: 100%;
}

.dash-filter-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Estado activo — Naranja corporativo */
.dash-filter-btn.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border-color: var(--accent-dark);
  color: #fff;
  box-shadow: 0 2px 10px rgba(255, 102, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .2);
}

.dash-filter-btn.active:hover {
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 102, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .15);
}

/* Variantes de color por filtro */
.dash-filter-btn[data-filter="success"]:not(.active):hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(22, 163, 74, .06);
  box-shadow: 0 2px 8px rgba(22, 163, 74, .12);
}

.dash-filter-btn[data-filter="error"]:not(.active):hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(220, 38, 38, .06);
  box-shadow: 0 2px 8px rgba(220, 38, 38, .12);
}

.dash-filter-btn[data-filter="sin_cambios"]:not(.active):hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(217, 119, 6, .06);
  box-shadow: 0 2px 8px rgba(217, 119, 6, .12);
}

/* Focus accesible */
.dash-filter-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ═══ BARRA RESUMEN VERIFICACIÓN ═══ */
.verify-summary {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #1a1a1a 0%, #111111 100%);
  border-bottom: 2px solid rgba(255, 102, 0, .35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .04);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Línea decorativa animada inferior */
.verify-summary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 25%, var(--accent-light) 50%, var(--accent) 75%, transparent 100%);
  background-size: 200% 100%;
  animation: verifyGlow 5s ease-in-out infinite;
}

@keyframes verifyGlow {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Título principal */
.verify-summary>span:nth-child(2) {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: .04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

/* Badge "encontrados" — verde */
.verify-summary>span:nth-child(3) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--green-light);
  background: rgba(34, 197, 94, .1);
  border: 1.5px solid rgba(34, 197, 94, .3);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(34, 197, 94, .15), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: all 0.25s ease;
}

.verify-summary>span:nth-child(3):hover {
  background: rgba(34, 197, 94, .18);
  border-color: rgba(34, 197, 94, .5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, .25);
}

.verify-summary>span:nth-child(3) strong {
  font-size: 15px;
  color: #fff;
  text-shadow: 0 0 8px rgba(34, 197, 94, .5);
}

/* Badge "no encontrados" — rojo */
.verify-summary>span:nth-child(4) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--red-light);
  background: rgba(239, 68, 68, .1);
  border: 1.5px solid rgba(239, 68, 68, .3);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(239, 68, 68, .15), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: all 0.25s ease;
}

.verify-summary>span:nth-child(4):hover {
  background: rgba(239, 68, 68, .18);
  border-color: rgba(239, 68, 68, .5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, .25);
}

.verify-summary>span:nth-child(4) strong {
  font-size: 15px;
  color: #fff;
  text-shadow: 0 0 8px rgba(239, 68, 68, .5);
}

/* Siempre alinear el botón exportar a la derecha */
.verify-summary>button {
  order: 100;
}

/* Texto "solo lectura" */
.verify-summary>span:last-child {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: #666;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: .03em;
}

/* Cuando está visible */
.verify-summary[style*="flex"],
.verify-summary:not([style*="none"]) {
  display: flex;
  animation: verifySlideIn 0.35s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes verifySlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══ CUSTOM SELECTOR DE SERVICIO — PREMIUM DROPDOWN ═══ */
#selectorServicioPanel {
  display: none !important;
}

.custom-servicio-select {
  position: relative;
  flex: 0 0 auto !important;
  width: 360px !important;
  max-width: 360px !important;
  z-index: 40;
}

.css-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--mono);
  box-shadow: var(--shadow-xs);
  user-select: none;
  min-height: 40px !important;
}

.css-trigger:hover {
  border-color: var(--border2);
  background: var(--surface2);
  box-shadow: var(--shadow-sm);
}

.css-trigger.open {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, .1), var(--shadow-sm);
  background: var(--surface);
}

.css-trigger-icon {
  font-size: 15px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .1));
  transition: transform 0.3s ease;
}

.css-trigger.open .css-trigger-icon {
  transform: scale(1.1);
}

.css-trigger-text {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  letter-spacing: -0.01em;
  max-width: calc(100% - 120px) !important;
}

.css-trigger-text.placeholder {
  color: var(--text3);
  font-weight: 400;
  font-style: italic;
}

.css-trigger-badge {
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 102, 0, .08);
  border: 1px solid rgba(255, 102, 0, .2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.css-trigger.open .css-trigger-badge {
  background: rgba(255, 102, 0, .15);
  border-color: rgba(255, 102, 0, .35);
}

.css-trigger-arrow {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(255, 102, 0, .08);
  border: 1.5px solid rgba(255, 102, 0, .25);
  flex-shrink: 0;
  margin-left: auto;
  margin-right: -6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--accent);
  font-size: 11px;
}

.css-trigger:hover .css-trigger-arrow {
  color: var(--accent);
  border-color: rgba(255, 102, 0, .2);
}

.css-trigger.open .css-trigger-arrow {
  transform: rotate(180deg);
  color: var(--accent);
  border-color: rgba(255, 102, 0, .3);
  background: rgba(255, 102, 0, .08);
}

.css-dropdown {
  position: fixed;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .2), 0 0 0 1px rgba(0, 0, 0, .06);
  max-height: 600px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 9999;
}

.css-dropdown.open {
  display: flex;
  animation: cssDropIn 0.18s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes cssDropIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header del dropdown */
.css-dropdown-header {
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(255, 102, 0, .04) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.css-dropdown-header span {
  font-size: 9px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  flex: 1;
}

.css-dropdown-count {
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text3);
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

/* Lista de opciones scroll */
.css-options {
  overflow-y: auto;
  flex: 1;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Opción individual */
.css-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
  min-height: 36px !important;
}

.css-options::-webkit-scrollbar {
  width: 5px;
}

.css-options::-webkit-scrollbar-track {
  background: transparent;
}

.css-options::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 102, 0, .2), rgba(255, 102, 0, .4));
  border-radius: 3px;
}

.css-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
  min-height: 54px !important;
}

.css-option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2.5px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.css-option:hover {
  background: linear-gradient(135deg, rgba(255, 102, 0, .06) 0%, rgba(255, 102, 0, .02) 100%);
  border-color: rgba(255, 102, 0, .15);
  transform: translateX(3px);
}

.css-option:hover::before {
  opacity: 0.5;
}

.css-option.selected {
  background: linear-gradient(135deg, rgba(255, 102, 0, .12) 0%, rgba(255, 102, 0, .05) 100%);
  border-color: rgba(255, 102, 0, .35);
  box-shadow: 0 2px 10px rgba(255, 102, 0, .1), inset 0 1px 0 rgba(255, 255, 255, .5);
}

.css-option.selected::before {
  opacity: 1;
}

.css-option-icon {
  font-size: 16px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease;
}

.css-option:hover .css-option-icon {
  transform: scale(1.15);
}

.css-option.selected .css-option-icon {
  transform: scale(1.1);
}

.css-option-info {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ANTERIOR */
.css-option-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--sans);
  letter-spacing: -0.01em;
  transition: color 0.2s ease;
}

.css-option.selected .css-option-name {
  color: var(--accent-dark);
  font-weight: 700;
}

.css-option-sub {
  font-size: 10px !important;
  font-family: var(--mono);
  color: var(--text3);
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  line-height: 1.3 !important;
  margin-top: 2px !important;
}

.css-option.selected .css-option-sub {
  color: var(--accent);
  opacity: 0.7;
}

.css-option-badge {
  font-size: 10px !important;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 102, 0, .1);
  border: 1.5px solid rgba(255, 102, 0, .25);
  padding: 3px 8px !important;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0 !important;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(255, 102, 0, .08);
  min-width: 32px !important;
  max-width: 42px !important;
  text-align: center !important;
}

.css-option:hover .css-option-badge {
  background: rgba(255, 102, 0, .16);
  border-color: rgba(255, 102, 0, .4);
  transform: scale(1.05);
}

.css-option.selected .css-option-badge {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  border-color: var(--accent-dark);
  box-shadow: 0 3px 10px rgba(255, 102, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}

.css-option-check {
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0 !important;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 10px;
  color: transparent;
}

.css-option.selected .css-option-check {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  border-color: var(--accent-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 102, 0, .3);
}

.css-option.placeholder {
  cursor: default;
  padding: 12px;
  min-height: 44px !important;
}

.css-option.placeholder:hover {
  background: transparent !important;
  border-color: transparent !important;
  transform: none !important;
}

.css-option.placeholder:hover::before {
  opacity: 0 !important;
}

.css-option.placeholder .css-option-name {
  color: var(--text3) !important;
  font-weight: 400 !important;
  font-style: italic !important;
}

/* Separador */
.css-separator {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 4px 8px;
}

/* Footer del dropdown */
.css-dropdown-footer {
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  background: var(--surface2);
  flex-shrink: 0;
}

.css-dropdown-hint {
  font-size: 10px;
  font-family: var(--mono);
  color: var(--text3);
  text-align: center;
  font-style: italic;
}

@media (max-width: 680px) {
  .css-dropdown {
    max-height: 260px;
    min-width: 280px !important;
    max-width: calc(100vw - 32px) !important;
  }

  .css-option {
    padding: 8px 10px;
  }

  .css-option-icon {
    font-size: 14px;
  }

  .css-option-name {
    font-size: 11px !important;
  }

  .css-option-sub {
    font-size: 9px !important;
  }

  .custom-servicio-select {
    min-width: 180px !important;
    flex: 1 1 180px !important;
  }
}

/* ═════════════════════════════════════════════════════════════
   ESTILOS MENÚ DE FILTROS (VERIFICACIÓN)
   ═════════════════════════════════════════════════════════════ */
.verif-filter-menu {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, .05);
  padding: 8px 0;
  min-width: 260px;
  max-width: 380px;
  max-height: 420px;
  overflow-y: auto;
  z-index: 9999;
  /* Asegura que quede por encima de todo */
  font-family: var(--sans);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.15s ease-out;
}

/* Scrollbar del menú */
.verif-filter-menu::-webkit-scrollbar {
  width: 5px;
}

.verif-filter-menu::-webkit-scrollbar-track {
  background: transparent;
}

.verif-filter-menu::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}

/* Cabecera fija del menú */
.filter-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  position: sticky;
  top: 0;
  z-index: 2;
}

.filter-menu-header span {
  font-size: 10px;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text2);
}

#btnLimpiarFiltroColumna {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--mono);
  font-weight: 600;
  white-space: nowrap;
}

#btnLimpiarFiltroColumna:hover {
  background: var(--surface);
  color: var(--red);
  border-color: rgba(239, 68, 68, .3);
}

/* Items del menú (Fila de filtro) */
.filter-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  /* Evita salto de línea al hover */
}

.filter-menu-item:hover {
  background: rgba(255, 102, 0, .05);
  /* Tinte naranja sutil corporativo */
}

/* Checkboxes nativos con color corporativo */
.filter-menu-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border2);
  border-radius: 4px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* Contador al final de la fila */
.item-count {
  margin-left: auto;
  font-size: 10px;
  font-family: var(--mono);
  color: var(--text3);
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}


/* ═══ RESIZER DE COLUMNAS — tabla verificación ═══ */
.col-resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  cursor: col-resize;
  z-index: 10;
  background: transparent;
  transition: background 0.15s;
}

.col-resizer:hover,
.col-resizer.resizing {
  background: rgba(255, 102, 0, .5);
}

.verify-table {
  table-layout: fixed;
}

.verify-table th {
  position: relative;
  user-select: none;
  overflow: hidden;
  white-space: nowrap;
}

.verify-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══ REEMPLAZAR el bloque .agent-tooltip existente ═══ */
.agent-tooltip {
  position: fixed;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-xl);
  z-index: 10000;
  max-width: 380px;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  /* ← Nunca más alto que el viewport */
  overflow: hidden;
  /* ← El scroll lo maneja .tooltip-scroll internamente */
  font-size: 12px;
  color: var(--text);
  display: none;
  opacity: 0;
  pointer-events: none;
  font-family: var(--sans);
  transition: opacity 0.12s ease;
  /* Sombra inferior sutil para dar profundidad */
  border-bottom: 2px solid var(--accent);
}

.agent-tooltip.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.12s ease;
}

.agent-tooltip .tooltip-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  margin: 0;
  padding: 14px 16px 12px;
  border-bottom: 1.5px solid var(--border);
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, var(--surface2) 0%, var(--surface) 100%);
}

.agent-tooltip .tooltip-section {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.agent-tooltip .tooltip-section:last-of-type {
  border-bottom: none;
}

.agent-tooltip .section-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}

.agent-tooltip .section-content {
  flex: 1;
  min-width: 0;
}

.agent-tooltip .tooltip-label {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
  font-weight: 600;
  font-family: var(--mono);
}

.agent-tooltip .tooltip-value {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.6;
  font-family: var(--mono);
  word-break: break-word;
}

.agent-tooltip .tooltip-empty {
  color: var(--text3);
  font-style: italic;
  font-size: 11px;
}

.agent-tooltip .cola-item {
  padding: 4px 0;
  font-size: 11px;
  color: var(--text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.agent-tooltip .cola-item:last-child {
  border-bottom: none;
}

.agent-tooltip .cola-item::before {
  content: '•';
  color: var(--accent);
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 1px;
}

.agent-tooltip .tooltip-scroll {
  max-height: 180px;
  overflow-y: auto;
  padding: 0 16px 4px;
}

.agent-tooltip .tooltip-scroll::-webkit-scrollbar {
  width: 4px;
}

.agent-tooltip .tooltip-scroll::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 2px;
}

.float-icon {
  animation: floaticon 3s infinite;
  font-size: 40px;
  display: inline-block;
  background: transparent;
}

@keyframes floaticon {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }

  100% {
    transform: translateY(0);
  }
}