:root {
  --navy: #141c4f;
  --surface: #1e2a5e;
  --primary: #534ab7;
  --gold: #ef9f27;
  --text: #f5f7ff;
  --muted: #9fb0e8;
  --ok: #4caf50;
  --err: #e57373;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Cairo', sans-serif;
  background: linear-gradient(160deg, #0a1028, var(--navy) 45%, #1a2555);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }

.shell { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.logo { font-size: 1.6rem; font-weight: 800; }
.logo span { color: var(--gold); }

.nav-links { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-gold { background: var(--gold); color: #1a1200; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.15); }

.card {
  background: rgba(30, 42, 94, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.hero { text-align: center; margin-bottom: 28px; }
.hero h1 { font-size: 1.75rem; margin-bottom: 8px; }
.hero p { color: var(--muted); line-height: 1.7; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; margin-bottom: 6px; color: var(--muted); }
.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.2);
  color: var(--text);
  font-family: inherit;
}

.phone-row { display: flex; gap: 8px; }
.phone-row select { width: 110px; flex-shrink: 0; }

.otp-row { display: flex; gap: 8px; justify-content: center; margin: 16px 0; }
.otp-row input {
  width: 48px; height: 52px; text-align: center; font-size: 1.25rem; font-weight: 800;
}

.msg {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  display: none;
}
.msg.show { display: block; }
.msg.err { background: rgba(229,115,115,0.15); color: #ffcdd2; border: 1px solid rgba(229,115,115,0.35); }
.msg.ok { background: rgba(76,175,80,0.15); color: #c8e6c9; border: 1px solid rgba(76,175,80,0.35); }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.plan-card {
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 20px;
  background: rgba(20,28,79,0.65);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.plan-card.featured { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(239,159,39,0.25); }
.plan-card h3 { font-size: 1.15rem; }
.plan-price { font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.plan-features { list-style: none; color: var(--muted); font-size: 0.9rem; line-height: 1.8; }
.plan-features li::before { content: '✓ '; color: var(--ok); }

.toggle-row {
  display: inline-flex;
  background: rgba(0,0,0,0.25);
  border-radius: 999px;
  padding: 4px;
  margin: 16px auto 0;
}
.toggle-row button {
  border: none; background: transparent; color: var(--muted);
  padding: 8px 18px; border-radius: 999px; cursor: pointer; font-family: inherit; font-weight: 700;
}
.toggle-row button.on { background: var(--primary); color: #fff; }

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}
.status-badge.active { background: rgba(76,175,80,0.2); color: #a5d6a7; }
.status-badge.inactive { background: rgba(229,115,115,0.2); color: #ffcdd2; }

.table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 0.9rem; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,0.08); text-align: right; }
.table th { color: var(--muted); font-weight: 600; }

.hidden { display: none !important; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.footer-note { margin-top: 32px; text-align: center; color: var(--muted); font-size: 0.85rem; }

/* ── B2B Landing Page ── */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(10, 16, 40, 0.85);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo-sub { font-size: 0.85rem; font-weight: 600; color: var(--muted); }

.landing-hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 16px 40px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(83, 74, 183, 0.25);
  color: #c5cae9;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.landing-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.35;
  margin-bottom: 16px;
}

.hero-lead {
  color: var(--muted);
  line-height: 1.85;
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn-lg { padding: 14px 24px; font-size: 1rem; }

.features-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.section-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 28px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature-card {
  background: rgba(30, 42, 94, 0.65);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 159, 39, 0.35);
}

.feature-icon { font-size: 1.8rem; margin-bottom: 10px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.75; }

.cta-section {
  max-width: 720px;
  margin: 0 auto 48px;
  padding: 36px 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(83,74,183,0.2), rgba(239,159,39,0.12));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
}

.cta-section h2 { margin-bottom: 10px; font-size: 1.35rem; }
.cta-section p { color: var(--muted); margin-bottom: 20px; line-height: 1.7; }

.landing-footer {
  text-align: center;
  padding: 24px 16px 40px;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-muted { margin-top: 6px; font-size: 0.8rem; opacity: 0.75; }

/* ── Login Modal ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-panel h2 { margin-bottom: 6px; font-size: 1.2rem; }
.modal-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }

.plan-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.plan-spec {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(83, 74, 183, 0.25);
  color: #c5cae9;
}

@media (max-width: 600px) {
  .top { flex-direction: column; align-items: flex-start; }
  .nav-inner { flex-direction: column; align-items: stretch; }
  .landing-nav .btn { width: 100%; }
}
