:root {
  /* Tema Suave: Branco e Vermelho (Salem Store / Divulgador Pro) */
  --primary: #e11d48; /* Vermelho rubi moderno */
  --primary-hover: #be123c;
  --primary-dark: #9f1239;
  --primary-darker: #881337;
  --primary-light: #ffe4e6;
  --primary-subtle: #fff1f2;
  --primary-border: #fecdd3;
  --primary-gradient: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  --primary-gradient-hover: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-focus: #e11d48;

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --warning: #f59e0b;
  --success: #10b981;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 14px rgba(225, 29, 72, 0.08);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 60px; /* Espaço para o rodapé Salem Store */
  margin: 0;
  width: 100%;
  overflow-x: hidden;
}

.app-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 20px 32px 40px 32px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .app-container {
    padding: 12px 14px 40px 14px;
  }
}

/* ==========================================
   Header Principal & Barra de Usuário
   ========================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--primary);
  flex-wrap: nowrap;
  gap: 16px;
}

@media (max-width: 992px) {
  .app-header {
    flex-wrap: wrap;
  }
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.25);
  border: 2px solid var(--primary-border);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.brand-logo-img:hover {
  transform: scale(1.06) rotate(3deg);
}

.brand-icon {
  background: var(--primary-light);
  color: var(--primary);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--primary-border);
}

.header-brand h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-pro {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.3);
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================
   Header Status & Ações do Usuário (Alinhamento Perfeito)
   ========================================== */
.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

@media (max-width: 992px) {
  .header-status {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

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

.header-vdivider {
  width: 1px;
  height: 26px;
  background-color: var(--border-color);
  margin: 0 4px;
}

/* Base Comum de Altura e Alinhamento para TODOS os Itens */
.header-status .status-pill,
.header-status .user-profile-badge,
.header-status .btn {
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1;
}

/* Badge de Status do WhatsApp */
.status-pill {
  gap: 6px;
  padding: 0 10px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-size: 0.78rem;
  overflow: hidden;
}

#status-badge {
  cursor: pointer;
  user-select: none;
}

#status-badge:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-disconnected {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}
.status-disconnected .status-dot {
  background: #ef4444;
}

.status-connecting {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}
.status-connecting .status-dot {
  background: #f59e0b;
  animation: pulse 1.2s infinite;
}

.status-connected {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.status-connected .status-dot {
  background: #22c55e;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.account-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
  line-height: 1.15;
  padding: 0 4px;
  height: 38px;
}

.account-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-main);
}

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

/* ==========================================
   Menu Dropdown do Usuário (Top Header)
   ========================================== */
.user-menu-wrapper {
  position: relative;
  display: inline-block;
}

.user-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  padding: 4px 14px 4px 8px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  height: 38px;
  box-sizing: border-box;
}

.user-menu-btn:hover {
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.12);
  transform: translateY(-1px);
}

.user-menu-btn.active {
  border-color: var(--primary);
  background: var(--primary-subtle);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.user-avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-subtle);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  border: 1px solid var(--primary-border);
  flex-shrink: 0;
}

.user-menu-info {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.user-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-plan {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.2;
}

.badge-plan.expired {
  background: #fee2e2;
  color: #991b1b;
  border-color: #f87171;
  animation: pulse 1.5s infinite;
}

.user-menu-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  line-height: 1;
}

.user-menu-btn.active .user-menu-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Painel Dropdown Flutuante */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(0, 0, 0, 0.04);
  padding: 8px;
  z-index: 1100;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-header {
  padding: 8px 10px 10px 10px;
}

.dropdown-user-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--primary-subtle);
  color: var(--primary-dark);
  border: 1px solid var(--primary-border);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: all 0.15s ease;
  color: var(--text-main);
}

.dropdown-item:hover {
  background: #f8fafc;
  transform: translateX(2px);
}

.dropdown-item-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.dropdown-item-text {
  display: flex;
  flex-direction: column;
}

.dropdown-item-text strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.dropdown-item-text small {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.dropdown-item:hover strong {
  color: var(--primary);
}

.dropdown-item-admin {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  margin: 2px 0;
}

.dropdown-item-admin:hover {
  background: #fef3c7;
}

.dropdown-item-admin strong {
  color: #b45309;
}

.dropdown-item-danger:hover {
  background: #fff1f2;
}

.dropdown-item-danger:hover strong {
  color: #dc2626;
}

/* Botões do Header */
.header-status .btn {
  padding: 0 13px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.header-status .btn-secondary {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.header-status .btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.header-status .btn-plan {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #ffffff;
  border: 1px solid transparent;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.25);
}

.header-status .btn-plan:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.header-status .btn-admin {
  background: #fef3c7;
  color: #854d0e;
  border: 1px solid #fde047;
  font-weight: 700;
}

.header-status .btn-admin:hover {
  background: #fde68a;
}

.header-status .btn-outline-danger {
  background: #ffffff;
  border: 1px solid #fca5a5;
  color: #dc2626;
}

.header-status .btn-outline-danger:hover {
  background: #fee2e2;
  border-color: #f87171;
}

/* ==========================================
   Banner de Alerta de Assinatura Expirada
   ========================================== */
.sub-alert-banner {
  background: #fff1f2;
  border: 1.5px solid #fca5a5;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.1);
  animation: fadeIn 0.3s ease;
}

.sub-alert-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-alert-icon {
  font-size: 1.6rem;
}

/* ==========================================
   Banner de Execução Ativa
   ========================================== */
.execution-card {
  background: #ffffff;
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.12);
  animation: fadeIn 0.3s ease;
}

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

.exec-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.7);
  animation: pulsingDot 1.5s infinite;
}

@keyframes pulsingDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(225, 29, 72, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

.exec-controls {
  display: flex;
  gap: 8px;
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: #f1f5f9;
  border-radius: 50px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #fb7185);
  border-radius: 50px;
  transition: width 0.3s ease;
}

.progress-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  text-align: center;
}

.metric-val {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.exec-status-msg {
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
}

/* ==========================================
   Layout Principal: Campanhas & Logs
   ========================================== */
.main-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}

.campaigns-section {
  width: 100%;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2, .section-header h3 {
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================
   Grid de Cards de Campanhas
   ========================================== */
.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.campaign-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
  position: relative;
}

.campaign-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
  transform: translateY(-2px);
}

.campaign-card.card-disabled {
  opacity: 0.65;
  background: #fafafa;
}

.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.campaign-name-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.campaign-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.badge-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
}

