@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary:       #8b5cf6;
  --primary-light: #a78bfa;
  --bg-dark:       #030712;
  --bg-card:       #111827;
  --bg-card-hover: #1f2937;
  --text:          #f9fafb;
  --text-muted:    #9ca3af;
  --border:        rgba(255,255,255,0.1);
  --whatsapp:      #25d366;
}

html { 
  scroll-behavior: smooth; 
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 1rem;
  width: 100%;
}

.bg-animation {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139,92,246,.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(6,182,212,.1), transparent),
    radial-gradient(ellipse 40% 30% at 0% 100%, rgba(236,72,153,.1), transparent);
}

/* ── Header ── */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 1rem 0; }
.header-solid {
  background: rgba(3,7,18,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 0 1rem;
  width: 100%;
}
.logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.4rem; font-weight: 800; color: var(--text);
  text-decoration: none;
}
.logo-icon { font-size: 1.2rem; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-weight: 500; font-size: .95rem; transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta {
  background: linear-gradient(135deg,#8b5cf6,#ec4899);
  padding: .55rem 1.2rem !important; border-radius: 50px;
  color: #fff !important; font-weight: 600;
}

/* ── Page label / pulse ── */
.page-label {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem 1rem;
  background: rgba(139,92,246,.1);
  border: 1px solid rgba(139,92,246,.3);
  border-radius: 50px; font-size: .85rem; color: var(--primary-light);
  margin-bottom: 1rem;
}
.pulse {
  width: 8px; height: 8px; background: var(--whatsapp);
  border-radius: 50%; animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.5)} }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.6rem; border-radius: 50px; font-weight: 600; font-size: .95rem;
  text-decoration: none; border: none; cursor: pointer; transition: all .25s;
}
.btn-primary {
  background: linear-gradient(135deg,#8b5cf6,#ec4899);
  color: #fff; box-shadow: 0 4px 20px rgba(139,92,246,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(139,92,246,.45); }
.btn-secondary {
  background: var(--bg-card-hover); color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); }

/* ── Layout ── */
.page-main { min-height: 100vh; padding-bottom: 4rem; }

.panel-hero {
  padding: 7rem 0 2.5rem; text-align: center; position: relative;
}
.panel-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center top, rgba(139,92,246,.15), transparent 60%);
  pointer-events: none;
}
.panel-hero-inner { position: relative; z-index: 1; }
.panel-hero h1 {
  font-size: clamp(2.5rem,5vw,3.5rem); font-weight: 900;
  background: linear-gradient(135deg,#8b5cf6,#ec4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin: .5rem 0 .75rem;
}
.panel-hero p { color: var(--text-muted); font-size: 1rem; }

.main-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.75rem; margin-top: 1.5rem;
}
@media (max-width: 768px) { 
  .main-grid { 
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .nav-links { 
    display: none; 
  }
  .container {
    padding: 0 0.75rem;
  }
  .panel-section {
    padding: 1rem;
    margin: 0;
  }
  .nav {
    padding: 0 0.75rem;
  }
}

/* Mobile menu styles */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .5rem;
  cursor: pointer;
  color: var(--text);
  transition: all .2s;
}

.mobile-menu-btn:hover {
  background: rgba(255,255,255,.1);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(280px, 85vw);
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 2000;
  transition: right .3s ease;
  padding: 1.5rem;
  overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,.5);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.mobile-menu-close {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .4rem;
  cursor: pointer;
  color: var(--text);
  transition: all .2s;
}

.mobile-menu-close:hover {
  background: rgba(255,255,255,.1);
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: all .25s;
}

.mobile-menu-link:hover {
  border-color: var(--primary);
  background: rgba(139,92,246,.1);
}

.mobile-menu-link svg {
  flex-shrink: 0;
  color: var(--primary-light);
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Panel section ── */
.panel-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 1.75rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}
.section-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 1rem;
}
.section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .25rem; }
.section-sub   { color: var(--text-muted); font-size: .82rem; }

.count-badge {
  display: inline-block; padding: .25rem .7rem;
  background: rgba(139,92,246,.12); border: 1px solid rgba(139,92,246,.25);
  border-radius: 50px; font-size: .78rem; color: var(--primary-light);
  font-weight: 600; margin-top: .3rem;
}

