/* وصل — الألوان والخطوط */
:root {
  --paper: #F4F5F9;
  --tint: #EBECF4;
  --surface: #FFFFFF;
  --ink: #1A1C33;
  --muted: #565A77;
  --line: #DADCE8;
  --majorelle: #3F35C9;
  --majorelle-deep: #2C2599;
  --majorelle-soft: #E7E6FB;
  --night: #15173A;
  --night-2: #262A5E;
  --night-text: #C9CBEA;
  --saffron: #F3B33D;
  --danger: #B3261E;

  --display: "Alexandria", "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --body: "IBM Plex Sans Arabic", Tahoma, "Segoe UI", sans-serif;
  --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

@media (min-width: 900px) { body { font-size: 1.125rem; } }

h1, h2, h3 { font-family: var(--display); color: inherit; margin: 0; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700; line-height: 1.3; margin-bottom: 12px; }
h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.45; }
p { margin: 0; }
a { color: var(--majorelle); }

::selection { background: var(--majorelle); color: #fff; }

a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--majorelle);
  outline-offset: 3px;
}
.contact a:focus-visible, .plan-featured a:focus-visible { outline-color: var(--saffron); }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 20px; }

/* أزرار */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border: 1.5px solid transparent; border-radius: 999px;
  background: var(--majorelle); color: #fff;
  font: 600 1rem/1.2 var(--body);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--majorelle-deep); }
.btn-ghost { background: transparent; color: var(--majorelle); border-color: currentColor; }
.btn-ghost:hover { background: var(--majorelle-soft); }
.btn-light { background: #fff; color: var(--majorelle-deep); }
.btn-light:hover { background: #EEEDFF; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: .925rem; }

/* الرأس */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(244, 245, 249, .94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { backdrop-filter: blur(8px); background: rgba(244, 245, 249, .82); }
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font: 800 1.5rem/1 var(--display);
}
.brand-mark { width: 34px; height: 20px; fill: var(--majorelle); stroke: var(--majorelle); }
.nav { display: flex; gap: 28px; margin-inline-start: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--majorelle); }
.header-row > .btn { margin-inline-start: 8px; }
@media (max-width: 760px) {
  .nav { display: none; }
  .header-row > .btn { margin-inline-start: auto; }
}

/* الواجهة */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.lead { margin-top: 22px; max-width: 34em; color: var(--muted); font-size: 1.15em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  margin: 28px 0 0; padding: 0; list-style: none;
  color: var(--ink); font-weight: 500; font-size: .95rem;
}
.hero-facts li { position: relative; padding-inline-start: 22px; }
.hero-facts li::before,
.plan-features li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: .55em;
  width: 11px; height: 6px;
  border-left: 2px solid var(--majorelle); border-bottom: 2px solid var(--majorelle);
  transform: rotate(-45deg);
}