.badge-interval {
  background: var(--primary-subtle);
  color: var(--primary-dark);
  border: 1px solid var(--primary-border);
}

.badge-once {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-image {
  background: #fdf4ff;
  color: #86198f;
  border: 1px solid #f5d0fe;
}

.card-text-preview {
  font-size: 0.88rem;
  color: #334155;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  max-height: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-line;
  border: 1px solid #f1f5f9;
}

.card-schedule-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.82rem;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.next-run-text {
  font-weight: 600;
  color: #0f172a;
}

.card-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.card-btn-group {
  display: flex;
  gap: 6px;
}

/* ==========================================
   Toggle Switch Habilitar/Desabilitar
   ========================================== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 34px;
}

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

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* ==========================================
   Terminal de Logs em Tempo Real (Abaixo)
   ========================================== */
.logs-section {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.logs-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logs-terminal {
  background: #0f172a;
  color: #f8fafc;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  height: 220px;
  min-height: 180px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
}

.log-entry {
  line-height: 1.4;
  word-break: break-word;
}
.log-info { color: #94a3b8; }
.log-success { color: #4ade80; }
.log-warn { color: #facc15; }
.log-error { color: #f87171; }

/* ==========================================
   Botões e Formulários Padrão (Modernos & Fluidos)
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  user-select: none;
  line-height: 1.25;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #fff;
  border-color: rgba(225, 29, 72, 0.2);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.38);
  color: #fff;
}
.btn-primary:active {
  transform: translateY(0.5px) scale(0.99);
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.2);
}

.btn-secondary {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  color: #1e293b;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--primary);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.btn-secondary:active {
  transform: translateY(0.5px);
  background: #f1f5f9;
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  border-color: rgba(245, 158, 11, 0.2);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}
.btn-warning:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border-color: rgba(16, 185, 129, 0.2);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
.btn-success:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  border-color: rgba(239, 68, 68, 0.2);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
  color: #fff;
}

.btn-outline-danger {
  background: #fff;
  border: 1.5px solid #fca5a5;
  color: #dc2626;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.05);
}
.btn-outline-danger:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.12);
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  padding: 4px 8px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-link:hover {
  background: var(--primary-subtle);
  color: var(--primary-hover);
  text-decoration: none;
}

.btn-sm { padding: 7px 14px; font-size: 0.82rem; border-radius: 8px; }
.btn-lg { padding: 13px 28px; font-size: 1rem; border-radius: 12px; }
.btn-xs { padding: 5px 11px; font-size: 0.76rem; border-radius: 7px; }
.btn-block { width: 100%; }

.form-group {
  margin-bottom: 16px;
}

.form-group > label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.form-control-inline {
  display: inline-block;
  width: auto;
}

/* ==========================================
   Modais (Gerais)
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.2s ease;
  overflow: hidden;
}

.modal-lg { max-width: 820px; }
.modal-xl { max-width: 1280px; width: 96%; }

#plans-modal .modal-card {
  max-width: 1340px;
  width: 96%;
}

#campaign-modal .modal-card,
#autoreply-modal .modal-card {
  max-width: 1360px;
  width: 96%;
  max-height: 94vh;
}

/* Layout Expandido de 2 Colunas para o Modal de Campanha */
.campaign-modal-body {
  padding: 22px 28px;
  overflow-y: auto;
}

.campaign-form-grid {
  display: grid;
  grid-template-columns: 1fr 1.18fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 1024px) {
  .campaign-form-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.campaign-modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

.btn-sync-pill {
  border-radius: 50px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  font-size: 0.76rem;
  padding: 4px 12px;
}
.btn-sync-pill:hover {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
}

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

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2, .modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
}

/* ==========================================
   Tela de Login
   ========================================== */
.login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, #f8fafc 0%, #fff1f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  box-shadow: 0 20px 25px -5px rgba(225, 29, 72, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  animation: slideUp 0.3s ease;
}

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

.login-logo-img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.3);
  border: 3px solid var(--primary-border);
  margin-bottom: 14px;
  display: inline-block;
  animation: pulseLogo 3s infinite ease-in-out;
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(225, 29, 72, 0.3); }
  50% { transform: scale(1.04); box-shadow: 0 12px 30px rgba(225, 29, 72, 0.45); }
}

.login-icon {
  background: var(--primary-light);
  color: var(--primary);
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid var(--primary-border);
}

.login-brand h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.login-alert {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.login-alert.alert-success {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.btn-link-clean {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  transition: color 0.2s;
}

.btn-link-clean:hover {
  color: var(--primary-hover);
}

.free-trial-banner {
  background: #fff1f2;
  border: 1px dashed var(--primary);
  color: #9f1239;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: left;
}

.btn-support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #25d366;
  color: #ffffff !important;
  padding: 9px 18px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
  transition: all 0.2s;
}

.btn-support-link:hover {
  background: #1eb956;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.plan-free-trial {
  border-color: #fecdd3;
  background: linear-gradient(180deg, #ffffff 0%, #fffbfb 100%);
}

.plan-free-trial:hover {
  border-color: var(--primary);
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.login-footer strong {
  color: var(--primary);
}

/* ==========================================
   Grade de Planos (Mercado Pago)
   ========================================== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

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

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

.plan-card {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  text-align: center;
  position: relative;
  transition: all 0.25s ease;
  min-width: 0;
}

.plan-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(225, 29, 72, 0.12);
  transform: translateY(-3px);
}

.plan-featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, #ffffff 0%, #fff1f2 100%);
  box-shadow: 0 8px 18px rgba(225, 29, 72, 0.15);
}

.plan-popular-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 50px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.3);
}

.plan-badge-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.plan-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 4px 0 2px;
}

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

.plan-price {
  margin: 14px 0;
  color: var(--text-main);
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.price-currency { font-size: 1rem; font-weight: 600; margin-right: 2px; }
.price-value { font-size: 2.1rem; font-weight: 800; line-height: 1; }
.price-cents { font-size: 1rem; font-weight: 600; }

.plan-features {
  list-style: none;
  font-size: 0.8rem;
  color: #475569;
  text-align: left;
  margin-bottom: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================
   Checkout Pix (Mercado Pago)
   ========================================== */
.checkout-box {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.checkout-summary {
  text-align: center;
  margin-bottom: 16px;
}

.checkout-summary h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 6px;
}

.demo-notice {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  text-align: center;
  margin-bottom: 14px;
}

.pix-qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0;
  min-height: 240px;
}

.pix-qr-img {
  width: 240px;
  height: 240px;
  border-radius: var(--radius-md);
  border: 3px solid var(--border-color);
  padding: 8px;
  background: #fff;
}

.pix-copy-box {
  margin-top: 16px;
}

.input-with-button {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.copy-feedback {
  display: block;
  font-size: 0.8rem;
  color: #15803d;
  font-weight: 600;
  margin-top: 6px;
  text-align: center;
}

.pix-status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 18px;
}

.status-waiting {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.spinner-small {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(22, 101, 52, 0.2);
  border-top-color: #166534;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==========================================
   Painel de Administração
   ========================================== */
.admin-tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1.5px solid var(--border-color);
  margin-bottom: 18px;
}

.admin-tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: all 0.2s;
}

.admin-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

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

.admin-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 700;
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.admin-table tr:hover {
  background: #fdf2f4;
}

.user-status-active {
  color: #15803d;
  font-weight: 700;
}

.user-status-blocked {
  color: #b91c1c;
  font-weight: 700;
}

/* ==========================================
   Aba de Recuperação de Leads Pós-Teste (Admin)
   ========================================== */
.recovery-connection-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: #166534;
  font-size: 0.88rem;
}
.recovery-connection-banner.warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.recovery-admin-layout {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .recovery-admin-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.recovery-config-box,
.recovery-leads-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.recovery-textarea {
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
}
.input-with-addon {
  display: flex;
  align-items: center;
}
.input-with-addon .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.addon-label {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-left: none;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  white-space: nowrap;
}
.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.recovery-tags-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.btn-tag {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.76rem;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-family: monospace;
  font-weight: 600;
  transition: all 0.15s ease;
}
.btn-tag:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
}
.recovery-table-scroll {
  max-height: 480px;
  overflow-y: auto;
}
.badge-recovery-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.badge-recovery-sent {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.badge-recovery-pending {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.badge-recovery-waiting {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.badge-recovery-failed {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.switch-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.switch-pill input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.switch-pill-slider {
  width: 44px;
  height: 24px;
  background-color: #cbd5e1;
  border-radius: 24px;
  position: relative;
  transition: 0.25s;
}
.switch-pill-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.25s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch-pill input:checked + .switch-pill-slider {
  background-color: var(--primary);
}
.switch-pill input:checked + .switch-pill-slider:before {
  transform: translateX(20px);
}

/* ==========================================
   Rodapé Salem Store (Canto Inferior)
   ========================================== */
.salem-footer {
  position: fixed;
  bottom: 14px;
  right: 18px;
  z-index: 100;
  pointer-events: none;
}

.salem-footer-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  color: #64748b;
  border: 1px solid var(--primary-border);
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.09);
  transition: all 0.2s;
}

.salem-footer-pill strong {
  color: var(--primary);
}

.footer-mini-logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--primary-border);
  flex-shrink: 0;
}

.salem-footer-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.16);
  border-color: var(--primary);
}

.footer-dot {
  color: var(--primary-border);
}

/* ==========================================
   Utilidades, Tags e Horários
   ========================================== */
.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.85rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }

.bg-light-red { background: #fff1f2; }
.border-red { border: 1px solid #fecdd3; }

/* Campo de Mensagem Ampliado e Proporcional */
#form-msg-text,
#form-autoreply-text {
  min-height: 200px;
  height: 210px;
  max-height: 420px;
  font-size: 0.94rem;
  line-height: 1.55;
  padding: 12px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  resize: vertical;
  background: #ffffff;
  transition: all 0.2s ease;
}

#form-msg-text:focus,
#form-autoreply-text:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.campaign-form-col .form-group {
  margin-bottom: 11px;
}

.campaign-form-col .form-group > label {
  font-size: 0.83rem;
  margin-bottom: 4px;
  font-weight: 700;
}

.drop-zone-compact {
  padding: 8px 12px;
  min-height: auto;
}

.drop-zone-compact .drop-content span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.image-preview-container img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

/* Horário de Funcionamento Box (Compacto) */
.operating-hours-box {
  background: #fff8f8;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
}

.operating-hours-radios {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.operating-radio-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 135px;
}

.operating-radio-card.active {
  border-color: var(--primary);
  background: #fff1f2;
  color: var(--primary-dark);
  font-weight: 600;
}

.operating-custom-row {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--primary-border);
}

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

.time-input-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.time-input-group input {
  width: 115px;
  padding: 4px 8px;
  font-size: 0.82rem;
}

.time-separator {
  padding-top: 14px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Agendamento Box (Compacto) */
.schedule-config-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 9px 12px;
}

.schedule-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 5px;
}

.schedule-radio-card {
  display: block;
  background: #fff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.83rem;
}

.schedule-radio-card.active {
  border-color: var(--primary);
  background: #fff1f2;
}

.radio-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radio-title-row input[type="radio"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
}

.interval-inputs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-left: 23px;
  flex-wrap: wrap;
}

.interval-inputs-row input[type="number"] {
  width: 80px;
  padding: 4px 6px;
  font-size: 0.82rem;
}

.interval-inputs-row select {
  padding: 4px 6px;
  font-size: 0.82rem;
}

.anti-ban-box {
  background: #fdfbf7;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 9px 12px;
}

.delay-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.delay-inputs input {
  width: 75px;
  padding: 4px 6px;
  font-size: 0.82rem;
}

.delay-separator {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.badge-safe {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  background: #dcfce7;
  color: #166534;
}

/* Variáveis dinâmicas */
.variable-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag-pill {
  font-size: 0.75rem;
  font-family: monospace;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  transition: all 0.2s;
}

.tag-pill:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary-border);
}

/* Destinatários Tabs e Listas (Estilo Moderno & Fluido) */
.target-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

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

.tab-btn.active {
  background: #ffffff;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.target-scroll-list {
  max-height: 250px;
  overflow-y: auto;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
}

.target-scroll-list-expanded {
  height: 420px;
  max-height: 460px;
}

.target-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid #f1f5f9;
  background: #ffffff;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.target-item:hover {
  background: #fff8f8;
  border-color: #fecdd3;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(225, 29, 72, 0.06);
}

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

