:root {
  --bg: #f7f7f8;
  --card: #ffffff;
  --border: #e2e2e6;
  --text: #1d1d1f;
  --muted: #6b6b70;
  --primary: #2563eb;
  --success: #16a34a;
  --danger: #dc2626;
}

* { box-sizing: border-box; }

body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
}

.container { max-width: 800px; margin: 0 auto; padding: 24px 16px 64px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { margin: 0; font-size: 20px; }

.login-box {
  max-width: 360px;
  margin: 80px auto;
  background: var(--card);
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--border);
  text-align: center;
}
.login-box input, .login-box button { width: 100%; padding: 10px; margin-top: 12px; border-radius: 8px; border: 1px solid var(--border); }
.login-box button { background: var(--primary); color: white; border: none; cursor: pointer; }

.error { color: var(--danger); }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
}
.btn.secondary { background: #edf1f7; color: var(--text); }
.btn.publish { background: var(--success); }
.btn-pay-black { background: #0a0a0a; color: #fff; }
.btn-pay-black:hover { background: #1a1a1a; }
.link-btn { background: none; border: none; color: var(--muted); cursor: pointer; text-decoration: underline; }

.actions-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.accounts, .reviews { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.accounts ul { list-style: none; padding: 0; }
.accounts li.account-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.auto-publish-toggle { margin: 0; }
.btn.tiny { padding: 6px 10px; font-size: 12px; }

.account-settings { margin-top: 8px; }
.account-settings summary { cursor: pointer; color: var(--primary); font-size: 13px; }
.settings-form { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 12px; background: var(--bg); border-radius: 8px; }
.settings-form label { font-size: 12px; color: var(--muted); }
.settings-form select, .settings-form input[type="text"] { padding: 8px; border-radius: 6px; border: 1px solid var(--border); font-family: inherit; font-size: 13px; }
.settings-form button { align-self: flex-start; margin-top: 4px; }

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-tile { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; }
.stat-value { font-size: 24px; font-weight: bold; }
.stat-label { color: var(--muted); font-size: 12px; margin-top: 4px; }

.insights { margin-bottom: 24px; }
.insights h2 { margin-bottom: 12px; }
.insight-card {
  background: linear-gradient(135deg, #eef4ff, #ffffff);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 12px;
}
.insight-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.insight-summary {
  white-space: pre-wrap;
  font-family: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.8;
}

.digest-card {
  background: linear-gradient(135deg, #fff7e6, #ffffff);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 24px;
}
.digest-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

.billing-list { list-style: none; padding: 0; margin: 16px 0; }
.billing-item { padding: 14px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.billing-item:last-child { border-bottom: none; }

.review-link-card {
  background: linear-gradient(135deg, #eef4ff, #ffffff);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.review-link-card > div { flex: 1; min-width: 220px; }
.review-qr { border-radius: 8px; border: 1px solid var(--border); background: #fff; padding: 6px; }
.copy-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.copy-row input { flex: 1; min-width: 180px; padding: 8px; border-radius: 6px; border: 1px solid var(--border); font-family: inherit; font-size: 13px; background: var(--bg); }

.reviews-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filter-chip { padding: 6px 12px; border-radius: 999px; background: var(--bg); color: var(--text); text-decoration: none; font-size: 13px; border: 1px solid var(--border); }
.filter-chip.active { background: var(--primary); color: white; border-color: var(--primary); }
.stars-filter { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; background: var(--bg); }

.review-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.stars { color: #f5a623; letter-spacing: 2px; }
.review-comment { margin: 8px 0; }

.badge { background: #fff7e6; color: #a15c00; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge.published { background: #e7f8ed; color: var(--success); }

.draft-form textarea { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--border); font-family: inherit; font-size: 14px; }

.location-card { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; background: var(--card); }

.container.narrow { max-width: 480px; }

.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { color: var(--text); text-decoration: none; }
.nav-links .btn { color: white; }

.hero-cta { padding: 14px 28px; font-size: 16px; }

/* ============ Landing page (lp-*) ============ */

:root {
  --lp-navy: #0a0f1e;
  --lp-navy-2: #131b30;
  --lp-blue: #3b82f6;
  --lp-cyan: #22d3ee;
  --lp-purple: #a855f7;
  --lp-light: #f8fafc;
  --lp-light-muted: #93a0b8;
}

.lp-body {
  font-family: "Inter", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--lp-light);
  margin: 0;
}
html[dir="rtl"] .lp-body { font-family: "Tajawal", "Inter", "Segoe UI", Tahoma, Arial, sans-serif; }

.lp-nav {
  position: relative;
  z-index: 5;
  background: var(--lp-navy);
}
.lp-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lp-logo { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.lp-nav-links { display: flex; align-items: center; gap: 20px; }
.lp-nav-links a { color: #cbd5e1; text-decoration: none; font-size: 14px; font-weight: 500; }
.lp-nav-links a.btn { color: #fff; padding: 9px 18px; }
.lp-lang-toggle {
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  padding: 6px 14px !important;
}

/* Hero */
.lp-hero {
  position: relative;
  background: linear-gradient(160deg, var(--lp-navy) 0%, var(--lp-navy-2) 55%, #1a1040 100%);
  overflow: hidden;
  padding: 72px 24px 96px;
}
.lp-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  pointer-events: none;
}
.lp-blob-1 { width: 420px; height: 420px; background: var(--lp-blue); top: -120px; inset-inline-end: -80px; }
.lp-blob-2 { width: 360px; height: 360px; background: var(--lp-purple); bottom: -140px; inset-inline-start: -100px; }
.lp-dotgrid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 40%, transparent 100%);
  pointer-events: none;
}
.lp-chart {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 220px;
  opacity: 0.5;
  pointer-events: none;
}

.lp-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .lp-hero-inner { grid-template-columns: 1fr; }
}

.lp-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #dbeafe;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.lp-hero-text h1 {
  color: #fff;
  font-size: 42px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
@media (max-width: 560px) { .lp-hero-text h1 { font-size: 30px; } }
.lp-hero-sub { color: var(--lp-light-muted); font-size: 17px; line-height: 1.7; margin: 0 0 28px; max-width: 520px; }
.lp-cta { padding: 14px 28px; font-size: 16px; font-weight: 600; background: linear-gradient(135deg, var(--lp-blue), var(--lp-cyan)); box-shadow: 0 8px 24px rgba(59,130,246,0.35); }
.lp-cta.full { display: block; text-align: center; }
.lp-hero-note { color: #64748b; font-size: 13px; margin-top: 14px; }

.lp-hero-visual { position: relative; }
.lp-review-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  max-width: 380px;
  margin: 0 auto;
}
.lp-review-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lp-review-stars { color: #f5a623; letter-spacing: 2px; }
.lp-review-name { color: var(--muted); font-size: 13px; font-weight: 600; }
.lp-review-text { color: var(--text); font-size: 15px; line-height: 1.6; margin: 0 0 16px; }
.lp-reply-box { background: #eff6ff; border: 1px solid #dbeafe; border-radius: 10px; padding: 14px; }
.lp-reply-label { display: block; color: var(--primary); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.lp-reply-box p { margin: 0; font-size: 14px; color: var(--text); line-height: 1.6; }

.lp-chip {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  white-space: nowrap;
}
.lp-chip-1 { top: -10px; inset-inline-start: -10px; }
.lp-chip-2 { bottom: 10px; inset-inline-end: -10px; }
@media (max-width: 560px) {
  .lp-chip { position: static; display: inline-block; margin: 12px 6px 0; }
}

/* Features */
.lp-features { max-width: 1120px; margin: 0 auto; padding: 80px 24px; }
.lp-section-head { text-align: center; max-width: 560px; margin: 0 auto 44px; }
.lp-section-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; }
.lp-section-head p { color: var(--muted); font-size: 16px; margin: 0; }

.lp-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.lp-feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.lp-feature-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,23,42,0.08); }
.lp-feature-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
  border-radius: 12px;
  font-size: 22px;
  margin-bottom: 16px;
}
.lp-feature-card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.lp-feature-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

/* Pricing */
.lp-pricing { background: #f1f5f9; padding: 80px 24px; }
.lp-price-card {
  max-width: 380px;
  margin: 0 auto;
  background: var(--lp-navy);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(10,15,30,0.25);
}
.lp-price-card .lp-price { font-size: 44px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.lp-price-card .lp-price span { font-size: 16px; font-weight: 500; color: var(--lp-light-muted); }
.lp-price-card ul { list-style: none; padding: 0; margin: 24px 0 28px; text-align: start; }
.lp-price-card li { padding: 8px 0; color: #cbd5e1; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.lp-price-card li::before { content: "✓ "; color: var(--lp-cyan); font-weight: bold; }

/* Footer */
.lp-footer { text-align: center; padding: 40px 16px; background: var(--lp-light); }
.lp-footer-tagline { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
