/* ═══════════════════════════════════════════════════════════
   MARKETING CSS
   ═══════════════════════════════════════════════════════════ */

.marketing-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Inner Tabs */
.marketing-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}

.m-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
}

.m-tab:hover {
  color: var(--text-primary);
}

.m-tab.active {
  color: var(--accent);
}

.m-tab.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.m-tab-content {
  display: none;
  animation: fade-in 0.3s ease;
}

.m-tab-content.active {
  display: block;
}

/* Plantillas */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.tmpl-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tmpl-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.05rem;
}

.tmpl-cat {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.tmpl-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: var(--bg-input);
  padding: 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  white-space: pre-wrap;
  flex: 1;
}

.tmpl-footer, .tmpl-header-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 8px;
}

.tmpl-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

.tmpl-btn-tag {
  background: rgba(79, 140, 255, 0.1);
  color: var(--accent);
  border: 1px solid rgba(79, 140, 255, 0.2);
  padding: 4px 8px;
  font-size: 0.7rem;
  border-radius: 20px;
}

.tmpl-delete {
  background: transparent;
  color: var(--red);
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  padding: 4px;
}
.tmpl-delete:hover { opacity: 1; }

.badge-state {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
}
.badge-APPROVED { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge-PENDING { background: rgba(234, 179, 8, 0.15); color: var(--yellow); }
.badge-REJECTED { background: rgba(239, 68, 68, 0.15); color: var(--red); }

/* Builder */
.template-builder {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

/* Campañas Grid */
.campana-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 20px;
  margin-top: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .campana-layout {
    grid-template-columns: 1fr;
  }
}

.c-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.c-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Contact List */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  background: var(--bg-surface);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.contact-item:hover {
  background: var(--bg-card);
}

.contact-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.c-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.c-phone {
  font-size: 0.8rem;
  color: var(--text-muted);
}

 . c a m p a n a - l a y o u t   s e l e c t . c a m p - f i l t e r   {   w i d t h :   1 0 0 % ;   b o x - s i z i n g :   b o r d e r - b o x ;   } 
  
 