.target-avatar {
  font-size: 1.15rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f5f9;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.target-item:hover .target-avatar {
  transform: scale(1.08);
  background: #ffe4e6;
}

.target-details {
  flex: 1;
  min-width: 0;
}

.target-name {
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.target-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.btn-tag-group {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.btn-tag-group:hover {
  background: #fff1f2;
  border-color: var(--primary-border);
  transform: scale(1.08);
}

/* Upload Drop Zone */
.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
}

.drop-zone:hover {
  border-color: var(--primary);
  background: #fff8f8;
}

.file-input {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.image-preview-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.image-preview-container img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}

.image-preview-container img:not([src]),
.image-preview-container img[src=""],
.image-preview-container img[src="#"] {
  display: none !important;
}

.preview-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-remove-img {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* Barra de Filtro de Etiquetas WhatsApp Business (Minimizável) */
.labels-filter-bar {
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.labels-filter-bar.is-collapsed {
  padding: 8px 14px;
  background: #f1f5f9;
}

.labels-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.labels-header-left, .labels-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.labels-toggle-arrow {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.labels-filter-bar.is-collapsed .labels-toggle-arrow {
  transform: rotate(-90deg);
}

.btn-clean-toggle {
  background: #ffffff;
  border: 1px solid var(--border-color);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-clean-toggle:hover {
  background: #f8fafc;
  color: var(--primary);
  border-color: var(--primary);
}

.labels-collapse-body {
  transition: max-height 0.25s ease, opacity 0.2s ease;
}

.labels-filter-bar.is-collapsed .labels-collapse-body {
  display: none;
}

.labels-chip-list {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.label-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.77rem;
  font-weight: 600;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  user-select: none;
}

.label-chip:hover {
  border-color: var(--primary-border);
  background: #fff8f8;
  transform: translateY(-1.5px);
  box-shadow: 0 3px 8px rgba(225, 29, 72, 0.1);
}

.label-chip.active {
  background: #fff1f2;
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.18);
  transform: translateY(-1px);
}

.label-chip-color {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.modal-filter-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ==============================================================
   Navegação por Abas Principais (Campanhas vs Auto-Resposta)
   ============================================================== */
.main-tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  background: #ffffff;
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.main-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  border: 1.5px solid transparent;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-tab-btn span {
  color: inherit;
  font-weight: 700;
  display: inline-block;
}

.main-tab-btn .tab-title {
  display: inline-block !important;
  color: inherit !important;
  font-weight: 700 !important;
}

.main-tab-btn:hover {
  background: #fff1f2;
  color: var(--primary);
  border-color: #fecdd3;
}

.main-tab-btn.active {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%) !important;
  color: #ffffff !important;
  border-color: rgba(225, 29, 72, 0.2) !important;
  box-shadow: 0 4px 16px rgba(225, 29, 72, 0.32);
  transform: translateY(-1px);
}

.main-tab-btn.active span,
.main-tab-btn.active .tab-title {
  color: #ffffff !important;
}

.main-tab-btn .tab-icon {
  font-size: 1.15rem;
}

.tab-badge-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 50px;
  background: #e2e8f0;
  color: #334155;
  transition: all 0.2s;
}

.badge-pill-fire {
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  letter-spacing: 0.4px;
}

.main-tab-btn.active .tab-badge-pill {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

.tab-view-container {
  display: block;
}

.tab-view-container.hidden {
  display: none !important;
}

/* ==============================================================
   Auto-Resposta & Chatbot UI
   ============================================================== */
.autoreply-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.autoreply-card {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.autoreply-card:hover {
  border-color: #fecdd3;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(225, 29, 72, 0.09);
}

.autoreply-card.disabled {
  opacity: 0.65;
  background: #f8fafc;
}

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

.autoreply-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-right: 10px;
  word-break: break-word;
}

.autoreply-msg-bubble {
  background: #f8fafc;
  border-left: 3.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #334155;
  margin-bottom: 14px;
  max-height: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-line;
  position: relative;
}

.autoreply-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.ar-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 50px;
  background: #f1f5f9;
  color: #475569;
}

.ar-badge-trigger-all {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.ar-badge-trigger-keyword {
  background: #fdf4ff;
  color: #a21caf;
  border: 1px solid #f5d0fe;
}

.ar-badge-unread {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.ar-badge-hours {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.ar-badge-image {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.autoreply-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.autoreply-stats {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.autoreply-actions {
  display: flex;
  gap: 6px;
}

/* Modal Trigger Radios */
.trigger-type-radios {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.trigger-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.83rem;
}

.trigger-radio-card:hover {
  border-color: var(--primary-border);
  background: #fff8f8;
}

.trigger-radio-card.active {
  border-color: var(--primary);
  background: #fff1f2;
}

.trigger-radio-card input[type="radio"] {
  accent-color: var(--primary);
  margin-top: 3px;
}

.trigger-radio-card strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-main);
}

.trigger-radio-card small {
  font-size: 0.74rem;
  line-height: 1.35;
  margin-top: 2px;
}

/* Empty State Card */
.empty-autoreply-box {
  background: #ffffff;
  border: 2px dashed #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  max-width: 620px;
  margin: 20px auto;
}

.empty-autoreply-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: inline-block;
}

.empty-autoreply-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-autoreply-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ==============================================================
   Melhorias Visuais e Alinhamento do Modal de Auto-Resposta
   ============================================================== */
#autoreply-modal .modal-card {
  max-width: 1360px;
  width: 96%;
  max-height: 94vh;
}

#autoreply-modal .campaign-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1024px) {
  #autoreply-modal .campaign-form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Checkbox Cards Alinhados e Estruturados */
.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.checkbox-card:last-child {
  margin-bottom: 0;
}

.checkbox-card:hover {
  border-color: var(--primary-border);
  background: #fff8f8;
  transform: translateY(-1px);
}

.checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

.checkbox-card .check-content {
  flex: 1;
}

.checkbox-card .check-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 3px;
}

.checkbox-card .check-desc {
  display: block;
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Switch Row Elegante */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  gap: 16px;
}

.switch-label strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-main);
  margin-bottom: 2px;
}

.switch-label small {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ==============================================================
   Seleção de Dias da Semana para Auto-Resposta
   ============================================================== */
.days-presets-btn-group {
  display: flex;
  gap: 5px;
}

.btn-preset-day {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.73rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-preset-day:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff8f8;
}

.btn-preset-day.active {
  background: #ffe4e6;
  border-color: var(--primary);
  color: var(--primary-dark);
}

.days-chips-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.day-chip {
  background: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  padding: 5px 2px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.day-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.day-chip.active {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  border-color: #be123c;
  box-shadow: 0 3px 8px rgba(225, 29, 72, 0.3);
}

.day-chip-name {
  font-size: 0.81rem;
  font-weight: 700;
  line-height: 1.1;
}

.day-chip-time {
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.2px;
}

.day-chip.active .day-chip-time {
  color: rgba(255, 255, 255, 0.92);
}

.day-chip:not(.active) .day-chip-time {
  color: #94a3b8;
}

/* Botão Toggle do Mini Menu de Horários */
.btn-mini-menu-toggle {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.btn-mini-menu-toggle:hover,
.btn-mini-menu-toggle.active {
  background: #fff1f2;
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Container do Mini Menu Expansível */
.day-schedules-mini-menu {
  margin-top: 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  animation: slideDownFade 0.22s ease-out;
}

.day-schedules-mini-menu.hidden {
  display: none !important;
}

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

.mini-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 9px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.mini-menu-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-main);
}

.mini-menu-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-mini-quick {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #0f766e;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-mini-quick:hover {
  background: #f0fdfa;
  border-color: #14b8a6;
}

.btn-mini-close {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-mini-close:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.mini-menu-days-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 6px 10px;
  gap: 10px;
  transition: all 0.15s;
}

.mini-day-row.inactive {
  background: #f8fafc;
  border-color: #e2e8f0;
  opacity: 0.75;
}

.mini-day-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 125px;
}

.mini-day-checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  user-select: none;
}

.mini-day-row.inactive .mini-day-checkbox-label {
  color: #94a3b8;
}

.mini-day-times {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-time-input {
  width: 95px !important;
  font-size: 0.78rem !important;
  padding: 3px 6px !important;
  height: 28px !important;
  border-radius: 5px !important;
}

.mini-time-sep {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.mini-day-closed {
  font-size: 0.74rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 3px 9px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 5px;
}

.ar-badge-days {
  background: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

/* ==========================================
   Botão Flutuante de Suporte WhatsApp (Canto Inferior Esquerdo)
   ========================================== */
.whatsapp-support-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 10px 18px;
  border-radius: 50px;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.42), 0 2px 6px rgba(0, 0, 0, 0.1);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid #ffffff;
  user-select: none;
}

.whatsapp-support-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55), 0 4px 10px rgba(0, 0, 0, 0.15);
  background: #20bd5a;
  color: #ffffff !important;
}

.whatsapp-support-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.whatsapp-support-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.whatsapp-support-icon svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.15));
}

