/* ALIGN 17.5 — الموقع العام (الصفحة الرئيسية + التسجيل + دخول الصيدلية).
   الألوان والخطوط من tokens.css فقط (الهوية الموحّدة 17.3). */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--al-surface); color: var(--al-text); line-height: 1.6; }
a { color: var(--al-brand); text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.st-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.st-muted { color: var(--al-muted); }
.st-center { text-align: center; }

/* شريط البيئة التجريبية */
.st-demo { background: var(--al-warn-bg); color: var(--al-warn); text-align: center; font-size: var(--al-fs-sm);
  font-weight: var(--al-fw-semibold); padding: 6px 12px; }

/* الشريط العلوي */
.st-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--al-surface) 92%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--al-line); }
.st-top-in { display: flex; align-items: center; gap: 14px; height: 68px; }
.st-logo img { height: 30px; display: block; }
.st-nav { display: flex; gap: 22px; margin-inline-start: 18px; }
.st-nav a { color: var(--al-text-2); font-weight: var(--al-fw-medium); font-size: var(--al-fs-md); }
.st-nav a:hover { color: var(--al-brand); }
.st-spacer { flex: 1; }
.st-lang { background: none; border: 1px solid var(--al-line-strong); border-radius: var(--al-radius-pill);
  height: 34px; min-width: 44px; padding: 0 10px; font: inherit; font-weight: var(--al-fw-semibold);
  color: var(--al-text-2); cursor: pointer; }

/* الأزرار */
.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--al-control-h);
  padding: 0 18px; border-radius: var(--al-radius); border: 1px solid transparent; font: inherit;
  font-weight: var(--al-fw-semibold); font-size: var(--al-fs-md); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s; }
.st-btn-primary { background: var(--al-brand); color: var(--al-surface); }
.st-btn-primary:hover { background: var(--al-brand-600); }
.st-btn-ghost { background: var(--al-surface); color: var(--al-text); border-color: var(--al-line-strong); }
.st-btn-ghost:hover { border-color: var(--al-brand); color: var(--al-brand); }
.st-btn-light { background: color-mix(in srgb, var(--al-surface) 10%, transparent); color: var(--al-surface);
  border-color: color-mix(in srgb, var(--al-surface) 35%, transparent); }
.st-btn-light:hover { background: color-mix(in srgb, var(--al-surface) 18%, transparent); }
.st-btn-lg { height: 52px; padding: 0 26px; font-size: var(--al-fs-lg); }
.st-btn-block { width: 100%; }
.st-btn[disabled] { opacity: .6; cursor: progress; }

/* البطل */
.st-hero { background: var(--al-dark); color: var(--al-surface); position: relative; overflow: hidden; }
.st-hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--al-brand) 45%, transparent), transparent);
  pointer-events: none; }
[dir="ltr"] .st-hero::before { inset: -40% auto auto -10%; }
.st-hero-in { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding-top: 84px; padding-bottom: 96px; }
.st-badge { display: inline-block; padding: 6px 14px; border-radius: var(--al-radius-pill);
  background: color-mix(in srgb, var(--al-brand) 22%, transparent); color: var(--al-brand-50);
  border: 1px solid color-mix(in srgb, var(--al-brand) 55%, transparent); font-size: var(--al-fs-sm);
  font-weight: var(--al-fw-semibold); }
.st-hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.15; margin: 18px 0 16px; font-weight: var(--al-fw-bold);
  letter-spacing: -.01em; }
.st-lead { font-size: 19px; color: var(--al-dark-text); margin: 0 0 30px; max-width: 34em; }
.st-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.st-link-demo { margin-top: 26px; display: inline-flex; align-items: center; gap: 10px; direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--al-fs-sm); color: var(--al-dark-muted);
  border: 1px dashed var(--al-dark-line); border-radius: var(--al-radius-pill); padding: 6px 14px; }
.st-link-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--al-chart-5); }