/* الهاتف الليلي */
.night { margin: 0; }
.phone {
  max-width: 420px; margin-inline: auto;
  background: var(--night); color: #fff;
  border-radius: 30px; padding-bottom: 18px;
  box-shadow: 0 34px 60px -34px rgba(21, 23, 58, .6);
  overflow: hidden;
}
.phone-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.avatar {
  flex: none; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--saffron); color: var(--night);
  font: 700 1.1rem/1 var(--display);
}
.who { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.shop { font-weight: 600; font-size: .98rem; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--night-text); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); }
.clock {
  margin-inline-start: auto; direction: ltr;
  font: 700 1.35rem/1 var(--display); color: var(--saffron);
  font-variant-numeric: tabular-nums;
}
.chat {
  display: flex; flex-direction: column; gap: 9px;
  margin: 0; padding: 18px 16px 4px; list-style: none;
  font-size: .94rem; line-height: 1.65;
}
.msg { max-width: 84%; padding: 9px 14px; border-radius: 18px; }
.msg.in { align-self: flex-start; background: var(--night-2); color: #F1F1FA; border-start-start-radius: 6px; }
.msg.out { align-self: flex-end; background: var(--majorelle); color: #fff; border-start-end-radius: 6px; }
.note {
  align-self: center; margin-top: 6px;
  padding: 5px 14px; border-radius: 999px;
  background: rgba(243, 179, 61, .14); color: #F8D592;
  font-size: .78rem; font-weight: 500; text-align: center;
}
.anim .chat > li { opacity: 0; transform: translateY(6px); }
.anim .chat > li.shown { opacity: 1; transform: none; transition: opacity .35s ease, transform .35s ease; }
.night figcaption { margin-top: 14px; text-align: center; color: var(--muted); font-size: .875rem; }

/* الأقسام */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-tint { background: var(--tint); }
.section-lead { color: var(--muted); margin-bottom: 36px; max-width: 40em; }
.split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.split-head p { color: var(--muted); max-width: 26em; }

.service { padding-block: 26px; border-top: 1px solid var(--line); }
.service:first-child { border-top: 0; padding-top: 0; }
.service p { margin-top: 6px; color: var(--muted); max-width: 38em; }

.steps {
  counter-reset: step; list-style: none; margin: 36px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.steps li { counter-increment: step; border-top: 3px solid var(--majorelle); padding-top: 18px; }
.steps li::before {
  content: counter(step); display: block; margin-bottom: 10px;
  font: 800 2.25rem/1 var(--display); color: var(--majorelle);
}
.steps p { margin-top: 6px; color: var(--muted); }

.sectors { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin: 0; }
.sectors div { padding-block: 18px; border-top: 1px solid var(--line); }
.sectors dt { font-weight: 600; }
.sectors dd { margin: 4px 0 0; color: var(--muted); }

/* الأسعار */
.plans {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.plan { position: relative; display: flex; flex-direction: column; padding: 56px 28px 32px; }
.plan + .plan { border-inline-start: 1px solid var(--line); }
.plan-featured { background: var(--majorelle); color: #fff; border-color: var(--majorelle) !important; }
.plan-flag {
  position: absolute; top: 20px; inset-inline-start: 28px;
  padding: 2px 12px; border-radius: 999px;
  background: var(--saffron); color: var(--night); font-size: .8rem; font-weight: 600;
}
.plan-tag { font-weight: 500; color: var(--muted); font-size: .95rem; }
.plan-featured .plan-tag { color: #D8D6FB; }
.plan-price { margin-top: 18px; color: var(--muted); }
.plan-price .amount { display: block; font: 800 2.9rem/1.1 var(--display); color: var(--ink); }
.plan-featured .plan-price, .plan-featured .plan-setup, .plan-featured .plan-for { color: #DAD8FC; }
.plan-featured .plan-price .amount { color: #fff; }
.plan-setup { color: var(--muted); font-size: .92rem; }
.plan-features { list-style: none; margin: 24px 0; padding: 22px 0 0; border-top: 1px solid var(--line); }
.plan-featured .plan-features { border-top-color: rgba(255, 255, 255, .22); }
.plan-features li { position: relative; padding-inline-start: 26px; margin-bottom: 10px; }
.plan-featured .plan-features li::before { border-color: var(--saffron); }
.plan-for { margin-bottom: 22px; font-size: .9rem; color: var(--muted); }
.plan .btn { margin-top: auto; width: 100%; }
.fineprint { margin-top: 22px; font-size: .92rem; color: var(--muted); max-width: 46em; }

/* الأسئلة */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 18px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.05em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: var(--majorelle-soft); color: var(--majorelle);
  font: 600 1.2rem/1 var(--body);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 20px; color: var(--muted); max-width: 40em; }

/* التواصل */
.contact { background: var(--night); color: #fff; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-intro p { color: var(--night-text); max-width: 26em; }
.contact-intro a:not(.btn) { color: #fff; }
.alt-contact { margin-top: 28px; margin-bottom: 12px; font-size: .95rem; }

.lead-form { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: clamp(22px, 4vw, 34px); }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); font-size: .85rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid #C6C9DB; border-radius: 12px; background: #fff; color: var(--ink);
  font: 400 1rem/1.5 var(--body);
}
.field input[dir="ltr"] { text-align: right; }
.field input::placeholder, .field textarea::placeholder { color: #8C90AA; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--majorelle); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin-top: 6px; color: var(--danger); font-size: .87rem; }
.field textarea { resize: vertical; min-height: 110px; }
.btn-submit { width: 100%; min-height: 54px; font-size: 1.05rem; }
.privacy { margin-top: 12px; text-align: center; color: var(--muted); font-size: .85rem; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.notice { margin-bottom: 20px; padding: 14px 16px; border-radius: 12px; font-weight: 500; }
.notice:focus { outline: none; }
.notice-ok { background: #E3F4EA; color: #14532D; }
.notice-error { background: #FDECEA; color: #8C1D18; }

/* التذييل */
.site-footer { padding-block: 28px; background: var(--night); color: var(--night-text); border-top: 1px solid rgba(255, 255, 255, .08); font-size: .9rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer strong { color: #fff; }

/* الهاتف والأجهزة الصغيرة */
@media (max-width: 960px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan + .plan { border-inline-start: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .steps, .sectors, .field-row { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
  .phone { border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* لوحة الطلبات */
.admin-main { padding-block: 40px 72px; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.admin-bar h1 { font-size: 1.75rem; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-actions form { margin: 0; }
.login-box { max-width: 420px; margin: 72px auto; }
.login-box h1 { font-size: 1.6rem; margin-bottom: 18px; }
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.leads { width: 100%; border-collapse: collapse; font-size: .95rem; }
.leads th, .leads td { padding: 12px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.leads th { background: var(--tint); font-weight: 600; white-space: nowrap; }
.leads tr:last-child td { border-bottom: 0; }
.leads td.msg-cell { min-width: 220px; max-width: 360px; white-space: pre-line; color: var(--muted); }
.leads .nowrap { white-space: nowrap; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
