/* ====================================================================
   BOT OPS SECTION — Compacto para caber en 100vh
   ==================================================================== */

.section-botops {
  padding: 72px 24px 16px;
  overflow: hidden;
  gap: 0;
}

.section-botops .section-title {
  margin-bottom: 4px;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.section-botops .section-subtitle {
  color: rgba(255,255,255,0.45);
  font-size: 0.88rem;
  margin: 0 0 16px;
  text-align: center;
}

/* ---- Grid 2x2 compacto ---- */
.botops-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}

/* ---- Tarjeta compacta ---- */
.botop-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 16px 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color .35s, box-shadow .35s, transform .25s;
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  gap: 6px;
}

.botop-card:hover {
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 0 28px rgba(0,212,255,0.07);
  transform: translateY(-2px);
}

/* Estado executing: borde pulsante */
.botop-card.executing {
  border-color: rgba(0,212,255,0.6);
  box-shadow: 0 0 0 2px rgba(0,212,255,0.15), 0 0 32px rgba(0,212,255,0.12);
  animation: cardGlow 1.2s ease-in-out infinite;
}
/* Estado done: borde verde */
.botop-card.done {
  border-color: rgba(16,185,129,0.5);
  box-shadow: 0 0 20px rgba(16,185,129,0.1);
}

@keyframes cardGlow {
  0%,100% { box-shadow: 0 0 0 2px rgba(0,212,255,0.15), 0 0 24px rgba(0,212,255,0.1); }
  50%      { box-shadow: 0 0 0 2px rgba(0,212,255,0.3),  0 0 40px rgba(0,212,255,0.2); }
}

/* Icono */
.botop-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.botop-icon--cyan   { background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.2); }
.botop-icon--purple { background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.2); }
.botop-icon--green  { background: rgba(37,211,102,0.1); border: 1px solid rgba(37,211,102,0.2); }

.botop-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
  line-height: 1.3;
}

.botop-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.42);
  line-height: 1.4;
  margin: 0;
}

/* Preview: oculto por defecto, aparece al ejecutar */
.botop-preview {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .45s ease, opacity .35s ease;
}
.botop-preview.visible {
  max-height: 110px;
  opacity: 1;
}