/* لوحة توضيحية */
.st-hero-art { display: flex; justify-content: center; }
.st-mock { width: 100%; max-width: 480px; background: var(--al-surface); color: var(--al-text);
  border-radius: 18px; padding: 18px; box-shadow: 0 40px 80px color-mix(in srgb, var(--al-ink) 55%, transparent);
  transform: perspective(1200px) rotateY(-6deg) rotateX(3deg); }
[dir="ltr"] .st-mock { transform: perspective(1200px) rotateY(6deg) rotateX(3deg); }
.st-mock-top { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.st-mock-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--al-line-strong); }
.st-mock-top b { margin-inline-start: auto; font-size: var(--al-fs-sm); color: var(--al-muted); letter-spacing: .1em; }
.st-mock-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.st-mock-kpis div { background: var(--al-bg); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.st-mock-kpis small { color: var(--al-muted); font-size: var(--al-fs-xs); }
.st-mock-kpis strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.st-mock-kpis em { direction: ltr; text-align: end; font-style: normal; font-size: var(--al-fs-xs); color: var(--al-success); font-weight: var(--al-fw-semibold); }
.st-mock-kpis em.warn { color: var(--al-warn); }
.st-mock-chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; margin: 18px 4px 14px;
  border-bottom: 1px solid var(--al-line); }
.st-mock-chart span { flex: 1; height: var(--h); background: var(--al-chart-soft); border-radius: 6px 6px 0 0; }
.st-mock-chart span.on { background: var(--al-brand); }
.st-mock-rows i { display: block; height: 10px; border-radius: 6px; background: var(--al-line-soft); margin-top: 9px; }
.st-mock-rows i:nth-child(2) { width: 80%; } .st-mock-rows i:nth-child(3) { width: 60%; }

/* الأقسام */
.st-section { padding: 88px 0; }
.st-section-alt { background: var(--al-bg); }
.st-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.st-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; }
.st-head p { margin: 0; color: var(--al-text-2); font-size: var(--al-fs-lg); }
.st-grid { display: grid; gap: 18px; }
.st-grid-4 { grid-template-columns: repeat(4, 1fr); }
.st-card { background: var(--al-surface); border: 1px solid var(--al-line); border-radius: var(--al-radius-lg);
  padding: 24px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.st-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--al-brand) 35%, var(--al-line));
  box-shadow: 0 18px 40px color-mix(in srgb, var(--al-ink) 8%, transparent); }
.st-card h3 { font-size: 18px; margin: 16px 0 8px; }
.st-card p { margin: 0; color: var(--al-text-2); }
.st-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--al-brand-50); color: var(--al-brand); }
.st-icon svg { width: 24px; height: 24px; }
.st-card-cat { border-top: 3px solid var(--al-brand); }

/* الدعوة */
.st-cta { background: var(--al-brand); color: var(--al-surface); }
.st-cta-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 56px 20px; flex-wrap: wrap; }
.st-cta h2 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); }
.st-cta p { margin: 0; color: var(--al-brand-50); font-size: var(--al-fs-lg); }
.st-cta .st-btn-primary { background: var(--al-ink); }
.st-cta .st-btn-primary:hover { background: var(--al-dark-2); }

/* التذييل */
.st-foot { background: var(--al-dark); color: var(--al-dark-text); padding-top: 52px; }
.st-foot-in { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; padding-bottom: 36px; }
.st-foot-brand img { height: 30px; }
.st-foot-brand p { max-width: 30em; color: var(--al-dark-muted); }
.st-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.st-contact li { display: flex; gap: 10px; align-items: center; }
.st-contact a { color: var(--al-dark-text); }
.st-contact .st-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--al-dark-2); color: var(--al-dark-text); }
.st-contact .st-icon svg { width: 18px; height: 18px; }
.st-foot-copy { border-top: 1px solid var(--al-dark-line); padding-top: 18px; padding-bottom: 22px;
  font-size: var(--al-fs-sm); color: var(--al-dark-muted); }

