/* بوابة زيدها الذكية — نظام التصميم
   الطبقات: primitive ⇒ semantic ⇒ component. هوية Zeedha Technology.
   قاعدة: لا نص أبيض فوق الأزرق الفاتح (#00A8E6) — النص فوقه كحلي. */
:root {
  /* primitive */
  --blue-50: #EEF8FD; --blue-100: #D6EFFA; --blue-200: #A9DDF3; --blue-500: #00A8E6;
  --blue-700: #006F99; --navy-900: #0B2A3A; --navy-700: #23485B; --navy-500: #4A6575;
  --orange-400: #FDAF17; --orange-100: #FFF1D3; --green-600: #0F7B4F; --green-100: #DDF5EA;
  --red-600: #B42318; --red-100: #FDE8E6; --gray-50: #F7FAFC; --gray-200: #E3ECF1;
  /* semantic */
  --bg: #F4F9FC; --surface: #FFFFFF; --surface-2: var(--blue-50); --text: var(--navy-900);
  --text-muted: var(--navy-500); --border: var(--gray-200); --brand: var(--blue-500);
  --on-brand: var(--navy-900); --link: var(--blue-700); --accent: var(--orange-400);
  --on-accent: var(--navy-900); --success: var(--green-600); --success-bg: var(--green-100);
  --danger: var(--red-600); --danger-bg: var(--red-100); --focus: #0B6E99;
  /* scale */
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px;
  --shadow-1: 0 1px 2px rgba(11,42,58,.06), 0 1px 1px rgba(11,42,58,.04);
  --shadow-2: 0 8px 24px -8px rgba(11,42,58,.18), 0 2px 6px rgba(11,42,58,.06);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --tabbar-h: 64px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere; min-height: 100dvh;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 var(--s-3); text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 5.2vw, 3rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 var(--s-3); }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; }
.ltr-text { direction: ltr; unicode-bidi: isolate; display: inline-block; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--navy-900); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }

/* layout */
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
.narrow { max-width: 560px; }
main { padding-block: var(--s-5) calc(var(--tabbar-h) + var(--s-6) + env(safe-area-inset-bottom)); }
.stack > * + * { margin-top: var(--s-4); }
.row { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: var(--s-4); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  main { padding-bottom: var(--s-7); }
}

/* header */
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.88);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border); padding-top: env(safe-area-inset-top);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: var(--s-3); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand img { height: 28px; width: auto; display: block; }
.brand .tag { font-size: .78rem; color: var(--text-muted); border-inline-start: 1px solid var(--border); padding-inline-start: 10px; white-space: nowrap; }
.topnav { display: none; gap: 4px; }
.topnav a { text-decoration: none; color: var(--text); padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.topnav a[aria-current="page"] { background: var(--surface-2); color: var(--blue-700); }
@media (min-width: 720px) { .topnav { display: flex; } }
@media (max-width: 420px) { .brand .tag { display: none; } }

/* bottom tab bar (mobile) */
.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--tabbar-h); text-decoration: none; color: var(--text-muted); font-size: .75rem; font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--blue-700); }
.tabbar a.cta svg { background: var(--brand); color: var(--on-brand); border-radius: 12px; padding: 6px; width: 36px; height: 36px; }
@media (min-width: 720px) { .tabbar { display: none; } }

/* buttons */
.btn {
  --_bg: var(--surface); --_fg: var(--text); --_bd: var(--border);
  appearance: none; border: 1px solid var(--_bd); background: var(--_bg); color: var(--_fg);
  font: inherit; font-weight: 600; font-size: 1rem; min-height: 48px; padding: 10px 20px;
  border-radius: var(--r-md); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; text-decoration: none; transition: transform 160ms var(--ease-out), background-color 160ms ease, box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { --_bg: var(--brand); --_fg: var(--on-brand); --_bd: transparent; box-shadow: 0 6px 16px -6px rgba(0,168,230,.55); }
.btn-dark { --_bg: var(--navy-900); --_fg: #fff; --_bd: transparent; }
.btn-accent { --_bg: var(--accent); --_fg: var(--on-accent); --_bd: transparent; }
.btn-ghost { --_bg: transparent; --_bd: transparent; color: var(--link); padding-inline: 12px; }
.btn-danger { --_bg: var(--danger-bg); --_fg: var(--danger); --_bd: transparent; }
.btn-sm { min-height: 40px; padding: 6px 14px; font-size: .9rem; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }
main:focus { outline: none; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #12B4F0; }
  .btn-dark:hover { background: var(--navy-700); }
  .btn:not(.btn-primary):not(.btn-dark):not(.btn-accent):not(.btn-ghost):hover { background: var(--gray-50); }
  .card-link:hover { box-shadow: var(--shadow-2); border-color: var(--blue-200); }
}
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-inline-end-color: transparent; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-1); }
.card-tight { padding: var(--s-4); }
.card-link { display: block; text-decoration: none; color: inherit; transition: box-shadow 200ms ease, border-color 200ms ease; }
.card h3 { margin-bottom: var(--s-2); }

