/* ============================================================
   FB Marketplace Renovador Pro - Diseño De-saturado & Multitema
   ============================================================ */
:root {
  /* Fondo Principal & Superficies */
  --bg-main: #0b1120;
  --bg-surface: #111a2e;
  --bg-card: #182338;
  --bg-card-hover: #1f2d46;
  --bg-input: #0f172a;
  
  /* Bordes */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-glow: rgba(99, 102, 241, 0.3);

  /* Color Primario Armonioso (Indigo Calmo) */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #818cf8;
  --primary-soft: rgba(79, 70, 229, 0.15);
  --primary-glow: rgba(79, 70, 229, 0.25);

  /* Estados Funcionales Suaves */
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.12);
  --success-glow: rgba(16, 185, 129, 0.2);
  
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --warning-glow: rgba(245, 158, 11, 0.2);
  
  --error: #ef4444;
  --error-soft: rgba(239, 68, 68, 0.12);
  --error-glow: rgba(239, 68, 68, 0.2);

  /* Tipografía */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --card-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.4);
  --modal-bg: #111a2e;

  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
}

/* ============================================================
   TEMA DE DÍA (MODO CLARO / LIGHT THEME)
   ============================================================ */
body.light-theme {
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #f1f5f9;
  --bg-card-hover: #e2e8f0;
  --bg-input: #ffffff;
  
  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-glow: rgba(79, 70, 229, 0.2);

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #4f46e5;
  --primary-soft: rgba(79, 70, 229, 0.08);
  --primary-glow: rgba(79, 70, 229, 0.15);

  --success: #059669;
  --success-soft: #ecfdf5;
  --success-glow: rgba(5, 150, 105, 0.15);

  --warning: #d97706;
  --warning-soft: #fffbeb;
  --warning-glow: rgba(217, 119, 6, 0.15);

  --error: #dc2626;
  --error-soft: #fef2f2;
  --error-glow: rgba(220, 38, 38, 0.15);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  --modal-bg: #ffffff;
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.view-screen {
  min-height: 100vh;
  transition: opacity 0.3s ease;
}

.hidden {
  display: none !important;
}

/* ============================================================
   1. PANTALLA DE LOGIN
   ============================================================ */
#login-view {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
  background: radial-gradient(circle at 50% 30%, #1e1b4b 0%, #090d16 80%);
}

.login-bg-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 30px rgba(37, 99, 235, 0.15);
  position: relative;
  z-index: 10;
}

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

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid var(--border-glow);
  padding: 6px 14px;
  border-radius: 30px;
  margin-bottom: 16px;
}

.brand-icon {
  font-size: 16px;
}

.brand-name {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary-light);
  text-transform: uppercase;
}

.login-title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

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

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
  pointer-events: none;
  opacity: 0.7;
}

.input-wrap input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px 12px 42px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.input-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.login-error {
  background: var(--error-soft);
  border: 1px solid var(--error);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  text-align: center;
}

.btn-primary-large {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 13px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  transition: all 0.2s ease;
}

.btn-primary-large:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

/* ============================================================
   2. DASHBOARD - TOP NAV
   ============================================================ */
.top-nav {
  height: 64px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.brand-title span {
  color: var(--primary-light);
  font-size: 12px;
  background: var(--primary-soft);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.server-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--success);
  margin-top: 2px;
}

.server-status.offline {
  color: var(--error);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* Master Toggle Control */
.master-control-box {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
}

.master-text {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.master-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-main);
}

.master-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.master-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.master-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.master-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #475569;
  transition: 0.25s;
  border-radius: 24px;
}

.master-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input:checked + .master-slider {
  background: #10b981;
}

input:checked + .master-slider:before {
  transform: translateX(20px);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
}

.btn-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-icon.theme-toggle:hover {
  background: var(--primary-soft);
  color: var(--primary-light);
  border-color: var(--primary);
}

.btn-icon.logout:hover {
  background: var(--error-soft);
  color: var(--error);
}

/* ============================================================
   3. DASHBOARD - MAIN CONTAINER & METRICS
   ============================================================ */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s, border-color 0.15s;
}

.metric-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.15);
}

.metric-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.metric-icon.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.metric-icon.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.metric-icon.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.metric-icon.amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.metric-data {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.metric-val {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  font-family: 'JetBrains Mono', monospace;
}

.metric-name {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   4. TABS NAVIGATION
   ============================================================ */
.tabs-nav {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  position: relative;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--primary-light);
  background: rgba(37, 99, 235, 0.1);
  border-bottom: 2px solid var(--primary);
}

.tab-count {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
}

.tab-btn.active .tab-count {
  background: var(--primary);
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 20px;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: flex;
}

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

/* ============================================================
   5. PANE HEADERS & CONTROLS
   ============================================================ */
.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.search-wrap {
  position: relative;
  min-width: 320px;
  display: flex;
  align-items: center;
}

.search-wrap.small {
  min-width: 240px;
}

.search-icon {
  position: absolute;
  left: 14px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0.6;
}

.search-wrap input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 40px;
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  transition: all 0.2s;
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.pane-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-pri, .btn-sec, .btn-danger-outline {
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  user-select: none;
}

.btn-pri {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.btn-pri:hover {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

.btn-sec {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-sec:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-subtle);
  color: var(--text-main);
  transform: translateY(-1px);
}

.btn-danger-outline {
  background: var(--error-soft);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fff;
  transform: translateY(-1px);
}

/* ============================================================
   6. LISTINGS GRID & CARDS
   ============================================================ */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.listing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.listing-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.5);
}

.listing-card.disabled {
  opacity: 0.65;
  border-style: dashed;
}

.listing-thumb-wrap {
  width: 100%;
  height: 160px;
  background: #1e293b;
  position: relative;
  overflow: hidden;
}

.listing-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.listing-card:hover .listing-thumb {
  transform: scale(1.05);
}

.listing-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #64748b;
}

.listing-price-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #34d399;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
}

.listing-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.listing-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.listing-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.listing-badge-count {
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary-light);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
}

.listing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-color);
  padding: 10px 16px;
}

.listing-switch-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

.listing-card.disabled .listing-switch-label {
  color: var(--text-dim);
}

.item-toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.item-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.item-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: 0.25s;
  border-radius: 20px;
}

.item-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

input:checked + .item-slider {
  background-color: #10b981;
}

input:checked + .item-slider:before {
  transform: translateX(18px);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.empty-state h3 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13.5px;
  max-width: 460px;
  margin: 0 auto;
}

/* ============================================================
   7. RENEWALS HISTORY TABLE
   ============================================================ */
.filter-group {
  display: flex;
  gap: 8px;
}

.filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.filter-chip.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--primary);
  color: #fff;
}

.table-responsive {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.history-table th {
  background: rgba(30, 41, 59, 0.6);
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.history-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.history-table tr:last-child td {
  border-bottom: none;
}

.history-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-empty {
  text-align: center;
  padding: 40px !important;
  color: var(--text-muted);
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cell-thumb {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: #1e293b;
  flex-shrink: 0;
}

.cell-title {
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.status-tag.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.status-tag.skipped {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.status-tag.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

/* ============================================================
   8. SETTINGS PANE
   ============================================================ */
.settings-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 900px;
  box-sizing: border-box;
}

.settings-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.settings-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.settings-form {
  width: 100%;
  box-sizing: border-box;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
  width: 100%;
  box-sizing: border-box;
}

.settings-grid .form-group {
  width: 100%;
  box-sizing: border-box;
}

.settings-grid .form-group select,
.settings-grid .form-group input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s;
}

.settings-grid .form-group select:focus,
.settings-grid .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-help {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ============================================================
   ESTILOS DE TABLA DE PUBLICACIONES
   ============================================================ */
.listings-table td {
  vertical-align: middle;
}

.table-toggle-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.table-toggle-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #34d399;
}

.table-toggle-label.disabled {
  color: #94a3b8;
}

.listing-row-disabled {
  opacity: 0.6;
}

.listing-row-disabled td {
  background: rgba(0, 0, 0, 0.15);
}

/* ============================================================
   9. TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
.toast.warning { border-left: 4px solid var(--warning); }

/* Responsive Adjustments */
@media (max-width: 768px) {
  .top-nav {
    padding: 0 16px;
    height: auto;
    flex-direction: column;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .master-control-box {
    width: 100%;
    justify-content: space-between;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   10. LICENCIAS, SUPERADMIN Y MODALES
   ============================================================ */
.license-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  color: #34d399;
}

.license-pill.expired {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.license-pill.suspended {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

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

.role-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.2);
  color: var(--primary-light);
  padding: 2px 7px;
  border-radius: 6px;
  margin-left: 4px;
}

.role-badge.superadmin {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.license-alert-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(185, 28, 28, 0.25));
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #fff;
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.2);
}

.license-alert-banner .alert-icon {
  font-size: 28px;
}

.license-alert-banner h4 {
  font-size: 15px;
  font-weight: 800;
  color: #fca5a5;
  margin-bottom: 2px;
}

.license-alert-banner p {
  font-size: 13px;
  color: #fecaca;
  margin: 0;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.role-tag.superadmin {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.role-tag.user {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.action-btns-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-tiny {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-tiny.extend {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #34d399;
}

.btn-tiny.extend:hover {
  background: rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.btn-tiny.suspend {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}

.btn-tiny.suspend:hover {
  background: rgba(245, 158, 11, 0.3);
}

.btn-tiny.activate {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #60a5fa;
}

.btn-tiny.activate:hover {
  background: rgba(59, 130, 246, 0.3);
}

.btn-tiny.delete {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
}

.btn-tiny.delete:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  width: 100%;
  max-width: 480px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(37, 99, 235, 0.2);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-icon {
  font-size: 28px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.modal-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-form input,
.modal-form select {
  width: 100%;
  box-sizing: border-box;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  transition: all 0.2s;
}

.modal-form input:focus,
.modal-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* ============================================================
   11. PUBLICADOR DE GRUPOS CON IA & FONDOS DE COLOR
   ============================================================ */
/* ============================================================
   ESTILOS GLOBALES DE FORMULARIO: INPUTS, SELECTS, TEXTAREAS
   ============================================================ */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
textarea,
select {
  width: 100%;
  box-sizing: border-box;
  background: #0d1526;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 9px 12px;
  color: #f8fafc;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input[type="text"]::placeholder,
textarea::placeholder {
  color: #64748b;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  background: #0f192d;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' 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 10px center;
  background-size: 13px;
  padding-right: 30px;
  cursor: pointer;
}

select option {
  background: #0f172a;
  color: #f8fafc;
}

.form-group label {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.2px;
  margin-bottom: 3px;
  display: block;
}

/* ============================================================
   CUADRÍCULA 50/50: COMPOSITOR DE TAREAS & COLA EN VIVO
   ============================================================ */
.tasks-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1080px) {
  .tasks-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.composer-card {
  height: auto;
  display: flex;
  flex-direction: column;
  background: #0e1626;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.35);
}

.pending-tasks-card {
  display: flex;
  flex-direction: column;
  background: #0e1626;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  overflow: hidden;
}

.composer-form-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Background Color Mode Switcher */
.bg-mode-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #0a0f1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px;
  border-radius: 8px;
}

.bg-mode-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.bg-mode-option input[type="radio"] {
  display: none;
}

.bg-mode-option:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.03);
}

.bg-mode-option.selected {
  background: #182438;
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.35);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Compact Lists inside Composer */
.inline-accounts-list.compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
  max-height: 130px;
  overflow-y: auto;
}

.inline-groups-list.compact-list {
  max-height: 125px;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-select-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #121c2e;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  padding: 6px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.account-select-card:hover {
  background: #16243a;
  border-color: rgba(255, 255, 255, 0.12);
}

.account-select-card.selected {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.35);
}

.inline-interval-grid.compact-interval {
  display: grid;
  grid-template-columns: 105px 105px 1fr;
  gap: 8px;
  align-items: flex-end;
}

/* ------------------------------------------------------------
   COLUMNA TAREAS PENDIENTES (COLA EN TIEMPO REAL)
   ------------------------------------------------------------ */
.tasks-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 2px 0;
}

.task-filter-btn {
  background: #111a2c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.task-filter-btn:hover {
  background: #162238;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.15);
}

.task-filter-btn.active {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.4);
  font-weight: 600;
}

.pending-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 8px;
}

/* Tarjeta individual de Tarea Pendiente - Relieve y Tonalidad */
.pending-task-item-card {
  background: #141f32;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pending-task-item-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.pending-task-item-card.running {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.06);
}

.pending-task-item-card.paused {
  opacity: 0.75;
  border-style: dashed;
  background: rgba(15, 23, 42, 0.5);
}

.task-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.task-id-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.task-campaign-badge {
  font-size: 11px;
  font-weight: 600;
  background: #1a273e;
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.2);
  padding: 2px 8px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}

.task-campaign-badge:hover {
  border-color: #38bdf8;
  color: #ffffff;
}

.task-destination-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
  flex-wrap: wrap;
}

.task-copy-snippet-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 6px;
  background: #0d1524;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.task-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.task-copy-text-preview {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.task-card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.task-time-info {
  font-size: 11px;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
}

