/* ═══════════════════════════════════════════
   WA API — Unified Design System
   Converted from Figma React/Tailwind exports
   ═══════════════════════════════════════════ */

/* 1. Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* 2. CSS Variables */
:root {
  /* Brand Colors */
  --wa-green: #25d366;
  --wa-teal: #128c7e;
  --wa-dark: #075e54;

  /* Dark Theme (Landing + Auth pages) */
  --bg-primary: #080e08;
  --bg-surface: #0f1a0f;
  --bg-surface-2: #111b11;
  --bg-card: #1a2a1a;
  --border-default: rgba(37, 211, 102, 0.12);
  --border-hover: rgba(37, 211, 102, 0.4);
  --border-subtle: #2a3f2a;
  --text-primary: #ffffff;
  --text-muted: #7a9a7a;
  --text-muted-2: #8a9e8a;
  --text-dim: #4a6e4a;
  --text-link: #a8c4a2;
  --glow-sm: 0 0 20px rgba(37, 211, 102, 0.2);
  --glow-md: 0 0 40px rgba(37, 211, 102, 0.35);
  --glow-lg: 0 0 60px rgba(37, 211, 102, 0.25);

  /* Dashboard Theme (Internal) */
  --dash-sidebar-bg: #111b11;
  --dash-body-bg: #f0f4f0;
  --dash-card-bg: #ffffff;
  --dash-text: #1a2e1a;
  --dash-muted: #6a8e6a;
  --dash-muted-2: #8aaa8a;
  --dash-border: #e8f5e9;
  --dash-border-light: #f0f4f0;
  --dash-hover: #f8fbf8;

  /* Status Colors */
  --color-success: #25d366;
  --color-info: #2196f3;
  --color-warning: #ff9800;
  --color-danger: #ef4444;
  --color-purple: #9c27b0;
  --color-teal: #009688;
  --color-indigo: #3f51b5;

  /* Typography */
  --font-main: 'Cairo', 'Segoe UI', system-ui, sans-serif;

  /* Spacing & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 50px;
  --radius-circle: 50%;
}

/* 3. Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
img { max-width: 100%; }

/* ═══════════════════════════════════════════
   4. PUBLIC PAGES (Dark Theme)
   Landing, Login, Register
   ═══════════════════════════════════════════ */

.public-page {
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
}

/* Dot grid background */
.public-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}

/* Radial glow overlay */
.public-page::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 800px 600px at 60% 20%, rgba(37,211,102,0.08) 0%, transparent 70%);
  z-index: 0;
}

.public-page > * {
  position: relative;
  z-index: 1;
}

/* ─── Navbar ─── */
.wa-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  border-bottom: 1px solid var(--border-default);
  backdrop-filter: blur(20px);
  background: rgba(8, 14, 8, 0.85);
}

.wa-navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wa-navbar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-navbar-logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wa-green);
}

.wa-navbar-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--wa-green);
}

.wa-navbar-logo-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(37, 211, 102, 0.1);
  color: var(--wa-green);
}

.wa-navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.wa-navbar-links a {
  font-size: 14px;
  color: #9ab89a;
  transition: color 0.2s;
}

.wa-navbar-links a:hover {
  color: var(--wa-green);
}

.wa-navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Buttons ─── */
.btn-wa-outline {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: var(--wa-green);
  font-size: 14px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-main);
}

.btn-wa-outline:hover {
  background: rgba(37, 211, 102, 0.1);
}

.btn-wa-solid {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--wa-green);
  color: var(--bg-primary);
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-wa-solid:hover {
  background: #1ea952;
}

.btn-wa-gradient {
  padding: 14px 32px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--wa-green), var(--wa-teal));
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--glow-md);
}

.btn-wa-gradient:hover {
  transform: scale(1.05);
}

.btn-wa-ghost {
  padding: 14px 32px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-wa-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* ─── Hero Section ─── */
.wa-hero {
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 128px;
  text-align: center;
}

.wa-hero-badge {
  display: inline-block;
  margin-bottom: 32px;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(37, 211, 102, 0.3);
  background: rgba(37, 211, 102, 0.06);
  color: var(--wa-green);
  font-size: 13px;
  transition: background 0.2s;
}

.wa-hero-badge:hover {
  background: rgba(37, 211, 102, 0.12);
}

.wa-hero h1 {
  font-size: 68px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
}

.wa-hero .gradient-text {
  background: linear-gradient(to left, #25d366, #a8ffc4, #25d366);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wa-hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 580px;
  margin: 0 auto 40px;
}

.wa-hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.wa-hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Social Proof Bar ─── */
.wa-proof-bar {
  padding: 28px 0;
  border-top: 1px solid rgba(37, 211, 102, 0.1);
  border-bottom: 1px solid rgba(37, 211, 102, 0.1);
  background: rgba(37, 211, 102, 0.04);
}

.wa-proof-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  text-align: center;
}

.wa-proof-stat-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--wa-green);
}

.wa-proof-stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* ─── Section Headers ─── */
.wa-section {
  padding: 96px 24px;
}

.wa-section-badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(37, 211, 102, 0.3);
  background: rgba(37, 211, 102, 0.06);
  color: var(--wa-green);
  font-size: 13px;
}

.wa-section-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
}

.wa-section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
}

/* ─── Feature Cards ─── */
.wa-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.wa-feature-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  transition: all 0.3s;
  cursor: pointer;
}

.wa-feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 30px rgba(37, 211, 102, 0.08);
}

.wa-feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 28px;
}

.wa-feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.wa-feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.wa-feature-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}

/* ─── Steps Section ─── */
.wa-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
}

.wa-step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--wa-green);
  background: rgba(37, 211, 102, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--wa-green);
  margin: 0 auto 24px;
}