/* forms */
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 600; font-size: .95rem; }
.hint { font-size: .85rem; color: var(--text-muted); }
.input, select.input, textarea.input {
  font: inherit; font-size: 16px; width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--r-md);
  border: 1.5px solid #C9DCE6; background: #fff; color: var(--text); transition: border-color 160ms ease, box-shadow 160ms ease;
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.6; }
.input:focus { outline: none; border-color: var(--blue-700); box-shadow: 0 0 0 4px rgba(0,168,230,.18); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.err-text { color: var(--danger); font-size: .875rem; min-height: 0; }
.phone-row { display: grid; grid-template-columns: minmax(150px, 42%) minmax(0, 1fr); gap: 8px; }
.phone-row select.input { padding-inline: 10px 6px; }
.phone-row .input[type="tel"] { direction: ltr; text-align: end; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-left: 76px; }
.pw-toggle { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); }
.pw-toggle:active { transform: translateY(-50%) scale(0.97); }
.ltr { direction: ltr; text-align: end; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: .95rem; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid #C9DCE6; background: #fff; color: var(--text); cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 140ms ease, border-color 140ms ease;
}
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--blue-100); border-color: var(--brand); color: var(--navy-900); font-weight: 600; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--blue-700); white-space: nowrap; }
.badge-ok { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--orange-100); color: #7A4A00; }
.badge-err { background: var(--danger-bg); color: var(--danger); }
.badge-ai { background: #EEF0FF; color: #3B3F9E; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* hero */
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: var(--s-7) var(--s-5); background:
  radial-gradient(120% 90% at 100% 0%, #D9F2FC 0%, rgba(217,242,252,0) 60%),
  radial-gradient(80% 70% at 0% 100%, #FFF3DA 0%, rgba(255,243,218,0) 55%), #fff; border: 1px solid var(--border); }
.hero h1 span { color: var(--blue-700); }
.hero .lead { font-size: clamp(1.02rem, 2.4vw, 1.2rem); color: var(--navy-700); max-width: 40ch; }
.hero-art { position: absolute; inset-inline-end: -60px; bottom: -60px; width: 220px; opacity: .06; pointer-events: none; }
@media (min-width: 900px) { .hero { padding: var(--s-8) var(--s-7); } .hero-art { width: 300px; opacity: .07; } }
.hero-steps { display: grid; gap: 10px; margin-top: var(--s-5); }
.hero-step { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.8); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; }
.hero-step b { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-size: .9rem; }
@media (min-width: 900px) { .hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s-7); align-items: center; } .hero-steps { margin-top: 0; } }

