/* ==========================================================================
   COTIZADOR AUTOMÁTICO - Módulo: Validador de Graneles y Exclusividades MP
   Diseño Minimalista, Limpio y de Alta Gama (Estilo Linear / Stripe / Vercel)
   ========================================================================== */

/* ==========================================================================
   1. AISLAMIENTO TIPOGRÁFICO Y BASE DEL VALIDADOR
   Garantiza que tablas y cifras mantengan legibilidad óptima en cualquier tema
   ========================================================================== */
#exclusividades-view,
.exclusividades-container {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[data-theme="dark"] #exclusividades-view,
[data-theme="dark"] .exclusividades-container {
  color: #f8fafc;
}

#exclusividades-view h1,
#exclusividades-view h2,
#exclusividades-view h3,
#exclusividades-view h4,
#exclusividades-view .exc-hero-title-group h2,
#exclusividades-view .exc-verdict-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  letter-spacing: -0.01em !important;
}

#exclusividades-view * {
  box-sizing: border-box;
}

#exclusividades-view code,
#exclusividades-view pre,
#exclusividades-view .font-mono,
#exclusividades-view .exc-mp-code,
#exclusividades-view .exc-code-tag,
#exclusividades-view .exc-stock-value,
#exclusividades-view .exc-stock-main,
#exclusividades-view .exc-stock-delta,
#exclusividades-view .exc-stock-pill,
#exclusividades-view .exc-metric-num,
#exclusividades-view .exc-product-meta-ref {
  font-family: 'JetBrains Mono', 'SF Mono', 'Roboto Mono', Menlo, monospace !important;
  font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums;
}

/* Scrollbar sutil para el validador */
#exclusividades-view ::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
#exclusividades-view ::-webkit-scrollbar-track {
  background: transparent;
}
#exclusividades-view ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
}
#exclusividades-view ::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

/* --- Mode Switcher en Cabecera (Totalmente Adaptativo y Armónico) --- */
.header-mode-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.04);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  gap: 2px;
  margin-right: 12px;
  height: 34px;
  box-sizing: border-box;
}