/* Preview Email */
.preview-email {
  background: rgba(0,212,255,0.05);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.72rem;
}
.preview-email__header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.preview-email__from { font-weight: 600; color: #00d4ff; }
.preview-email__badge { background: rgba(0,212,255,0.2); color: #00d4ff; padding: 1px 6px; border-radius: 4px; font-size: 0.65rem; }
.preview-email__subject { font-weight: 600; color: #e2e8f0; margin-bottom: 4px; }
.preview-email__body { color: rgba(255,255,255,0.5); line-height: 1.4; }

/* Preview Factura */
.preview-invoice {
  background: rgba(124,58,237,0.05);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.72rem;
}
.preview-invoice__header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.preview-invoice__logo { font-weight: 700; color: #7c3aed; }
.preview-invoice__num  { color: rgba(255,255,255,0.5); }
.preview-invoice__row  { display: flex; justify-content: space-between; color: rgba(255,255,255,0.55); margin-bottom: 3px; }
.preview-invoice__row--iva { color: rgba(255,255,255,0.35); font-size: 0.68rem; }
.preview-invoice__total { display: flex; justify-content: space-between; font-weight: 700; color: #e2e8f0; padding-top: 4px; border-top: 1px solid rgba(255,255,255,0.1); }

/* Preview WhatsApp */
.preview-wa { padding: 6px; }
.preview-wa__bubble {
  background: rgba(37,211,102,0.08);
  border: 1px solid rgba(37,211,102,0.2);
  border-radius: 10px 10px 10px 0;
  padding: 8px 10px;
  font-size: 0.72rem;
  max-width: 100%;
}
.preview-wa__sender { font-weight: 700; color: #25D366; display: block; margin-bottom: 3px; }
.preview-wa__msg { color: rgba(255,255,255,0.65); margin: 0 0 4px; line-height: 1.4; }
.preview-wa__time { color: rgba(255,255,255,0.3); font-size: 0.65rem; }

/* Preview CRM */
.preview-crm { font-size: 0.72rem; }
.preview-crm__row { display: flex; gap: 8px; margin-bottom: 3px; }
.preview-crm__field { color: rgba(255,255,255,0.35); min-width: 54px; }
.preview-crm__val { color: rgba(255,255,255,0.65); }
.preview-crm__val--status.filled { color: #10b981; font-weight: 600; }

/* Status */
.botop-status { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; color: rgba(255,255,255,0.35); }
.botop-status__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background .3s;
  flex-shrink: 0;
}
.botop-card.executing .botop-status__dot { background: #00d4ff; animation: dotPulse 1s infinite; }
.botop-card.done      .botop-status__dot { background: #10b981; }
@keyframes dotPulse {
  0%,100% { opacity: 1; } 50% { opacity: 0.3; }
}

/* Botón ejecutar */
.botop-execute-btn {
  background: rgba(0,212,255,0.07);
  color: #00d4ff;
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer !important;
  transition: background .25s, border-color .25s, transform .2s;
  align-self: flex-start;
}
.botop-execute-btn:hover:not(:disabled) {
  background: rgba(0,212,255,0.14);
  border-color: rgba(0,212,255,0.45);
  transform: translateY(-1px);
}
.botop-execute-btn:disabled { opacity: 0.35; cursor: not-allowed !important; }

/* Footer */
.botops-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 14px;
  width: 100%;
  max-width: 860px;
  flex-wrap: wrap;
}

.botop-execute-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer !important;
  transition: transform .2s, box-shadow .25s, opacity .2s;
  white-space: nowrap;
}
.botop-execute-all:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,212,255,0.3);
}
.botop-execute-all:disabled { opacity: 0.5; cursor: not-allowed !important; }

.botops-counter { text-align: center; color: rgba(255,255,255,0.35); font-size: 0.78rem; }
.botops-counter__num {
  color: #00d4ff; font-weight: 700; font-size: 1.1rem;
  display: block; margin-bottom: 2px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .botops-grid { grid-template-columns: 1fr; gap: 10px; }
  .section-botops { padding: 68px 16px 12px; }
  .botops-footer { flex-direction: column; gap: 12px; }
  .botop-execute-all { width: 100%; justify-content: center; }
}

/* ====================================================================
   INTENSIDAD VISUAL — Glow radial único por sección
   ==================================================================== */
.section-hero     { background: radial-gradient(ellipse 70% 55% at 30% 40%, rgba(0,212,255,0.07) 0%, transparent 65%), #0a0a0f; }
.section-calculator { background: radial-gradient(ellipse 60% 60% at 70% 50%, rgba(124,58,237,0.07) 0%, transparent 70%), #0a0a0f; }
.section-diagnosis  { background: radial-gradient(ellipse 80% 50% at 50% 60%, rgba(239,68,68,0.05) 0%, rgba(16,185,129,0.05) 60%, transparent 80%), #0a0a0f; }
.section-chat       { background: radial-gradient(ellipse 60% 65% at 30% 50%, rgba(37,211,102,0.06) 0%, transparent 65%), #0a0a0f; }
.section-dispatch   { background: radial-gradient(ellipse 70% 50% at 50% 40%, rgba(0,212,255,0.06) 0%, transparent 70%), #0a0a0f; }
.section-botops     { background: radial-gradient(ellipse 65% 55% at 60% 55%, rgba(124,58,237,0.08) 0%, rgba(0,212,255,0.04) 50%, transparent 75%), #0a0a0f; }
.section-final      { background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(16,185,129,0.06) 0%, transparent 70%), #0a0a0f; }

/* Número de sección gigante de fondo más pronunciado */
.section-number {
  font-size: clamp(7rem, 18vw, 16rem) !important;
  opacity: 0.04 !important;
  letter-spacing: -0.02em;
  font-family: 'Bebas Neue', sans-serif;
  color: #00d4ff;
}

/* Título más intenso en todas las secciones */
.section-title {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem) !important;
  letter-spacing: 0.02em;
  margin-bottom: 8px !important;
}

/* Text gradient consistente */
.text-gradient {
  background: linear-gradient(135deg, #00d4ff 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ====================================================================
   MEJORAS BOT OPS v2
   ==================================================================== */

/* Timer de velocidad */
.botop-timer { display: none; font-size: 0.72rem; color: var(--cyan,#00d4ff); font-family: 'Space Grotesk',sans-serif; margin-top: 2px; }
.botop-timer--done { color: #10b981; font-weight: 600; }

/* Badge de integración */
.botop-integration-badge {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 0.65rem; color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 6px; padding: 3px 8px;
    margin-top: 2px;
}

/* Modal */
.botops-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.botops-modal.open { opacity: 1; pointer-events: all; }
.botops-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); }
.botops-modal__box {
    position: relative; z-index: 1;
    background: #0e0e16; border: 1px solid rgba(0,212,255,0.2);
    border-radius: 18px; padding: 0; overflow: hidden;
    max-width: 580px; width: 92vw; max-height: 85vh; overflow-y: auto;
    box-shadow: 0 0 60px rgba(0,212,255,0.1);
    transform: scale(0.95); transition: transform 0.3s;
}
.botops-modal.open .botops-modal__box { transform: scale(1); }
.botops-modal__close { position: absolute; top: 14px; right: 16px; background: rgba(255,255,255,0.06); border: none; color: rgba(255,255,255,0.5); width: 28px; height: 28px; border-radius: 50%; cursor: pointer !important; font-size: 0.85rem; z-index: 2; transition: background 0.2s; }
.botops-modal__close:hover { background: rgba(255,255,255,0.12); }

/* Chrome bar */
.modal-email__chrome, .modal-invoice__chrome, .modal-crm__chrome {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 10px 16px; font-size: 0.73rem; color: rgba(255,255,255,0.3);
}
.modal-email__chrome-dots, .modal-invoice__chrome-dots, .modal-crm__chrome-dots { display: flex; gap: 5px; }
.modal-email__chrome-dots span, .modal-invoice__chrome-dots span, .modal-crm__chrome-dots span { width: 10px; height: 10px; border-radius: 50%; }
.modal-email__chrome-dots span:nth-child(1) { background:#ff5f57; }
.modal-email__chrome-dots span:nth-child(2) { background:#febc2e; }
.modal-email__chrome-dots span:nth-child(3) { background:#28c840; }
.modal-invoice__chrome-dots span:nth-child(1), .modal-crm__chrome-dots span:nth-child(1) { background:#ff5f57; }
.modal-invoice__chrome-dots span:nth-child(2), .modal-crm__chrome-dots span:nth-child(2) { background:#febc2e; }
.modal-invoice__chrome-dots span:nth-child(3), .modal-crm__chrome-dots span:nth-child(3) { background:#28c840; }

/* Email modal */
.modal-email__header { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.modal-email__avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,#00d4ff,#7c3aed); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; color: #fff; flex-shrink: 0; }
.modal-email__from { font-weight: 600; font-size: 0.85rem; color: #e2e8f0; }
.modal-email__to { font-size: 0.72rem; color: rgba(255,255,255,0.35); }
.modal-email__badge-sent { margin-left: auto; background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); padding: 3px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; white-space: nowrap; }
.modal-email__subject { padding: 12px 16px; font-weight: 700; color: #e2e8f0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.modal-email__body { padding: 16px; font-size: 0.82rem; color: rgba(255,255,255,0.65); line-height: 1.7; }
.modal-email__body p { margin-bottom: 10px; }
.modal-email__body ul { padding-left: 18px; margin-bottom: 12px; }
.modal-email__body li { margin-bottom: 4px; }
.modal-email__footer { font-size: 0.68rem; color: rgba(255,255,255,0.2); border-top: 1px solid rgba(255,255,255,0.06); padding-top: 12px; margin-top: 12px; }

/* Invoice modal */
.modal-invoice__doc { padding: 20px; }
.modal-invoice__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.modal-invoice__logo { font-family: 'Bebas Neue',sans-serif; font-size: 1.8rem; color: #00d4ff; letter-spacing: 0.05em; }
.modal-invoice__meta { text-align: right; font-size: 0.78rem; color: rgba(255,255,255,0.5); line-height: 1.6; }
.modal-invoice__status { color: #10b981; font-weight: 600; }
.modal-invoice__divider { height: 1px; background: rgba(255,255,255,0.08); margin: 12px 0; }
.modal-invoice__client { font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-bottom: 14px; }
.modal-invoice__table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.modal-invoice__table th { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.35); font-weight: 500; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.modal-invoice__table td { padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.05); color: rgba(255,255,255,0.7); }
.modal-invoice__totals { text-align: right; font-size: 0.8rem; color: rgba(255,255,255,0.45); line-height: 1.8; padding-top: 10px; }
.modal-invoice__grand { font-size: 1.1rem; font-weight: 700; color: #e2e8f0; margin-top: 4px; }

/* WhatsApp modal */
.modal-wa { background: #0a1929; }
.modal-wa__phone { max-width: 360px; margin: 0 auto; }
.modal-wa__header { background: #1a3a2a; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.modal-wa__avatar { width: 38px; height: 38px; border-radius: 50%; background: #25D366; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; color: #fff; flex-shrink: 0; }
.modal-wa__name { font-weight: 600; font-size: 0.88rem; color: #e2e8f0; }
.modal-wa__online { font-size: 0.7rem; color: #25D366; }
.modal-wa__messages { padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #0d1f17; min-height: 200px; }
.modal-wa__msg { max-width: 85%; padding: 10px 13px; border-radius: 12px; font-size: 0.78rem; line-height: 1.5; position: relative; }
.modal-wa__msg--bot { background: #1a3a2a; border-radius: 0 12px 12px 12px; color: rgba(255,255,255,0.8); }
.modal-wa__msg--operator { background: #1a3346; border-radius: 12px 0 12px 12px; align-self: flex-end; color: rgba(255,255,255,0.8); }
.modal-wa__msg p { margin-bottom: 4px; }
.modal-wa__time { font-size: 0.62rem; color: rgba(255,255,255,0.3); display: block; text-align: right; margin-top: 4px; }

/* CRM modal */
.modal-crm__header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.modal-crm__header h4 { font-size: 1rem; color: #e2e8f0; margin: 0; }
.modal-crm__tag { background: rgba(0,212,255,0.12); color: #00d4ff; padding: 2px 10px; border-radius: 20px; font-size: 0.68rem; }
.modal-crm__sync { margin-left: auto; font-size: 0.68rem; color: #10b981; }
.modal-crm__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,0.05); margin: 0; }
.modal-crm__field { background: #0e0e16; padding: 12px 16px; }
.modal-crm__field span { display: block; font-size: 0.65rem; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.modal-crm__field strong { font-size: 0.82rem; color: #e2e8f0; }
.modal-crm__field strong.green { color: #10b981; }
.modal-crm__field strong.cyan { color: #00d4ff; }

/* Live feed */
.botops-live-feed {
    background: rgba(0,212,255,0.03); border: 1px solid rgba(0,212,255,0.1);
    border-radius: 12px; padding: 12px 18px;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    min-width: 280px;
}
.botops-live-feed__header { display: flex; align-items: center; gap: 8px; font-size: 0.65rem; color: rgba(255,255,255,0.3); font-family: 'Space Grotesk',sans-serif; letter-spacing: 0.08em; }
.botops-live-feed__dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; animation: dotPulse 1.5s ease infinite; }
.botops-live-feed__ticker { font-size: 0.76rem; color: rgba(255,255,255,0.55); text-align: center; min-height: 20px; transition: opacity 0.3s; }
.botops-live-feed__ticker .feed-company { color: rgba(255,255,255,0.8); font-weight: 600; }
.botops-live-feed__ticker .feed-time { color: rgba(255,255,255,0.3); font-size: 0.68rem; }
.botops-live-feed__total { font-size: 0.72rem; color: rgba(255,255,255,0.3); }
.botops-counter__num { color: #00d4ff; font-weight: 700; font-size: 1.1rem; display: inline; transition: transform 0.2s; }
.botops-counter__num.pop { transform: scale(1.2); }