.whatsapp-support-text {
  white-space: nowrap;
}

/* ==============================================================
   Otimizações Responsivas Mobile Completas (Telas <= 768px)
   ============================================================== */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  .app-container {
    padding: 10px 10px 70px 10px;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Header Mobile */
  .app-header {
    display: flex;
    flex-direction: column;
    padding: 12px 14px;
    gap: 12px;
    margin-bottom: 14px;
  }

  .header-brand {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .header-brand h1 {
    font-size: 1.18rem;
  }

  .header-brand .subtitle {
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .brand-logo-img {
    width: 42px;
    height: 42px;
  }

  .header-status {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
  }

  .header-group {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .header-group-whatsapp {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
  }

  .header-status .status-pill,
  .status-pill {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 8px !important;
    font-size: 0.69rem !important;
    font-weight: 700 !important;
    gap: 5px !important;
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  .status-dot {
    width: 6px !important;
    height: 6px !important;
    flex-shrink: 0 !important;
  }

  #status-text {
    font-size: 0.69rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }

  .account-info {
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 4px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.15 !important;
  }

  .account-name {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .account-phone {
    font-size: 0.64rem !important;
    color: var(--text-muted) !important;
    white-space: nowrap !important;
  }

  .header-status .btn-outline-danger {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 8px !important;
    font-size: 0.68rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  .header-status .btn-primary {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 10px !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
  }

  .header-vdivider {
    display: none !important;
  }

  .user-menu-wrapper {
    width: 100%;
  }

  .user-menu-btn {
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .user-name {
    max-width: 160px;
  }

  .user-dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
    box-sizing: border-box;
  }

  /* Abas de Navegação Mobile */
  .main-tabs-nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 8px;
    padding: 6px;
    margin-bottom: 14px;
  }

  .main-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .main-tab-btn {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 9px 14px;
    font-size: 0.84rem;
    white-space: nowrap;
    border-radius: var(--radius-md);
  }

  .main-tab-btn .tab-title {
    font-size: 0.84rem;
  }

  /* Seções e Cabeçalhos */
  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .section-header > div:first-child h2 {
    font-size: 1.22rem;
  }

  .section-header > div:first-child .subtitle {
    font-size: 0.78rem;
  }

  .section-header .flex-center,
  .section-header .btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .logs-section .section-header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .logs-section .section-header .logs-header-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .logs-section .section-header .logs-header-actions .btn {
    width: auto !important;
  }

  /* Grids de Campanhas e Auto-Resposta */
  .campaigns-grid,
  .autoreply-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .campaign-card,
  .autoreply-card {
    padding: 16px;
  }

  .card-actions-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .card-btn-group {
    width: 100%;
    justify-content: flex-end;
  }

  

  /* ==============================================================
     MODAIS NO MOBILE (Alinhamento Perfeito & Responsividade Fluida)
     ============================================================== */
  .modal-overlay:not(.hidden) {
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .modal-overlay.hidden,
  .hidden {
    display: none !important;
  }

  .modal-card,
  #campaign-modal .modal-card,
  #autoreply-modal .modal-card,
  #plans-modal .modal-card {
    max-height: 92vh !important;
    border-radius: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .modal-header {
    padding: 12px 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .modal-header h2, .modal-header h3 {
    font-size: 1.05rem !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .modal-close {
    font-size: 1.5rem !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
  }

  .campaign-modal-body,
  #campaign-modal .campaign-modal-body,
  #autoreply-modal .campaign-modal-body {
    padding: 14px 12px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .campaign-form-grid,
  #campaign-modal .campaign-form-grid,
  #autoreply-modal .campaign-form-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .campaign-form-col {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* Filtro de Grupos e Ações */
  .modal-filter-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .modal-filter-row input {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .filter-actions {
    display: flex !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .filter-actions button {
    flex: 1 !important;
    font-size: 0.78rem !important;
    padding: 7px 6px !important;
    text-align: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  /* Cabeçalho de Etiquetas e Destinatários */
  .targets-section-box .flex-between {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .labels-filter-header {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .labels-header-left {
    flex: 1 1 auto !important;
    min-width: 140px !important;
  }

  .labels-header-right {
    display: flex !important;
    gap: 6px !important;
  }

  /* Áudio Humanizado e Player no Mobile */
  .audio-actions-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .audio-actions-row button,
  .audio-actions-row label {
    flex: 1 1 auto !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .audio-preview-card {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    position: relative !important;
    padding: 10px 12px 10px 12px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  .audio-card-left {
    min-width: 0 !important;
    width: 100% !important;
    padding-right: 28px !important;
  }

  .audio-player {
    max-width: 100% !important;
    width: 100% !important;
  }

  .btn-remove-audio {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
  }

  /* Horário e Disparos no Mobile */
  .operating-hours-radios {
    flex-direction: column !important;
    gap: 6px !important;
  }

  .operating-radio-card {
    width: 100% !important;
    min-width: 0 !important;
  }

  .time-range-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
  }

  .time-range-row .time-separator {
    padding-top: 0 !important;
    text-align: center !important;
    font-size: 0.75rem !important;
  }

  .time-input-group input {
    width: 100% !important;
  }

  .interval-inputs-row {
    padding-left: 0 !important;
    gap: 6px !important;
  }

  .interval-inputs-row input[type="number"],
  .interval-inputs-row select {
    flex: 1 1 auto !important;
    min-width: 100px !important;
    width: 100% !important;
  }

  /* Anti-ban Delay */
  .anti-ban-box .flex-between {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  .delay-inputs {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  .delay-inputs input {
    width: 65px !important;
  }

  /* Footer do Modal no Mobile */
  .campaign-modal-footer,
  .modal-footer {
    padding: 12px 14px !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .campaign-modal-footer .btn,
  .modal-footer .btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* Tabs de Destinatários */
  .target-tabs {
    padding: 4px !important;
    gap: 4px !important;
  }

  .tab-btn {
    padding: 7px 6px !important;
    font-size: 0.78rem !important;
  }

  /* Lista de Grupos com Altura Equilibrada */
  .target-scroll-list-expanded {
    height: 280px !important;
    max-height: 320px !important;
  }

  /* Switch Row */
  .switch-row {
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  .plans-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .plan-card {
    padding: 18px 16px;
  }

  .modal-tutorial-card {
    max-height: 90vh;
  }

  .tutorial-benefits-grid {
    gap: 8px;
  }

  .tutorial-benefit-item {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .timeline-step {
    padding: 10px 12px;
    flex-direction: column;
    gap: 6px;
  }

  /* Rodapé Flutuante Salem Store (Oculta no celular para não cobrir botões) */
  .salem-footer {
    display: none !important;
  }

  .whatsapp-support-btn {
    bottom: 14px;
    left: 14px;
    padding: 8px 12px;
    font-size: 0.78rem;
  }
}





/* ==========================================================================
   PROGRAMA INDIQUE & GANHE (DIAS NO VENCIMENTO)
   ========================================================================== */

/* Botão de Destaque no Header */
.btn-referral-pill {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
  animation: pulse-gold 3s infinite;
}

@keyframes pulse-gold {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
  }
  50% {
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.6);
  }
}

.btn-referral-pill:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #fff;
}

.referral-pill-sparkle {
  font-size: 0.95rem;
}

.referral-pill-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Banner de Boas-Vindas no Cadastro com Link de Indicação */
.referral-welcome-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 12px 14px;
  color: #92400e;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
  animation: fadeIn 0.3s ease-out;
}

.ref-banner-icon {
  font-size: 1.4rem;
}

/* Callout dentro do Modal de Planos */
.plans-referral-callout {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
}

.plans-referral-icon {
  font-size: 1.8rem;
}

.plans-referral-text {
  flex: 1;
}

.plans-referral-text strong {
  display: block;
  font-size: 0.92rem;
  color: #14532d;
  margin-bottom: 2px;
}

.plans-referral-text p {
  margin: 0;
  font-size: 0.8rem;
  color: #166534;
}

/* Modal de Indique & Ganhe (Cliente) */
.referral-modal-card {
  max-width: 680px;
  border-radius: 14px;
}

.referral-modal-header {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #e2e8f0;
}

.header-with-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.referral-modal-icon {
  font-size: 2rem;
}

.referral-modal-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
}

/* Card de Compartilhamento do Link */
.referral-share-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.referral-share-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-reward-rule {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
}

.referral-link-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.referral-link-bar input {
  flex: 1;
  min-width: 220px;
  font-weight: 600;
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.referral-share-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* Grid de Métricas Gamificadas */
.referral-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.ref-metric-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ref-metric-card.highlight-green {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-color: #86efac;
}

.ref-metric-card.highlight-green .ref-metric-value {
  color: #15803d;
}

.ref-metric-icon {
  font-size: 1.5rem;
}

.ref-metric-content {
  display: flex;
  flex-direction: column;
}

.ref-metric-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.ref-metric-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
}

/* Nível de Embaixador / Gamificação */
.ambassador-level-box {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ambassador-level-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

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

.ambassador-icon {
  font-size: 1.6rem;
}

.ambassador-label {
  font-size: 0.75rem;
  color: #92400e;
  font-weight: 600;
  display: block;
}

.ambassador-level-top h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #78350f;
}

.ambassador-goal {
  font-size: 0.8rem;
  font-weight: 600;
  color: #b45309;
}

.ambassador-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(180, 83, 9, 0.15);
  border-radius: 6px;
  overflow: hidden;
}

.ambassador-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border-radius: 6px;
  transition: width 0.4s ease;
}

/* Passos Rápidos */
.referral-steps-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 18px;
  gap: 8px;
}

.ref-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.ref-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ref-step-text strong {
  display: block;
  font-size: 0.84rem;
  color: #1e293b;
}

.ref-step-text small {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
}

.ref-step-sep {
  color: #94a3b8;
  font-weight: 800;
  font-size: 1.1rem;
}

/* Histórico de Indicações */
.referral-history-box h5 {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

/* Admin Referral Summary Cards */
.admin-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.summary-icon {
  font-size: 2rem;
}

.summary-info small {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 600;
}

.summary-info strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: #1e293b;
}

@media (max-width: 768px) {
  .referral-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .referral-steps-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .ref-step-sep {
    display: none;
  }
  .admin-summary-cards {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   ESTILOS: ÁUDIO HUMANIZADO (PTT / VOICE NOTE)
   ========================================== */
.audio-humanized-group {
  background: var(--bg-card);
  border: 1px solid var(--primary-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 10px;
}

.audio-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.badge-audio-tag {
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.btn-record-audio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  cursor: pointer;
}

.record-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #ef4444;
  display: inline-block;
  animation: pulse-dot 1.4s infinite;
}

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

.btn-upload-audio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0;
}

.file-input-hidden {
  display: none !important;
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px dashed #ef4444;
  border-radius: 8px;
  margin-top: 10px;
  animation: fadeIn 0.25s ease-out;
}

.recording-pulse {
  width: 14px;
  height: 14px;
  background-color: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(239, 68, 68, 0.6);
  animation: pulse-ring 1.25s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.recording-timer {
  font-family: monospace;
  font-weight: 700;
  font-size: 1.1rem;
  color: #ef4444;
}

.recording-status {
  font-size: 0.85rem;
  color: var(--text-main);
  flex: 1;
}

.audio-preview-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(16, 185, 129, 0.07);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.audio-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 180px;
}

.audio-icon-mic {
  font-size: 1.3rem;
}

.audio-details strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-main);
  word-break: break-all;
}

.audio-player {
  height: 36px;
  outline: none;
  border-radius: 20px;
  max-width: 260px;
}

.btn-remove-audio {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.btn-remove-audio:hover {
  background: rgba(239, 68, 68, 0.15);
}

/* ========================================================
   DISPARO EXCLUSIVO PARA CLIENTES DO GERADOR (PLANOS ATIVOS)
   ======================================================== */
.paid-clients-scroll-list {
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.paid-client-row {
  transition: background 0.15s ease;
}

.paid-client-row:hover {
  background: rgba(225, 29, 72, 0.04);
}

.paid-client-row.selected-row {
  background: rgba(225, 29, 72, 0.08);
}

.phone-chip {
  display: inline-block;
  font-family: monospace;
  font-size: 0.8rem;
  background: var(--bg-main);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.broadcast-progress-card {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
}

.broadcast-mini-log {
  max-height: 160px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.78rem;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  line-height: 1.4;
}

.broadcast-mini-log .log-item {
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.broadcast-mini-log .log-item.success {
  color: #34d399;
}

.broadcast-mini-log .log-item.error {
  color: #f87171;
}

.admin-paid-shortcut-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--primary-subtle);
  border: 1px dashed var(--primary-border);
  border-radius: var(--radius-md);
}

.btn-variable-chip {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-variable-chip:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.media-preview-box {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  text-align: center;
}

.media-preview-box img {
  max-height: 140px;
  border-radius: 6px;
  object-fit: contain;
}

/* ========================================================
   VISUALIZADOR DE LOGS DOS CLIENTES (ADMIN)
   ======================================================== */
.admin-logs-terminal-expanded {
  height: 480px;
  max-height: 600px;
  background: #0b1120;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

.client-logs-filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}

.client-info-summary-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
}



/* ========================================================
   GESTOR PRO - CONTROLE DE CLIENTES & COBRANÇA AUTOMÁTICA
   ======================================================== */
.crm-subtabs-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.crm-subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.crm-subtab-btn:hover {
  background: #fff1f2;
  color: var(--primary);
  border-color: #fecdd3;
}

.crm-subtab-btn.active {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%) !important;
  color: #ffffff !important;
  border-color: rgba(225, 29, 72, 0.2) !important;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.25);
}

.crm-subtab-btn.active .tab-badge-pill {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.crm-subtab-pane {
  display: none;
}

.crm-subtab-pane.active {
  display: block;
  animation: fadeInPane 0.2s ease;
}

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

/* Status Cards Grid */
.customer-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.status-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary);
}

.status-summary-card.active-filter {
  border-color: var(--primary);
  background: #fff1f2;
  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.2);
}

.status-summary-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-summary-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

/* Days presets */
.days-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.btn-preset-day,
.btn-preset-renew {
  border: 1px solid var(--border-color);
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-preset-day:hover,
.btn-preset-renew:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff1f2;
}

.btn-preset-day.active,
.btn-preset-renew.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Due Calculation Box */
.due-calculation-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.due-calculation-box.warning {
  background: #fffbeb;
  border-color: #fde68a;
}

.due-calculation-box.danger {
  background: #fef2f2;
  border-color: #fecaca;
}

.due-calc-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* CRM Table & Badges */
.crm-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 50px;
  white-space: nowrap;
}

.crm-badge-active {
  background: #dcfce7;
  color: #166534;
}

.crm-badge-due-today {
  background: #fef9c3;
  color: #854d0e;
  box-shadow: 0 0 0 1px #facc15;
  animation: pulseWarning 1.8s infinite;
}

.crm-badge-overdue {
  background: #fee2e2;
  color: #991b1b;
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

/* CRM Financial Summary Cards */
.crm-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.crm-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.crm-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.crm-summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.crm-summary-info small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.crm-summary-info strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

/* Variable Chips */
.variable-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.btn-variable-chip {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: monospace;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-variable-chip:hover {
  background: #fff1f2;
  border-color: var(--primary);
  color: var(--primary);
}

/* Progress bar for Broadcast */
.broadcast-progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.progress-bar-bg {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 50px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #e11d48, #f43f5e);
  border-radius: 50px;
  transition: width 0.3s ease;
}

.broadcast-mini-log {
  max-height: 120px;
  overflow-y: auto;
  font-size: 0.76rem;
  font-family: monospace;
  background: #0f172a;
  color: #f8fafc;
  padding: 8px 12px;
  border-radius: 6px;
  line-height: 1.4;
}

.broadcast-mini-log .log-sent {
  color: #4ade80;
}

.broadcast-mini-log .log-err {
  color: #f87171;
}

/* ==============================================================
   CRM SPREADSHEET STYLING (PLANILHA PROFISSIONAL)
   Excel / Google Sheets / Airtable Style
============================================================== */
.crm-sheet-wrapper {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 12px rgba(15, 23, 42, 0.03);
  overflow: hidden;
  margin-top: 10px;
}

.crm-sheet-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.83rem;
  color: #1e293b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.crm-sheet-table thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  border-bottom: 2px solid #cbd5e1;
  border-right: 1px solid #e2e8f0;
  white-space: nowrap;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 2;
}

.crm-sheet-table thead th:last-child {
  border-right: none;
}

.crm-sheet-table thead th.sheet-col-idx {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
  background: #edf2f7;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  border-right: 1px solid #cbd5e1;
}

.crm-sheet-table tbody tr {
  transition: background-color 0.12s ease;
}

.crm-sheet-table tbody tr:nth-child(even) {
  background-color: #fbfcfe;
}

.crm-sheet-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

.crm-sheet-table tbody tr:hover {
  background-color: #f0fdf4 !important;
}

.crm-sheet-table tbody tr:hover td.sheet-col-idx {
  background-color: #e2e8f0;
  color: #1e293b;
  font-weight: 700;
}

.crm-sheet-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #f1f5f9;
  vertical-align: middle;
  line-height: 1.45;
}

.crm-sheet-table tbody td:last-child {
  border-right: none;
}

.crm-sheet-table tbody td.sheet-col-idx {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
  background: #f8fafc;
  color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 600;
  border-right: 1px solid #e2e8f0;
  user-select: none;
}

.crm-sheet-table tbody tr:last-child td {
  border-bottom: none;
}

/* Specific Cell Elements */
.sheet-cell-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.85rem;
  display: block;
}

.sheet-cell-sub {
  font-size: 0.72rem;
  color: #64748b;
  display: block;
  margin-top: 2px;
  font-weight: 400;
}

.sheet-phone-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  color: #15803d;
  font-weight: 600;
  font-size: 0.77rem;
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sheet-phone-pill:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
  box-shadow: 0 1px 3px rgba(22, 101, 52, 0.12);
  transform: translateY(-1px);
}

.sheet-product-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 6px;
  color: #be123c;
  font-weight: 600;
  font-size: 0.75rem;
  white-space: nowrap;
}

.sheet-currency {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #0f172a;
  font-size: 0.86rem;
  white-space: nowrap;
}

.sheet-date-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.80rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
}

/* Status Badges in Sheet */
.sheet-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.sheet-badge-active {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.sheet-badge-due-today {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fde047;
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.25);
  animation: pulseWarning 1.8s infinite;
}

.sheet-badge-overdue {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Row Actions Toolbar */
.sheet-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}

.sheet-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  line-height: 1;
}

.sheet-btn-action:hover {
  transform: translateY(-1px);
}

.sheet-btn-renew {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.sheet-btn-renew:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.sheet-btn-bill {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: #ffffff;
  border-color: #be123c;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.25);
}

.sheet-btn-bill:hover {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.35);
}

.sheet-btn-edit {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
}

.sheet-btn-edit:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.sheet-btn-del {
  background: #ffffff;
  color: #ef4444;
  border-color: #fecaca;
}

.sheet-btn-del:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #b91c1c;
}