.icon-btn {
  background: rgba(255,255,255,.05); border: 1px solid var(--border);
  border-radius: 8px; padding: .45rem; cursor: pointer;
  color: var(--text-muted); transition: all .2s; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: rgba(255,255,255,.1); color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Subbot cards ── */
.subbot-grid { display: flex; flex-direction: column; gap: .75rem; flex: 1; }

.subbot-card {
  background: var(--bg-card-hover); border: 1px solid var(--border);
  border-radius: 14px; padding: 1rem 1.1rem; transition: all .25s;
}
.subbot-card:hover { border-color: rgba(37,211,102,.3); }

.subbot-card-header {
  display: flex; align-items: center; gap: .75rem; margin-bottom: .85rem;
}
.subbot-avatar {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg,#25d366,#128c7e);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; color: #fff;
}
.subbot-info { flex: 1; min-width: 0; }
.subbot-name   { font-weight: 700; font-size: .9rem; }
.subbot-number { color: var(--text-muted); font-size: .78rem; }
.online-dot {
  width: 8px; height: 8px; background: #25d366; border-radius: 50%;
  box-shadow: 0 0 5px #25d366; flex-shrink: 0;
}

.subbot-actions { display: flex; gap: .5rem; }
.action-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  padding: .5rem .6rem; border-radius: 8px; font-size: .78rem; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none; transition: all .2s;
}
.copy-btn { background: rgba(255,255,255,.05); color: var(--text-muted); }
.copy-btn:hover, .copy-btn.copied { background: rgba(139,92,246,.15); color: var(--primary-light); }
.chat-btn { background: rgba(37,211,102,.1); color: #25d366; }
.chat-btn:hover { background: rgba(37,211,102,.2); }

/* Skeleton */
.skeleton-card {
  height: 110px; border-radius: 14px;
  background: linear-gradient(90deg,var(--bg-card-hover) 25%,rgba(255,255,255,.04) 50%,var(--bg-card-hover) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.empty-state {
  flex-direction: column; align-items: center; justify-content: center;
  padding: 2.5rem 1rem; text-align: center; color: var(--text-muted); flex: 1;
}
.empty-icon { font-size: 2.5rem; margin-bottom: .75rem; display: block; }
.error-msg  { color: #ef4444; font-size: .9rem; padding: .5rem; }

/* ── QR card ── */
.qr-card {
  background: var(--bg-card-hover); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem 1.5rem; min-height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.qr-state {
  display: flex; flex-direction: column; align-items: center;
  gap: 1rem; text-align: center; width: 100%;
}
.qr-placeholder-icon { font-size: 3rem; }
.qr-state > p { color: var(--text-muted); font-size: .9rem; }

.spinner {
  width: 42px; height: 42px;
  border: 3px solid rgba(139,92,246,.2);
  border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite;
}
.qr-image {
  width: 200px; height: 200px; border-radius: 10px;
  background: #fff; padding: 6px;
}
.qr-hint { color: var(--text-muted); font-size: .82rem; max-width: 240px; line-height: 1.5; }
.qr-timer-wrap { width: 100%; }
.qr-timer-wrap > span { font-size: .82rem; color: var(--text-muted); }
.qr-progress {
  height: 3px; background: rgba(255,255,255,.08);
  border-radius: 4px; margin-top: .35rem; overflow: hidden;
}
.qr-bar {
  height: 100%; background: linear-gradient(90deg,#8b5cf6,#ec4899);
  border-radius: 4px; transition: width 1s linear;
}

/* ── Steps ── */
.steps-list { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.steps-list li {
  display: flex; align-items: flex-start; gap: .7rem;
  color: var(--text-muted); font-size: .82rem; line-height: 1.5;
}
.step-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#8b5cf6,#ec4899);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: #fff;
}

/* ── Footer ── */
.footer-mini {
  text-align: center; padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: .82rem;
}
.footer-mini a { color: var(--primary-light); text-decoration: none; }
.footer-mini a:hover { text-decoration: underline; }