.section { margin-top: var(--s-7); }
.section-head { margin-bottom: var(--s-4); }
.division { border-radius: var(--r-xl); padding: var(--s-5); border: 1px solid var(--border); background: #fff; }
.division.tech { border-top: 4px solid var(--brand); }
.division.growth { border-top: 4px solid var(--accent); }
.division ul { list-style: none; padding: 0; margin: var(--s-3) 0 0; display: grid; gap: 8px; }
.division li { display: flex; gap: 10px; align-items: flex-start; }
.division li svg { flex: none; width: 20px; height: 20px; color: var(--blue-700); margin-top: 3px; }
.wordtext { font-weight: 700; letter-spacing: .08em; font-size: .85rem; color: #7A4A00; background: var(--orange-100); padding: 2px 10px; border-radius: 6px; }
.trust { display: grid; gap: var(--s-3); }
@media (min-width: 720px) { .trust { grid-template-columns: repeat(3, 1fr); } }
.trust .card svg { width: 28px; height: 28px; color: var(--blue-700); }
footer.site { border-top: 1px solid var(--border); margin-top: var(--s-7); padding-block: var(--s-5); color: var(--text-muted); font-size: .875rem; }

/* balance */
.balance { background: var(--navy-900); color: #fff; border-radius: var(--r-xl); padding: var(--s-5); position: relative; overflow: hidden; }
.balance::after { content: ""; position: absolute; inset-inline-end: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(0,168,230,.45), transparent 70%); }
.balance .amt { font-size: clamp(2rem, 7vw, 2.6rem); font-weight: 700; line-height: 1.1; }
.balance .sub { color: #B7D3E0; font-size: .9rem; }
.balance .btn { position: relative; z-index: 1; }

/* list */
.list { display: grid; gap: 10px; }
.item { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--border); background: #fff; border-radius: var(--r-md); text-decoration: none; color: inherit; min-width: 0; }
.item .t { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item .m { font-size: .82rem; color: var(--text-muted); }
.item > :first-child { min-width: 0; }
.item-key { flex: none; white-space: nowrap; }
.nowrap { white-space: nowrap; flex: none; }
.amount-pos { color: var(--success); font-weight: 600; }
.amount-neg { color: var(--navy-900); font-weight: 600; }

.price { font-weight: 700; color: var(--navy-900); font-size: 1rem; text-align: end; }

/* empty / skeleton / error */
.empty { text-align: center; padding: var(--s-6) var(--s-4); border: 1.5px dashed #C9DCE6; border-radius: var(--r-lg); background: #fff; }
.empty svg { width: 44px; height: 44px; color: var(--blue-500); }
.skeleton { background: linear-gradient(90deg, #EAF2F6 0%, #F5F9FB 50%, #EAF2F6 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--r-md); min-height: 64px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.alert { border-radius: var(--r-md); padding: 12px 14px; font-size: .95rem; display: flex; gap: 10px; align-items: flex-start; }
.alert-err { background: var(--danger-bg); color: var(--danger); }
.alert-info { background: var(--surface-2); color: var(--navy-700); }
.alert-warn { background: var(--orange-100); color: #6B4100; }
.alert-ok { background: var(--success-bg); color: var(--success); }

/* stepper */
.stepper { display: flex; gap: 6px; margin-bottom: var(--s-4); }
.stepper span { flex: 1; height: 5px; border-radius: 99px; background: var(--gray-200); transition: background-color 240ms ease; }
.stepper span.on { background: var(--brand); }
.svc-pick { display: grid; gap: 10px; }
@media (min-width: 720px) { .svc-pick { grid-template-columns: repeat(2, 1fr); } }
.svc-opt { text-align: start; font: inherit; color: inherit; background: #fff; border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; cursor: pointer; display: grid; gap: 4px; transition: border-color 160ms ease, transform 160ms var(--ease-out); }
.svc-opt:active { transform: scale(0.98); }
.svc-opt[aria-pressed="true"] { border-color: var(--brand); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(0,168,230,.15); }
.svc-opt b { font-size: 1rem; }
.svc-price { color: var(--blue-700) !important; font-weight: 600; }
.svc-group { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); }
.svc-group summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; min-height: 52px; font-weight: 600; }
.svc-group summary::-webkit-details-marker { display: none; }
.svc-group summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--navy-500); border-bottom: 2px solid var(--navy-500); transform: rotate(45deg); transition: transform 200ms var(--ease-out); margin-inline-start: auto; }
.svc-group[open] summary::after { transform: rotate(-135deg); }
.svc-group .svc-pick { padding: 0 12px 12px; }
.svc-opt small { color: var(--text-muted); font-size: .85rem; }
.sticky-actions { position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); z-index: 5; background: linear-gradient(to top, var(--bg) 70%, rgba(244,249,252,0)); padding-top: 16px; }
@media (min-width: 720px) { .sticky-actions { bottom: 8px; } }
.files { display: grid; gap: 6px; }
.file-pill { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.file-pill span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding-inline-start: 28px; padding-bottom: 14px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 7px; top: 8px; bottom: -6px; width: 2px; background: var(--gray-200); }
.timeline li:last-child::before { display: none; }
.timeline li i { position: absolute; inset-inline-start: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--brand); }
.timeline li.live i { animation: pulse 1.2s ease-in-out infinite; }
.timeline .who { font-weight: 600; font-size: .85rem; color: var(--blue-700); }
.timeline li { animation: rise 260ms var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* samples */
.sample { border: 1px solid var(--border); border-radius: var(--r-lg); background: #fff; overflow: hidden; }
.sample-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.sample-body { padding: 16px; }
.sample-text { white-space: pre-wrap; line-height: 1.85; }
.frame-wrap { background: #E9F1F5; padding: 12px; display: flex; justify-content: center; }
.frame-wrap iframe { border: 0; background: #fff; width: 100%; height: 560px; border-radius: 12px; box-shadow: var(--shadow-2); transition: width 240ms var(--ease-out); }
.frame-wrap.mobile iframe { width: 375px; max-width: 100%; }
.logo-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.logo-tiles div { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; padding: 18%; border: 1px solid var(--border); }
.logo-tiles img { width: 100%; height: 100%; object-fit: contain; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.swatch { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.swatch div { height: 72px; }
.swatch p { margin: 0; padding: 8px 10px; font-size: .85rem; }
.storyboard { display: grid; gap: 10px; }
.scene { display: grid; grid-template-columns: 44px 1fr; gap: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.scene b { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--blue-700); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs button { flex: none; }
.kv { display: grid; gap: 6px; padding: 0; margin: 0; list-style: none; }
.kv li { display: flex; gap: 8px; }
.kv li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); margin-top: 11px; }
.idea { border-inline-start: 3px solid var(--accent); padding-inline-start: 12px; }

/* chat */
.chat { display: grid; gap: 8px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: .95rem; white-space: pre-wrap; }
.bubble.customer { background: var(--blue-100); justify-self: start; border-end-start-radius: 4px; }
.bubble.team, .bubble.ai { background: #fff; border: 1px solid var(--border); justify-self: end; border-end-end-radius: 4px; }
.bubble .meta { display: block; font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* toast */
.toasts { position: fixed; inset-inline: 0; top: calc(env(safe-area-inset-top) + 70px); z-index: 60; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding-inline: 16px; }
.toast { pointer-events: auto; background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-2); max-width: 460px; font-size: .95rem;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
.toast.err { background: var(--red-600); }
.toast.hide { opacity: 0; transform: translateY(-8px); }
@starting-style { .toast { opacity: 0; transform: translateY(-8px); } }

.view { animation: viewIn 220ms var(--ease-out) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

/* admin */
.admin-shell { display: grid; gap: var(--s-4); }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--gray-50); font-weight: 600; white-space: nowrap; }
td.wrap-cell { max-width: 320px; }
td .input { min-width: 130px; min-height: 40px; padding: 8px 10px; font-size: 14px; border-radius: 10px; }
td textarea.input { min-width: 220px; }
td:nth-child(2) .input { min-width: 220px; }
td .btn { white-space: nowrap; }
td select.input + select.input, td select.input + .input { margin-top: 6px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; }
.stat b { display: block; font-size: 1.5rem; }
pre.json { white-space: pre-wrap; background: var(--gray-50); padding: 12px; border-radius: 10px; font-size: .8rem; direction: ltr; text-align: left; max-height: 360px; overflow: auto; }


/* «أعمالنا» */
.filter-row { margin-bottom: var(--s-4); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filter-row .chip { flex: none; }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.work-card { font: inherit; color: inherit; text-align: start; padding: 0; border: 1px solid var(--border); background: #fff; border-radius: var(--r-lg); overflow: hidden; cursor: pointer; display: grid; transition: transform 180ms var(--ease-out), box-shadow 200ms ease; }
.work-card:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .work-card:hover { box-shadow: var(--shadow-2); } .work-card:hover img { transform: scale(1.03); } }
.work-media { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); overflow: hidden; }
.work-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 400ms var(--ease-out); }
.work-ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--blue-500); }
.work-ph svg { width: 40px; height: 40px; }
.work-play { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(11,42,58,.72); color: #fff; font-size: 1.1rem; padding-inline-start: 4px; }
.work-badge { position: absolute; top: 10px; inset-inline-start: 10px; }
.work-meta { padding: 10px 12px 12px; display: grid; gap: 2px; }
.work-meta b { font-size: .95rem; line-height: 1.4; }
.logo-wall { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; margin-top: var(--s-5); padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-lg); background: #fff; }
.logo-wall img { height: 40px; width: auto; filter: grayscale(1); opacity: .8; }

/* dialogs */
dialog.lightbox, dialog.sheet { border: 0; padding: 0; border-radius: var(--r-xl); background: #fff; color: var(--text); box-shadow: var(--shadow-2); max-width: min(960px, calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 24px); overflow: auto; }
dialog::backdrop { background: rgba(11,42,58,.55); backdrop-filter: blur(3px); }
dialog[open] { animation: dlgIn 240ms var(--ease-drawer) both; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.lightbox { display: grid; }
.lb-media { background: #0B2A3A; display: grid; place-items: center; }
.lb-media img, .lb-media video { max-width: 100%; max-height: 72dvh; display: block; object-fit: contain; }
.lb-body { padding: var(--s-5); }
@media (min-width: 900px) { dialog.lightbox[open] { display: grid; grid-template-columns: 1.4fr 1fr; } .lb-media img, .lb-media video { max-height: 86dvh; } }
dialog.sheet { max-width: 520px; padding: var(--s-5); }
dialog.sheet > * + * { margin-top: var(--s-4); }
@media (max-width: 719px) { dialog.sheet { margin: auto 0 0; max-width: 100vw; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(var(--s-5) + env(safe-area-inset-bottom)); } }
.consent-opts { display: grid; gap: 8px; }

/* colors */
.swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { font: inherit; font-size: .85rem; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1.5px solid #C9DCE6; background: #fff; cursor: pointer; color: var(--text); }
.sw::before { content: ""; width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.sw-on { border-color: var(--brand); background: var(--blue-50); font-weight: 600; }
.palettes { display: flex; flex-wrap: wrap; gap: 10px; }
.palette { display: flex; padding: 4px; border-radius: 14px; border: 1.5px solid #C9DCE6; background: #fff; cursor: pointer; min-height: 44px; }
.palette span { width: 34px; height: 36px; }
.palette span:first-child { border-radius: 10px 0 0 10px; } .palette span:last-child { border-radius: 0 10px 10px 0; }
[dir="rtl"] .palette span:first-child { border-radius: 0 10px 10px 0; } [dir="rtl"] .palette span:last-child { border-radius: 10px 0 0 10px; }
.palette:active, .sw:active { transform: scale(0.97); }
.color-in { width: 48px; height: 44px; border: 1.5px solid #C9DCE6; border-radius: 12px; padding: 3px; background: #fff; }

/* video & progress */
.stepper-num { display: inline-flex; align-items: center; gap: 14px; }
.stepper-num .btn { width: 48px; padding: 0; font-size: 1.3rem; }
.stepper-num b { min-width: 84px; text-align: center; font-size: 1.05rem; }
.progress { height: 10px; border-radius: 99px; background: var(--gray-200); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width 400ms var(--ease-out); }
.pg { display: grid; gap: 8px; }
.pg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pg-stage { min-width: 0; overflow-wrap: anywhere; }
.pg-pct { flex: none; font-size: 1.15rem; color: var(--link); }
.pg .progress { height: 12px; }
.pg-note { color: var(--text-muted); min-height: 1.4em; }
.pg-slow .progress span { background: var(--accent); }
.pg-slow .pg-note { color: var(--text); font-weight: 600; }
.pg-failed .progress span { background: var(--danger); }
.pg-failed .pg-note, .pg-failed .pg-pct { color: var(--danger); }
.pg-done .progress span { background: var(--success); }
@media (prefers-reduced-motion: reduce) { .progress span { transition: none; } }
.video-out { width: 100%; max-width: 340px; aspect-ratio: 9 / 16; background: #0B2A3A; border-radius: 14px; display: block; margin-inline: auto; }
.video-out.sq { max-width: 480px; aspect-ratio: 1; }
.shot-wrap { max-height: 640px; overflow: auto; }
.preview-shot { width: 100%; max-width: 420px; height: auto; display: block; border-radius: 12px; box-shadow: var(--shadow-2); }

/* study */
.reco { border: 1.5px solid #BDE6D2; background: var(--success-bg); border-radius: var(--r-md); padding: 14px 16px; }
table.forecast td, table.forecast th { text-align: center; }
table.forecast th[scope="row"] { text-align: start; background: #fff; }
table.forecast tr.hl td, table.forecast tr.hl th { background: var(--blue-50); }
@media (max-width: 480px) {
  table.forecast { font-size: .78rem; }
  table.forecast td, table.forecast th { padding: 8px 4px; white-space: nowrap; }
}
.terms summary { cursor: pointer; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .skeleton { animation: none; }
}

/* --- شرح الخدمات و«ما الفرق؟» --- */
.explain { margin: 8px 0; border: 1px dashed var(--blue-200); border-radius: var(--r-md); padding: 8px 12px; background: var(--blue-50); }
.explain summary { cursor: pointer; font-weight: 600; color: var(--blue-700); min-height: 32px; display: flex; align-items: center; }
.explain-body { display: grid; grid-template-columns: 120px 1fr; gap: 14px; margin-top: 10px; align-items: start; font-size: .92rem; }
.explain-fig { margin: 0; text-align: center; }
.explain-fig img { width: 120px; height: auto; border-radius: 14px; box-shadow: var(--shadow-1); background: #fff; }
.explain-fig figcaption { font-size: .72rem; color: var(--text-muted); margin-top: 4px; }
@media (max-width: 420px) { .explain-body { grid-template-columns: 96px 1fr; gap: 10px; } .explain-fig img { width: 96px; } }
dialog.sheet-wide { max-width: min(960px, 96vw); width: 96vw; }
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.compare { min-width: 640px; border-collapse: collapse; font-size: .88rem; }
table.compare th, table.compare td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; text-align: start; }
table.compare thead th { text-align: center; font-weight: 700; }
table.compare thead img { width: 84px; border-radius: 10px; display: block; margin: 0 auto 6px; box-shadow: var(--shadow-1); }
table.compare tbody th { color: var(--text-muted); font-weight: 600; white-space: nowrap; }
/* --- مراحل خطّ الإنتاج --- */
.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.phases li { display: flex; align-items: center; gap: 10px; color: var(--text-muted); }
.phases li i { font-style: normal; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 700; background: var(--gray-100, #EEF2F5); }
.phases li.done { color: var(--text); }
.phases li.done i { background: var(--success-bg); color: var(--success); }
.phases li.now { color: var(--text); font-weight: 700; }
.phases li.now i { background: var(--brand); color: var(--on-brand); }
.phases li.live i { animation: pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .phases li.live i { animation: none; } }
.frame-wrap.tall iframe { height: 720px; }
.sw-mini { width: 18px; height: 18px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.prod-row { display: flex; gap: 8px; align-items: center; }
.prod-row .input:first-child { flex: 1; min-width: 0; }
.preview-first { border: 1.5px solid var(--orange-100); background: #FFFBF2; }
.review-card iframe { width: 375px; max-width: 100%; height: 640px; border: 0; border-radius: 12px; background: #fff; box-shadow: var(--shadow-2); }
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger, #B42318); color: #fff; font-size: .72rem; font-weight: 700; margin-inline-start: 6px; }

/* --- الدراسة أقساماً + PDF + الدول (2026-11-08) --- */
.study .study-sec{border-top:1px solid var(--line, #e5ebf0);padding-top:12px}
.study .study-sec:first-of-type{border-top:0;padding-top:0}
.study-sec h3{display:flex;align-items:center;gap:8px;margin:0 0 8px;font-size:1.02rem}
.study-sec h3 svg{width:18px;height:18px;color:var(--blue-700, #0a6f99)}
.study-sec h4{margin:10px 0 6px;font-size:.95rem}
.study-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.study-list li{position:relative;padding-inline-start:18px;line-height:1.7}
.study-list li::before{content:"";position:absolute;inset-inline-start:2px;top:.7em;width:8px;height:8px;border-radius:50%;background:var(--blue, #00A8E6)}
.study-list.gap li::before{background:#FDAF17}
.study-list.ok li::before{background:#22A06B}
.pdf-bar{gap:12px;flex-wrap:wrap}
.cmulti{max-height:260px;overflow:auto;border:1px solid var(--line, #e5ebf0);border-radius:12px;padding:6px;display:grid;gap:2px}
.cm-item{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;cursor:pointer;min-height:44px}
.cm-item:hover{background:rgba(0,168,230,.06)}
.cm-item span{flex:1}
.cm-item input{width:20px;height:20px;accent-color:var(--blue, #00A8E6)}
.linklike{background:none;border:0;padding:0;color:var(--blue-700, #0a6f99);text-decoration:underline;cursor:pointer;font:inherit}
/* شارات بنصّ طويل (مثل أتعاب الحملات) لا توسّع الصفحة على الهاتف */
.badge{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.card .row.between{flex-wrap:wrap}
/* الأدمن على الهاتف: تبويبات بسطر واحد قابل للتمرير، وجداول لا تتكسّر حرفاً حرفاً */
.admin-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;padding-bottom:6px;-webkit-overflow-scrolling:touch}
.admin-tabs .chip{flex:none;white-space:nowrap}
.admin-shell .table-wrap{overflow-x:auto}
.admin-shell table th,.admin-shell table td{min-width:76px}
.admin-shell table .badge{overflow-wrap:normal;white-space:nowrap}
.admin-shell code{font-size:.85rem;background:var(--surface-2,#f2f6f9);padding:6px 8px;border-radius:8px}

/* حساباتي العامة ومنتجاتي */
.stat-row{display:flex;flex-wrap:wrap;gap:8px}
.stat{flex:1 1 90px;background:var(--surface-2,#f2f6f9);border-radius:12px;padding:8px 10px;display:flex;flex-direction:column;gap:2px;min-width:0}
.stat b{font-size:1.15rem}
.badge-warn{background:#FFF4D6;color:#7A5500}
.badge-auto{background:#FFF4D6;color:#7A5500}
.badge-ok{background:#E3F6EC;color:#13693C}
.prod-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.prod-card{border:1px solid var(--line,#e3e8ee);border-radius:16px;overflow:hidden;background:#fff;display:flex;flex-direction:column;min-width:0}
.prod-card img,.prod-noimg{width:100%;aspect-ratio:4/5;object-fit:cover;background:#eef2f5;display:block}
.prod-noimg{display:grid;place-items:center;color:var(--muted,#667)}
.prod-body{padding:12px;gap:8px}
.prod-price{font-weight:800;font-size:1.05rem}
.chip-color{display:inline-flex;align-items:center;gap:4px;font-size:.8rem;background:var(--surface-2,#f2f6f9);border-radius:999px;padding:2px 8px}
.chip-color i{width:12px;height:12px;border-radius:50%;display:inline-block;box-shadow:0 0 0 1px rgba(0,0,0,.15)}
@media (max-width:520px){.prod-grid{grid-template-columns:1fr 1fr;gap:8px}.prod-body{padding:8px}.prod-body .btn-sm{padding-inline:8px}}

/* زرّ «تصدير PDF» أعلى صفحة الطلب */
.pdf-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border:1.5px solid var(--blue-200,#bfe9f9);background:#F2FBFF}
.pdf-top .pdf-txt{flex:1 1 200px;min-width:0}
.pdf-top .btn{flex:none}
@media (max-width:520px){.pdf-top .btn{width:100%;justify-content:center}}

/* بطاقة المتجر */
.store-card .stats-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.store-card .stat{background:#F5F8FA;border-radius:12px;padding:10px;text-align:center}
.store-card .stat b{display:block;font-size:20px}
.setup-code{background:#FFF8E5;border:1px dashed #E2B53E;border-radius:12px;padding:10px 12px}
.setup-code b{font-size:20px;letter-spacing:2px}

/* الحملات الإعلانية */
.camp-page{max-width:640px;margin-inline:auto;min-width:0}
.camp-back{align-self:flex-start;justify-self:start}
.card .row.camp-line{gap:12px;flex-wrap:nowrap}
.camp-line>span{min-width:0}
.camp-line>b{flex:none}
.camp-total{border-top:1px solid var(--border);padding-top:8px;font-size:1.1rem}
.camp-consent{display:flex;gap:10px;align-items:flex-start;padding:12px;border:1px solid var(--border);border-radius:var(--r-md);background:var(--surface-2);font-size:.95rem;cursor:pointer}
.camp-consent input{flex:none;width:22px;height:22px;margin:2px 0 0;accent-color:var(--brand)}
.camp-steps{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.camp-steps li{display:flex;gap:10px;align-items:center;color:var(--text-muted)}
.camp-steps i{flex:none;width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-weight:700;font-size:.85rem;background:var(--surface-2);border:1px solid var(--border)}
.camp-steps i svg{width:16px;height:16px}
.camp-steps .done{color:var(--text)}
.camp-steps .done i{background:var(--success-bg);color:var(--success);border-color:transparent}
.camp-steps .now{color:var(--text);font-weight:700}
.camp-steps .now i{background:var(--brand);color:var(--on-brand);border-color:transparent}
.camp-guide{margin:0;padding-inline-start:22px;display:grid;gap:8px}
.camp-url{overflow-wrap:anywhere;max-width:100%}
.camp-page .alert svg{flex:none;width:22px;height:22px}
.camp-page .item b{white-space:nowrap}
/* ربط حساباتي */
.link-page{max-width:680px;margin-inline:auto;min-width:0}
.link-page .alert svg{flex:none;width:22px;height:22px}
.link-head{flex-wrap:nowrap;align-items:flex-start}
.link-name{display:grid;gap:2px;min-width:0}
.link-soon{opacity:.78}
.link-hint{color:var(--text-muted);border-inline-start:3px solid var(--brand);padding-inline-start:10px}
.link-assets{margin:0;padding-inline-start:20px;display:grid;gap:4px;overflow-wrap:anywhere}
.link-actions{display:grid;gap:8px}
.link-actions .btn{width:100%}
@media (min-width:560px){.link-actions{grid-template-columns:repeat(auto-fit,minmax(0,1fr))}}
.link-notices{margin:0;padding-inline-start:20px;display:grid;gap:8px}
.link-perms{list-style:none;margin:0;padding:0;display:grid;gap:12px}
.link-perms>li{border:1px solid var(--border);border-radius:var(--r-md);padding:12px 14px;display:grid;gap:6px;min-width:0}
.link-perm-head{flex-wrap:nowrap;gap:8px}
.link-perms p{margin:0;font-size:.95rem}
.link-will span{color:var(--success);font-weight:700}
.link-wont span{color:var(--danger);font-weight:700}
.link-scope{justify-self:end;font-size:.78rem;overflow-wrap:anywhere}
.link-radio{display:flex;gap:10px;align-items:flex-start;padding:12px;min-height:48px;border:1px solid var(--border);border-radius:var(--r-md);cursor:pointer}
.link-radio.on{border-color:var(--blue-700);background:var(--surface-2)}
.link-radio input{flex:none;width:20px;height:20px;margin:2px 0 0;accent-color:var(--brand)}
.link-audit .item{align-items:flex-start;gap:10px}
.link-audit .m{overflow-wrap:anywhere}
.link-audit .badge,.link-head .badge{flex:none;white-space:nowrap}
/* البلدان المستهدفة: أزرار كبيرة بسؤال واحد */
.target-opts{display:grid;gap:10px}
.target-opt{min-height:64px;padding:16px 18px}
.target-opt b{font-size:1.05rem}
.study-basis{margin:0;padding:10px 14px;border-radius:12px;background:var(--blue-50,#eef8fd);border:1px solid var(--blue-100,#d6effa);font-weight:600;font-size:.95rem}

/* «طلب جديد»: مربّعات مصوّرة (قسم ⇐ خدمة). المربّع كلّه زرّ، عمودان على الجوال */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tiles > [role="listitem"] { min-width: 0; }
.tile { aspect-ratio: 1; width: 100%; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 8px; font: inherit; color: var(--text); text-align: center; text-decoration: none; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: border-color 160ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease; }
.tile:hover { border-color: var(--blue-200); }
.tile:active { transform: scale(0.97); }
.tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile[aria-pressed="true"] { border-color: var(--brand); background: var(--blue-50); box-shadow: 0 0 0 3px rgba(0,168,230,.18); }
.tile-img { width: 44%; max-width: 96px; height: auto; aspect-ratio: 1; flex: none; }
.tile-name { font-size: .9rem; line-height: 1.35; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-cat .tile-img { width: 56%; }
.tile-cat .tile-name { font-size: 1rem; }
.tile-price { font-size: .78rem; line-height: 1.3; color: var(--blue-700); font-weight: 600; }
@media (max-width: 359px) { .tile-img { width: 38%; } .tile-name { font-size: .88rem; } }
.tiles-back { align-self: flex-start; min-height: 48px; }
.tiles-title { display: flex; align-items: center; gap: 10px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:active { transform: none; } }
.sticky-actions[hidden] { display: none !important; }