.task-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ------------------------------------------------------------
   MODAL DE GESTIÓN INTEGRAL DE GRUPOS
   ------------------------------------------------------------ */
.modal-tabs-switcher {
  display: flex;
  gap: 8px;
  padding: 0 24px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  color: #94a3b8;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-tab-btn:hover {
  color: #f8fafc;
}

.modal-tab-btn.active {
  color: #818cf8;
  border-bottom-color: #6366f1;
}

.manage-groups-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.manage-groups-search-box {
  flex: 1;
  min-width: 240px;
}

.manage-groups-actions {
  display: flex;
  gap: 8px;
}

.delete-impact-card {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
}

.delete-impact-warning {
  background: #181824;
  border-left: 3px solid #ef4444;
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 12.5px;
  color: #fca5a5;
  line-height: 1.45;
}


.modal-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.modal-summary-stat.total .stat-num {
  color: var(--primary-light);
  font-size: 18px;
}

.modal-summary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.modal-variations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  max-height: 440px;
  overflow-y: auto;
  padding: 2px;
}

.modal-variation-edit-card {
  position: relative;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.modal-variation-edit-card textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  padding: 8px;
  resize: none;
  min-height: 70px;
  outline: none;
}

.modal-variation-edit-card textarea:focus {
  border-color: #fff;
  background: rgba(0, 0, 0, 0.5);
}

.modal-var-card-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-var-color-selector {
  display: flex;
  align-items: center;
  gap: 4px;
}

.var-palette-mini-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.var-palette-mini-dot:hover {
  transform: scale(1.25);
  border-color: #fff;
}

.var-palette-mini-dot.active {
  transform: scale(1.2);
  border: 2px solid #fff;
}

.studio-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
}

.studio-card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.studio-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--border-color);
  margin-bottom: 6px;
}

.studio-badge.green {
  background: var(--success-soft);
  color: var(--success);
}

.studio-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.studio-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Selector de Modo de Creación (Segmented Switcher) */
.campaign-mode-switcher {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 4px;
  margin: 4px 0 8px 0;
}

.campaign-mode-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
}

.campaign-mode-tab:hover {
  color: var(--text-main);
}

.campaign-mode-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
}

.group-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}

.group-form textarea,
.group-form input,
.group-form select {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 13.5px;
  font-family: inherit;
  transition: all 0.2s ease;
  resize: vertical;
}

.group-form textarea:focus,
.group-form input:focus,
.group-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.ai-source-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 6px;
}

.studio-badge.purple {
  background: var(--primary-soft);
  color: var(--primary-light);
  border-color: var(--border-color);
}

.studio-badge.blue {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.25);
}

/* Selector de Paletas de Fondo Manual */
.manual-bg-palette-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-bg-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  transition: all 0.15s ease;
  user-select: none;
}

.manual-bg-option input[type="radio"] {
  display: none;
}

.manual-bg-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.manual-bg-option:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}

.manual-bg-option.selected {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-light);
  font-weight: 600;
}

.manual-bulk-container {
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

/* Previsualización de Variaciones */
.variations-preview-wrap {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

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

.variations-counter {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary-light);
  border: 1px solid var(--border-color);
  padding: 3px 8px;
  border-radius: 6px;
}

.btn-tiny {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-tiny:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}

.btn-tiny.delete {
  color: var(--error);
  border-color: var(--error-soft);
}

.btn-tiny.delete:hover {
  background: var(--error-soft);
  border-color: var(--error);
}

.btn-tiny-ghost {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-tiny-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.variations-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

/* Tarjetas de Fondo de Facebook */
.fb-bg-card {
  position: relative;
  aspect-ratio: 1.3 / 1;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.fb-bg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.fb-bg-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  z-index: 2;
  word-break: break-word;
}

/* FB Background Themes */
.fb-bg-fire { background: linear-gradient(135deg, #e11d48 0%, #ea580c 100%); }
.fb-bg-purple { background: linear-gradient(135deg, #7c3aed 0%, #c026d3 100%); }
.fb-bg-blue { background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%); }
.fb-bg-sunset { background: linear-gradient(135deg, #dc2626 0%, #d97706 100%); }
.fb-bg-emerald { background: linear-gradient(135deg, #059669 0%, #0d9488 100%); }
.fb-bg-black { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); }

.fb-bg-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  padding: 1px 6px;
  border-radius: 4px;
  color: #34d399;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 3;
}

.fb-bg-copy-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  z-index: 3;
  transition: all 0.15s ease;
}

.fb-bg-copy-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

/* ============================================================
   PANEL INTEGRADO: ASIGNACIÓN Y DISTRIBUCIÓN DE TAREAS
   ============================================================ */
.inline-distribution-card {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.inline-dist-header {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.inline-dist-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.inline-dist-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dist-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.dist-quick-actions {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.btn-dist-filter {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-dist-filter:hover {
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.btn-dist-filter.active {
  background: var(--primary-soft);
  color: var(--primary-light);
  font-weight: 600;
}

.inline-accounts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.account-select-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.account-select-card:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
}

.account-select-card.selected {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.account-select-card input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.account-select-card .acc-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
}

.account-select-card .acc-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.inline-groups-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
}

.inline-group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s ease;
}

.inline-group-item:hover {
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
}

.inline-group-item.selected {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.inline-group-name {
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
}

.inline-interval-grid {
  display: grid;
  grid-template-columns: 140px 140px 1fr;
  align-items: center;
  gap: 14px;
}

@media (max-width: 768px) {
  .inline-interval-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.interval-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.interval-input-group label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.interval-input-group input {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
}

.interval-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.interval-info-badge {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 14px;
}

.inline-dist-summary-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.stat-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
}

.stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.summary-text {
  font-size: 12px;
  color: var(--text-muted);
  border-left: 1px solid var(--border-color);
  padding-left: 16px;
  flex: 1;
}

.inline-dist-actions {
  margin-top: 4px;
}

/* ============================================================
   12. STUDIO CONTROL CARD: TOKEN GEMINI & MODO DE PUBLICACIÓN
   ============================================================ */
.studio-control-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.control-card-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .control-card-grid {
    grid-template-columns: 1fr;
  }
}

.control-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-badge.purple {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}

.control-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
}

.status-dot-mini {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.status-dot-mini.active {
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.status-dot-mini.warning {
  background: #fbbf24;
}

.status-dot-mini.error {
  background: #f87171;
}

.control-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.password-input-wrap {
  position: relative;
  flex: 1;
}

.password-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 9px 36px 9px 12px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.2s;
}

.password-input-wrap input:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
}

.btn-toggle-pwd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: #94a3b8;
  padding: 4px;
}

.btn-toggle-pwd:hover {
  color: #fff;
}

.control-btn-group {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.control-btn-group button {
  padding: 8px 14px;
  font-size: 12.5px;
}

.mode-badge-active {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.mode-selector-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-radio-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.mode-radio-label:hover {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(15, 23, 42, 0.8);
}

.mode-radio-label input[type="radio"] {
  margin-top: 3px;
  accent-color: #a855f7;
}

.mode-radio-label:has(input:checked) {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.12);
}

.mode-radio-content p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

@media (max-width: 600px) {
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}

.ai-source-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.fb-bg-actions {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 4;
}

.fb-bg-action-btn {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fb-bg-action-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: #fff;
  transform: translateY(-1px);
}

.fb-bg-action-btn.post-manual {
  background: rgba(168, 85, 247, 0.7);
  border-color: rgba(255, 255, 255, 0.4);
}

.fb-bg-action-btn.post-manual:hover {
  background: rgba(168, 85, 247, 0.95);
}

/* ============================================================
   13. MULTI-FACEBOOK ACCOUNTS BAR & TASK QUEUE
   ============================================================ */
.fb-accounts-bar {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.4);
}

.fb-accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.quota-badge {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.fb-accounts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fb-account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 14px;
  transition: all 0.2s;
}

.fb-account-card:hover {
  border-color: #60a5fa;
  background: rgba(30, 41, 59, 0.9);
}

.fb-account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3b82f6;
  background: #1e293b;
}

.fb-account-info {
  display: flex;
  flex-direction: column;
}

.fb-account-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.fb-account-id {
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  color: #94a3b8;
}

.empty-accts-hint {
  font-size: 12px;
  color: #94a3b8;
  font-style: italic;
  padding: 6px 0;
}

/* ============================================================
   14. WIDE MODALS & SCHEDULER PANELS (SPACIOUS & MODERN)
   ============================================================ */
.modal-box.modal-wide {
  max-width: 780px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  gap: 16px;
  padding: 24px 28px;
}

.modal-icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.modal-icon-badge.purple {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
}

.schedule-panel-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.schedule-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-select-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #93c5fd;
  cursor: pointer;
  background: rgba(59, 130, 246, 0.12);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  transition: all 0.2s;
}

.schedule-select-all-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #fff;
}

.schedule-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.schedule-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.schedule-item-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(59, 130, 246, 0.4);
}

.schedule-item-card.selected {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.5);
}

.schedule-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.schedule-item-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #3b82f6;
  flex-shrink: 0;
}

