/* ═══════════════════════════════════════════════════════════════════════════
   منصة د. أحمد أبو الرب — نظام تصميم لوحات التحكم
   يعتمد Bootstrap 5 RTL ويضيف فوقه هوية بصرية طبية هادئة.
   نفس لوحة ألوان الموقع العام: أزرق هادئ + أخضر علاجي + لافندر.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* الهوية */
  --c-blue:        #4E8AB8;
  --c-blue-deep:   #2F5D80;
  --c-blue-ink:    #22384A;
  --c-green:       #67A98F;
  --c-green-deep:  #4C8A72;
  --c-lavender:    #9D8FCB;
  --c-gold:        #C9A86A;

  /* محايدة */
  --c-text:        #46586A;
  --c-text-soft:   #7A8B9C;
  --c-bg:          #F4F7FA;
  --c-surface:     #FFFFFF;
  --c-surface-2:   #F8FBFD;
  --c-border:      #E3EAF1;
  --c-border-soft: #EFF4F8;

  /* مقاسات */
  --sidebar-w:   264px;
  --topbar-h:    68px;
  --radius-sm:   8px;
  --radius:      12px;
  --radius-lg:   18px;
  --shadow-xs:   0 1px 2px rgba(34,56,74,.05);
  --shadow-sm:   0 2px 10px rgba(34,56,74,.06);
  --shadow:      0 8px 28px rgba(34,56,74,.09);
  --shadow-lg:   0 20px 50px rgba(34,56,74,.14);

  /* Bootstrap overrides */
  --bs-primary:      #2F5D80;
  --bs-primary-rgb:  47,93,128;
  --bs-body-color:   #46586A;
  --bs-body-bg:      #F4F7FA;
  --bs-border-color: #E3EAF1;
  --bs-font-sans-serif: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --bs-border-radius: 12px;
}

* { -webkit-tap-highlight-color: transparent; }

body {
  font-family: var(--bs-font-sans-serif);
  background: var(--c-bg);
  color: var(--c-text);
  font-size: .94rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--c-blue-ink); font-weight: 700; line-height: 1.5; }
a { color: var(--c-blue-deep); text-decoration: none; }
a:hover { color: var(--c-blue); }

:focus-visible {
  outline: 3px solid rgba(78,138,184,.45);
  outline-offset: 2px;
  border-radius: 6px;
}

/* شريط تمرير أنيق */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D3DFE9; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #B9CBD9; }

/* ─────────────────────────── الهيكل العام ─────────────────────────── */

.app-shell { display: flex; min-height: 100vh; }

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-inline-start: var(--sidebar-w);
}

.app-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 1360px;
  width: 100%;
}
.app-content.is-wide { max-width: none; }

.app-footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--c-border);
  color: var(--c-text-soft);
  font-size: .82rem;
}

/* ─────────────────────────── الشريط الجانبي ─────────────────────────── */

.app-sidebar {
  position: fixed;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #24506E 0%, #1E4459 60%, #1D4A4A 100%);
  color: #DCE8F1;
  display: flex;
  flex-direction: column;
  z-index: 1040;
  transition: transform .28s cubic-bezier(.22,.8,.32,1);
}

.sidebar-brand {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.09);
  min-height: var(--topbar-h);
}

.brand-link { display: flex; align-items: center; gap: .7rem; color: #fff; min-width: 0; }
.brand-link:hover { color: #fff; }

.brand-mark {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c-blue), var(--c-green));
  color: #fff; font-size: 1.15rem;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.brand-mark.lg { width: 56px; height: 56px; font-size: 1.6rem; border-radius: 16px; }

.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: .92rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-size: .73rem; color: rgba(220,232,241,.7); }