[data-theme="dark"] .header-mode-switch,
[data-theme="ciudad"] .header-mode-switch,
[data-theme="cyberpop"] .header-mode-switch,
[data-theme="premium"] .header-mode-switch,
[data-theme="plano"] .header-mode-switch {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border: none;
  background: transparent;
  color: var(--muted-foreground, #64748b);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit !important;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mode-btn:hover {
  color: var(--foreground, #0f172a);
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .mode-btn,
[data-theme="ciudad"] .mode-btn,
[data-theme="cyberpop"] .mode-btn,
[data-theme="premium"] .mode-btn,
[data-theme="plano"] .mode-btn {
  color: #94a3b8;
}

[data-theme="dark"] .mode-btn:hover,
[data-theme="ciudad"] .mode-btn:hover,
[data-theme="cyberpop"] .mode-btn:hover,
[data-theme="premium"] .mode-btn:hover,
[data-theme="plano"] .mode-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.07);
}

.mode-btn.active {
  background: #ffffff;
  color: var(--primary, #7c3aed);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .mode-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

[data-theme="ciudad"] .mode-btn.active {
  background: rgba(254, 212, 106, 0.16) !important;
  color: #fed46a !important;
  border: 1px solid rgba(254, 212, 106, 0.35) !important;
  box-shadow: 0 1px 6px rgba(254, 212, 106, 0.2) !important;
}

[data-theme="cyberpop"] .mode-btn.active {
  background: var(--pop-yellow, #ffd500) !important;
  color: #000000 !important;
}

[data-theme="premium"] .mode-btn.active {
  background: rgba(217, 119, 6, 0.22) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(251, 191, 36, 0.35) !important;
}

[data-theme="plano"] .mode-btn.active {
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: 1px 1px 0px #000 !important;
}

.mode-btn svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   2. CONTENEDOR PRINCIPAL
   ========================================================================== */
.exclusividades-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4px 60px 4px;
  animation: excFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes excFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   3. HERO SEARCH CARD (Buscador Minimalista)
   ========================================================================== */
.exc-hero-card {
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: visible;
}

[data-theme="dark"] .exc-hero-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.exc-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  gap: 16px;
}

.exc-hero-title-group h2 {
  font-family: inherit !important;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--foreground, #0f172a);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.exc-hero-title-group h2 i,
.exc-hero-title-group h2 svg {
  color: #7c3aed;
  width: 22px;
  height: 22px;
}

[data-theme="dark"] .exc-hero-title-group h2 svg {
  color: #a78bfa;
}

.exc-hero-title-group p {
  color: var(--muted-foreground, #64748b);
  font-size: 0.88rem;
  max-width: 780px;
  line-height: 1.5;
  margin: 0;
}

/* Search Box */
.exc-search-box-wrapper {
  position: relative;
  width: 100%;
  max-width: 920px;
}

.exc-search-bar-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.exc-search-input-group {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.exc-btn-reset-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 45px;
  padding: 0 18px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit !important;
  color: var(--muted-foreground, #64748b);
  background: var(--muted, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.exc-btn-reset-visible:hover {
  background: var(--card, #ffffff);
  color: #7c3aed;
  border-color: #7c3aed;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.12);
  transform: translateY(-1px);
}

.exc-btn-reset-visible:active {
  transform: translateY(0);
}

.exc-btn-reset-visible i,
.exc-btn-reset-visible svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.exc-btn-reset-visible:hover i,
.exc-btn-reset-visible:hover svg {
  transform: rotate(-90deg);
}

/* Dark mode */
[data-theme="dark"] .exc-btn-reset-visible {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .exc-btn-reset-visible:hover {
  background: #0f172a;
  border-color: #a78bfa;
  color: #a78bfa;
  box-shadow: 0 3px 10px rgba(167, 139, 250, 0.2);
}

/* Theme specifics */
[data-theme="sakura"] .exc-btn-reset-visible:hover {
  border-color: #f43f5e;
  color: #f43f5e;
  box-shadow: 0 3px 10px rgba(244, 63, 94, 0.15);
}

[data-theme="natural"] .exc-btn-reset-visible:hover {
  border-color: #059669;
  color: #059669;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.15);
}

[data-theme="premium"] .exc-btn-reset-visible:hover {
  border-color: #d97706;
  color: #d97706;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.15);
}

[data-theme="plano"] .exc-btn-reset-visible {
  border-radius: 6px;
  box-shadow: 2px 2px 0px #000;
  border: 2px solid #000;
  background: #ffffff;
  color: #000000;
}

[data-theme="plano"] .exc-btn-reset-visible:hover {
  box-shadow: 4px 4px 0px #000;
  transform: translate(-1px, -1px);
  background: #fef08a;
  color: #000000;
  border-color: #000000;
}

@media (max-width: 640px) {
  .exc-btn-reset-visible span {
    display: none;
  }
  .exc-btn-reset-visible {
    padding: 0 12px;
  }
}

.exc-search-icon {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.exc-search-input {
  width: 100%;
  padding: 12px 44px 12px 46px;
  font-size: 0.95rem;
  font-family: inherit !important;
  background: var(--muted, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  color: var(--foreground, #0f172a);
  transition: all 0.2s ease;
}

.exc-search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

[data-theme="dark"] .exc-search-input {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

[data-theme="dark"] .exc-search-input:focus {
  background: #0f172a;
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.exc-search-clear {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.exc-search-clear:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

[data-theme="dark"] .exc-search-clear:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.exc-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  padding: 6px;
}

[data-theme="dark"] .exc-search-dropdown {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.exc-search-dropdown.active {
  display: block;
}

.exc-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 12px;
}

.exc-search-item:hover {
  background: rgba(124, 58, 237, 0.10);
}

[data-theme="sakura"] .exc-search-item:hover {
  background: rgba(236, 72, 153, 0.22);
}

[data-theme="natural"] .exc-search-item:hover {
  background: rgba(16, 185, 129, 0.20);
}

[data-theme="premium"] .exc-search-item:hover {
  background: rgba(217, 119, 6, 0.22);
}

[data-theme="cyberpop"] .exc-search-item:hover {
  background: rgba(0, 240, 255, 0.18);
}

[data-theme="plano"] .exc-search-item:hover {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .exc-search-item:hover {
  background: rgba(124, 58, 237, 0.25);
}

.exc-search-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.exc-search-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.exc-search-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--foreground, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.exc-search-item:hover .exc-search-item-name {
  color: var(--foreground, #0f172a);
}

.exc-bom-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(139, 92, 246, 0.16);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .exc-bom-badge,
[data-theme="sakura"] .exc-bom-badge,
[data-theme="natural"] .exc-bom-badge,
[data-theme="premium"] .exc-bom-badge,
[data-theme="cyberpop"] .exc-bom-badge {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(167, 139, 250, 0.4);
}

.exc-search-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted-foreground, #64748b);
}

.exc-search-item-ref {
  font-weight: 600;
  color: #7c3aed;
}

[data-theme="dark"] .exc-search-item-ref,
[data-theme="sakura"] .exc-search-item-ref,
[data-theme="natural"] .exc-search-item-ref,
[data-theme="premium"] .exc-search-item-ref {
  color: #a78bfa;
}

/* Badges de Categoría */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge-tag-pt {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #d1fae5;
}

.badge-tag-gr {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ede9fe;
}

.badge-tag-me {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
}

.badge-tag-mp {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fef3c7;
}

/* ==========================================================================
   4. ESTADO VACÍO / PLACEHOLDER
   ========================================================================== */
.exc-empty-state {
  background: var(--card, #ffffff);
  border: 1px dashed var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 50px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

[data-theme="dark"] .exc-empty-state {
  background: #0f172a;
  border-color: #1e293b;
}

.exc-empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #f5f3ff;
  color: #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

[data-theme="dark"] .exc-empty-icon {
  background: rgba(124, 58, 237, 0.15);
  color: #a78bfa;
}

.exc-empty-state h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--foreground, #0f172a);
  margin: 0;
}

.exc-empty-state p {
  color: var(--muted-foreground, #64748b);
  font-size: 0.88rem;
  max-width: 500px;
  line-height: 1.5;
  margin: 0;
}

.exc-quick-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.exc-quick-tag-btn {
  padding: 5px 12px;
  background: var(--muted, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  color: var(--foreground, #334155);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.exc-quick-tag-btn:hover {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

[data-theme="dark"] .exc-quick-tag-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

[data-theme="dark"] .exc-quick-tag-btn:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: #7c3aed;
  color: #c4b5fd;
}

/* ==========================================================================
   5. RESUMEN EJECUTIVO INTEGRADO (Unificación de Veredicto + KPIs)
   Reemplaza los bloques pesados con una barra horizontal compacta y elegante
   ========================================================================== */
.exc-summary-card {
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: stretch;
  overflow: hidden;
  transition: all 0.2s ease;
}

[data-theme="dark"] .exc-summary-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* Sección Izquierda: Veredicto e Identidad de la Fórmula */
.exc-verdict-section {
  flex: 1.3;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}

.exc-verdict-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.exc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.exc-status-badge.is-exclusive {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ede9fe;
}

[data-theme="dark"] .exc-status-badge.is-exclusive {
  background: rgba(124, 58, 237, 0.15);
  color: #c4b5fd;
  border-color: rgba(124, 58, 237, 0.3);
}

.exc-status-badge.is-standard {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #d1fae5;
}

[data-theme="dark"] .exc-status-badge.is-standard {
  background: rgba(5, 150, 105, 0.15);
  color: #34d399;
  border-color: rgba(5, 150, 105, 0.3);
}

.exc-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.exc-code-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 6px;
}

[data-theme="dark"] .exc-code-tag {
  background: #1e293b;
  color: #94a3b8;
}

.exc-verdict-title {
  font-family: inherit !important;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--foreground, #0f172a);
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.exc-verdict-desc {
  font-size: 0.84rem;
  color: var(--muted-foreground, #64748b);
  margin: 0;
  line-height: 1.45;
}

/* Divisor Vertical del Panel */
.exc-summary-divider {
  width: 1px;
  background: var(--border, #e2e8f0);
  align-self: stretch;
  margin: 12px 0;
}

[data-theme="dark"] .exc-summary-divider {
  background: #1e293b;
}

/* Sección Derecha: Tira de Métricas Clave */
.exc-kpi-metrics {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  gap: 16px;
}

.exc-metric-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 85px;
}

.exc-metric-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground, #64748b);
}

.exc-metric-num {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--foreground, #0f172a);
  line-height: 1.15;
  margin: 2px 0;
}

.exc-metric-col.metric-exclusive .exc-metric-num {
  color: #7c3aed;
}

[data-theme="dark"] .exc-metric-col.metric-exclusive .exc-metric-num {
  color: #a78bfa;
}

.exc-metric-col.metric-deficit .exc-metric-num {
  color: #dc2626;
}

[data-theme="dark"] .exc-metric-col.metric-deficit .exc-metric-num {
  color: #f87171;
}

.exc-metric-hint {
  font-size: 0.7rem;
  color: var(--muted-foreground, #94a3b8);
  white-space: nowrap;
}

.exc-metric-divider {
  width: 1px;
  height: 36px;
  background: var(--border, #e2e8f0);
}

[data-theme="dark"] .exc-metric-divider {
  background: #1e293b;
}

/* Compatibilidad con clases anteriores de verdict-banner si se aplican */
.exc-verdict-banner {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* ==========================================================================
   6. TABLA DE DESGLOSE Y TOOLBAR MINIMALISTA
   ========================================================================== */
.exc-table-section {
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .exc-table-section {
  background: #0f172a;
  border-color: #1e293b;
}

.exc-table-toolbar {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #ffffff;
}

[data-theme="dark"] .exc-table-toolbar {
  background: #0f172a;
  border-color: #1e293b;
}

/* Filtros Segmentados */
.exc-filter-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 9px;
}

[data-theme="dark"] .exc-filter-chips {
  background: #1e293b;
}

.exc-filter-btn,
.exc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.exc-filter-btn:hover,
.exc-chip:hover {
  color: #0f172a;
}

[data-theme="dark"] .exc-filter-btn:hover,
[data-theme="dark"] .exc-chip:hover {
  color: #f1f5f9;
}

.exc-filter-btn.active,
.exc-chip.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .exc-filter-btn.active,
[data-theme="dark"] .exc-chip.active {
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.exc-filter-count,
.exc-chip-count {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(100, 116, 139, 0.12);
  color: inherit;
}

.exc-filter-btn.active .exc-filter-count,
.exc-chip.active .exc-chip-count {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

[data-theme="dark"] .exc-filter-btn.active .exc-filter-count,
[data-theme="dark"] .exc-chip.active .exc-chip-count {
  background: rgba(167, 139, 250, 0.2);
  color: #c4b5fd;
}

.exc-filter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.exc-dot-deficit { background: #ef4444; }
.exc-dot-surplus { background: #10b981; }

.exc-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exc-table-search {
  padding: 6px 12px;
  font-size: 0.82rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--foreground, #0f172a);
  width: 175px;
  transition: all 0.15s ease;
}

.exc-table-search:focus {
  outline: none;
  background: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
  width: 205px;
}

[data-theme="dark"] .exc-table-search {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

[data-theme="dark"] .exc-table-search:focus {
  background: #0f172a;
  border-color: #a78bfa;
}

/* ==========================================================================
   7. ESTILOS DE LA TABLA (MÁXIMA LEGIBILIDAD)
   ========================================================================== */
.exc-table-wrapper {
  overflow-x: auto;
  max-height: 650px;
}

.exc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
  text-align: left;
}

.exc-table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  z-index: 10;
  white-space: nowrap;
}

[data-theme="dark"] .exc-table thead th {
  background: #0f172a;
  color: #94a3b8;
  border-color: #1e293b;
}

.exc-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  transition: background 0.12s ease;
}

[data-theme="dark"] .exc-table tbody td {
  border-bottom-color: #1e293b;
}

.exc-row:hover td,
.exc-table tbody tr:hover td {
  background: rgba(124, 58, 237, 0.04);
}

[data-theme="dark"] .exc-row:hover td,
[data-theme="dark"] .exc-table tbody tr:hover td,
[data-theme="sakura"] .exc-row:hover td,
[data-theme="sakura"] .exc-table tbody tr:hover td,
[data-theme="natural"] .exc-row:hover td,
[data-theme="natural"] .exc-table tbody tr:hover td,
[data-theme="premium"] .exc-row:hover td,
[data-theme="premium"] .exc-table tbody tr:hover td,
[data-theme="cyberpop"] .exc-row:hover td,
[data-theme="cyberpop"] .exc-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.06);
}

/* Acento lateral sutil para filas exclusivas */
.exc-row.is-exclusive td:first-child,
.exc-table tbody tr.row-exclusive td:first-child {
  border-left: 3px solid #8b5cf6;
}

.exc-col-idx {
  text-align: center;
  color: #94a3b8;
  font-size: 0.78rem;
}

/* Celda Materia Prima */
.exc-mp-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exc-mp-top,
.exc-mp-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.exc-mp-code {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6366f1;
  letter-spacing: 0.02em;
}

[data-theme="dark"] .exc-mp-code {
  color: #a5b4fc;
}

.exc-type-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}
.exc-type-tag.tag-me { background: #eff6ff; color: #2563eb; }
.exc-type-tag.tag-gr { background: #fdf4ff; color: #a855f7; }

.exc-mp-name {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--foreground, #0f172a);
  line-height: 1.35;
}

[data-theme="dark"] .exc-mp-name {
  color: #f1f5f9;
}

/* Celda Stock & Pronóstico */
.exc-stock-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.exc-stock-value,
.exc-stock-main {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--foreground, #0f172a);
}

[data-theme="dark"] .exc-stock-value,
[data-theme="dark"] .exc-stock-main {
  color: #f8fafc;
}

.exc-stock-value small {
  font-size: 0.72rem;
  font-weight: normal;
  color: #94a3b8;
}

.exc-stock-delta,
.exc-stock-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.exc-stock-delta.is-sobra,
.exc-stock-pill.sobra {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #d1fae5;
}

[data-theme="dark"] .exc-stock-delta.is-sobra,
[data-theme="dark"] .exc-stock-pill.sobra {
  background: rgba(5, 150, 105, 0.15);
  color: #34d399;
  border-color: rgba(5, 150, 105, 0.3);
}

.exc-stock-delta.is-falta,
.exc-stock-pill.falta {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
}

[data-theme="dark"] .exc-stock-delta.is-falta,
[data-theme="dark"] .exc-stock-pill.falta {
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  border-color: rgba(220, 38, 38, 0.3);
}

.exc-stock-delta.is-balance,
.exc-stock-pill.neutro {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

[data-theme="dark"] .exc-stock-delta.is-balance,
[data-theme="dark"] .exc-stock-pill.neutro {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

.exc-stock-empty {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Celda Exclusiva vs Compartida (Fin de la saturación visual) */
.exc-tag-exclusive,
.badge-exclusive {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 7px;
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ede9fe;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

[data-theme="dark"] .exc-tag-exclusive,
[data-theme="dark"] .badge-exclusive {
  background: rgba(124, 58, 237, 0.15);
  color: #c4b5fd;
  border-color: rgba(124, 58, 237, 0.3);
}

.exc-tag-exclusive svg,
.badge-exclusive svg {
  width: 12px;
  height: 12px;
}

.exc-tag-semiexclusive {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 7px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.exc-tag-semiexclusive--tiempo {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

.exc-tag-semiexclusive--formulas {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}

.exc-tag-semiexclusive--ambos {
  background: #ffedd5;
  color: #c2410c;
  border-color: #fed7aa;
}

[data-theme="dark"] .exc-tag-semiexclusive {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .exc-tag-semiexclusive--tiempo {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .exc-tag-semiexclusive--formulas {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border-color: rgba(14, 165, 233, 0.3);
}

[data-theme="dark"] .exc-tag-semiexclusive--ambos {
  background: rgba(234, 88, 12, 0.15);
  color: #fb923c;
  border-color: rgba(234, 88, 12, 0.3);
}

.exc-tag-semiexclusive svg {
  width: 12px;
  height: 12px;
}

.exc-row.is-semiexclusive {
  background: rgba(245, 158, 11, 0.04);
}

.exc-tag-shared,
.badge-standard {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  border: none;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

[data-theme="dark"] .exc-tag-shared,
[data-theme="dark"] .badge-standard {
  color: #94a3b8;
}

.exc-tag-shared svg,
.badge-standard svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

/* Celda Otros Graneles */
.exc-otros-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.exc-otros-main,
.exc-otros-status {
  font-size: 0.8rem;
  font-weight: 600;
}

.exc-otros-main.is-zero,
.exc-text-success {
  color: #94a3b8;
  font-weight: 500;
}

.exc-otros-main.is-active,
.exc-text-info {
  color: #2563eb;
}

[data-theme="dark"] .exc-otros-main.is-active,
[data-theme="dark"] .exc-text-info {
  color: #60a5fa;
}

.exc-otros-sub {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Botón Ficha Detalle */
.exc-btn-detail,
.btn-view-lists {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border, #e2e8f0);
  background: #ffffff;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .exc-btn-detail,
[data-theme="dark"] .btn-view-lists {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

.exc-btn-detail:hover,
.btn-view-lists:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="dark"] .exc-btn-detail:hover,
[data-theme="dark"] .btn-view-lists:hover {
  background: #334155;
  color: #ffffff;
}

.exc-btn-detail svg,
.btn-view-lists svg {
  width: 12px;
  height: 12px;
}

/* ==========================================================================
   8. MODAL DE DIAGNÓSTICO Y FICHA TÉCNICA
   ========================================================================== */
.exc-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.exc-modal-card {
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  width: 100%;
  max-width: 920px;
  max-height: 88vh;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: excModalPop 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .exc-modal-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.5);
}

@keyframes excModalPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.exc-modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

[data-theme="dark"] .exc-modal-header {
  border-color: #1e293b;
}

.exc-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--foreground, #0f172a);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.exc-modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exc-modal-info-box {
  background: var(--muted, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

[data-theme="dark"] .exc-modal-info-box {
  background: #1e293b;
  border-color: #334155;
}

.exc-modal-stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.exc-modal-stock-card {
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

[data-theme="dark"] .exc-modal-stock-card {
  background: #0f172a;
  border-color: #334155;
}

.exc-modal-stock-card span {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted-foreground, #64748b);
}

.exc-modal-stock-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--foreground, #0f172a);
}

.exc-modal-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.exc-modal-list-table th {
  padding: 9px 12px;
  text-align: left;
  background: var(--muted, #f8fafc);
  border-bottom: 1px solid var(--border, #e2e8f0);
  color: var(--muted-foreground, #64748b);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

[data-theme="dark"] .exc-modal-list-table th {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.exc-modal-list-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border, #f1f5f9);
  vertical-align: middle;
}

[data-theme="dark"] .exc-modal-list-table td {
  border-bottom-color: #1e293b;
}

.exc-modal-list-table tr:hover td {
  background: rgba(124, 58, 237, 0.05);
}

[data-theme="dark"] .exc-modal-list-table tr:hover td,
[data-theme="sakura"] .exc-modal-list-table tr:hover td,
[data-theme="natural"] .exc-modal-list-table tr:hover td,
[data-theme="premium"] .exc-modal-list-table tr:hover td,
[data-theme="cyberpop"] .exc-modal-list-table tr:hover td {
  background: rgba(255, 255, 255, 0.06);
}

.badge-active-granel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #d1fae5;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

[data-theme="dark"] .badge-active-granel {
  background: rgba(5, 150, 105, 0.15);
  color: #34d399;
  border-color: rgba(5, 150, 105, 0.3);
}

.badge-inactive-granel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

[data-theme="dark"] .badge-inactive-granel {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}

.exc-modal-footer {
  padding: 12px 22px;
  border-top: 1px solid var(--border, #e2e8f0);
  display: flex;
  justify-content: flex-end;
  background: var(--card, #ffffff);
}

[data-theme="dark"] .exc-modal-footer {
  background: #0f172a;
  border-color: #1e293b;
}

/* ==========================================================================
   9. RESPONSIVIDAD Y MEDIA QUERIES
   ========================================================================== */
@media (max-width: 950px) {
  .exc-summary-card {
    flex-direction: column;
  }
  .exc-summary-divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }
  .exc-kpi-metrics {
    justify-content: space-around;
    padding: 14px 18px;
    flex-wrap: wrap;
  }
  .exc-metric-divider {
    display: none;
  }
}

@media (max-width: 650px) {
  .exc-hero-card {
    padding: 18px 16px;
  }
  .exc-table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .exc-filter-chips {
    overflow-x: auto;
    width: 100%;
  }
  .exc-table-actions {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .exc-table-search {
    width: 100%;
  }
  .exc-table-search:focus {
    width: 100%;
  }
  .exc-kpi-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* ==========================================================================
   10. HERRAMIENTAS ADICIONALES: GRANELES EXENTOS Y LOTE DE EXPORTACIÓN
   ========================================================================== */
.exc-tools-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: -6px;
}

@media (max-width: 860px) {
  .exc-tools-strip {
    grid-template-columns: 1fr;
  }
}

.exc-tool-box {
  background: var(--card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

[data-theme="dark"] .exc-tool-box {
  background: #0f172a;
  border-color: #1e293b;
}

.exc-exempt-box {
  border-left: 3px solid #10b981;
}

.exc-batch-box {
  border-left: 3px solid #0284c7;
}

.exc-tool-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.exc-tool-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--foreground, #0f172a);
}

.exc-tool-icon {
  width: 17px;
  height: 17px;
  color: #10b981;
}

.exc-badge-counter {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}

.exc-tool-box-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.exc-tool-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border, #e2e8f0);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-foreground, #64748b);
  cursor: pointer;
  transition: all 0.15s ease;
}

.exc-tool-btn-ghost:hover {
  background: var(--muted, #f1f5f9);
  color: var(--foreground, #0f172a);
}

[data-theme="dark"] .exc-tool-btn-ghost {
  border-color: #334155;
  color: #94a3b8;
}

[data-theme="dark"] .exc-tool-btn-ghost:hover {
  background: #1e293b;
  color: #f8fafc;
}

.exc-tool-desc {
  font-size: 0.8rem;
  color: var(--muted-foreground, #64748b);
  margin: 0;
  line-height: 1.4;
}

.exc-tool-expandable {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border, #e2e8f0);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

[data-theme="dark"] .exc-tool-expandable {
  border-top-color: #1e293b;
}

.exc-input-inline-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.exc-inline-input {
  flex: 1;
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 6px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--muted, #f8fafc);
  color: var(--foreground, #0f172a);
  outline: none;
}

.exc-inline-input:focus {
  border-color: #10b981;
  background: #ffffff;
}

[data-theme="dark"] .exc-inline-input {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

.exc-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  align-items: center;
}

.exc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 14px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  transition: all 0.15s ease;
}

[data-theme="dark"] .exc-chip {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

.exc-chip.is-exempt {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #047857;
}

[data-theme="dark"] .exc-chip.is-exempt {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.exc-chip.is-batch {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.3);
  color: #0369a1;
}

[data-theme="dark"] .exc-chip.is-batch {
  background: rgba(2, 132, 199, 0.18);
  border-color: rgba(2, 132, 199, 0.4);
  color: #38bdf8;
}

.exc-chip-remove {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: inherit;
  opacity: 0.6;
  font-size: 14px;
  line-height: 1;
}

.exc-chip-remove:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

.exc-empty-chip-hint {
  font-size: 0.78rem;
  color: var(--muted-foreground, #94a3b8);
  font-style: italic;
}

/* Selector de versiones BOM */
.exc-bom-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 8px;
}

[data-theme="dark"] .exc-bom-switcher {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.25);
}

.exc-bom-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #7c3aed;
}

[data-theme="dark"] .exc-bom-label {
  color: #c4b5fd;
}

.exc-bom-options {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.exc-bom-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: #ffffff;
  color: #6d28d9;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

[data-theme="dark"] .exc-bom-btn {
  background: #1e293b;
  color: #ddd6fe;
  border-color: #475569;
}

.exc-bom-btn:hover {
  background: #f5f3ff;
  border-color: #7c3aed;
}

.exc-bom-btn.active {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3);
}

[data-theme="dark"] .exc-bom-btn.active {
  background: #8b5cf6;
  color: #ffffff;
  border-color: #8b5cf6;
}

/* Tag Exenta de Exclusividad en Tabla */
.exc-tag-exempt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
  white-space: nowrap;
  cursor: help;
}

[data-theme="dark"] .exc-tag-exempt {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