.schedule-item-avatar.placeholder {
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.schedule-item-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.schedule-item-title {
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-item-subtitle {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-item-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.schedule-item-badge.success {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.schedule-item-badge.warning {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.schedule-item-badge.error {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.schedule-summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.schedule-summary-card .summary-icon {
  font-size: 24px;
}

.schedule-summary-card .summary-text {
  font-size: 12.5px;
  color: #e2e8f0;
  line-height: 1.4;
}

.schedule-summary-card strong {
  color: #c084fc;
}

.schedule-variation-preview-box {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.schedule-section-label {
  font-size: 10.5px;
  font-weight: 800;
  color: #c084fc;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  display: block;
}

.schedule-variation-text {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

/* Task Queue Filter Bar & Table */
.task-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  background: rgba(15, 23, 42, 0.5);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-chip.task-filter-chip {
  cursor: pointer;
}

.filter-chip.purple.active,
.filter-chip.purple:hover {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-color: #a855f7;
}

.task-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
}

.task-tag.validate {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.task-tag.post {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Variation Card Enhancement */
.fb-bg-pill-group {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: auto;
}

.fb-bg-sched-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #93c5fd;
  cursor: pointer;
  transition: all 0.2s;
}

.fb-bg-sched-pill:hover {
  background: rgba(0, 0, 0, 0.85);
  border-color: #60a5fa;
  transform: scale(1.04);
}

.fb-bg-sched-pill.has-pending {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.5);
}

.fb-bg-sched-pill.has-completed {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.5);
}

/* Modal Variation Tasks Detail */
.modal-body-scrollable {
  max-height: 60vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.variation-detail-banner {
  background: linear-gradient(135deg, #e11d48, #be123c);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  position: relative;
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.3);
}

.var-detail-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.6);
  padding: 2px 8px;
  border-radius: 8px;
  color: #34d399;
  margin-bottom: 8px;
}

.var-detail-text {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.stats-grid-small {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.stat-pill-sm {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-pill-sm .stat-val {
  font-size: 16px;
  font-weight: 800;
}

.stat-pill-sm .stat-lbl {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}

@media (max-width: 640px) {
  .stats-grid-small {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   15. QUEUE STATUS HUD & NEXT UPCOMING SCHEDULE WIDGET
   ============================================================ */
.queue-status-hud {
  margin-bottom: 14px;
}

.queue-hud-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.6));
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.queue-hud-empty-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.queue-hud-empty-icon {
  font-size: 26px;
}

.queue-hud-empty-title {
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 2px;
}

.queue-hud-empty-desc {
  font-size: 12px;
  color: #94a3b8;
}

.queue-hud-pending-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.08);
  position: relative;
  overflow: hidden;
}

.queue-hud-pending-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #3b82f6, #8b5cf6);
  animation: pulseGradient 3s infinite alternate;
}

@keyframes pulseGradient {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

.queue-hud-pending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.queue-hud-title-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #fbbf24;
}

.queue-hud-count-pill {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
}

.queue-hud-next-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
}

@media (max-width: 768px) {
  .queue-hud-next-card {
    grid-template-columns: 1fr;
  }
}

.hud-next-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hud-next-timing {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hud-timer-badge {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.hud-target-group {
  font-size: 12.5px;
  font-weight: 700;
  color: #93c5fd;
  text-decoration: none;
}

.hud-target-group:hover {
  text-decoration: underline;
  color: #fff;
}

.hud-next-copy {
  font-size: 13px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid #f59e0b;
  padding: 6px 10px;
  border-radius: 0 4px 4px 0;
  margin: 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-next-acct {
  font-size: 11.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-next-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* FB Account Cards Enhanced Status */
.fb-account-card.offline {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(30, 41, 59, 0.35);
  opacity: 0.85;
}

.fb-account-card.offline:hover {
  opacity: 1;
  border-color: rgba(239, 68, 68, 0.45);
}

.fb-acc-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.fb-acc-status-tag.online {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.fb-acc-status-tag.offline {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.fb-acc-status-tag.paused {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.btn-acc-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-acc-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ============================================================
   16. GESTOR DE CAMPAÑAS & PROGRESO X DE X EN VIVO
   ============================================================ */
.campaign-progress-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

/* ============================================================
   16. GESTOR DE CONJUNTOS DE ANUNCIOS (CAMPAÑAS) & PROGRESO
   ============================================================ */
.campaign-sets-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Tarjetas de Conjunto de Anuncios: Tono Gris / Slate Elegante */
.campaign-set-card {
  background: linear-gradient(180deg, #141b27 0%, #0e131d 100%);
  border: 1.5px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s ease;
  position: relative;
}

.campaign-set-card:hover {
  border-color: rgba(148, 163, 184, 0.4);
  background: linear-gradient(180deg, #172030 0%, #101724 100%);
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.65), 0 0 15px rgba(148, 163, 184, 0.08);
  transform: translateY(-2px);
}

.campaign-set-card.done {
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.5);
}

.campaign-set-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.campaign-set-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.campaign-set-icon {
  font-size: 20px;
}

.campaign-set-title {
  font-size: 15.5px;
  font-weight: 800;
  color: #f8fafc;
  margin: 0;
  letter-spacing: -0.2px;
}

.campaign-set-meta-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #94a3b8;
  flex-wrap: wrap;
}

.campaign-set-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
}

.campaign-set-badge.running {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.campaign-set-badge.scheduled {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.campaign-set-badge.completed {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.campaign-set-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* BOTÓN RESALTADO: REANUDAR CAMPAÑA (VIBRANTE ESMERALDA) */
.btn-campaign-resume-highlight {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  border: 1px solid rgba(52, 211, 153, 0.6);
  border-radius: var(--radius-md);
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 12px rgba(16, 185, 129, 0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.2px;
}

.btn-campaign-resume-highlight:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  border-color: rgba(52, 211, 153, 0.9);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.6);
  transform: translateY(-1px);
}

.btn-campaign-resume-highlight:active {
  transform: translateY(0);
}

/* BOTÓN SECUNDARIO: VER ANUNCIOS (TONO GRIS / SLATE NEUTRO) */
.btn-campaign-view {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-campaign-view:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.btn-campaign-view:active {
  transform: translateY(0);
}

/* BOTÓN REASIGNAR (TONO GRIS DISCRETO) */
.btn-campaign-redistribute {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-campaign-redistribute:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f1f5f9;
  transform: translateY(-1px);
}

.campaign-set-progress-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.campaign-set-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.campaign-set-stat-text {
  color: #e2e8f0;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.campaign-set-percent {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  color: #38bdf8;
  font-size: 13.5px;
}

.campaign-set-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.campaign-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.campaign-hero-card.finished {
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 20px rgba(52, 211, 153, 0.1);
}

.campaign-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.campaign-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.campaign-name-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.2px;
}

.campaign-status-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.campaign-status-badge.running {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
  animation: pulseBadge 2s infinite;
}

.campaign-status-badge.finished {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

@keyframes pulseBadge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.campaign-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.campaign-progress-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.campaign-bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.campaign-bar-ratio {
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.campaign-bar-ratio strong {
  color: #38bdf8;
  font-size: 14px;
}

.campaign-bar-percent {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  color: #38bdf8;
  font-size: 13.5px;
}

.camp-progress-bar-wrap {
  width: 100%;
  height: 10px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.camp-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #6366f1, #a855f7);
  border-radius: 6px;
  transition: width 0.5s ease-in-out;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.campaign-hero-card.finished .camp-progress-bar-fill {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.6);
}

.campaign-pills-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.camp-stat-chip {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.camp-stat-chip.pending {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.1);
}

.camp-stat-chip.completed {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.1);
}

.camp-stat-chip.failed {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.1);
}

/* Schedule Mode Selector Cards */
.schedule-mode-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.schedule-mode-card:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(56, 189, 248, 0.4);
}

.schedule-mode-card.selected {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.12);
}

.schedule-mode-card input[type="radio"] {
  margin-top: 3px;
  accent-color: #38bdf8;
  cursor: pointer;
}

.mode-card-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mode-card-content strong {
  font-size: 13px;
  color: #fff;
}

.mode-card-content span {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.4;
}

/* Badges for Table */
.camp-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
}

.batch-index-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #c084fc;
  background: rgba(192, 132, 252, 0.12);
  border: 1px solid rgba(192, 132, 252, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* Campaign Modal Hero */
.camp-progress-hero {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.camp-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.camp-hero-name {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
}

.camp-hero-badge {
  font-size: 11px;
  font-weight: 800;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.camp-hero-percent {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 800;
  color: #38bdf8;
  display: block;
  text-align: right;
}

.camp-hero-count {
  font-size: 12px;
  color: #94a3b8;
  display: block;
}

#modal-campaign-detail .modal-box.modal-wide {
  max-width: 1440px;
  width: 96vw;
  max-height: 94vh;
  padding: 24px 30px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.85), 0 0 45px rgba(56, 189, 248, 0.15);
}

#modal-campaign-detail .table-responsive {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  max-height: 480px !important;
  width: 100% !important;
}

#modal-campaign-detail .history-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

#modal-campaign-detail .history-table th,
#modal-campaign-detail .history-table td {
  padding: 10px 10px !important;
  vertical-align: middle;
  font-size: 12px;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

#camp-tasks-table-body td {
  padding: 10px 10px;
  vertical-align: middle;
  font-size: 12px;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

#camp-tasks-table-body .copy-cell {
  white-space: normal;
  line-height: 1.35;
  color: #e2e8f0;
  word-break: break-word;
}

#camp-tasks-table-body .group-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

#camp-tasks-table-body .group-link:hover {
  text-decoration: underline;
  color: #60a5fa;
}

/* ============================================================
   15. CAMPAIGN REDISTRIBUTION & ACCOUNT REASSIGNMENT UI
   ============================================================ */
.btn-campaign-redistribute {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 6px 13px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-campaign-redistribute:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.btn-campaign-redistribute:active {
  transform: translateY(0);
}

.camp-redistribute-info-box {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.accounts-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}

.account-select-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.account-select-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(99, 102, 241, 0.4);
}

.account-select-card.selected {
  background: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.account-select-card input[type="checkbox"] {
  accent-color: #6366f1;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.account-select-card .acc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(99, 102, 241, 0.4);
}

.account-select-card .acc-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #334155;
  color: #94a3b8;
  font-size: 14px;
}

.account-select-card .acc-info {
  flex: 1;
  min-width: 0;
}

.account-select-card .acc-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.account-select-card .acc-sub {
  font-size: 10.5px;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 4px;
}

.radio-cards-grid .radio-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.radio-cards-grid .radio-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(30, 41, 59, 0.6);
}

.radio-cards-grid .radio-card.selected {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.15);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

/* ============================================================
   16. NUEVA INTERFAZ DE GESTIÓN POR PESTAÑAS (ACCOUNTS & GENERATOR)
   ============================================================ */
.account-nav-tabs-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 8px 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.account-nav-tabs-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow-x: auto;
}

.account-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #94a3b8;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.account-nav-tab:hover {
  background: rgba(51, 65, 85, 0.7);
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.15);
}

.account-nav-tab.active {
  background: rgba(30, 58, 138, 0.35);
  border-color: #3b82f6;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.account-nav-tab.generator-tab {
  background: rgba(79, 70, 229, 0.2);
  border-color: rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
}

.account-nav-tab.generator-tab.active {
  background: rgba(79, 70, 229, 0.4);
  border-color: #6366f1;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.35);
}

.account-nav-tab .tab-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.account-nav-tab .tab-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.account-nav-tab .tab-status-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.account-nav-tab .tab-pending-pill {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
}

/* Account Detail View Styles */
.account-detail-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.account-detail-header-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  width: 100%;
  box-sizing: border-box;
}

.account-profile-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.account-profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(59, 130, 246, 0.5);
  flex-shrink: 0;
}