/* Spreadsheet Bottom Status Bar */
.crm-sheet-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #f8fafc;
  border-top: 1px solid #cbd5e1;
  padding: 8px 16px;
  font-size: 0.74rem;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.sheet-status-left,
.sheet-status-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sheet-status-sep {
  color: #cbd5e1;
}

/* ==============================================================
   MODO RODÍZIO AUTOMÁTICO (INTERCALAÇÃO DE CAMPANHAS)
============================================================== */
.rotation-banner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.03) 100%), #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  padding: 14px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
}

.rotation-banner-card.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(5, 150, 105, 0.05) 100%), #ffffff;
  border-color: #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.rotation-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.rotation-banner-badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.rotation-banner-card.active .rotation-banner-badge {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.rotation-banner-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rotation-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
}

.rotation-desc {
  font-size: 0.85rem;
  color: #475569;
  margin: 3px 0 0 0;
  line-height: 1.35;
}

.rotation-desc strong {
  color: #059669;
}

.rotation-banner-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.rotation-preview-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 0.85rem;
}

.rotation-campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  margin-bottom: 6px;
}

.rotation-campaign-item:last-child {
  margin-bottom: 0;
}

.btn-preset-interval {
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 500;
}

.btn-preset-interval:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

@media (max-width: 768px) {
  .rotation-banner-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .rotation-banner-right {
    width: 100%;
    justify-content: space-between;
  }
}

