/* ===== Design tokens ===== */
:root {
  --navy: #0b1220;
  --navy-2: #131c2e;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --ink: #0a0a0a;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f7f8fa;
  --card: #ffffff;
  --success: #16a34a;
  --success-bg: #e7f8ed;
  --warn: #a15c00;
  --warn-bg: #fff7e6;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

html[dir="rtl"] body, html[dir="rtl"] { font-family: "Tajawal", "Inter", sans-serif; }

a { color: var(--blue); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.container { max-width: 960px; margin: 0 auto; padding: 24px 20px 64px; }
.container.narrow { max-width: 520px; }

/* ===== App shell topbar (dashboard, billing, settings) ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--navy);
  color: #fff;
}
.topbar h1 { font-size: 18px; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.topbar a { color: #fff; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 20px; font-size: 14px; }
.nav-links a:hover { text-decoration: underline; }
.nav-links .muted { color: rgba(255, 255, 255, 0.6); }
.link-btn { background: none; border: none; color: rgba(255, 255, 255, 0.85); cursor: pointer; font-size: 14px; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }

.urgent-badge-link {
  background: #dc2626;
  color: #fff !important;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none !important;
  animation: urgent-pulse 2s ease-in-out infinite;
}
@keyframes urgent-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.05s ease, box-shadow 0.15s ease;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: #edf1f7; color: var(--text); }
.btn.publish { background: var(--success); }
.btn.danger { background: #dc2626; }
.btn-pay-black { background: var(--ink); color: #fff; }
.btn-pay-black:hover { background: #1a1a1a; }
.btn.tiny { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn.full { display: block; width: 100%; text-align: center; }

/* ===== Brand mark (black square, white wordmark) ===== */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  padding: 9px 13px;
  border-radius: 8px;
  line-height: 1;
}
.brand-mark-sm { font-size: 12px; padding: 7px 10px; border-radius: 6px; }

/* ===== Forms ===== */
label { font-size: 13px; color: var(--muted); font-weight: 600; display: block; margin-bottom: 4px; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.field { margin-bottom: 14px; }

/* ===== Auth pages (login/signup/reset) ===== */
.auth-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); padding: 24px; }
.login-box {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-box h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.login-box > p:first-of-type { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.login-box form { text-align: left; }
html[dir="rtl"] .login-box form { text-align: right; }
.login-box input { margin-bottom: 12px; }
.login-box button[type="submit"] {
  width: 100%;
  background: var(--ink);
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}
.error { background: #fef2f2; color: #b91c1c; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.success-msg { background: var(--success-bg); color: var(--success); padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }

/* ===== Cards / sections ===== */
.accounts, .reviews, .card-block { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.accounts ul { list-style: none; padding: 0; }
.accounts li.account-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.accounts li.account-item:last-child { border-bottom: none; }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.auto-publish-toggle { margin: 0; }

.account-settings { margin-top: 8px; }
.account-settings summary { cursor: pointer; color: var(--blue); font-size: 13px; font-weight: 600; }
.settings-form { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 14px; background: var(--bg); border-radius: 8px; }
.settings-form label { margin-bottom: 0; }
.settings-form button { align-self: flex-start; margin-top: 4px; }

/* ===== Stats ===== */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow-sm); }
.stat-value { font-size: 26px; font-weight: 800; color: var(--ink); }
.stat-label { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ===== Trend chart card ===== */
.trend-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.trend-card svg { display: block; }
.trend-card .trend-copy h3 { margin-bottom: 4px; }

/* ===== Insights ===== */
.insights { margin-bottom: 24px; }
.insights h2 { margin-bottom: 12px; }
.insight-card {
  background: linear-gradient(135deg, #eef4ff, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  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: 14px; margin: 0 0 12px; font-size: 14px; line-height: 1.8; }

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

/* ===== Review link / QR ===== */
.review-link-card {
  background: linear-gradient(135deg, #eefcf5, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  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: 10px; flex-wrap: wrap; }
.copy-row input { flex: 1; min-width: 180px; }

/* ===== Reply templates ===== */
.template-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.template-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.template-item strong { display: block; font-size: 13px; }
.template-item p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.template-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }

/* ===== Reviews list ===== */
.reviews-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filter-chip { padding: 7px 14px; 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(--ink); color: white; border-color: var(--ink); }
.stars-filter { width: auto; padding: 7px 12px; border-radius: 999px; font-size: 13px; }

.review-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; background: var(--card); box-shadow: var(--shadow-sm); }
.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: var(--warn-bg); color: var(--warn); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.published { background: var(--success-bg); color: var(--success); }

.draft-form textarea { min-height: 90px; }
.actions-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ===== Billing ===== */
.billing-list { list-style: none; padding: 0; margin: 16px 0; }
.billing-item { padding: 16px 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; }

/* ===== Location picker ===== */
.location-card { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; background: var(--card); box-shadow: var(--shadow-sm); }

/* ===== Error pages ===== */
.error-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.error-shell .code { font-size: 72px; font-weight: 800; color: var(--border); line-height: 1; }
.error-shell h1 { margin-top: 8px; }

/* ===== Legal pages ===== */
.legal { max-width: 720px; margin: 0 auto; padding: 40px 20px 80px; line-height: 1.7; }
.legal h1 { font-size: 28px; margin-bottom: 4px; }
.legal h2 { font-size: 18px; margin-top: 32px; }
.legal p, .legal li { color: var(--muted); font-size: 15px; }
.legal ul { padding-inline-start: 20px; }

/* ============================================================ */
/* ===== Landing page (marketing) — monochrome, Uber-style ===== */
/* ============================================================ */
.lp-body {
  background: #fff;
  color: #000;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.lp-body h1, .lp-body h2, .lp-body h3, .lp-body h4 { text-wrap: balance; letter-spacing: -0.02em; }

.lp-nav { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid #ececec; }
.lp-nav-inner { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.lp-brand { text-decoration: none; }
.lp-nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; font-weight: 600; }
.lp-nav-links a { text-decoration: none; color: #000; }
.lp-nav-cta { background: #000 !important; color: #fff !important; padding: 10px 20px !important; border-radius: 8px; }

/* ----- Hero: black ----- */
.lp-hero {
  background: #000;
  color: #fff;
  padding: 96px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.lp-hero-inner { max-width: 720px; }
.lp-eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a9a9a;
  border: 1px solid #333;
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 22px;
}
.lp-hero h1 { font-size: clamp(34px, 5.5vw, 58px); font-weight: 800; line-height: 1.08; margin: 0 0 20px; }
.lp-hero-sub { font-size: 17px; color: #b3b3b3; line-height: 1.7; margin: 0 auto 30px; max-width: 560px; }
.lp-hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-cta { background: #fff; color: #000; font-weight: 700; padding: 15px 30px; border-radius: 8px; font-size: 15.5px; }
.lp-cta:hover { background: #e6e6e6; }
.lp-cta-ghost {
  display: inline-flex; align-items: center;
  color: #fff; text-decoration: none; font-weight: 600; font-size: 15.5px;
  padding: 15px 8px; border-bottom: 1px solid transparent;
}
.lp-cta-ghost:hover { border-bottom-color: #fff; }
.lp-hero-note { font-size: 12.5px; color: #777; margin-top: 18px; }

/* ----- Hero mock review card, sits on the black hero ----- */
.lp-mock { width: 100%; max-width: 620px; margin: 56px auto 0; }
.lp-mock-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 16px; }
.lp-mock-chip { font-size: 12px; color: #999; background: #141414; border: 1px solid #2a2a2a; border-radius: 999px; padding: 6px 12px; }
.lp-mock-card { background: #fff; color: #000; border-radius: 14px; padding: 22px; text-align: start; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6); }
.lp-mock-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.lp-mock-name { font-size: 13px; font-weight: 700; }
.lp-mock-stars { color: #000; letter-spacing: 2px; font-size: 13px; }
.lp-mock-text { font-size: 14.5px; margin: 0 0 14px; color: #333; }
.lp-mock-reply { background: #f4f4f4; border-radius: 10px; padding: 13px 15px; }
.lp-mock-reply-label { display: block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #000; margin-bottom: 6px; }
.lp-mock-reply p { margin: 0; font-size: 13.5px; color: #222; }

/* ----- Three pillars: white, bold numbers ----- */
.lp-pillars {
  max-width: 1120px; margin: 0 auto; padding: 72px 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
.lp-pillar-n { display: block; font-size: 13px; font-weight: 800; color: #b3b3b3; letter-spacing: 0.06em; margin-bottom: 14px; }
.lp-pillar h3 { font-size: 21px; font-weight: 800; margin: 0 0 10px; }
.lp-pillar p { font-size: 14.5px; color: #555; line-height: 1.7; margin: 0; }

/* ----- Section heads ----- */
.lp-kicker { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #999; margin-bottom: 12px; }
.lp-section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.lp-section-head h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; margin: 0; }
.lp-section-head-light .lp-kicker { color: #888; }
.lp-section-head-light h2 { color: #fff; }

/* ----- Features: white ----- */
.lp-features { max-width: 1120px; margin: 0 auto; padding: 24px 24px 88px; }
.lp-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #ececec; border: 1px solid #ececec; }
.lp-feature { background: #fff; padding: 28px; }
.lp-feature h4 { font-size: 15.5px; font-weight: 800; margin: 0 0 8px; }
.lp-feature p { font-size: 13.5px; color: #666; line-height: 1.65; margin: 0; }

/* ----- How it works: black ----- */
.lp-how { background: #000; color: #fff; padding: 80px 24px; }
.lp-steps { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.lp-step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #000;
  font-weight: 800; font-size: 14px; margin-bottom: 18px;
}
.lp-step h4 { font-size: 16px; font-weight: 800; margin: 0 0 8px; }
.lp-step p { font-size: 13.5px; color: #aaa; line-height: 1.7; margin: 0; }

/* ----- Pricing: white ----- */
.lp-pricing { padding: 88px 24px; }
.lp-price-card { max-width: 380px; margin: 0 auto; background: #000; color: #fff; border-radius: 16px; padding: 36px; text-align: center; }
.lp-price { font-size: 44px; font-weight: 800; margin-bottom: 22px; }
.lp-price span { display: block; font-size: 13px; font-weight: 500; color: #999; margin-top: 4px; }
.lp-price-card ul { list-style: none; padding: 0; margin: 0 0 26px; text-align: start; }
.lp-price-card li { padding: 9px 0; border-bottom: 1px solid #262626; font-size: 13.5px; color: #ddd; }
.lp-price-card li:last-child { border-bottom: none; }
.lp-price-card .lp-cta { background: #fff; color: #000; }

/* ----- Footer: white ----- */
.lp-footer { text-align: center; padding: 48px 24px 60px; border-top: 1px solid #ececec; }
.lp-footer .brand-mark { margin-bottom: 14px; }
.lp-footer-tagline { font-size: 13.5px; color: #777; margin: 0 0 12px; }
.lp-footer-links { font-size: 13px; }
.lp-footer-links a { color: #555; }

@media (max-width: 820px) {
  .lp-pillars, .lp-feature-grid, .lp-steps { grid-template-columns: 1fr; }
}

/* ===== Executive dashboard ===== */
.exec-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.exec-picker select { width: auto; min-width: 220px; }

.exec-warning {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff4e5;
  border: 1px solid #f5c477;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
}
.exec-warning-icon { font-size: 22px; line-height: 1; }
.exec-warning strong { color: #92400e; }
.exec-warning p { margin: 6px 0 0; color: #7a4a06; font-size: 14px; line-height: 1.6; }

.exec-satisfaction .stat-value { color: var(--blue); }
.exec-delta { margin-top: 6px; font-size: 12px; font-weight: 700; }
.exec-delta.up { color: var(--success); }
.exec-delta.down { color: #dc2626; }

.exec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 24px; }
.exec-list h3 { margin-bottom: 4px; }
.exec-rank-list { list-style: none; counter-reset: exec-rank; padding: 0; margin: 14px 0 0; }
.exec-rank-list li {
  counter-increment: exec-rank;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.exec-rank-list li:last-child { border-bottom: none; }
.exec-rank-list li::before {
  content: counter(exec-rank);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--bg);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  margin-inline-end: 10px;
  color: var(--muted);
}
.exec-rank-label { flex: 1; text-transform: capitalize; }
.exec-rank-count { color: var(--muted); font-weight: 700; font-size: 12px; background: var(--bg); border-radius: 999px; padding: 2px 10px; }

.exec-competitor-list { list-style: none; padding: 0; margin: 14px 0 0; }
.exec-competitor-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.exec-competitor-list li:last-child { border-bottom: none; }

.exec-branch-highlights { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.exec-branch-chip { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--bg); }
.exec-branch-chip.best { background: var(--success-bg); color: var(--success); }
.exec-branch-chip.worst { background: #fef2f2; color: #b91c1c; }
.exec-branch-chip.up { background: var(--success-bg); color: var(--success); }
.exec-branch-chip.down { background: #fef2f2; color: #b91c1c; }

.exec-branch-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.exec-branch-table th, .exec-branch-table td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.exec-branch-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; }
.exec-branch-table tr:last-child td { border-bottom: none; }

.exec-ask { background: linear-gradient(135deg, #f0f4ff, #ffffff); }
.exec-ask-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.exec-ask-form input[type="text"] { flex: 1; min-width: 220px; }
.exec-ask-answer { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin-top: 12px; font-size: 14px; }
.exec-ask-answer p { margin: 4px 0; }

.exec-ai .insight-header { margin-bottom: 4px; }