.account-profile-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1e293b;
  color: #94a3b8;
  font-size: 24px;
}

.account-profile-meta {
  min-width: 0;
}

.account-profile-meta h3 {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-profile-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-running-task-card {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(14, 165, 233, 0.15) 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  animation: fbr-pulse-border 2s infinite ease-in-out;
}

@keyframes fbr-pulse-border {
  0%, 100% { border-color: rgba(99, 102, 241, 0.4); }
  50% { border-color: rgba(99, 102, 241, 0.9); }
}

.membership-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.membership-status-pill.member {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.membership-status-pill.pending_approval {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.membership-status-pill.not_member {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.membership-status-pill.unknown {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.account-subsections-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.account-subsections-grid > .studio-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 1200px) {
  .account-subsections-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* PER-ACCOUNT GROUP MEMBERSHIP STYLES */
.group-account-memberships-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.account-membership-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.2s ease;
}

.account-membership-chip:hover {
  background: rgba(30, 41, 59, 0.8);
}

.account-membership-chip .acc-name {
  font-weight: 600;
  color: #f1f5f9;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.account-membership-chip .acc-status-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.account-membership-chip .acc-status-tag.member {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.account-membership-chip .acc-status-tag.pending_approval {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.account-membership-chip .acc-status-tag.not_member {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.account-membership-chip .acc-status-tag.unknown {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

/* MODAL DE CAMBIO MANUAL DE MEMBRESÍA */
.membership-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: fbr-fade-in 0.2s ease;
}

.membership-modal-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  color: #f8fafc;
}

.membership-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0;
}

.membership-opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.membership-opt-btn:hover {
  background: #1e293b;
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.membership-opt-btn.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.15);
}

/* ============================================================
   17. REGLAS ESPECÍFICAS DE COMPONENTES PARA MODO DÍA (LIGHT THEME)
   ============================================================ */
body.light-theme {
  background-color: #f8fafc;
  color: #0f172a;
}

body.light-theme #login-view {
  background: radial-gradient(circle at 50% 30%, #e0e7ff 0%, #f8fafc 80%);
}

body.light-theme .login-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.08), 0 0 20px rgba(79, 70, 229, 0.05);
}