.sidebar-close { color: #fff; padding: .25rem .5rem; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .85rem .7rem 1.2rem; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }

.nav-group + .nav-group { margin-top: 1.1rem; }
.nav-group-label {
  display: block;
  padding: 0 .65rem .4rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  color: rgba(220,232,241,.45);
  text-transform: uppercase;
}

.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .58rem .65rem;
  margin-bottom: .12rem;
  border-radius: 10px;
  color: rgba(220,232,241,.82);
  font-size: .87rem; font-weight: 500;
  transition: background .18s, color .18s;
}
.sidebar-nav .nav-link i { font-size: 1.02rem; width: 20px; text-align: center; opacity: .85; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav .nav-link.active {
  background: linear-gradient(90deg, rgba(103,169,143,.28), rgba(78,138,184,.18));
  color: #fff;
  box-shadow: inset 2px 0 0 var(--c-green);
}
.sidebar-nav .nav-link.active i { opacity: 1; }

.sidebar-footer { padding: .8rem 1.1rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-site-link { color: rgba(220,232,241,.7); font-size: .8rem; }
.sidebar-site-link:hover { color: #fff; }

.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(19,38,52,.5);
  backdrop-filter: blur(2px); z-index: 1035; display: none;
}
.sidebar-open .sidebar-backdrop { display: block; }

/* ─────────────────────────── الشريط العلوي ─────────────────────────── */

.app-topbar {
  position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; gap: .9rem;
  min-height: var(--topbar-h);
  padding: .6rem 1.5rem;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
}

.topbar-toggle, .topbar-icon-btn {
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  border-radius: 10px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--c-blue-ink);
  font-size: 1.05rem;
  padding: 0;
}
.topbar-icon-btn:hover, .topbar-toggle:hover { background: var(--c-surface-2); border-color: #D3DFE9; }

.topbar-heading { flex: 1; min-width: 0; }
.topbar-heading h1 { font-size: 1.12rem; margin: 0; line-height: 1.4; }
.topbar-subtitle { margin: 0; font-size: .8rem; color: var(--c-text-soft); }
.topbar-heading .breadcrumb { margin: 0; font-size: .76rem; --bs-breadcrumb-divider: '‹'; }
.topbar-heading .breadcrumb-item + .breadcrumb-item::before { content: '‹'; color: #B9C7D4; }

.topbar-actions { display: flex; align-items: center; gap: .5rem; }

.notif-dot {
  position: absolute; top: -4px; inset-inline-end: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: #D9534F; color: #fff;
  font-size: .66rem; font-weight: 700;
  display: grid; place-items: center;
  border: 2px solid #fff;
}

.user-chip {
  display: flex; align-items: center; gap: .55rem;
  border: 1px solid var(--c-border); background: var(--c-surface);
  border-radius: 12px; padding: .3rem .6rem;
}
.user-chip:hover { background: var(--c-surface-2); }
.user-chip-text { display: flex; flex-direction: column; line-height: 1.25; text-align: start; }
.user-chip-text strong { font-size: .8rem; color: var(--c-blue-ink); }
.user-chip-text small { font-size: .68rem; color: var(--c-text-soft); }

.avatar {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--c-blue), var(--c-green));
  color: #fff; font-weight: 700; font-size: .82rem;
}
.avatar.sm { width: 28px; height: 28px; flex-basis: 28px; font-size: .72rem; border-radius: 8px; }
.avatar.lg { width: 60px; height: 60px; flex-basis: 60px; font-size: 1.3rem; border-radius: 16px; }

/* قائمة الإشعارات */
.notif-menu { width: 340px; max-width: calc(100vw - 2rem); padding: 0; border: 1px solid var(--c-border); box-shadow: var(--shadow); border-radius: 14px; overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--c-border-soft); font-weight: 700; font-size: .85rem; color: var(--c-blue-ink); }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item { display: flex; gap: .6rem; padding: .65rem .9rem; border-bottom: 1px solid var(--c-border-soft); font-size: .82rem; color: var(--c-text); }
.notif-item:hover { background: var(--c-surface-2); }
.notif-item.unread { background: rgba(78,138,184,.06); }
.notif-item i { color: var(--c-blue); margin-top: .15rem; }
.notif-item time { display: block; font-size: .7rem; color: var(--c-text-soft); }
.notif-all { display: block; text-align: center; padding: .6rem; font-size: .8rem; font-weight: 600; border-top: 1px solid var(--c-border-soft); }

/* شريط انتحال الهوية */
.impersonation-bar {
  background: linear-gradient(90deg, #B4642F, #C9A86A);
  color: #fff; text-align: center; padding: .45rem 1rem; font-size: .84rem; font-weight: 600;
  position: sticky; top: 0; z-index: 1060;
}

/* ─────────────────────────── البطاقات ─────────────────────────── */

.card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  background: var(--c-surface);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--c-border-soft);
  padding: .95rem 1.15rem;
  font-weight: 700; color: var(--c-blue-ink);
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
}
.card-header h2, .card-header h3 { font-size: .98rem; margin: 0; }
.card-body { padding: 1.15rem; }
.card-footer { background: var(--c-surface-2); border-top: 1px solid var(--c-border-soft); padding: .8rem 1.15rem; }