.wa-step h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.wa-step p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ─── Pricing Cards ─── */
.wa-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.wa-pricing-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wa-pricing-card.featured {
  border-color: var(--wa-green);
  background: linear-gradient(160deg, #0d2a1a 0%, var(--bg-surface) 100%);
  box-shadow: 0 0 60px rgba(37, 211, 102, 0.2), inset 0 1px 0 rgba(37, 211, 102, 0.3);
  position: relative;
}

.wa-pricing-card.featured .wa-pricing-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  background: var(--wa-green);
  color: var(--bg-primary);
  font-size: 12px;
  font-weight: 700;
}

.wa-pricing-price {
  font-size: 48px;
  font-weight: 700;
  margin: 16px 0 8px;
}

.wa-pricing-card.featured .wa-pricing-price {
  color: var(--wa-green);
}

.wa-pricing-period {
  color: var(--text-muted);
  margin-right: 8px;
}

.wa-pricing-features {
  list-style: none;
  padding: 0;
  margin: 24px 0 32px;
}

.wa-pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

.wa-pricing-features .check {
  color: var(--wa-green);
}

.wa-pricing-features .cross {
  color: #ff5252;
}

.wa-pricing-features .disabled {
  color: var(--text-muted);
}

/* ─── FAQ ─── */
.wa-faq-item {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid rgba(37, 211, 102, 0.1);
  cursor: pointer;
  transition: border-color 0.2s;
  margin-bottom: 12px;
}

.wa-faq-item:hover {
  border-color: rgba(37, 211, 102, 0.3);
}

.wa-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
}

.wa-faq-answer {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── CTA Banner ─── */
.wa-cta-banner {
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 80px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(37, 211, 102, 0.2);
  background: linear-gradient(135deg, #0d2a1a 0%, var(--bg-primary) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.wa-cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(37, 211, 102, 0.15) 0%, transparent 70%);
}

.wa-cta-banner > * {
  position: relative;
  z-index: 1;
}

.wa-cta-banner h2 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ─── Footer ─── */
.wa-footer {
  background: #050a05;
  border-top: 1px solid rgba(37, 211, 102, 0.1);
  padding: 48px 24px;
}

.wa-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.wa-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.wa-footer h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.wa-footer a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  transition: color 0.2s;
}

.wa-footer a:hover {
  color: var(--wa-green);
}

.wa-footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(37, 211, 102, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-dim);
}

/* ─── Auth Pages (Login/Register) ─── */
.wa-auth-page {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  direction: rtl;
}

.wa-auth-brand {
  width: 60%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--wa-dark), #0a1a0a);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 64px;
}

.wa-auth-brand-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 540px;
}

.wa-auth-brand h1 {
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.4;
}

.wa-auth-brand p {
  font-size: 16px;
  color: var(--text-link);
  line-height: 1.7;
}

/* Floating decorative bubbles */
.wa-auth-bubble {
  position: absolute;
  border-radius: 24px;
  backdrop-filter: blur(4px);
}

.wa-auth-form-side {
  width: 40%;
  background: var(--bg-surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow-y: auto;
}

.wa-auth-form-side::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 384px;
  height: 384px;
  background: var(--wa-green);
  opacity: 0.08;
  filter: blur(100px);
  border-radius: 50%;
}

.wa-auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  border: 1px solid rgba(42, 63, 42, 0.3);
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.wa-auth-card h2 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.wa-auth-card .subtitle {
  color: var(--text-muted-2);
  font-size: 14px;
  margin-bottom: 32px;
}

/* Form fields */
.wa-form-group {
  margin-bottom: 20px;
}

.wa-form-group label {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.wa-form-input-wrap {
  position: relative;
}

.wa-form-input-wrap .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted-2);
  font-size: 20px;
}

.wa-form-input-wrap .toggle-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted-2);
  cursor: pointer;
  background: none;
  border: none;
  font-size: 20px;
}

.wa-form-input-wrap .toggle-icon:hover {
  color: var(--wa-green);
}

.wa-form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px 16px 14px 48px;
  color: #fff;
  font-size: 14px;
  font-family: var(--font-main);
  transition: all 0.2s;
}

.wa-form-input::placeholder {
  color: var(--text-dim);
}

.wa-form-input:focus {
  outline: none;
  border-color: var(--wa-green);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

/* Password strength bar */
.wa-strength-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.wa-strength-segment {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border-subtle);
  transition: background 0.3s;
}

.wa-strength-label {
  font-size: 12px;
  color: var(--text-link);
}

/* Auth button */
.wa-auth-btn {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, var(--wa-green), var(--wa-teal));
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wa-auth-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
}

.wa-auth-btn:active {
  transform: scale(0.98);
}

/* Divider */
.wa-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.wa-divider::before,
.wa-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.wa-divider span {
  color: var(--text-dim);
  font-size: 14px;
}

/* ─── Responsive ─── */
@media (max-width: 991px) {
  .wa-hero h1 { font-size: 42px; }
  .wa-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .wa-pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .wa-steps-grid { grid-template-columns: 1fr; gap: 32px; }
  .wa-footer-grid { grid-template-columns: repeat(2, 1fr); }
  .wa-navbar-links { display: none; }
  .wa-auth-brand { display: none; }
  .wa-auth-form-side { width: 100%; }
  .wa-cta-banner { padding: 40px 24px; }
  .wa-cta-banner h2 { font-size: 32px; }
}

@media (max-width: 575px) {
  .wa-hero h1 { font-size: 32px; }
  .wa-section-title { font-size: 28px; }
  .wa-feature-grid { grid-template-columns: 1fr; }
  .wa-hero-cta { flex-direction: column; }
  .wa-footer-grid { grid-template-columns: 1fr; }
}