body.light-theme .login-title {
  color: #0f172a;
}

body.light-theme .login-subtitle {
  color: #64748b;
}

body.light-theme .top-nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

body.light-theme .studio-card,
body.light-theme .metric-card,
body.light-theme .table-responsive,
body.light-theme .settings-card,
body.light-theme .modal-box,
body.light-theme .membership-modal-card,
body.light-theme .account-detail-header-card,
body.light-theme .campaign-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

body.light-theme .studio-title,
body.light-theme .settings-title,
body.light-theme .modal-title,
body.light-theme .metric-val,
body.light-theme .cell-title,
body.light-theme .account-profile-meta h3,
body.light-theme .dist-block-title,
body.light-theme .stat-num,
body.light-theme .camp-name {
  color: #0f172a !important;
}

body.light-theme .studio-desc,
body.light-theme .settings-desc,
body.light-theme .modal-subtitle,
body.light-theme .metric-name,
body.light-theme .stat-lbl,
body.light-theme .camp-date,
body.light-theme .summary-text {
  color: #64748b !important;
}

body.light-theme .master-control-box {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

body.light-theme .master-label {
  color: #0f172a;
}

body.light-theme .user-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

body.light-theme .tabs-nav {
  border-bottom: 1px solid #e2e8f0;
}

body.light-theme .tab-btn {
  color: #64748b;
}

body.light-theme .tab-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

body.light-theme .tab-btn.active {
  color: #4f46e5;
  background: #eef2ff;
  border-bottom: 2px solid #4f46e5;
}

body.light-theme .tab-count {
  background: #e2e8f0;
  color: #475569;
}

body.light-theme .tab-btn.active .tab-count {
  background: #4f46e5;
  color: #ffffff;
}

body.light-theme .account-nav-tabs-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

body.light-theme .account-nav-tab {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}

body.light-theme .account-nav-tab:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.light-theme .account-nav-tab.active {
  background: #eef2ff;
  border-color: #6366f1;
  color: #4338ca;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.15);
}

body.light-theme .account-nav-tab.generator-tab {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}

body.light-theme .account-nav-tab.generator-tab.active {
  background: #ede9fe;
  border-color: #7c3aed;
  color: #5b21b6;
}

body.light-theme input,
body.light-theme select,
body.light-theme textarea {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.light-theme input:focus,
body.light-theme select:focus,
body.light-theme textarea:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

body.light-theme .search-wrap input {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

body.light-theme .search-wrap input:focus {
  background: #ffffff !important;
  border-color: #4f46e5 !important;
}

body.light-theme .history-table th {
  background: #f8fafc;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

body.light-theme .history-table td {
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
}

body.light-theme .history-table tr:hover td {
  background: #f8fafc;
}

body.light-theme .filter-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
}

body.light-theme .filter-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.light-theme .filter-chip.active {
  background: #eef2ff;
  border-color: #4f46e5;
  color: #4f46e5;
}

body.light-theme .account-select-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

body.light-theme .account-select-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body.light-theme .account-select-card.selected {
  background: #eef2ff;
  border-color: #6366f1;
}

body.light-theme .account-select-card .acc-name {
  color: #0f172a;
}

body.light-theme .inline-group-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

body.light-theme .inline-group-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body.light-theme .inline-group-item.selected {
  background: #eef2ff;
  border-color: #6366f1;
}

body.light-theme .inline-group-name {
  color: #0f172a;
}

body.light-theme .inline-dist-summary-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

body.light-theme .account-membership-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

body.light-theme .account-membership-chip .acc-name {
  color: #0f172a;
}

body.light-theme .membership-opt-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

body.light-theme .membership-opt-btn:hover {
  background: #f1f5f9;
  border-color: #4f46e5;
}

body.light-theme .membership-opt-btn.active {
  background: #eef2ff;
  border-color: #4f46e5;
  color: #4338ca;
}

body.light-theme .camp-redistribute-info-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

body.light-theme .toast {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body.light-theme .campaign-mode-switcher {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body.light-theme .campaign-mode-tab {
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
}

body.light-theme .campaign-mode-tab:hover {
  color: #0f172a;
}

body.light-theme .campaign-mode-tab.active {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #4f46e5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.light-theme .btn-dist-filter {
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
}

body.light-theme .btn-dist-filter:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.light-theme .btn-dist-filter.active {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #4f46e5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

body.light-theme .dist-quick-actions {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body.light-theme .btn-tiny,
body.light-theme .btn-tiny-ghost,
body.light-theme .manual-bg-option,
body.light-theme .ai-source-badge {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

body.light-theme .btn-tiny:hover,
body.light-theme .manual-bg-option:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .manual-bg-option.selected {
  background: #eef2ff;
  border-color: #4f46e5;
  color: #4338ca;
}

body.light-theme .btn-sec {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

body.light-theme .btn-sec:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light-theme .variations-counter {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

body.light-theme .empty-state {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #64748b;
}

body.light-theme .empty-state h3,
body.light-theme .empty-state h4 {
  color: #0f172a !important;
}

body.light-theme .bg-mode-switcher {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body.light-theme .bg-mode-option {
  color: #64748b;
}

body.light-theme .bg-mode-option:hover {
  color: #0f172a;
}

body.light-theme .bg-mode-option.selected {
  background: #ffffff;
  color: #4f46e5;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .task-filter-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

body.light-theme .task-filter-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

body.light-theme .task-filter-btn.active {
  background: #eef2ff;
  border-color: #4f46e5;
  color: #4f46e5;
}

body.light-theme .pending-task-item-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-theme .pending-task-item-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.light-theme .task-copy-snippet-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme .variations-modal-summary-banner {
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* ============================================================
   18. COMPACT SWIPE TOGGLE: IA vs MANUAL EN LABEL SUPERIOR
   ============================================================ */
.mode-swipe-control {
  display: inline-flex;
  align-items: center;
  background: #090e1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2px 3px;
  gap: 2px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mode-swipe-btn {
  background: transparent;
  border: none;
  border-radius: 16px;
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.mode-swipe-btn:hover {
  color: #f1f5f9;
}

.mode-swipe-btn.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.45);
}

body.light-theme .mode-swipe-control {
  background: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

body.light-theme .mode-swipe-btn {
  color: #64748b;
}

body.light-theme .mode-swipe-btn:hover {
  color: #0f172a;
}

body.light-theme .mode-swipe-btn.active {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

/* ============================================================
   19. SEPARACIÓN DE COLORES NOTORIA Y CONTRASTES EN TARJETAS
   ============================================================ */
.composer-card {
  background: linear-gradient(180deg, #101827 0%, #0c121e 100%) !important;
  border: 1.5px solid rgba(99, 102, 241, 0.28) !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.05);
}

.pending-tasks-card {
  background: linear-gradient(180deg, #0e1726 0%, #0a111c 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.28) !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.05);
}

.pending-task-item-card {
  background: #131c2c;
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: all 0.2s ease;
}

.pending-task-item-card:hover {
  background: #172338;
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* Botón Reanudar Tareas Resaltado */
#btn-resume-all-tasks {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.5);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

#btn-resume-all-tasks:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

/* Botón Pausar Tareas */
#btn-pause-all-tasks {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#btn-pause-all-tasks:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* ============================================================
   20. GESTOR DE GRUPOS: ZERO OVERFLOW Y TABLA PERFECTA
   ============================================================ */
.manage-groups-table-wrap {
  overflow-x: hidden !important;
  width: 100%;
}

.manage-groups-table {
  width: 100% !important;
  table-layout: fixed !important;
}

.manage-groups-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.manage-groups-table td a {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

body.light-theme .composer-card {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
}

body.light-theme .pending-tasks-card {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
}

body.light-theme .campaign-set-card {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .btn-campaign-view {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

body.light-theme .btn-campaign-view:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ============================================================
   21. TABLA DE CONJUNTOS DE ANUNCIOS (DESATURADA, ELEGANTE Y COMPACTA)
   ============================================================ */
.campaign-sets-table-wrap {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.4);
}

.campaign-sets-table {
  width: 100% !important;
  border-collapse: collapse;
  table-layout: fixed;
}

.campaign-sets-table thead th {
  background: #0f172a;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.campaign-set-row td {
  background: #141b27;
  padding: 12px 14px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.campaign-set-row:hover td {
  background: #192233;
}

/* Estado PAUSADO: Fondo gris desactivado en toda la fila */
.campaign-set-row.is-paused td {
  background: #181f2a !important;
  border-bottom: 1px solid rgba(100, 116, 139, 0.25) !important;
  opacity: 0.88;
}

.campaign-set-row.is-paused .campaign-tag-number {
  background: #252e3e;
  color: #64748b;
  border-color: #334155;
}

.campaign-set-row.is-paused .campaign-title-text {
  color: #94a3b8;
}

.campaign-set-row.is-paused .campaign-cell-meta {
  color: #64748b;
}

/* Elementos dentro de la tabla */
.campaign-cell-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.campaign-tag-number {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.campaign-title-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.2px;
}

.campaign-cell-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}

/* Barra de progreso en la tabla */
.campaign-table-prog-text {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #cbd5e1;
  font-weight: 600;
  margin-bottom: 4px;
}

.campaign-table-prog-pct {
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.table-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.table-progress-bar-fill {
  height: 100%;
  background: #38bdf8;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.table-progress-bar-fill.finished {
  background: #10b981;
}

.table-progress-bar-fill.paused {
  background: #f59e0b;
}

/* Badges de estado en tabla */
.badge-status-table {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-status-table.completed {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-status-table.paused {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-status-table.running {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-status-table.scheduled {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-status-table.waiting-image {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-status-table.generating-image {
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.badge-status-table.image-error {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* Botones de acción en tabla */
.campaign-table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn-table-action {
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-table-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-table-action.resume {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.45);
  font-weight: 700;
}

.btn-table-action.resume:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: rgba(52, 211, 153, 0.7);
  color: #6ee7b7;
}

.btn-table-action.pause {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.btn-table-action.pause:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.6);
  color: #fde68a;
}

.btn-table-action.duplicate {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.4);
  font-weight: 700;
}

.btn-table-action.duplicate:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.7);
  color: #ffffff;
}

.btn-table-action.delete {
  padding: 5px 8px;
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
}

.btn-table-action.delete:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

/* Light theme overrides */
body.light-theme .campaign-sets-table-wrap {
  border-color: #cbd5e1;
  background: #ffffff;
}

body.light-theme .campaign-sets-table thead th {
  background: #f1f5f9;
  color: #475569;
  border-bottom: 1px solid #cbd5e1;
}

body.light-theme .campaign-set-row td {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-theme .campaign-set-row:hover td {
  background: #f8fafc;
}

body.light-theme .campaign-set-row.is-paused td {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  opacity: 0.88;
}

body.light-theme .campaign-title-text {
  color: #0f172a;
}

body.light-theme .btn-table-action {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}

body.light-theme .btn-table-action:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

/* ============================================================
   22. TABLA DE TAREAS PENDIENTES Y PROGRAMACIONES
   ============================================================ */
.pending-tasks-table-wrap {
  flex: 1 1 auto;
  min-height: 280px;
  max-height: 590px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.4);
  position: relative;
}

.pending-tasks-table {
  width: 100% !important;
  border-collapse: collapse;
  table-layout: fixed;
}

.pending-tasks-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #0f172a;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.pending-task-row td {
  background: #141b27;
  padding: 8px 10px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.pending-task-row:hover td {
  background: #192233;
}

/* Fila Pausada en Gris Desactivado */
.pending-task-row.is-paused td {
  background: #181f2a !important;
  border-bottom: 1px solid rgba(100, 116, 139, 0.25) !important;
  opacity: 0.85;
}

.pending-task-row.is-paused .pending-task-id-badge {
  color: #64748b;
}

.pending-task-row.is-paused .pending-task-time-lbl {
  color: #64748b;
}

.pending-task-row.is-paused .pending-task-copy-text {
  color: #64748b;
}

.pending-task-row.is-paused .pending-task-camp-pill {
  background: rgba(255, 255, 255, 0.03);
  color: #64748b;
}

/* Elementos de la celda de Tareas */
.pending-task-id-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pending-task-id-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}

.pending-task-time-lbl {
  font-size: 10px;
  color: #38bdf8;
  white-space: nowrap;
  font-weight: 600;
}

.pending-task-copy-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pending-task-camp-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pending-task-camp-pill {
  font-size: 10.5px;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
  display: inline-block;
}

.pending-task-camp-pill:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.pending-task-copy-text {
  font-size: 11.5px;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.pending-task-dest-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pending-task-group-link {
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.pending-task-group-link:hover {
  color: #38bdf8;
  text-decoration: underline;
}

.pending-task-account-lbl {
  font-size: 11px;
  color: #93c5fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Light theme overrides */
body.light-theme .pending-tasks-table-wrap {
  border-color: #cbd5e1;
  background: #ffffff;
}

body.light-theme .pending-tasks-table thead th {
  background: #f1f5f9;
  color: #475569;
  border-bottom: 1px solid #cbd5e1;
}

body.light-theme .pending-task-row td {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light-theme .pending-task-row:hover td {
  background: #f8fafc;
}

body.light-theme .pending-task-row.is-paused td {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  opacity: 0.88;
}

body.light-theme .pending-task-group-link {
  color: #0f172a;
}

body.light-theme .pending-task-copy-text {
  color: #334155;
}

/* ============================================================
   SMARTEC GENERATOR IA - ESTILOS Y ESTADOS VISUALES
   ============================================================ */
.post-type-switcher .bg-mode-option {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
}

.badge-gen-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-gen-status.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.badge-gen-status.claimed {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.badge-gen-status.generating {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.5);
  animation: pulse-border-glow 2s infinite ease-in-out;
}

.badge-gen-status.completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.badge-gen-status.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

@keyframes pulse-border-glow {
  0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
  50% { box-shadow: 0 0 10px 2px rgba(168, 85, 247, 0.25); }
  100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
}

.var-img-thumbnail-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #090d16;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.var-img-thumbnail-wrap:hover {
  transform: scale(1.06);
  border-color: #38bdf8;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.var-img-thumbnail-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.var-img-zoom-hint {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.var-img-thumbnail-wrap:hover .var-img-zoom-hint {
  opacity: 1;
}

.var-card-text-image-layout {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px;
  margin-top: 6px;
}

/* ============================================================
   GALERÍA DE AFICHES PUBLICITARIOS EN DETALLE DE CAMPAÑA
   ============================================================ */
.camp-gallery-wrapper {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.camp-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.camp-gallery-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 14px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 4px;
}

#modal-variations-preview .modal-box.modal-wide {
  max-width: 1400px !important;
  width: 96vw !important;
  max-height: 94vh !important;
}

#modal-variations-cards-container.modal-variations-grid {
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)) !important;
}

.camp-gallery-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  transition: all 0.2s ease;
}

.camp-gallery-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.camp-gallery-poster-thumb {
  width: 72px;
  height: 108px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #090d16;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.camp-gallery-poster-thumb:hover {
  transform: scale(1.05);
  border-color: #38bdf8;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35);
}

.camp-gallery-poster-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camp-gallery-poster-thumb .zoom-badge {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s ease;
  gap: 2px;
}

.camp-gallery-poster-thumb:hover .zoom-badge {
  opacity: 1;
}

.camp-gallery-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.camp-gallery-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.camp-gallery-card-prompt {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.camp-gallery-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.camp-table-thumb-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ============================================================
   ESTILOS PARA SISTEMA MULTI-MARCA (BRAND IDENTITY & SELECTOR)
   ============================================================ */
.brand-summary-chip {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 9px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeIn 0.25s ease-out;
}

.brand-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-summary-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #c7d2fe;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-summary-industry {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

.brand-summary-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #cbd5e1;
}

.brand-color-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
  color: #f1f5f9;
}

.brand-card-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.brand-card-item:hover {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(15, 23, 42, 0.85);
  transform: translateY(-1px);
}

.brand-card-item.is-default {
  border-color: rgba(99, 102, 241, 0.6);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(15, 23, 42, 0.9));
}

.brand-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.brand-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-card-slogan {
  font-size: 11.5px;
  font-style: italic;
  color: #a5b4fc;
}

.brand-card-meta {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.badge-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .modal-brands-layout {
    grid-template-columns: 1fr !important;
  }
}