/* ==========================================
   CARD DO MODO RODÍZIO (PREMIUM REDESIGN)
   ========================================== */
.rotation-premium-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #6366f1;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  margin-top: 14px;
  margin-bottom: 22px;
  transition: all 0.3s ease;
  position: relative;
}
.rotation-premium-card.rot-is-active {
  border-color: #10b981;
  border-left: 5px solid #10b981;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.12);
}
.rot-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.rot-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 260px;
}
.rot-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eef2ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}
.rotation-premium-card.rot-is-active .rot-icon-badge {
  background: #dcfce7;
  color: #15803d;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
}
.rot-icon-badge.spinning .rot-badge-glyph {
  display: inline-block;
  animation: rot-spin 4s linear infinite;
}
@keyframes rot-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.rot-title-wrap {
  flex: 1;
}
.rot-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rot-main-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.rot-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}
.rot-pill-off {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}
.rot-pill-on {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.25);
}
.rot-desc-text {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.4;
}
.rot-desc-text strong {
  color: #0f172a;
  font-weight: 600;
}
.rotation-premium-card.rot-is-active .rot-desc-text strong {
  color: #047857;
}
.rot-header-right {
  display: flex;
  align-items: center;
}
.rot-switch-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  background: #f8fafc;
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}
.rot-switch-label:hover {
  background: #f1f5f9;
}
.rot-switch-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
}
.rot-ios-switch {
  position: relative;
  width: 44px;
  height: 24px;
  display: inline-block;
}
.rot-ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.rot-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}
.rot-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.rot-ios-switch input:checked + .rot-slider {
  background-color: #10b981;
}
.rot-ios-switch input:checked + .rot-slider:before {
  transform: translateX(20px);
}
.rot-stats-strip {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) auto;
  gap: 12px;
  align-items: center;
}
.rot-stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.rotation-premium-card.rot-is-active .rot-stat-item {
  background: #ffffff;
  border-color: #d1fae5;
}
.rot-stat-icon {
  font-size: 1.15rem;
  line-height: 1;
}
.rot-stat-info {
  display: flex;
  flex-direction: column;
}
.rot-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rot-stat-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 1px;
}
.rot-stat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.rot-btn-config {
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 600 !important;
  padding: 8px 16px !important;
  border-radius: 9px !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.85rem !important;
}
.rot-btn-config:hover {
  background: #1d4ed8 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
}
.rot-btn-trigger {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border: 1px solid #a7f3d0 !important;
  font-weight: 600 !important;
  padding: 8px 14px !important;
  border-radius: 9px !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 0.85rem !important;
}
.rot-btn-trigger:hover {
  background: #10b981 !important;
  color: #ffffff !important;
}
@media (max-width: 768px) {
  .rot-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .rot-header-right {
    width: 100%;
    justify-content: flex-end;
  }
  .rot-stats-strip {
    grid-template-columns: 1fr;
  }
  .rot-stat-actions {
    width: 100%;
    flex-direction: column;
  }
  .rot-btn-config, .rot-btn-trigger {
    width: 100%;
    justify-content: center;
  }
}