/* بطاقات الإحصاءات */
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.05rem 1.15rem;
  display: flex; align-items: flex-start; gap: .85rem;
  box-shadow: var(--shadow-xs);
  transition: transform .2s var(--ease, cubic-bezier(.22,.8,.32,1)), box-shadow .2s;
  position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-card::after {
  content: ''; position: absolute; inset-block-start: 0; inset-inline-start: 0;
  width: 3px; height: 100%; background: var(--stat-color, var(--c-blue));
}
.stat-icon {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 13px; display: grid; place-items: center;
  font-size: 1.2rem;
  background: color-mix(in srgb, var(--stat-color, var(--c-blue)) 13%, #fff);
  color: var(--stat-color, var(--c-blue));
}
.stat-body { min-width: 0; }
.stat-value { font-size: 1.55rem; font-weight: 700; color: var(--c-blue-ink); line-height: 1.2; }
.stat-label { font-size: .8rem; color: var(--c-text-soft); }
.stat-meta { font-size: .74rem; margin-top: .15rem; }

/* ─────────────────────────── الجداول ─────────────────────────── */

.table-card { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }

.table {
  --bs-table-bg: transparent;
  margin: 0;
  font-size: .86rem;
  vertical-align: middle;
}
.table > thead th {
  background: var(--c-surface-2);
  color: var(--c-text-soft);
  font-weight: 600; font-size: .76rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.table > tbody td { padding: .75rem .9rem; border-bottom: 1px solid var(--c-border-soft); }
.table > tbody tr:last-child td { border-bottom: 0; }
.table > tbody tr:hover { background: rgba(78,138,184,.035); }
.table .cell-main { font-weight: 600; color: var(--c-blue-ink); }
.table .cell-sub { font-size: .76rem; color: var(--c-text-soft); }
.table-actions { display: flex; gap: .3rem; justify-content: flex-end; white-space: nowrap; }

/* ─────────────────────────── الشارات والأزرار ─────────────────────────── */

.badge { font-weight: 600; font-size: .72rem; padding: .32em .62em; border-radius: 7px; }

.btn { border-radius: 10px; font-weight: 600; font-size: .86rem; padding: .48rem .95rem; }
.btn-sm { padding: .32rem .68rem; font-size: .79rem; border-radius: 8px; }
.btn-lg { padding: .68rem 1.35rem; font-size: .95rem; border-radius: 12px; }

.btn-primary {
  background: linear-gradient(120deg, var(--c-blue-deep), #2A6B6B);
  border: none;
  box-shadow: 0 4px 14px rgba(47,93,128,.24);
}
.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(120deg, #27506F, #235C5C);
  box-shadow: 0 6px 18px rgba(47,93,128,.32);
}
.btn-outline-primary { border-color: #C9D9E6; color: var(--c-blue-deep); }
.btn-outline-primary:hover { background: var(--c-blue-deep); border-color: var(--c-blue-deep); }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }

/* ─────────────────────────── النماذج ─────────────────────────── */

.form-label { font-size: .82rem; font-weight: 600; color: var(--c-blue-ink); margin-bottom: .3rem; }
.form-label .req { color: #D9534F; }

.form-control, .form-select {
  border-radius: 10px;
  border-color: #DCE6EF;
  padding: .55rem .8rem;
  font-size: .88rem;
  background-color: #fff;
}
.form-control:focus, .form-select:focus {
  border-color: var(--c-blue);
  box-shadow: 0 0 0 .2rem rgba(78,138,184,.15);
}
.form-control::placeholder { color: #A9B8C6; }
.form-text { font-size: .76rem; color: var(--c-text-soft); }
.form-check-input:checked { background-color: var(--c-blue-deep); border-color: var(--c-blue-deep); }
.form-check-label { font-size: .87rem; }
.input-group-text { background: var(--c-surface-2); border-color: #DCE6EF; font-size: .84rem; color: var(--c-text-soft); }

.is-invalid ~ .invalid-feedback { display: block; }
.invalid-feedback { font-size: .76rem; }

/* حقل ثنائي الاتجاه (بريد/هاتف) */
.ltr-input { direction: ltr; text-align: left; }

/* مجموعة تبديل */
.form-switch .form-check-input { width: 2.4em; height: 1.25em; }

/* ─────────────────────────── الفلاتر والبحث ─────────────────────────── */

.filter-bar {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: end;
  padding: .9rem 1.15rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}
.filter-bar .form-control, .filter-bar .form-select { min-width: 150px; }
.filter-bar .filter-grow { flex: 1 1 220px; }

.chip-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-filter {
  border: 1px solid var(--c-border); background: #fff;
  border-radius: 999px; padding: .28rem .8rem;
  font-size: .79rem; font-weight: 600; color: var(--c-text-soft);
}
.chip-filter:hover { border-color: var(--c-blue); color: var(--c-blue-deep); }
.chip-filter.active { background: var(--c-blue-deep); border-color: var(--c-blue-deep); color: #fff; }

/* ─────────────────────────── الحالة الفارغة ─────────────────────────── */

.empty-state { text-align: center; padding: 2.8rem 1.5rem; }
.empty-icon {
  width: 68px; height: 68px; margin: 0 auto 1rem;
  border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(78,138,184,.12), rgba(103,169,143,.12));
  color: var(--c-blue); font-size: 1.7rem;
}
.empty-state h3 { font-size: 1rem; margin-bottom: .35rem; }
.empty-state p { font-size: .85rem; color: var(--c-text-soft); max-width: 380px; margin: 0 auto 1rem; }

/* ─────────────────────────── الخط الزمني ─────────────────────────── */

.timeline { position: relative; padding-inline-start: 1.4rem; margin: 0; list-style: none; }
.timeline::before {
  content: ''; position: absolute; inset-inline-start: .32rem; top: .4rem; bottom: .4rem;
  width: 2px; background: var(--c-border);
}
.timeline-item { position: relative; padding-bottom: 1.1rem; }
.timeline-item::before {
  content: ''; position: absolute; inset-inline-start: -1.24rem; top: .42rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--c-blue);
}
.timeline-item.is-done::before { background: var(--c-green); border-color: var(--c-green); }
.timeline-item.is-danger::before { background: #D9534F; border-color: #D9534F; }
.timeline-title { font-weight: 600; font-size: .87rem; color: var(--c-blue-ink); }
.timeline-meta { font-size: .75rem; color: var(--c-text-soft); }

/* ─────────────────────────── مسار حالة الموعد ─────────────────────────── */

.status-flow { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.status-step {
  display: flex; align-items: center; gap: .3rem;
  font-size: .74rem; font-weight: 600;
  padding: .22rem .6rem; border-radius: 999px;
  background: #F0F4F8; color: #9AAAB8; border: 1px solid transparent;
}
.status-step.done { background: rgba(103,169,143,.14); color: var(--c-green-deep); }
.status-step.current { background: rgba(78,138,184,.16); color: var(--c-blue-deep); border-color: rgba(78,138,184,.35); }
.status-step.failed { background: rgba(217,83,79,.12); color: #B23B37; }
.status-flow .sep { color: #CBD7E2; font-size: .7rem; }

/* ─────────────────────────── تجربة الاستبيان ─────────────────────────── */

.focus-body { background: linear-gradient(160deg, #EFF5F9 0%, #F4F1FA 55%, #EDF5F1 100%); min-height: 100vh; }

.focus-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1.2rem;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 20;
}
.focus-back { font-size: .85rem; font-weight: 600; color: var(--c-blue-deep); display: inline-flex; align-items: center; gap: .35rem; }
.focus-title { font-weight: 700; color: var(--c-blue-ink); font-size: .95rem; text-align: center; flex: 1; }
.focus-right { min-width: 60px; text-align: end; }
.focus-content { max-width: 780px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.quiz-card {
  background: #fff; border-radius: 22px; box-shadow: var(--shadow);
  border: 1px solid var(--c-border-soft);
  overflow: hidden;
}
.quiz-progress-wrap { padding: 1rem 1.4rem .6rem; }
.quiz-progress-meta { display: flex; justify-content: space-between; font-size: .78rem; color: var(--c-text-soft); margin-bottom: .4rem; }
.quiz-progress { height: 7px; border-radius: 999px; background: #E9F0F6; overflow: hidden; }
.quiz-progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c-blue), var(--c-green)); transition: width .35s cubic-bezier(.22,.8,.32,1); }

.quiz-step { padding: 1.4rem; display: none; }
.quiz-step.is-active { display: block; animation: quizIn .32s cubic-bezier(.22,.8,.32,1); }
@keyframes quizIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.quiz-question-num { font-size: .78rem; font-weight: 700; color: var(--c-blue); letter-spacing: .03em; }
.quiz-question-title { font-size: 1.12rem; font-weight: 700; color: var(--c-blue-ink); margin: .3rem 0 .5rem; line-height: 1.65; }
.quiz-question-desc { font-size: .86rem; color: var(--c-text-soft); margin-bottom: .9rem; }
.quiz-help { font-size: .78rem; color: var(--c-text-soft); background: var(--c-surface-2); border-radius: 10px; padding: .5rem .75rem; margin-bottom: .9rem; }

.opt-list { display: flex; flex-direction: column; gap: .55rem; }
.opt {
  display: flex; align-items: center; gap: .7rem;
  border: 1.5px solid var(--c-border); border-radius: 14px;
  padding: .8rem .95rem; cursor: pointer;
  background: #fff; transition: all .18s;
  font-size: .92rem;
}
.opt:hover { border-color: var(--c-blue); background: rgba(78,138,184,.04); }
.opt input { margin: 0; flex: 0 0 auto; width: 1.15em; height: 1.15em; }
.opt.selected { border-color: var(--c-blue-deep); background: rgba(78,138,184,.09); box-shadow: 0 2px 10px rgba(47,93,128,.1); }
.opt-text { flex: 1; }

.scale-row { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.scale-btn {
  min-width: 46px; height: 46px; border-radius: 12px;
  border: 1.5px solid var(--c-border); background: #fff;
  font-weight: 700; color: var(--c-text);
  display: grid; place-items: center;
  transition: all .16s;
}
.scale-btn:hover { border-color: var(--c-blue); }
.scale-btn.selected { background: var(--c-blue-deep); border-color: var(--c-blue-deep); color: #fff; }
.scale-labels { display: flex; justify-content: space-between; font-size: .76rem; color: var(--c-text-soft); margin-top: .5rem; }

.rating-stars { display: flex; gap: .3rem; justify-content: center; font-size: 1.9rem; color: #DCE6EF; }
.rating-stars button { background: none; border: 0; color: inherit; padding: .1rem; line-height: 1; }
.rating-stars button.on { color: var(--c-gold); }

.quiz-nav { display: flex; justify-content: space-between; gap: .6rem; padding: 1rem 1.4rem 1.4rem; border-top: 1px solid var(--c-border-soft); }

.quiz-error { color: #B23B37; font-size: .82rem; margin-top: .6rem; display: none; }
.quiz-error.show { display: block; }

/* مراجعة قبل الإرسال */
.review-item { padding: .75rem 0; border-bottom: 1px solid var(--c-border-soft); }
.review-item:last-child { border-bottom: 0; }
.review-q { font-size: .85rem; font-weight: 600; color: var(--c-blue-ink); }
.review-a { font-size: .86rem; color: var(--c-text); }
.review-a.empty { color: #C0392B; }

/* ─────────────────────────── بطاقة النتيجة ─────────────────────────── */

.result-hero {
  border-radius: 22px; padding: 1.8rem 1.4rem; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--result-color, var(--c-blue)), color-mix(in srgb, var(--result-color, var(--c-blue)) 70%, #1E3D52));
  box-shadow: var(--shadow);
}
.result-score { font-size: 3rem; font-weight: 800; line-height: 1; }
.result-of { font-size: .95rem; opacity: .85; }
.result-level { display: inline-block; margin-top: .8rem; padding: .35rem 1rem; border-radius: 999px; background: rgba(255,255,255,.2); font-weight: 700; }
.result-meter { height: 10px; border-radius: 999px; background: rgba(255,255,255,.25); overflow: hidden; margin-top: 1rem; }
.result-meter span { display: block; height: 100%; background: #fff; border-radius: 999px; }

/* ─────────────────────────── بناء الاستبيانات ─────────────────────────── */

.builder-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; align-items: start; }
.builder-side { position: sticky; top: calc(var(--topbar-h) + 1rem); }

.q-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: 14px;
  margin-bottom: .8rem; box-shadow: var(--shadow-xs);
  transition: box-shadow .2s, border-color .2s;
}
.q-card:hover { box-shadow: var(--shadow-sm); }
.q-card.dragging { opacity: .5; }
.q-card-head { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-bottom: 1px solid var(--c-border-soft); }
.q-handle { cursor: grab; color: #B9C7D4; font-size: 1.1rem; }
.q-handle:active { cursor: grabbing; }
.q-index { width: 26px; height: 26px; border-radius: 8px; background: var(--c-surface-2); display: grid; place-items: center; font-size: .76rem; font-weight: 700; color: var(--c-blue-deep); flex: 0 0 26px; }
.q-title { flex: 1; font-weight: 600; font-size: .88rem; color: var(--c-blue-ink); min-width: 0; }
.q-type-badge { font-size: .7rem; padding: .2rem .5rem; border-radius: 6px; background: rgba(78,138,184,.1); color: var(--c-blue-deep); font-weight: 600; white-space: nowrap; }
.q-card-body { padding: .8rem .9rem; }
.q-opt-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.q-opt-row .form-control { font-size: .84rem; }
.q-score-input { max-width: 92px; }

.type-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; }
.type-btn {
  border: 1px solid var(--c-border); background: #fff; border-radius: 10px;
  padding: .55rem .4rem; font-size: .76rem; font-weight: 600; color: var(--c-text);
  display: flex; flex-direction: column; align-items: center; gap: .25rem;
  transition: all .16s;
}
.type-btn i { font-size: 1.05rem; color: var(--c-blue); }
.type-btn:hover { border-color: var(--c-blue); background: rgba(78,138,184,.05); transform: translateY(-1px); }

/* قواعد التفسير */
.rule-row { display: grid; grid-template-columns: 90px 90px 1fr 130px 40px; gap: .45rem; align-items: center; margin-bottom: .5rem; }
@media (max-width: 900px) { .rule-row { grid-template-columns: 1fr 1fr; } }

/* ─────────────────────────── التقويم ─────────────────────────── */

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.cal-head { text-align: center; font-size: .74rem; font-weight: 700; color: var(--c-text-soft); padding: .35rem 0; }
.cal-cell {
  min-height: 92px; border: 1px solid var(--c-border); border-radius: 10px;
  padding: .35rem; background: #fff; font-size: .74rem;
}
.cal-cell.other-month { background: var(--c-surface-2); opacity: .55; }
.cal-cell.today { border-color: var(--c-blue); box-shadow: inset 0 0 0 1px var(--c-blue); }
.cal-date { font-weight: 700; color: var(--c-blue-ink); font-size: .78rem; }
.cal-event {
  display: block; margin-top: .2rem; padding: .15rem .35rem; border-radius: 6px;
  background: rgba(78,138,184,.12); color: var(--c-blue-deep);
  font-size: .68rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-event.confirmed { background: rgba(103,169,143,.16); color: var(--c-green-deep); }
.cal-event.pending { background: rgba(201,168,106,.18); color: #8A6D2F; }

/* اختيار الموعد */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .5rem; }
.slot-btn {
  border: 1.5px solid var(--c-border); background: #fff; border-radius: 11px;
  padding: .55rem .3rem; font-size: .84rem; font-weight: 600; color: var(--c-blue-ink);
  transition: all .16s; text-align: center;
}
.slot-btn:hover:not(:disabled) { border-color: var(--c-blue); background: rgba(78,138,184,.05); }
.slot-btn.selected { background: var(--c-blue-deep); border-color: var(--c-blue-deep); color: #fff; }
.slot-btn:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

.day-strip { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .4rem; }
.day-btn {
  flex: 0 0 auto; min-width: 78px; text-align: center;
  border: 1.5px solid var(--c-border); background: #fff; border-radius: 13px;
  padding: .55rem .4rem;
}
.day-btn small { display: block; font-size: .7rem; color: var(--c-text-soft); }
.day-btn strong { display: block; font-size: 1.02rem; color: var(--c-blue-ink); }
.day-btn.selected { background: var(--c-blue-deep); border-color: var(--c-blue-deep); }
.day-btn.selected small, .day-btn.selected strong { color: #fff; }
.day-btn:disabled { opacity: .4; }

/* ─────────────────────────── متفرقات ─────────────────────────── */

.section-title { font-size: .82rem; font-weight: 700; color: var(--c-text-soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .6rem; }

.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--c-border-soft); font-size: .86rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list .k { color: var(--c-text-soft); }
.info-list .v { font-weight: 600; color: var(--c-blue-ink); text-align: end; }

.data-pill { display: inline-flex; align-items: center; gap: .3rem; background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: 999px; padding: .18rem .6rem; font-size: .76rem; }

.copy-field { display: flex; gap: .35rem; }
.copy-field input { font-family: ui-monospace, monospace; font-size: .8rem; direction: ltr; }

.zoom-join-card {
  background: linear-gradient(135deg, #2D8CFF, #1E6FD9);
  color: #fff; border-radius: 18px; padding: 1.2rem; box-shadow: var(--shadow);
}
.zoom-join-card .btn-light { color: #1E6FD9; font-weight: 700; }

.secret-set { color: var(--c-green-deep); font-size: .78rem; font-weight: 600; }
.secret-unset { color: #C0392B; font-size: .78rem; font-weight: 600; }

.loading-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.7);
  backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 2000;
}

.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: btnspin .7s linear infinite;
}
.btn-outline-primary.is-loading::after, .btn-light.is-loading::after { border-color: rgba(47,93,128,.3); border-top-color: var(--c-blue-deep); }
@keyframes btnspin { to { transform: rotate(360deg); } }

/* ─────────────────────────── صفحات المصادقة ─────────────────────────── */

.auth-body {
  min-height: 100vh;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #EAF3F9 0%, #F1EEF9 55%, #E7F3EE 100%);
  padding: 1.5rem 1rem;
}
.auth-wrap { width: 100%; max-width: 460px; }
.auth-brand { text-align: center; margin-bottom: 1.2rem; }
.auth-brand .brand-mark { margin: 0 auto .7rem; }
.auth-brand h1 { font-size: 1.2rem; margin-bottom: .15rem; }
.auth-brand p { font-size: .84rem; color: var(--c-text-soft); margin: 0; }
.auth-card {
  background: #fff; border-radius: 20px; padding: 1.6rem;
  box-shadow: var(--shadow); border: 1px solid var(--c-border-soft);
}
.auth-card-wide { max-width: none; }
.auth-wrap:has(.auth-card-wide) { max-width: 720px; }
.auth-card h2 { font-size: 1.08rem; margin-bottom: .3rem; }
.auth-card .lead-sm { font-size: .85rem; color: var(--c-text-soft); margin-bottom: 1.2rem; }
.auth-foot { text-align: center; margin-top: 1.1rem; font-size: .82rem; color: var(--c-text-soft); }

.pw-strength { height: 4px; border-radius: 999px; background: #E9F0F6; margin-top: .4rem; overflow: hidden; }
.pw-strength span { display: block; height: 100%; width: 0; transition: width .3s, background .3s; border-radius: 999px; }

/* ─────────────────────────── الاستجابة ─────────────────────────── */

@media (max-width: 991.98px) {
  .app-main { margin-inline-start: 0; }
  .app-sidebar { transform: translateX(100%); }        /* RTL: يخرج لليمين */
  .sidebar-open .app-sidebar { transform: translateX(0); }
  .app-topbar { padding-inline: 1rem; }
  .app-content { padding: 1rem; }
  .builder-layout { grid-template-columns: 1fr; }
  .builder-side { position: static; }
}

@media (max-width: 575.98px) {
  .stat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .stat-value { font-size: 1.3rem; }
  .topbar-heading h1 { font-size: 1rem; }
  .card-body { padding: .95rem; }
  .quiz-step { padding: 1.1rem; }
  .quiz-question-title { font-size: 1.02rem; }
  .cal-cell { min-height: 66px; }
  .type-picker { grid-template-columns: repeat(3, 1fr); }
}

/* ─────────────────────────── الطباعة ─────────────────────────── */

@media print {
  .app-sidebar, .app-topbar, .app-footer, .no-print, .btn { display: none !important; }
  .app-main { margin: 0; }
  .app-content { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  body { background: #fff; }
}

/* تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ─────────────── الملف المصنَّف (محاور التقييم) ─────────────── */

.domain-profile { display: flex; flex-direction: column; gap: .95rem; }

.domain-row {
  padding: .75rem .9rem;
  border: 1px solid var(--c-border);
  border-radius: 13px;
  background: #fff;
}
.domain-row.is-critical { border-color: rgba(192,57,43,.28); background: rgba(192,57,43,.03); }
.domain-row.is-urgent {
  border-color: #C0392B;
  box-shadow: 0 0 0 3px rgba(192,57,43,.12);
  background: rgba(192,57,43,.06);
}

.domain-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; flex-wrap: wrap; margin-bottom: .45rem;
}
.domain-name { font-weight: 600; font-size: .9rem; color: var(--c-blue-ink); display: inline-flex; align-items: center; gap: .35rem; }
.domain-row.is-critical .domain-name i { color: #C0392B; }
.domain-score { display: inline-flex; align-items: center; gap: .5rem; }
.domain-level { font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.domain-numbers { font-size: .82rem; font-weight: 700; color: var(--c-blue-ink); font-variant-numeric: tabular-nums; }

.domain-bar { height: 8px; border-radius: 999px; background: #EDF2F7; overflow: hidden; }
.domain-bar span { display: block; height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.22,.8,.32,1); }

.domain-desc { font-size: .83rem; color: var(--c-text); margin: .5rem 0 0; line-height: 1.75; }
.domain-rec  { font-size: .82rem; color: var(--c-green-deep); margin: .35rem 0 0; line-height: 1.75; }
.domain-rec i { margin-inline-end: .2rem; }

.domain-note {
  display: flex; gap: .45rem; align-items: flex-start;
  margin-top: .5rem; padding: .5rem .7rem;
  background: rgba(201,168,106,.12); border-radius: 9px;
  font-size: .8rem; color: #7A5F23; line-height: 1.7;
}
.domain-note i { margin-top: .2rem; }

/* ملخص أفقي مصغّر (بطاقات المرضى والجداول) */
.domain-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.domain-chip {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .72rem; font-weight: 600;
  padding: .15rem .55rem; border-radius: 999px;
  border: 1px solid transparent;
}

/* ─────────────── بوابة التقييم المبدئي ─────────────── */

.intake-wrap { max-width: 620px; margin: 0 auto; }

.intake-card {
  background: #fff;
  border: 1px solid var(--c-border-soft);
  border-radius: 20px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.intake-icon {
  width: 66px; height: 66px; margin: 0 auto 1rem;
  border-radius: 20px; display: grid; place-items: center;
  font-size: 1.7rem; color: #fff;
  background: linear-gradient(135deg, var(--c-blue), var(--c-green));
  box-shadow: 0 10px 26px rgba(47,93,128,.24);
}
.intake-icon.success { background: linear-gradient(135deg, var(--c-green), var(--c-green-deep)); }

.intake-card h2 { font-size: 1.18rem; margin-bottom: .4rem; }

.intake-meta {
  display: flex; flex-wrap: wrap; gap: .4rem;
  justify-content: center; margin: 1rem 0;
}

.intake-note {
  display: flex; gap: .5rem; align-items: flex-start;
  background: var(--c-surface-2); border: 1px solid var(--c-border-soft);
  border-radius: 12px; padding: .8rem .95rem;
  font-size: .85rem; line-height: 1.8; margin-bottom: 1rem;
}

.intake-points { list-style: none; padding: 0; margin: 0 0 1.3rem; }
.intake-points li {
  display: flex; gap: .55rem; align-items: flex-start;
  font-size: .85rem; color: var(--c-text); padding: .35rem 0;
}
.intake-points i { color: var(--c-green-deep); margin-top: .22rem; flex-shrink: 0; }

/* صندوق رسالة الطوارئ */
.crisis-box {
  border-radius: 16px; padding: 1.1rem 1.25rem;
  background: linear-gradient(135deg, #C0392B, #8E1F17);
  color: #fff; box-shadow: 0 10px 30px rgba(192,57,43,.28);
  line-height: 1.85; font-size: .88rem;
}
.crisis-box i { font-size: 1.4rem; flex-shrink: 0; }
.crisis-box strong { font-size: .96rem; }

/* شارة حالة التقييم المبدئي في الجداول */
.intake-badge { font-size: .72rem; font-weight: 600; padding: .18rem .55rem; border-radius: 7px; white-space: nowrap; }
.intake-badge.done    { background: rgba(103,169,143,.16); color: var(--c-green-deep); }
.intake-badge.pending { background: rgba(201,168,106,.18); color: #8A6D2F; }
.intake-badge.none    { background: #F0F4F8; color: #9AAAB8; }
.intake-badge.alert   { background: rgba(192,57,43,.14); color: #C0392B; }

@media (max-width: 575.98px) {
  .intake-card { padding: 1.2rem; border-radius: 16px; }
  .domain-head { gap: .4rem; }
  .domain-name { font-size: .85rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   طبقة ثيم الموقع التعريفي — نفس روح اللاندنج بيج داخل المنصة
   Alexandria للعناوين · أزرار حبّية بتدرج أزرق→أخضر · زوايا أرحب · خلفيات ناعمة
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --font-head: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --grad-main: linear-gradient(120deg, var(--c-blue) 0%, var(--c-green) 100%);
  --grad-deep: linear-gradient(170deg, #2F5D80 0%, #24546E 55%, #2E6B57 100%);
  --grad-soft: linear-gradient(140deg, #EAF3F9 0%, #F1EEF9 55%, #E7F3EE 100%);
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --bs-border-radius: 14px;
}

/* العناوين بخط الموقع */
h1, h2, h3, h4, h5, h6,
.topbar-heading h1, .card-header h2, .card-header h3,
.stat-value, .auth-brand h1, .focus-title,
.modal-title, .quiz-question-title {
  font-family: var(--font-head);
}

/* ─── الأزرار: حبّية بلمسة اللاندنج ─── */
.btn {
  border-radius: 999px;
  padding: .5rem 1.15rem;
  transition: transform .2s cubic-bezier(.22,.8,.32,1), box-shadow .25s, background .25s, color .25s;
}
.btn:active { transform: scale(.97); }
.btn-sm { border-radius: 999px; padding: .34rem .85rem; }
.btn-lg { border-radius: 999px; padding: .68rem 1.6rem; }
.btn-icon { border-radius: 999px; }

.btn-primary {
  background: var(--grad-main);
  border: none;
  box-shadow: 0 6px 20px rgba(78,138,184,.30);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--grad-main);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(78,138,184,.40);
}
.btn-primary:active { transform: scale(.97); }

.btn-outline-primary {
  border: 1.8px solid var(--c-blue);
  color: var(--c-blue-deep);
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(78,138,184,.28);
}

.btn-success { background: linear-gradient(120deg, var(--c-green), var(--c-green-deep)); border: none; }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(103,169,143,.35); }

.btn-light, .btn-outline-secondary { border-radius: 999px; }

/* ─── الشريط الجانبي: التدرج العميق نفسه ─── */
.app-sidebar { background: var(--grad-deep); }
.sidebar-nav .nav-link { border-radius: 999px; padding-inline: .85rem; }
.sidebar-nav .nav-link.active {
  background: var(--grad-main);
  box-shadow: 0 4px 14px rgba(78,138,184,.35);
  color: #fff;
}
.brand-mark { background: rgba(255,255,255,.10); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark.lg svg { width: 36px; height: 36px; }

/* ─── البطاقات والحاويات ─── */
.card { border-radius: var(--radius-lg); }
.card-header { border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important; }
.filter-bar { border-radius: var(--radius-lg); }
.badge { border-radius: 999px; padding: .35em .75em; }
.alert { border-radius: var(--radius); }
.modal-content { border-radius: var(--radius-lg); }
.dropdown-menu { border-radius: var(--radius); box-shadow: var(--shadow); border-color: var(--c-border-soft); }

/* ─── النماذج ─── */
.form-control, .form-select { border-radius: 12px; }
.input-group > .form-control:first-child, .input-group > .input-group-text:first-child { border-start-start-radius: 12px; border-end-start-radius: 12px; }
.input-group > .form-control:last-child, .input-group > .input-group-text:last-child, .input-group > .btn:last-child { border-start-end-radius: 12px; border-end-end-radius: 12px; }
.input-group > .btn { border-radius: 0; }

/* ─── صفحات المصادقة: مشهد اللاندنج ─── */
.auth-body {
  position: relative;
  background: var(--grad-soft);
  overflow: hidden;
}
.auth-body::before, .auth-body::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  pointer-events: none;
}
.auth-body::before { width: 380px; height: 380px; background: #BFD9EC; top: -110px; inset-inline-start: -70px; }
.auth-body::after  { width: 300px; height: 300px; background: #CBE7DB; bottom: -80px; inset-inline-end: -60px; }

.auth-wrap { position: relative; z-index: 1; }
.auth-brand .brand-mark {
  background: var(--grad-main);
  box-shadow: 0 10px 30px rgba(78,138,184,.35);
}
.auth-brand h1 { font-size: 1.35rem; }
.auth-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.6);
}

/* ─── الشريط العلوي ─── */
.app-topbar { backdrop-filter: blur(8px); }
.topbar-icon-btn, .topbar-toggle { border-radius: 999px; }

/* ─── بطاقات الإحصاءات ─── */
.stat-card { border-radius: var(--radius-lg); }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card { transition: transform .2s cubic-bezier(.22,.8,.32,1), box-shadow .25s; }

/* ─── شاشة التركيز (الاستبيان/الجلسة) ─── */
.focus-body { background: var(--grad-soft); }

/* ─── ترويسة صفحات الجداول ─── */
.page-eyebrow {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  color: var(--c-green-deep);
  background: rgba(103,169,143,.12);
  border-radius: 999px;
  padding: .25rem .75rem;
}

/* ─────────────────────────── دخول مقسوم: نموذج + سلايدر ─────────────────────────── */

.auth-split { display: block; padding: 0; overflow: hidden; }

.split-shell {
  display: flex;
  width: 100%;          /* صريح: يقاوم أي سياق يقلّصه لعرض المحتوى */
  min-height: 100vh;
}

/* ── نصف النموذج ── */
.split-form {
  flex: 0 0 44%;
  display: grid;
  place-items: center;
  background: #fff;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 60px rgba(34,56,74,.12);
}
.split-form-inner { width: 100%; max-width: 400px; }

.auth-split .auth-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.auth-split .auth-brand { text-align: right; margin-bottom: 1.6rem; }
.auth-split .auth-brand .brand-mark { margin: 0 0 .9rem; }
.auth-split .auth-foot { text-align: right; margin-top: 1.6rem; }

/* ── نصف السلايدر ── */
.split-hero {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--grad-deep);
  color: #EAF3F9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  padding: 3rem 2.5rem;
}

.split-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .35;
  pointer-events: none;
}
.split-blob-1 { width: 380px; height: 380px; background: #4E8AB8; top: -100px; inset-inline-start: -80px; }
.split-blob-2 { width: 320px; height: 320px; background: #67A98F; bottom: -90px; inset-inline-end: -70px; }

/* هالة التنفّس حول الشعار — إيقاع اللاندنج */
.split-halo {
  position: relative;
  width: 190px; height: 190px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.split-halo > span:not(.split-halo-mark) {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(234,243,249,.35);
  animation: splitBreath 4s ease-in-out infinite;
}
.split-halo > span:nth-child(2) { inset: 16%; border-color: rgba(143,212,184,.4); animation-delay: .6s; }
.split-halo > span:nth-child(3) { inset: 32%; border-color: rgba(191,227,242,.45); animation-delay: 1.2s; }
@keyframes splitBreath {
  0%, 100% { transform: scale(1);    opacity: .55; }
  50%      { transform: scale(1.08); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .split-halo > span:not(.split-halo-mark) { animation: none; }
}
.split-halo-mark {
  width: 86px; height: 86px;
  display: grid; place-items: center;
  border-radius: 26px;
  background: rgba(255,255,255,.10);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 18px 44px rgba(0,0,0,.28);
}
.split-halo-mark svg { width: 52px; height: 52px; }

/* الشرائح */
.split-slides {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: 190px;
}
.split-slide {
  position: absolute; inset: 0;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.split-slide.is-active { opacity: 1; transform: none; }
.split-slide h2 {
  font-family: var(--font-head);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: .7rem;
}
.split-slide h2 em {
  font-style: normal;
  background: linear-gradient(120deg, #8FD4B8, #BFE3F2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.split-slide p {
  color: rgba(234,243,249,.85);
  font-size: .95rem;
  line-height: 1.9;
  max-width: 42ch;
  margin: 0 auto;
}
.split-slide ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid; gap: .65rem;
  text-align: right;
  width: fit-content;
  margin-inline: auto;
}
.split-slide li {
  display: flex; align-items: center; gap: .6rem;
  color: rgba(234,243,249,.9);
  font-size: .93rem;
}
.split-slide li i { color: #8FD4B8; font-size: 1.05rem; }

/* النقاط */
.split-dots { display: flex; gap: .5rem; }
.split-dots button {
  width: 9px; height: 9px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(234,243,249,.35);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}
.split-dots button.is-active { width: 26px; background: #8FD4B8; }
.split-dots button:focus-visible { outline: 2px solid #8FD4B8; outline-offset: 3px; }

/* شاشات ضيقة: النموذج وحده، بخلفية الوضع الافتراضي */
@media (max-width: 991.98px) {
  .split-hero { display: none; }
  .split-form { flex: 1; background: transparent; box-shadow: none; }
  .auth-split { padding: 1.5rem 1rem; background: var(--grad-soft); }
  .auth-split .auth-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,.6);
    padding: 1.6rem;
  }
  .auth-split .auth-brand,
  .auth-split .auth-foot { text-align: center; }
  .auth-split .auth-brand .brand-mark { margin: 0 auto .7rem; }
}
