/* Cairo, self-hosted from the brand identity (09_Typography), so no font request leaves the site. */
@font-face {
  font-family: "Cairo";
  src: url("../fonts/Cairo-Variable.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  /* TOA Visits brand tokens (toa-sa/toa-brand-identity, 18_TOA_Visits/08_Colors) */
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #1f2a27;
  --muted: #5b6663;
  --line: #e2e5e0;
  --brand: #0d3b2e;
  --brand-ink: #ffffff;
  --gold: #c79a2e;
  --gold-ink: #8a6a1e;
  --gold-soft: #f6ecd2;
  --ivory: #fcf9f2;
  --danger: #b3261e;
  --ok: #1e7a46;
  --radius: 14px;
  --tint: #eef4f1;
  --soft: #f5f7f6;
  --brand-deep: #0d3b2e;
  --gold-bright: #e0bd64; /* gold that reads on the brand colour */
  --on-brand: #fcf9f2;    /* text on the brand colour */
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111513;
    --surface: #1a201d;
    --ink: #eef1ee;
    --muted: #a6b0a9;
    --line: #2c3430;
    --brand: #2f8a66;
    --gold: #d9b45a;
    --gold-ink: #d9b45a;
    --gold-soft: #2a261b;
    --danger: #f2817a;
    --ok: #63c48b;
    --shadow: none;
    --tint: #16201c;
    --soft: #141a17;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body, "Cairo"), "Cairo", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.75;
  font-size: 17px;
}

a { color: var(--brand); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.topbar { border-bottom: 1px solid var(--line); background: var(--ivory); }
.topbar .btn-ghost { color: var(--brand-deep); border-color: #e2e5e0; }
.topbar .admin-nav a { color: var(--brand-deep); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; font-weight: 700; font-size: 18px; color: var(--brand-deep); text-decoration: none; }
.brand img { height: 40px; width: auto; display: block; }
.brand span { color: var(--gold-ink); margin-inline-start: 8px; }

.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600;
  padding: 12px 22px; border-radius: 999px;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn-small { padding: 6px 14px; font-size: 15px; }

.hero { padding: 64px 0 40px; }
.badge { display: inline-block; background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; padding: 4px 14px; border-radius: 999px; font-size: 15px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.3; margin: 16px 0 12px; color: var(--brand); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 0 24px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.seats { color: var(--gold-ink); font-weight: 600; margin-top: 14px; }

section { padding: 40px 0; }
section h2 { font-size: 28px; color: var(--brand); margin: 0 0 20px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); }
.step-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; margin-bottom: 8px; }

.price { font-size: 34px; font-weight: 700; color: var(--brand); }
.price small { font-size: 15px; color: var(--muted); font-weight: 400; }
.price-old { text-decoration: line-through; color: var(--muted); font-size: 16px; }
.features { margin: 14px 0 0; padding: 0 18px 0 0; color: var(--muted); font-size: 15px; }
.features li { margin-bottom: 4px; }
.badge-small { font-size: 12px; padding: 2px 10px; margin-inline-start: 6px; vertical-align: middle; }
.card.primary { border: 2px solid var(--gold); }
.note { color: var(--muted); font-size: 15px; }

.trial-split { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.trial-split .card.primary { border: 2px solid var(--gold); }

.form-card { max-width: 720px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.field .error { color: var(--danger); font-size: 14px; margin-top: 4px; }
.row2 { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.check input { width: auto; margin-top: 6px; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 8px 0 0; }

footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.follow-links { display: inline-flex; gap: 8px; vertical-align: middle; }
.follow-links a { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--brand); }
.follow-links a:hover, .follow-links a:focus-visible { border-color: var(--gold); color: var(--gold-ink); }
.follow-links .icon { width: 20px; height: 20px; }
.follow { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--muted); }

.consent {
  position: fixed; inset: auto 16px 16px 16px; max-width: 720px; margin: 0 auto; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; display: none; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between;
}
.consent.show { display: flex; }
.consent p { margin: 0; flex: 1 1 320px; font-size: 15px; }
.consent .actions { display: flex; gap: 8px; }

.flash { background: var(--gold-soft); border-radius: 10px; padding: 10px 14px; margin: 16px 0; }
.alert { background: var(--surface); border: 1px solid var(--danger); color: var(--danger); border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; }

/* Admin */
.admin-nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.admin-nav a { text-decoration: none; font-weight: 600; }
.post-card { scroll-margin-top: 90px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
/* Cells wrap long text so a table fits its page (Turki, 1 Nov 2026); only
   headers, numbers, phones and dates stay on one line. The wrap scrolls
   sideways only on a narrow phone. */
th, td { text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td.num, td[dir="ltr"], td.nowrap { white-space: nowrap; }
td { overflow-wrap: break-word; }
td code, td a[href^="http"] { overflow-wrap: anywhere; } /* long links break anywhere */
td small { display: inline-block; max-width: 36ch; }
@media (max-width: 1180px) { th, td { padding: 8px 7px; font-size: 14px; } }
/* Phones: each row becomes a card, labels from js/tables.js. */
@media (max-width: 640px) {
  .table-wrap:has(table.is-cards) { overflow-x: visible; background: none; border: 0; }
  table.is-cards thead { display: none; }
  table.is-cards, table.is-cards tbody, table.is-cards tr, table.is-cards td { display: block; width: 100%; }
  table.is-cards tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px; margin-bottom: 10px; }
  /* Physical sides: the admin is RTL, and an LTR cell (a phone) must not flip its label. */
  table.is-cards td { position: relative; border: 0; padding: 5px 7.5em 5px 0; min-height: 1.6em; white-space: normal; text-align: right; }
  table.is-cards td[data-label]::before { content: attr(data-label); position: absolute; right: 0; top: 6px; width: 7em; color: var(--muted); font-size: 13px; font-weight: 600; text-align: right; direction: rtl; }
  table.is-cards td:not([data-label]), table.is-cards td[colspan] { padding-right: 0; }
  .pill { white-space: nowrap; }
}
th { color: var(--muted); font-weight: 600; }
td.num, th.num { font-variant-numeric: tabular-nums; text-align: left; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--gold-soft); font-size: 13px; }
.pill.won { background: var(--ok); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.filters select { font: inherit; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.pager { display: flex; gap: 12px; margin: 16px 0; }
code.link { direction: ltr; display: inline-block; font-size: 13px; background: var(--bg); padding: 2px 6px; border-radius: 6px; user-select: all; }

/* Publishing */
.post-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 10px; }
.post-body { display: flex; gap: 14px; align-items: flex-start; }
.post-thumb { width: 120px; max-width: 30%; border-radius: 10px; border: 1px solid var(--line); }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.post-actions form { margin: 0; }
.pill.status-approved { background: var(--brand); color: #fff; }
.pill.status-published { background: var(--ok); color: #fff; }
.pill.status-failed { background: var(--danger); color: #fff; }
.field .label { display: block; font-weight: 600; margin-bottom: 6px; }

@media (max-width: 720px) {
    .topbar .wrap:has(.admin-nav) { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
    .admin-nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding-bottom: 4px; white-space: nowrap; }
    .admin-nav form { margin-inline-start: auto; }
}

/* Two-factor */
.qr { background: #fff; display: inline-block; padding: 12px; border-radius: 12px; border: 1px solid var(--line); margin: 12px 0; }
.qr svg { display: block; width: 220px; height: 220px; }
.steps { padding-inline-start: 20px; margin: 12px 0; }
.recovery-codes { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; font-size: 16px; line-height: 1.8; text-align: left; }

/* ---------------------------------------------------------------------
   Campaign landing page (lp-*), modelled on visit.toa.sa
   --------------------------------------------------------------------- */
.icon { width: 1em; height: 1em; flex: none; }

.btn-gold { background: var(--gold); color: var(--brand-deep); font-weight: 700; }
.btn-outline { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .55); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .08); }

.topbar { position: sticky; top: 0; z-index: 40; backdrop-filter: saturate(1.4) blur(6px); }
.lp-nav { display: flex; gap: 22px; margin-inline-start: auto; margin-inline-end: 8px; }
.lp-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.lp-nav a:hover { color: var(--brand); }

.lp-kicker { color: var(--gold); font-weight: 700; font-size: 16px; margin: 0 0 10px; }
.lp-kicker-dark { color: var(--gold-ink); }

/* Hero */
.lp-hero {
  background: var(--brand-deep) url("../brand/pattern-gold-on-green.svg") repeat;
  background-size: 320px; color: #fff; padding: 72px 0 80px; overflow: hidden;
}
.lp-hero-grid { display: grid; gap: 48px; grid-template-columns: 1.15fr .85fr; align-items: center; }
.lp-hero h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.25; margin: 0 0 18px; color: #fff; font-weight: 800; }
.lp-lead { font-size: 19px; line-height: 1.85; color: rgba(255, 255, 255, .85); margin: 0 0 28px; max-width: 600px; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: rgba(255, 255, 255, .85); font-size: 15px; }
.lp-hero-points li { display: flex; align-items: center; gap: 8px; }
.lp-hero-points .icon { color: var(--gold); }
.lp-hero-visual { position: relative; display: flex; justify-content: center; }
.lp-phone {
  width: min(300px, 80%); border-radius: 40px; border: 10px solid #fff; overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35); transform: rotate(-3deg); background: #fff;
}
.lp-phone img { display: block; width: 100%; height: auto; }
.lp-float-card {
  position: absolute; bottom: 36px; inset-inline-end: 0; display: flex; gap: 12px; align-items: center;
  background: #fff; color: #17332b; border-radius: 14px; padding: 12px 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
}
.lp-float-card strong { display: block; font-size: 15px; }
.lp-float-card span { font-size: 13px; color: #62726b; }
.lp-float-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #e3f1ea; color: #1e7a46; font-size: 20px; }

/* Offer strip */
.lp-offer { background: var(--gold-soft); padding: 16px 0; border-bottom: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.lp-offer-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lp-offer p { margin: 0; color: var(--gold-ink); flex: 1 1 320px; }
.lp-offer-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: #fff; font-size: 20px; }
.lp-seats { background: var(--brand-deep); color: #fff; font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px; }

/* Sections */
.lp-section { padding: 80px 0; }
.lp-tint { background: var(--tint); }
.lp-soft { background: var(--soft); }
.lp-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.lp-head h2, .lp-section h2 { font-size: clamp(26px, 3.4vw, 36px); color: var(--brand); margin: 0 0 10px; font-weight: 800; line-height: 1.35; }
.lp-head p { color: var(--muted); margin: 0; }

.lp-features { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.lp-feature { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; transition: transform .2s, box-shadow .2s; }
.lp-feature:hover { transform: translateY(-3px); box-shadow: 0 14px 34px color-mix(in srgb, var(--brand-deep) 8%, transparent); }
.lp-feature h3 { margin: 16px 0 6px; font-size: 19px; color: var(--ink); }
.lp-feature p { margin: 0; color: var(--muted); font-size: 16px; }
.lp-feature-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--tint); color: var(--brand); font-size: 22px; }

.lp-showcase { display: grid; gap: 48px; grid-template-columns: .9fr 1.1fr; align-items: center; }
.lp-showcase-visual img { width: 100%; height: auto; display: block; filter: drop-shadow(0 24px 40px color-mix(in srgb, var(--brand-deep) 18%, transparent)); }
.lp-checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.lp-checks li { display: flex; gap: 12px; align-items: flex-start; }
.lp-checks .icon { color: var(--gold); font-size: 22px; margin-top: 3px; }
.lp-checks span { color: var(--muted); }
.lp-checks strong { color: var(--ink); }

.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); counter-reset: none; }
.lp-steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; position: relative; }
.lp-steps h3 { margin: 14px 0 6px; font-size: 19px; }
.lp-steps p { margin: 0; color: var(--muted); }
.lp-step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-deep); color: #fff; font-weight: 800; }

/* Pricing */
.lp-pill-gold { display: inline-block; margin-top: 18px; background: var(--gold-soft); color: var(--gold-ink); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); font-weight: 700; padding: 8px 20px; border-radius: 999px; font-size: 15px; }
.lp-plans { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); align-items: stretch; }
.lp-plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 22px 22px; }
.lp-plan h3 { margin: 0; font-size: 22px; color: var(--brand); }
.lp-plan-tagline { color: var(--muted); font-size: 14px; margin: 6px 0 18px; min-height: 44px; }
.lp-plan-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.lp-plan-price strong { font-size: 44px; line-height: 1; color: var(--ink); font-weight: 800; }
.lp-plan-price span { color: var(--muted); font-size: 14px; }
.lp-price-old { text-decoration: line-through; color: var(--muted); font-size: 18px; }
.lp-plan-extra { color: var(--muted); font-size: 13px; margin: 12px 0 4px; }
.lp-plan-features { list-style: none; padding: 0; margin: 10px 0 22px; display: grid; gap: 10px; flex: 1; }
.lp-plan-features li { display: flex; gap: 10px; font-size: 15px; }
.lp-plan-features .icon { color: var(--ok); margin-top: 5px; }
.lp-plan .btn { width: 100%; }
.lp-plan.is-featured { border: 2px solid var(--brand); box-shadow: 0 20px 44px color-mix(in srgb, var(--brand-deep) 12%, transparent); transform: translateY(-6px); }
.lp-plan.is-enterprise { border-top: 4px solid var(--gold); }
.lp-plan.is-enterprise .lp-plan-price strong { font-size: 34px; }
.lp-plan-flag { position: absolute; top: -14px; inset-inline-start: 50%; transform: translateX(50%); background: var(--brand-deep); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 14px; border-radius: 999px; white-space: nowrap; }
.lp-note { text-align: center; color: var(--muted); font-size: 14px; margin: 28px auto 0; max-width: 760px; }

/* Request */
.lp-request { display: grid; gap: 0; grid-template-columns: .8fr 1.2fr; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px color-mix(in srgb, var(--brand-deep) 12%, transparent); }
.lp-request-side { background: var(--brand-deep) url("../brand/pattern-gold-on-green.svg") repeat; background-size: 320px; color: #fff; padding: 40px 32px; }
.lp-request-side h2 { color: #fff; }
.lp-request-side > p { color: rgba(255, 255, 255, .85); margin: 0; }
.lp-checks-light span { color: rgba(255, 255, 255, .9); }
.lp-request-note { margin-top: 28px !important; font-size: 14px; color: rgba(255, 255, 255, .75) !important; }
.lp-request-note a { color: var(--gold); }
.lp-form { max-width: none; border-radius: 0; border: 0; box-shadow: none; padding: 36px 32px; }
.lp-submit { width: 100%; padding: 14px 22px; font-size: 18px; }

/* FAQ */
.lp-faq { max-width: 760px; }
.lp-faq h2 { text-align: center; margin-bottom: 28px; }
.lp-faq details { border-radius: 12px; padding: 16px 20px; }

/* Closing CTA */
.lp-cta { background: var(--brand-deep) url("../brand/pattern-gold-on-green.svg") repeat; background-size: 320px; color: #fff; padding: 48px 0; }
.lp-cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.lp-cta h2 { color: #fff; margin: 0 0 6px; font-size: 30px; }
.lp-cta p { margin: 0; color: rgba(255, 255, 255, .85); }
.lp-cta a:not(.btn) { color: var(--gold); }

@media (max-width: 980px) {
  .lp-nav { display: none; }
  .lp-hero-grid, .lp-showcase, .lp-request { grid-template-columns: 1fr; }
  .lp-hero { padding: 48px 0 56px; }
  .lp-hero-visual { margin-top: 8px; }
  .lp-features, .lp-steps { grid-template-columns: 1fr 1fr; }
  .lp-plans { grid-template-columns: 1fr 1fr; }
  .lp-plan.is-featured { transform: none; }
}
@media (max-width: 640px) {
  .lp-section { padding: 56px 0; }
  .lp-features, .lp-steps, .lp-plans { grid-template-columns: 1fr; }
  .lp-plan-tagline { min-height: 0; }
  .lp-float-card { inset-inline-end: 4px; bottom: 16px; }
  .lp-request-side, .lp-form { padding: 28px 20px; }
  .topbar .btn-small { padding: 6px 12px; font-size: 14px; }
}

/* Media library and post previews */
.media-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.media-item img, .media-item video { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: var(--soft); }
.media-item .note { margin: 6px 0; }
.media-title { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.media-title select { flex: 1 1 100%; min-width: 0; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--bg); color: var(--ink); }
.media-title input { flex: 1; min-width: 0; }
.media-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-bottom: 14px; }
.media-option { display: block; cursor: pointer; border: 2px solid var(--line); border-radius: 12px; padding: 6px; }
.media-option:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }
.media-option input { position: absolute; opacity: 0; }
.media-option img, .media-option video { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; }
.media-option .note { display: block; font-size: 12px; line-height: 1.4; margin-top: 4px; }
.card-editor { display: grid; gap: 16px; grid-template-columns: 1fr 260px; align-items: start; }
.card-preview canvas { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 700px) { .card-editor { grid-template-columns: 1fr; } .card-preview { max-width: 300px; } }
.card-pending { padding: 10px 0; }
.previews { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; margin: 8px 0; }
.preview { margin: 0; background: #fff; color: #0f1419; border: 1px solid #e1e4e8; border-radius: 14px; overflow: hidden; font-size: 14px; }
.preview-label { background: var(--brand); color: #fff; font-size: 12px; padding: 4px 12px; }
.preview-head { display: flex; gap: 8px; align-items: center; padding: 10px 12px 6px; }
.preview-head .note { color: #536471; font-size: 12px; }
.preview-avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #e1e4e8; }
.preview-text { margin: 0; padding: 4px 12px 10px; white-space: normal; line-height: 1.6; overflow-wrap: anywhere; }
.preview-link { color: #1d9bf0; }
.preview-facebook .preview-link { color: #0866ff; }
.preview-media img, .preview-media video { display: block; width: 100%; height: auto; background: #000; }
.preview-x .preview-media { margin: 0 12px 12px; border-radius: 14px; overflow: hidden; border: 1px solid #e1e4e8; }
.preview-instagram .preview-media img, .preview-instagram .preview-media video { aspect-ratio: 4 / 5; object-fit: cover; }
.preview-empty { padding: 30px; text-align: center; color: #b3261e; background: #fdf1f0; }

/* Website chat window (مساعد TOA Visits). Sits bottom-left in RTL, above the consent bar. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.chatw { position: fixed; left: 20px; bottom: 20px; z-index: 60; font-size: 15px; transition: transform .25s ease, opacity .25s ease; }
.chatw.is-away:not(.is-open) { transform: translateY(24px); opacity: 0; pointer-events: none; }
/* A round brand button with a gold mark; on wide screens it opens into a small «اسألنا» pill on hover. */
.chatw-open {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 56px; min-width: 56px; padding: 0 15px;
  border: 2px solid var(--gold); border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700;
  background: var(--brand-deep); color: var(--gold); box-shadow: 0 8px 24px color-mix(in srgb, var(--brand-deep) 28%, transparent); transition: transform .2s ease, box-shadow .2s ease;
}
.chatw-open:hover { transform: translateY(-2px); box-shadow: 0 12px 28px color-mix(in srgb, var(--brand-deep) 34%, transparent); }
.chatw-open:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.chatw-open-label { color: #fff; max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .25s ease; }
.chatw-open:hover .chatw-open-label, .chatw-open:focus-visible .chatw-open-label { max-width: 80px; }
.chatw-dot { position: absolute; top: 2px; right: 2px; width: 13px; height: 13px; border-radius: 50%; background: #e5484d; border: 2px solid var(--surface); }
.chatw-dot[hidden] { display: none; }
.chatw.is-open .chatw-open { display: none; }
.chatw-panel {
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 32px)); display: flex; flex-direction: column; padding: 0; margin: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0, 0, 0, .18); overflow: hidden;
}
.chatw-panel[hidden] { display: none; }
.chatw-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--brand-deep); color: #fff; padding: 12px 16px; border-bottom: 3px solid var(--gold); }
.chatw-head small { display: block; opacity: .8; font-size: 12px; }
.chatw-close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.chatw-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--soft); }
.chatw-msg { margin: 0; padding: 9px 13px; border-radius: 14px; max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.chatw-msg.bot, .chatw-msg.team { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-start-start-radius: 4px; }
.chatw-msg.team { border-color: var(--gold); }
.chatw-msg.me { align-self: flex-end; background: var(--brand-deep); color: #fff; border-start-end-radius: 4px; }
.chatw-msg.typing { color: var(--muted); font-style: italic; }
.chatw-msg.error { align-self: center; background: none; color: var(--danger); font-size: 13px; }
.chatw-msg a { color: inherit; text-decoration: underline; }
.chatw-chips[hidden] { display: none; }
.chatw-next { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 92%; }
.chatw-next button { font: inherit; font-size: 13px; cursor: pointer; border: 1px solid var(--gold); color: var(--gold-ink); background: var(--surface); border-radius: 999px; padding: 4px 12px; text-align: start; }
.chatw-next button:hover { background: var(--gold-soft, #f6eedb); }
.chatw-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 0; background: var(--soft); }
.chatw-chips button { font: inherit; font-size: 13px; cursor: pointer; border: 1px solid var(--gold); color: var(--gold-ink); background: var(--surface); border-radius: 999px; padding: 4px 12px; }
.chatw-form { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.chatw-attach { display: inline-grid; place-items: center; width: 38px; flex: none; cursor: pointer; color: var(--muted); border-radius: 10px; }
.chatw-attach:hover { color: var(--gold-ink); background: var(--soft); }
.chatw-form textarea { flex: 1; resize: none; font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; max-height: 120px; background: var(--surface); color: var(--ink); }
.chatw-form[hidden], .chatw-start[hidden] { display: none; }
.chatw-start { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.chatw-start-title { margin: 0 0 4px; font-weight: 700; color: var(--brand-deep); }
.chatw-start label { font-size: 13px; color: var(--muted); }
.chatw-start label span { font-size: 12px; }
.chatw-start input { font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); color: var(--ink); margin-bottom: 4px; }
.chatw-start input[dir="ltr"] { text-align: right; }
.chatw-start input:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold); }
.chatw-start .btn { margin-top: 6px; }
.chatw-start-error { margin: 0; color: var(--danger); font-size: 13px; }
.chatw-start-error[hidden] { display: none; }
.chatw-note { margin: 0; padding: 0 14px 8px; font-size: 11px; color: var(--muted); background: var(--surface); }
/* iPhone zooms into any field under 16px when it gets focus; keep the chat's fields at 16px. */
.chatw-form textarea, .chatw-start input { font-size: 16px; }
/* Stay clear of the cookie bar until the visitor answers it. */
.consent.show ~ .chatw:not(.is-open) { bottom: 110px; }
@media (max-width: 480px) {
  .chatw { left: 12px; bottom: 12px; }
  .chatw-open { height: 52px; min-width: 52px; padding: 0 13px; }
  .chatw-open:hover { transform: none; }
  .consent.show ~ .chatw:not(.is-open) { bottom: 170px; }
  .chatw.is-open { inset: 0; bottom: auto; height: 100dvh; }
  .chatw.is-open .chatw-panel { width: 100vw; height: 100%; border-radius: 0; border: 0; }
  /* The page behind must not scroll while the full-screen chat is open. */
  html:has(.chatw.is-open) { overflow: hidden; }
  .chatw.is-open .chatw-start { overflow-y: auto; }
  .chatw.is-kb .chatw-start:not([hidden]) { flex: 1; padding-bottom: 72px; }
  .chatw.is-kb .chatw-start:not([hidden]) ~ .chatw-chips, .chatw.is-kb:has(.chatw-start:not([hidden])) .chatw-log { display: none; }
}

/* Executive dashboard (admin home) */
.dash-period { color: var(--muted); margin: -6px 0 16px; font-size: 15px; }
.dash-needs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; }
.dash-needs h2 { font-size: 16px; margin: 0; margin-inline-end: 8px; color: var(--gold-ink); }
.dash-needs.is-clear { background: var(--tint); border-color: var(--line); }
.dash-need { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 15px; color: var(--ink); text-decoration: none; }
.dash-need:hover { border-color: var(--gold); }
.dash-need b { color: var(--gold-ink); font-size: 17px; }
.dash-need-clear { color: var(--ok); font-weight: 700; font-size: 15px; }

.dash-kpis { padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.dash-kpi { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 40px; box-shadow: var(--shadow); }
.dash-kpi-label { color: var(--muted); font-size: 15px; font-weight: 600; }
.dash-kpi-value { font-size: 36px; font-weight: 800; color: var(--ink); line-height: 1.25; font-variant-numeric: tabular-nums; }
.dash-kpi-foot { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 14px; }
.dash-kpi-foot .note { font-size: 13px; }
.dash-delta { font-weight: 700; font-size: 13px; padding: 1px 8px; border-radius: 999px; }
.dash-delta.is-up { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.dash-delta.is-down { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.dash-delta.is-flat { color: var(--muted); background: var(--soft); font-weight: 600; }
.dash-spark { position: absolute; inset-inline: 0; bottom: 6px; width: 100%; height: 28px; }
.dash-spark polyline { fill: none; stroke: var(--gold); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }

.dash-money { padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(255, 255, 255, .12); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.dash-money > div { background: var(--brand-deep); color: var(--on-brand); padding: 16px 18px; display: grid; }
.dash-money span { font-size: 14px; opacity: .8; }
.dash-money b { font-size: 28px; color: var(--gold-bright); line-height: 1.3; font-variant-numeric: tabular-nums; }
.dash-money small { font-size: 12px; opacity: .7; }

.dash-card { margin-bottom: 18px; padding: 18px 20px; }
.dash-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.dash-card-head h2 { font-size: 18px; margin: 0; color: var(--brand); }
.dash-card-head a { text-decoration: none; }
.dash-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline: 4px 2px; }
.sw-brand { background: var(--brand); }
.sw-gold { background: var(--gold); }
.dash-empty { color: var(--muted); background: var(--soft); border-radius: 10px; padding: 18px; text-align: center; margin: 0; }

.dash-trend { position: relative; display: grid; gap: 10px; }
.dash-trend-row { display: grid; grid-template-columns: 44px 1fr; gap: 8px; }
.dash-axis { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--muted); text-align: end; font-variant-numeric: tabular-nums; line-height: 1; }
.dash-plot svg { display: block; width: 100%; }
.dash-plot-visits svg { height: 180px; }
.dash-plot-leads svg { height: 70px; }
.dash-plot .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 4; }
.dash-plot .base { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .5; }
.dash-plot .area { fill: color-mix(in srgb, var(--brand) 14%, transparent); }
.dash-plot .line { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.dash-plot .bar { fill: var(--gold); }
.dash-hover { position: absolute; top: 0; bottom: 22px; left: 52px; right: 0; display: grid; grid-template-columns: repeat(var(--cols), 1fr); }
.dash-col { position: relative; outline: none; }
.dash-col:hover, .dash-col:focus-visible { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.dash-tip { display: none; position: absolute; top: 8px; left: 50%; z-index: 3; min-width: 120px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); border-radius: 10px; padding: 8px 12px; font-size: 13px; white-space: nowrap; }
.dash-tip span, .dash-tip b { display: block; }
.dash-col.is-late .dash-tip { left: auto; right: 50%; }
.dash-col:hover .dash-tip, .dash-col:focus-visible .dash-tip { display: block; }
.dash-dates { display: flex; justify-content: space-between; padding-left: 52px; font-size: 12px; color: var(--muted); }

.dash-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dash-two > .dash-card { margin-bottom: 18px; }
.dash-bars { display: grid; gap: 10px; margin-bottom: 8px; }
.dash-bar-row { display: grid; grid-template-columns: 130px 1fr 64px; align-items: center; gap: 10px; font-size: 15px; }
.dash-bars-posts .dash-bar-row { grid-template-columns: minmax(0, 1.3fr) 1fr 64px; }
.dash-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-bar-label a { color: var(--ink); text-decoration: none; }
.dash-bar-label a:hover { color: var(--brand); text-decoration: underline; }
.dash-bar-track { height: 14px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.dash-bar-fill { display: block; height: 100%; background: var(--brand); border-radius: 4px; min-width: 0; }
.dash-bar-fill.is-gold { background: var(--gold); }
.dash-bar-row:hover .dash-bar-fill { filter: brightness(1.15); }
.dash-bar-value { font-weight: 700; font-variant-numeric: tabular-nums; display: grid; line-height: 1.2; }
.dash-bar-value small { font-weight: 600; color: var(--muted); font-size: 12px; }

.dash-campaign { padding: 10px 0; border-bottom: 1px solid var(--line); }
.dash-campaign:last-child { border-bottom: 0; }
.dash-campaign-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }
.dash-campaign-foot { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 14px; }
.dash-status { font-size: 13px; font-weight: 700; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.dash-status.is-live { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.dash-meter { height: 10px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.dash-meter span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.dash-meter.is-warn span { background: var(--gold); }

@media (max-width: 900px) {
  .dash-kpis, .dash-money { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-two { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .dash-kpi-value { font-size: 30px; }
  .dash-money b { font-size: 22px; }
  .dash-bar-row { grid-template-columns: 96px 1fr 52px; font-size: 14px; }
  .dash-plot-visits svg { height: 140px; }
}

/* Admin shell: sidebar navigation (nav-side / nav-dark) or a top bar (nav-top) */
.admin-body { --side-w: 248px; --side-bg: var(--ivory); --side-ink: #1f2a27; --side-muted: #6b7571; --side-line: #e7e2d4; --side-hover: color-mix(in srgb, var(--brand-deep) 6%, transparent); --side-active-bg: var(--brand-deep); --side-active-ink: var(--on-brand); }
.admin-body.nav-dark { --side-bg: var(--brand-deep); --side-ink: #e9efe9; --side-muted: #9fb5aa; --side-line: rgba(255, 255, 255, .1); --side-hover: rgba(255, 255, 255, .07); --side-active-bg: color-mix(in srgb, var(--gold) 16%, transparent); --side-active-ink: var(--gold-bright); }
@media (prefers-color-scheme: dark) {
  .admin-body.nav-side, .admin-body.nav-top { --side-bg: #151b18; --side-ink: #e6ebe7; --side-muted: #95a19a; --side-line: #2a322e; --side-hover: rgba(255, 255, 255, .05); --side-active-bg: #2f8a66; --side-active-ink: #fff; }
  .admin-body.nav-dark { --side-bg: #0b2f25; }
}

.side { position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--side-w); z-index: 40; display: flex; flex-direction: column; background: var(--side-bg); color: var(--side-ink); border-inline-end: 1px solid var(--side-line); }
.side-brand { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 22px 22px 18px; text-decoration: none; border-bottom: 1px solid var(--side-line); }
.side-brand img { width: 100%; height: auto; display: block; }
.side-brand-light { max-width: 170px; }
.side-brand-dark { display: none !important; }
.nav-dark .side-brand-dark { display: block !important; }
.nav-dark .side-brand-light { display: none; }
.side-brand-tag { display: flex; align-items: center; gap: 10px; direction: ltr; font-size: 12px; font-weight: 700; letter-spacing: .42em; text-transform: uppercase; color: var(--gold-ink); line-height: 1; padding-inline-start: .42em; }
.side-brand-tag::before, .side-brand-tag::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .55; }
.nav-dark .side-brand-tag { color: var(--gold-bright); }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 12px 16px; }
.side-group { font-size: 12px; font-weight: 700; color: var(--side-muted); padding: 16px 12px 6px; letter-spacing: .02em; }
.side-group .side-badge { display: none; }
.side-items { display: grid; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--side-ink); text-decoration: none; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.side-link:hover { background: var(--side-hover); }
.side-link svg, .side-logout svg, .admin-bar-menu svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.side-link.is-active { background: var(--side-active-bg); color: var(--side-active-ink); box-shadow: inset -3px 0 0 var(--gold); }
.side-link.is-active svg { opacity: 1; }
.side-badge { margin-inline-start: auto; min-width: 22px; text-align: center; font-size: 12px; font-weight: 800; background: var(--gold); color: var(--brand-deep); border-radius: 999px; padding: 1px 7px; }
.side-foot { border-top: 1px solid var(--side-line); padding: 12px 16px 16px; display: grid; gap: 6px; }
.side-user { font-size: 13px; color: var(--side-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot form { margin: 0; }
.side-logout { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 10px; font-size: 14.5px; font-weight: 600; color: var(--side-ink); }
.side-logout:hover { background: var(--side-hover); }

.admin-main { margin-inline-start: var(--side-w); min-height: 100vh; min-width: 0; }
.admin-content { max-width: 1160px; margin: 0 auto; padding: 28px 32px 56px; }
.admin-title { font-size: 26px; color: var(--brand); margin: 0 0 8px; }
.admin-bar { display: none; }
.side-scrim { display: none; }

@media (max-width: 960px) {
  .side { transform: translateX(100%); transition: transform .2s ease; box-shadow: none; }
  /* Phones: the open menu fits the visible screen (Safari's bottom bar included) and scrolls inside. */
  .side { height: 100dvh; inset-block-end: auto; padding-bottom: env(safe-area-inset-bottom); }
  .side-nav { min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  body:has(.side-toggle:checked) { overflow: hidden; } /* the page behind stays put while the menu is open */
  .side-toggle:checked ~ .side { transform: none; box-shadow: -12px 0 32px rgba(0, 0, 0, .18); }
  .side-toggle:checked ~ .side-scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .35); }
  .admin-main { margin-inline-start: 0; }
  .admin-bar { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; background: var(--side-bg); border-bottom: 1px solid var(--side-line); padding: 10px 16px; }
  .nav-dark .admin-bar { background: var(--side-bg); border-color: rgba(255, 255, 255, .1); }
  .nav-dark .admin-bar-menu { background: rgba(255, 255, 255, .08); color: var(--on-brand); border-color: rgba(255, 255, 255, .2); }
  .admin-bar img { height: 30px; width: auto; }
  .admin-bar-menu { order: 2; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 15px; color: var(--brand-deep); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; background: var(--surface); }
  .admin-content { padding: 20px 16px 48px; }
}

/* Top bar variant: one slim row, groups open as drop-down menus */
@media (min-width: 961px) {
  .nav-top .side { position: sticky; top: 0; inset-inline: auto; width: auto; height: 64px; flex-direction: row; align-items: center; gap: 8px; padding: 0 24px; border-inline-end: 0; border-bottom: 1px solid var(--side-line); box-shadow: 0 1px 0 rgba(0, 0, 0, .02); }
  .nav-top .side-brand { border: 0; padding: 0; margin-inline-end: 16px; }
  .nav-top .side-nav { flex: 1; display: flex; align-items: center; gap: 4px; padding: 0; overflow: visible; }
  .nav-top .side-section { position: relative; }
  .nav-top .side-group { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 15.5px; font-weight: 700; color: var(--side-ink); padding: 8px 14px; border-radius: 10px; letter-spacing: 0; }
  .nav-top .side-group::after { content: ""; width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translateY(-2px); opacity: .6; }
  .nav-top .side-group .side-badge { display: inline-block; margin: 0; }
  .nav-top .side-section.is-active > .side-group { background: var(--side-active-bg); color: var(--side-active-ink); }
  .nav-top .side-section:hover > .side-group, .nav-top .side-section:focus-within > .side-group { background: var(--side-hover); color: var(--side-ink); }
  .nav-top .side-items { display: none; position: absolute; top: 100%; inset-inline-start: 0; min-width: 240px; margin-top: 6px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .12); }
  .nav-top .side-items::before { content: ""; position: absolute; inset-inline: 0; top: -10px; height: 10px; }
  .nav-top .side-section:hover > .side-items, .nav-top .side-section:focus-within > .side-items { display: grid; }
  .nav-top .side-link { color: var(--ink); }
  .nav-top .side-link.is-active { box-shadow: none; }
  .nav-top .side-foot { flex-direction: row; display: flex; align-items: center; gap: 12px; border: 0; padding: 0; }
  .nav-top .side-user { max-width: 180px; }
  .nav-top .side-logout { width: auto; border: 1px solid var(--side-line); }
  .nav-top .admin-main { margin-inline-start: 0; }
}

/* «هويتك ومنتجك» */
.brand-intro { max-width: 720px; margin: 0 0 16px; }
.brand-form .form-card { margin-bottom: 16px; }
.brand-h { font-size: 18px; margin: 0 0 14px; }
.brand-logo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.brand-logo img { max-width: 180px; max-height: 64px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.brand-logo .field { flex: 1; min-width: 220px; margin: 0; }
.brand-colors input[type=color] { height: 44px; padding: 4px; cursor: pointer; }
.brand-product { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 0; margin: 0 0 12px; min-width: 0; }
.brand-product legend { font-weight: 600; padding: 0 6px; }
.brand-gap { margin-top: 16px; }

/* «الربط»: keys and how to get them */
.keys-list { display: grid; gap: 12px; max-width: 820px; }
.keys-group summary { cursor: pointer; display: flex; gap: 10px; align-items: center; list-style: none; }
.keys-group summary::-webkit-details-marker { display: none; }
.keys-group summary .note { margin-inline-start: auto; }
.keys-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); flex: none; }
.keys-dot.is-ready { background: #2E7D4F; }
.keys-steps { margin: 14px 0 10px; padding-inline-start: 22px; line-height: 1.8; }
.keys-form { margin-top: 12px; }

/* Company edition: products with their own photos */
.co-products { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.co-product-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; margin-bottom: 14px; }
.co-hero-photo { width: 100%; max-width: 460px; border-radius: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.side-brand-logo { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 12px; padding: 8px 12px; max-width: 100%; }
.side-brand .side-brand-logo img, .side-brand-logo img { width: auto; max-width: 100%; max-height: 56px; display: block; }
.side-brand-logo.is-small { padding: 4px 8px; border-radius: 8px; }
.side-brand-logo.is-small img { max-height: 28px; }
.side-brand-name { font-size: 20px; font-weight: 800; color: var(--side-ink, inherit); }

/* «واتساب» admin (Turki, 1 Nov 2026): cost tiles on top, then one small
   bar with the two switches and the assistant's settings side by side. */
.wa-kpis { margin-top: 12px; }
.wa-kpis .dash-kpi { padding: 12px 16px 14px; }
.wa-kpis .dash-kpi-value { font-size: 26px; }
.wa-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 14px; margin: 0 0 14px; }
.wa-bar > form { margin: 0; }
.switch { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 14px; color: var(--muted); }
.switch::before { content: ""; width: 34px; height: 20px; border-radius: 999px; background: var(--line); transition: background .2s; }
.switch::after { content: ""; position: absolute; inset-inline-start: 2px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: inset-inline-start .2s; }
.switch b { font-weight: 700; color: var(--ink); }
.switch.is-on b { color: var(--brand); }
.switch.is-on::before { background: var(--brand); }
.switch.is-on::after { inset-inline-start: 16px; }
.switch:focus-visible::before { outline: 2px solid var(--gold); outline-offset: 2px; }
.wa-settings { margin: 0 0 0 0; margin-inline-start: auto; padding: 0; border: 0; background: none; font-size: 14px; }
.wa-settings summary { font-weight: 400; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; cursor: pointer; list-style: none; color: var(--muted); }
.wa-settings summary::-webkit-details-marker { display: none; }
.wa-settings summary b { color: var(--ink); }
.wa-edit { color: var(--brand); font-weight: 700; border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; }
.wa-settings[open] { flex-basis: 100%; margin-inline-start: 0; }
.wa-settings[open] .wa-edit { display: none; }
.wa-settings-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.wa-settings-form .field { flex: 1 1 160px; margin: 0; }
.wa-settings-form .note, .wa-settings-form .alert { flex-basis: 100%; margin: 0; }
.suggestions { margin: 14px 0 22px; padding: 14px 16px; border: 1px solid var(--gold); border-radius: var(--radius); background: var(--gold-soft); }
.suggestions h2 { margin: 0 0 4px; font-size: 20px; }
.suggestion { margin-top: 12px; }
.suggestion-kind { margin: 0 0 4px; color: var(--gold-ink); font-size: 13px; font-weight: 700; }
.suggestion-rec { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: var(--bg); font-size: 14px; }
.suggestion-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.chip { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 14px; text-decoration: none; }
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.chip-action { margin-inline-start: auto; color: var(--brand); font-weight: 700; border-color: var(--brand); }
.chip-sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }

/* «تجهيز النظام» (company copy, first run) */
.setup-wrap { max-width: 760px; padding: 40px 16px 56px; }
.setup-in-panel { padding: 0; }
.setup-card { margin: 0 0 16px; }
.setup-list { list-style: none; margin: 0 0 8px; padding: 0; }
.setup-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.setup-list li + li { border-top: 1px solid var(--line); }
.setup-list li > div { flex: 1; min-width: 0; }
.setup-list .keys-dot { margin-top: 7px; }
.setup-list .note { margin: 2px 0 0; overflow-wrap: anywhere; }
.setup-costs { margin: 10px 0 0; padding-inline-start: 20px; line-height: 1.9; }
.setup-card summary { cursor: pointer; }
.setup-finish { margin-top: 8px; }
.users-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
/* «دليل منصة TOA Visits» on the Q&A page: one line until opened. */
details.guide-box { margin: 0 0 16px; }
details.guide-box > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; list-style: none; }
details.guide-box > summary::-webkit-details-marker { display: none; }
details.guide-box > summary::before { content: "▸"; color: var(--gold); }
details.guide-box[open] > summary::before { content: "▾"; }
details.guide-box > summary .note { margin: 0; }
details.guide-box form { margin-top: 10px; }

/* A button that can't be pressed yet must look it (e.g. «شغّل النظام» before setup is done). */
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }

/* «مقترحات» grouped: new questions vs changes to live answers (Turki, 1 Nov 2026). */
.suggestions-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.suggestions-head h2 { margin: 0; }
.suggestions-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.suggestions-jump a { text-decoration: none; color: inherit; }
.suggestions-group { margin: 22px 0 2px; }
.pill.pill-new { background: var(--brand); color: #fff; }
.pill.pill-change { background: var(--gold); color: #fff; }
.suggestion.is-new { border-inline-start: 4px solid var(--brand); }
.suggestion.is-change { border-inline-start: 4px solid var(--gold); }
.faq-live-title { margin: 28px 0 2px; }

/* «الأسئلة والأجوبة» tabs: waiting for approval / approved (Turki, 1 Nov 2026). */
.faq-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 6px 0 16px; overflow-x: auto; }
.faq-tab { padding: 10px 18px; margin-bottom: -2px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 700; text-decoration: none; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.faq-tab:hover { color: var(--ink); }
.faq-tab.is-active { color: var(--brand); border-bottom-color: var(--gold); }
.faq-tab .faq-tab-count { background: #C0392B; color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; }
.faq-tab .count { font-weight: 400; }
.empty-state { color: var(--muted); }

/* A form field's own error, next to the input it is about. */
.field-error { margin: 6px 0 0; color: #b42318; font-size: 14px; font-weight: 600; }

/* «وش نوع إيميلك؟» on the connections page. */
.mail-provider { max-width: 420px; margin: 4px 0 8px; }
.mail-warning { background: #fff7e6; border: 1px solid #f3d9a4; border-radius: 10px; padding: 8px 12px; color: #6b4a00; }
.keys-group [hidden] { display: none !important; }
.keys-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.keys-actions:empty { display: none; }
.btn-danger { color: #b42318; border-color: #f1c4bf; }