/* التنبيه (رابط غير موجود) */
.st-notice { background: var(--al-danger-bg); color: var(--al-danger); text-align: center; padding: 12px 20px;
  font-weight: var(--al-fw-medium); }

/* النماذج */
.st-form-wrap { padding-top: 56px; padding-bottom: 80px; background: var(--al-bg); max-width: none; }
#st-signup { background: var(--al-bg); }
.st-form-card { max-width: 640px; margin: 0 auto; background: var(--al-surface); border: 1px solid var(--al-line);
  border-radius: 18px; padding: 34px; }
.st-form-card h1 { margin: 0 0 6px; font-size: 28px; }
.st-field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; min-width: 0; }
.st-field label { font-weight: var(--al-fw-semibold); font-size: var(--al-fs-sm); color: var(--al-text-2); }
.st-field input, .st-slug { height: var(--al-control-h); border: 1px solid var(--al-line-strong); border-radius: var(--al-radius);
  padding: 0 12px; font: inherit; font-size: var(--al-fs-md); background: var(--al-surface); color: var(--al-text); width: 100%; }
.st-field input:focus, .st-slug:focus-within { outline: none; border-color: var(--al-brand); box-shadow: var(--al-focus); }
.st-field input.bad { border-color: var(--al-danger); }
.st-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.st-slug { display: flex; align-items: center; padding: 0; overflow: hidden; }
.st-slug input { border: 0; height: 100%; flex: 1; min-width: 60px; padding: 0 6px; font: inherit; font-size: var(--al-fs-md);
  outline: none; background: transparent; color: var(--al-text); }
.st-slug-pre, .st-slug-post { color: var(--al-muted); font-size: var(--al-fs-sm); white-space: nowrap; padding: 0 10px;
  background: var(--al-surface-2); height: 100%; display: flex; align-items: center; }
.st-slug-pre:empty, .st-slug-post:empty { display: none; }
.st-hint { font-size: var(--al-fs-xs); color: var(--al-muted); }
.st-hint.ok { color: var(--al-success); font-weight: var(--al-fw-semibold); }
.st-hint.bad { color: var(--al-danger); font-weight: var(--al-fw-semibold); }
.st-msg { min-height: 22px; margin: 14px 0 6px; color: var(--al-danger); font-weight: var(--al-fw-medium); }
.st-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.st-done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--al-success-bg); color: var(--al-success);
  display: grid; place-items: center; font-size: 32px; font-weight: var(--al-fw-bold); margin: 0 auto 10px; }
#su-done { text-align: center; }
.st-link-box { display: flex; align-items: center; gap: 10px; justify-content: space-between; border: 1px dashed var(--al-brand);
  background: var(--al-brand-50); border-radius: var(--al-radius); padding: 8px 8px 8px 14px; margin: 16px 0 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: var(--al-fw-semibold); color: var(--al-brand-600);
  word-break: break-all; text-align: left; }

/* نافذة الدخول */
.st-modal { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--al-ink) 55%, transparent);
  display: grid; place-items: center; padding: 20px; }
.st-modal-card { position: relative; width: 100%; max-width: 440px; background: var(--al-surface); border-radius: 18px;
  padding: 30px; box-shadow: var(--al-shadow-pop); }
.st-modal-card h2 { margin: 0 0 4px; }
.st-modal-card .st-slug { margin-top: 16px; border: 1px solid var(--al-line-strong); border-radius: var(--al-radius);
  height: var(--al-control-h); }
.st-x { position: absolute; top: 12px; inset-inline-end: 12px; width: 36px; height: 36px; border: 0; background: var(--al-bg);
  border-radius: 50%; font-size: 20px; cursor: pointer; color: var(--al-text-2); }

