/* ============================================
   BuzzViral - Design System (Clean Light Theme)
   v4 - SaaS Multicamadas com Páginas Separadas
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Colors - Light Theme */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;

  /* Accent & Brand Colors */
  --primary-blue: #2563eb;
  --primary-blue-hover: #1d4ed8;
  --primary-blue-light: #eff6ff;

  --emerald: #059669;
  --emerald-light: #ecfdf5;
  --emerald-border: #a7f3d0;

  --amber: #d97706;
  --amber-light: #fffbeb;
  --amber-border: #fde68a;

  --red: #dc2626;
  --red-light: #fef2f2;
  --red-border: #fecaca;

  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --purple-border: #ddd6fe;

  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-on-primary: #ffffff;

  /* Borders & Shadows */
  --border-color: #e2e8f0;
  --border-dark: #cbd5e1;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Radius & Transitions */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --transition: all 0.2s ease-in-out;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   B2B HOMEPAGE (index.html) STYLES
   ============================================ */

.b2b-header {
  height: 72px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
}

.b2b-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.6rem;
  background: var(--primary-blue-light);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.b2b-nav {
  display: flex;
  gap: 28px;
}

.b2b-nav a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: var(--transition);
}

.b2b-nav a:hover {
  color: var(--primary-blue);
}

.b2b-header-actions {
  display: flex;
  gap: 10px;
}

/* B2B Hero */
.b2b-hero {
  padding: 140px 0 80px 0;
  text-align: center;
  background: radial-gradient(circle at 50% 10%, rgba(37, 99, 235, 0.06) 0%, transparent 60%);
}

.b2b-hero-badge {
  display: inline-block;
  background: var(--primary-blue-light);
  color: var(--primary-blue);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  border: 1px solid #bfdbfe;
}

.b2b-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 860px;
  margin: 0 auto 24px auto;
}

.b2b-hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 36px auto;
}

.b2b-cta-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.b2b-stats-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 32px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-top: 40px;
}

.b2b-stat-item {
  text-align: center;
}

.b2b-stat-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary-blue);
}

.b2b-stat-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Sections */
.b2b-section {
  padding: 80px 0;
}

.b2b-section.bg-subtle {
  background-color: var(--bg-subtle);
}

.b2b-section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 50px auto;
}

.b2b-section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.b2b-section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.b2b-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.b2b-card-num {
  width: 44px;
  height: 44px;
  background: var(--primary-blue-light);
  color: var(--primary-blue);
  font-weight: 800;
  font-size: 1.2rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.b2b-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.b2b-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

/* Pricing Cards */
.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition);
}

.pricing-card.featured {
  border-color: var(--emerald);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.pricing-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.pricing-badge.featured {
  color: var(--emerald);
  background: var(--emerald-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.pricing-card h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.pricing-period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.pricing-list {
  list-style: none;
  margin-bottom: 32px;
  flex: 1;
}

.pricing-list li {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.b2b-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
}

.b2b-footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

/* ============================================
   LAYOUT PORTAIS (Sidebar + Header + Content)
   ============================================ */

.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  height: 70px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo-icon {
  font-size: 1.6rem;
  background: var(--primary-blue-light);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.sidebar-logo-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--purple-light);
  color: var(--purple);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--purple-border);
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 20px 12px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 12px 12px 6px 12px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: var(--transition);
  text-decoration: none;
}

.sidebar-item:hover {
  background-color: var(--bg-subtle);
  color: var(--text-primary);
}

.sidebar-item.active {
  background-color: var(--primary-blue-light);
  color: var(--primary-blue);
  font-weight: 600;
}

.sidebar-item-icon {
  font-size: 1.1rem;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-subtle);
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-user-info {
  overflow: hidden;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* Top Header Portais */
.top-header {
  height: 70px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  right: 0;
  left: 260px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.top-header-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.top-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.main-content {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
  padding: 94px 32px 48px 32px;
  background-color: var(--bg-main);
}

/* ============================================
   ELEMENTOS DE UI & FORMULÁRIOS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary { background-color: var(--primary-blue); color: var(--text-on-primary); }
.btn-primary:hover { background-color: var(--primary-blue-hover); }

.btn-secondary { background-color: var(--bg-surface); border-color: var(--border-color); color: var(--text-primary); }
.btn-secondary:hover { background-color: var(--bg-subtle); border-color: var(--border-dark); }

.btn-success { background-color: var(--emerald); color: var(--text-on-primary); }
.btn-success:hover { background-color: #047857; }

.btn-danger { background-color: var(--red); color: var(--text-on-primary); }
.btn-danger:hover { background-color: #b91c1c; }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-full { width: 100%; }

.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  font-weight: 700;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover { background-color: #20ba5a; }

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

.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.password-wrapper { position: relative; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

/* Cards & Grids */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

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

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

.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; margin-bottom: 24px; }

.stat-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-header { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; }
.stat-icon { font-size: 1.3rem; padding: 8px; border-radius: var(--radius-md); background-color: var(--bg-subtle); }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
.stat-desc { font-size: 0.78rem; color: var(--text-muted); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge-active { background-color: var(--emerald-light); color: var(--emerald); border: 1px solid var(--emerald-border); }
.badge-blocked { background-color: var(--red-light); color: var(--red); border: 1px solid var(--red-border); }
.badge-warning { background-color: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }
.badge-purple { background-color: var(--purple-light); color: var(--purple); border: 1px solid var(--purple-border); }

/* Tables */
.table-container { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.table { width: 100%; border-collapse: collapse; background-color: var(--bg-surface); text-align: left; font-size: 0.88rem; }
.table th { background-color: var(--bg-subtle); color: var(--text-secondary); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border-color); color: var(--text-primary); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background-color: var(--bg-main); }

.auth-screen { max-width: 440px; margin: 40px auto; }
.auth-card { background-color: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 36px 32px; box-shadow: var(--shadow-lg); text-align: center; }
.auth-card-icon { font-size: 2.5rem; margin-bottom: 12px; }
.auth-subtitle { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; }

.blocked-screen { background-color: var(--red-light); border: 1px solid var(--red-border); border-radius: var(--radius-xl); padding: 40px; text-align: center; max-width: 550px; margin: 40px auto; }
.blocked-icon { font-size: 3.5rem; margin-bottom: 16px; }
.blocked-title { font-size: 1.5rem; font-weight: 800; color: var(--red); margin-bottom: 12px; }
.blocked-desc { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 24px; }

.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(15, 23, 42, 0.5); backdrop-filter: blur(4px);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content { background-color: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-xl); width: 100%; max-width: 520px; padding: 28px; box-shadow: var(--shadow-lg); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); }

#toastContainer { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast { background-color: var(--bg-surface); border: 1px solid var(--border-color); border-left: 4px solid var(--primary-blue); padding: 12px 18px; border-radius: var(--radius-md); box-shadow: var(--shadow-md); font-size: 0.88rem; font-weight: 500; display: flex; align-items: center; gap: 10px; min-width: 280px; }
.toast.success { border-left-color: var(--emerald); }
.toast.error { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--amber); }

.hidden { display: none !important; }
.text-emerald { color: var(--emerald); }
.text-blue { color: var(--primary-blue); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.font-mono { font-family: monospace; }