/* 17.6 — لقطات حقيقية وجولة النظام */
.st-shot { margin: 0; background: var(--al-surface); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--al-line-soft); box-shadow: 0 30px 70px -20px color-mix(in srgb, var(--al-ink) 45%, transparent); }
.st-shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--al-bg); border-bottom: 1px solid var(--al-line-soft); }
.st-shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--al-line-strong); }
.st-shot-bar span { margin-inline-start: 10px; flex: 1; min-width: 0; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--al-muted); background: var(--al-surface); border-radius: 999px; padding: 3px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.st-shot img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.st-hero-art { min-width: 0; }
.st-hero-shot { width: 118%; max-width: 760px; transform: perspective(1600px) rotateY(-8deg) rotateX(2deg); transform-origin: right center; }
[dir="ltr"] .st-hero-shot { transform: perspective(1600px) rotateY(8deg) rotateX(2deg); transform-origin: left center; }
.st-shot-zoom { border: 0; background: none; color: var(--al-brand); font: inherit; font-size: 13px; cursor: pointer; padding: 2px 6px; }
.st-tour-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 30px; }
.st-tour-tab { border: 1px solid var(--al-line); background: var(--al-surface); color: var(--al-text); font: inherit;
  font-size: 15px; padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.st-tour-tab:hover { border-color: var(--al-brand); }
.st-tour-tab.on { background: var(--al-brand); border-color: var(--al-brand); color: #fff; }
.st-tour { display: grid; grid-template-columns: 1fr; gap: 28px; }
.st-tour-text { display: grid; grid-template-columns: 1.2fr 1fr; column-gap: 48px; align-items: start; }
.st-tour-text > .st-tour-kicker, .st-tour-text > h3, .st-tour-text > p { grid-column: 1; }
.st-tour-text > .st-tour-points { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.st-tour-text > .st-tour-nav { grid-column: 2; }
.st-tour-kicker { display: inline-block; color: var(--al-brand); font-weight: var(--al-fw-semibold); font-size: 14px; margin-bottom: 8px; }
.st-tour-text h3 { font-size: 26px; line-height: 1.35; margin: 0 0 12px; }
.st-tour-text p { color: var(--al-muted); font-size: 16px; line-height: 1.8; margin: 0 0 16px; }
.st-tour-points { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.st-tour-points li { position: relative; padding-inline-start: 26px; font-size: 15px; }
.st-tour-points li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: var(--al-success); font-weight: 700; }
.st-tour-nav { display: flex; align-items: center; gap: 12px; }
.st-tour-nav .st-btn { width: 42px; padding: 0; font-size: 20px; }
.st-tour-shot img { aspect-ratio: 1800 / 1125; background: var(--al-bg); }
.st-lightbox { position: fixed; inset: 0; z-index: 90; background: color-mix(in srgb, #000 82%, transparent);
  display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.st-lightbox[hidden] { display: none; }
.st-lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px #000; cursor: default; }
.st-lightbox-x { position: absolute; top: 14px; inset-inline-end: 18px; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: #fff; color: #111; font-size: 26px; line-height: 1; cursor: pointer; }

/* الاستجابة */
@media (max-width: 980px) {
  .st-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .st-hero-in { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 64px; }
  .st-hero-shot { width: 100%; transform: none; }
  .st-tour-text { grid-template-columns: 1fr; }
  .st-tour-text > * { grid-column: 1 !important; grid-row: auto !important; }
  .st-tour-shot { order: -1; }
  .st-nav { display: none; }
}
@media (max-width: 600px) {
  .st-grid-4, .st-row2 { grid-template-columns: 1fr; }
  .st-hide-sm { display: none; }
  .st-top-in { gap: 8px; }
  .st-btn { padding: 0 12px; }
  .st-form-card { padding: 22px; }
  .st-section { padding: 60px 0; }
  .st-tour-tabs { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 6px; margin-inline: -16px; padding-inline: 16px; }
  .st-tour-tab { flex: none; font-size: 14px; padding: 8px 14px; }
}
