* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #0b1f3a;
  --navy-soft: #163258;
  --emerald: #065f46;
  --emerald-mid: #047857;
  --emerald-light: #ecfdf5;
  --gold: #b45309;
  --bg-surface: #f4f6f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --font-scale: 1;
}

body {
  font-family: "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 50% 20%, #1b2e4b 0%, #070d19 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px;
  color: var(--text);
  overflow-x: hidden;
}

.stage {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* =========================================================
   إطار الآيفون الواقعي (iPhone Bezel & Hardware)
========================================================= */
.iphone-frame {
  width: 100%;
  max-width: 418px;
  height: 856px;
  max-height: 95vh;
  background: #0b1322;
  border-radius: 52px;
  border: 11px solid #1e293b;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.72),
    0 0 0 2px #475569,
    inset 0 0 0 2px #0f172a;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.iphone-frame.senior-font {
  --font-scale: 1.13;
}

/* الأزرار الجانبية */
.hw-btn {
  position: absolute;
  background: #334155;
  border-radius: 4px;
  z-index: 60;
}
.hw-mute { right: -14px; top: 115px; width: 3px; height: 26px; }
.hw-vol-up { right: -14px; top: 160px; width: 3px; height: 48px; }
.hw-vol-down { right: -14px; top: 220px; width: 3px; height: 48px; }
.hw-power { left: -14px; top: 175px; width: 3px; height: 68px; cursor: pointer; }

/* الجزيرة التفاعلية Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 122px;
  height: 28px;
  background: #05080f;
  border-radius: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dynamic-island.expanded {
  width: 270px;
  height: 36px;
  background: #064e3b;
  box-shadow: 0 8px 20px rgba(6, 78, 59, 0.45);
}

.di-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.di-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1e293b;
  flex-shrink: 0;
}

.di-text {
  font-size: 11px;
  font-weight: 600;
  color: #ecfdf5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.di-pill {
  width: 28px;
  height: 5px;
  border-radius: 4px;
  background: #172033;
  flex-shrink: 0;
}

/* شريط الحالة */
.ios-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 26px 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  z-index: 40;
  position: relative;
}

.ios-statusbar.dark-text {
  color: #0f172a;
}

.sb-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sb-battery {
  width: 22px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 3.5px;
  padding: 1.5px;
}

.sb-battery-level {
  width: 82%;
  height: 100%;
  background: #10b981;
  border-radius: 1.5px;
}

/* =========================================================
   الشاشات الأساسية (قفل + رئيسية)
========================================================= */
.ios-screen {
  position: absolute;
  inset: 0;
  padding-top: 44px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
  transition: opacity 0.35s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.ios-screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* شاشة القفل */
.lock-screen {
  background: linear-gradient(165deg, #091526 0%, #102a4c 52%, #064e3b 100%);
  color: #ffffff;
  padding: 54px 20px 24px;
  justify-content: space-between;
  z-index: 25;
}

.lock-top {
  text-align: center;
}

.lock-padlock {
  font-size: 18px;
  margin-bottom: 4px;
}

.lock-date {
  font-size: 13px;
  color: #cbd5e1;
}

.lock-time {
  font-size: 64px;
  font-weight: 300;
  letter-spacing: -1px;
  line-height: 1.05;
  margin-top: 4px;
}

.lock-notifs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ios-notif {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.18s ease;
}

.ios-notif:active {
  transform: scale(0.98);
}

.notif-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin-bottom: 4px;
}

.notif-head time {
  margin-right: auto;
  font-size: 11px;
  color: #cbd5e1;
}

.notif-badge {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.sanad-mini-badge { background: #047857; color: #fff; }
.wa-mini-badge { background: #25d366; color: #fff; }

.notif-msg {
  font-size: 12.5px;
  color: #f1f5f9;
  line-height: 1.45;
}

.lock-bottom {
  text-align: center;
  cursor: pointer;
  padding-top: 8px;
}

.swipe-pill {
  width: 120px;
  height: 4px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 99px;
  margin: 0 auto 8px;
}

.lock-bottom span {
  font-size: 12px;
  color: #cbd5e1;
}

/* الشاشة الرئيسية للآيفون */
.home-screen {
  background: linear-gradient(160deg, #0d213d 0%, #16355c 48%, #0a2e2c 100%);
  color: #ffffff;
  justify-content: space-between;
  padding-bottom: 10px;
  z-index: 15;
}

.home-wallpaper-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%);
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.home-pages-track {
  flex: 1;
  display: flex;
  width: 200%;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  touch-action: pan-y;
}

.home-page {
  width: 50%;
  padding: 14px 20px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ويدجت سند الذكي في الشاشة الرئيسية */
.sanad-hero-widget {
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 16px;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease;
}

.sanad-hero-widget:active {
  transform: scale(0.98);
}

.w-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.w-tag {
  font-size: 11px;
  font-weight: 600;
  color: #a7f3d0;
  background: rgba(6, 95, 70, 0.55);
  padding: 3px 10px;
  border-radius: 99px;
}

.w-status {
  font-size: 11px;
  color: #6ee7b7;
  font-weight: 600;
}

.w-middle {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.w-middle small {
  display: block;
  font-size: 11px;
  color: #cbd5e1;
  margin-bottom: 2px;
}

.w-middle h2 {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
}

.w-capital {
  text-align: left;
}

.w-capital strong {
  font-size: 15px;
  color: #e2e8f0;
}

.w-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 9px;
  font-size: 11.5px;
  color: #cbd5e1;
}

/* أيقونة تطبيق سند الوحيدة في المنتصف */
.single-app-stage {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ios-app-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.hero-sanad-btn .ios-icon-box {
  width: 82px;
  height: 82px;
  border-radius: 22px;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-sanad-btn:hover .ios-icon-box {
  transform: scale(1.06);
}

.hero-sanad-btn:active .ios-icon-box {
  transform: scale(0.92);
}

.sanad-app-artwork {
  background: linear-gradient(145deg, #065f46 0%, #0b1f3a 100%);
  border: 1.5px solid rgba(110, 231, 183, 0.45);
  box-shadow: 0 16px 34px rgba(4, 120, 87, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sanad-emblem {
  text-align: center;
  color: #ffffff;
}

.emblem-letter {
  display: block;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.emblem-sub {
  display: block;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #6ee7b7;
  margin-top: 3px;
}

.ios-app-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.stage-hint {
  font-size: 12px;
  color: #94a3b8;
}

/* الصفحة الثانية */
.glass-summary-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 20px;
  margin: auto 0;
}

.glass-summary-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.glass-summary-card p {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 16px;
}

.mini-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.22);
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 14px;
}

.mini-kpi-row span {
  display: block;
  font-size: 11px;
  color: #94a3b8;
}

.mini-kpi-row strong {
  font-size: 13px;
  color: #6ee7b7;
}

.glass-cta {
  width: 100%;
  background: #047857;
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* نقاط الصفحات */
.page-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 10px;
}

.page-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.page-dots .dot.active {
  background: #ffffff;
  width: 18px;
  border-radius: 99px;
}

/* شريط التطبيقات السفلي Dock */
.ios-dock {
  margin: 0 18px 8px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  padding: 10px 18px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.dock-app {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.dock-app .ios-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  position: relative;
  transition: transform 0.18s ease;
}

.dock-app:active .ios-icon-box {
  transform: scale(0.9);
}

.notes-artwork {
  background: #ffffff;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.notes-top-strip {
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 13px;
  background: #f59e0b;
}

.wa-artwork {
  background: linear-gradient(145deg, #25d366, #128c7e);
  color: #fff;
}

.sms-artwork {
  background: linear-gradient(145deg, #34c759, #248a3d);
  color: #fff;
}

.badge-count {
  position: absolute;
  top: -5px;
  left: -5px;
  background: #ef4444;
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.dock-label {
  font-size: 10.5px;
  color: #f1f5f9;
  font-weight: 500;
}

.home-indicator-bar {
  width: 134px;
  height: 5px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 99px;
  margin: 2px auto 0;
  cursor: pointer;
}

/* =========================================================
   نوافذ التطبيقات (فتح سلس كأنه آيفون حقيقي)
========================================================= */
.app-window {
  position: absolute;
  inset: 0;
  padding-top: 42px;
  background: var(--bg-surface);
  z-index: 30;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.84) translateY(36px);
  border-radius: 42px;
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 0.42s ease;
}

.app-window.open {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  border-radius: 0;
}

.app-home-bar {
  width: 134px;
  height: 5px;
  background: #94a3b8;
  border-radius: 99px;
  margin: 6px auto 9px;
  cursor: pointer;
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

/* =========================================================
   تطبيق سند: شاشة تسجيل الدخول الناضجة
========================================================= */
.sanad-window {
  background: #f8fafc;
}

.sanad-login-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 20px 14px;
}

.login-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ios-back-pill {
  background: #e2e8f0;
  border: none;
  padding: 6px 12px;
  border-radius: 99px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}

.cma-mini-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald);
  background: var(--emerald-light);
  padding: 4px 10px;
  border-radius: 99px;
}

.login-hero {
  text-align: center;
  margin-top: 8px;
}

.sanad-mature-logo {
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--navy) 0%, var(--emerald) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(11, 31, 58, 0.22);
}

.login-hero h2 {
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 6px;
}

.login-hero p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.login-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 7px;
}

.password-field-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: 13px;
  padding: 0 10px;
  margin-bottom: 13px;
  background: #f8fafc;
}

.mature-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 4px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
}

.toggle-pass-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.mature-primary-btn {
  width: 100%;
  background: var(--navy);
  color: #ffffff;
  border: none;
  padding: 13px;
  border-radius: 13px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mature-primary-btn:hover {
  background: var(--navy-soft);
}

.login-divider {
  text-align: center;
  margin: 14px 0;
  position: relative;
}

.login-divider::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 1px;
  background: var(--border);
}

.login-divider span {
  position: relative;
  background: #ffffff;
  padding: 0 10px;
  font-size: 11.5px;
  color: var(--muted);
}

.faceid-btn {
  width: 100%;
  background: var(--emerald-light);
  border: 1.5px solid #a7f3d0;
  border-radius: 14px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease;
}

.faceid-btn:active {
  transform: scale(0.98);
}

.faceid-icon {
  font-size: 26px;
}

.faceid-btn strong {
  display: block;
  font-size: 13.5px;
  color: var(--emerald);
}

.faceid-btn small {
  font-size: 11px;
  color: #065f46;
}

.login-footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

/* =========================================================
   تطبيق سند: الشاشة الرئيسية بعد الدخول + القائمة الجانبية اليمنى
========================================================= */
.sanad-main-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.sanad-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-trigger-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}

.topbar-center {
  text-align: center;
}

.topbar-center strong {
  display: block;
  font-size: 15px;
  color: var(--navy);
}

.topbar-center span {
  font-size: 11px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  gap: 5px;
}

.mini-util-btn {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}

.mini-util-btn.active {
  background: var(--navy);
  color: #ffffff;
}

.sanad-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ملخص الوضع الحالي بالأعلى */
.current-status-summary {
  background: linear-gradient(135deg, var(--navy) 0%, #133661 65%, #064e3b 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 12px 26px rgba(11, 31, 58, 0.18);
}

.css-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.css-eyebrow {
  font-size: calc(11px * var(--font-scale));
  color: #93c5fd;
  font-weight: 600;
}

.css-header h3 {
  font-size: calc(15px * var(--font-scale));
  font-weight: 600;
  margin-top: 2px;
}

.css-pill {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(110, 231, 183, 0.4);
  color: #a7f3d0;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
}

.css-main-number {
  margin: 10px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.css-main-number strong {
  font-size: calc(32px * var(--font-scale));
  font-weight: 700;
}

.css-main-number span {
  font-size: calc(13px * var(--font-scale));
  color: #6ee7b7;
}

.css-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
  border-radius: 13px;
}

.css-metric span {
  display: block;
  font-size: 10px;
  color: #cbd5e1;
  margin-bottom: 2px;
}

.css-metric strong {
  font-size: calc(12px * var(--font-scale));
}

.text-emerald {
  color: #6ee7b7;
}

/* الصفحات الفرعية داخل تطبيق سند */
.sanad-subpage {
  display: none;
  flex-direction: column;
  gap: 11px;
}

.sanad-subpage.active {
  display: flex;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-heading-row h4 {
  font-size: calc(14.5px * var(--font-scale));
  color: var(--navy);
}

.link-action-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--emerald-mid);
  cursor: pointer;
}

.mature-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.mature-card h4,
.mature-card h5 {
  font-size: calc(14px * var(--font-scale));
  color: var(--navy);
  margin-bottom: 6px;
}

.mature-card p {
  font-size: calc(12px * var(--font-scale));
  color: var(--muted);
  line-height: 1.55;
}

/* شريط التوزيع */
.mature-alloc-bar {
  display: flex;
  height: 26px;
  border-radius: 9px;
  overflow: hidden;
  margin: 12px 0;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}

.m-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease;
}

.seg-sukuk { background: #065f46; }
.seg-re { background: #0b1f3a; }
.seg-liq { background: #b45309; }

.plan-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid #f1f5f9;
}

.pr-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.dot-ind {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.dot-sukuk { background: #065f46; }
.dot-re { background: #0b1f3a; }
.dot-liq { background: #b45309; }

.pr-info strong {
  display: block;
  font-size: calc(12.5px * var(--font-scale));
  color: var(--text);
}

.pr-info small {
  font-size: calc(11px * var(--font-scale));
  color: var(--muted);
}

.pr-val {
  text-align: left;
  flex-shrink: 0;
}

.pr-val strong {
  display: block;
  font-size: calc(12.5px * var(--font-scale));
  color: var(--navy);
}

.pr-val small {
  font-size: 11px;
  color: var(--emerald-mid);
  font-weight: 700;
}

.info-kv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 10px;
}

.info-kv-list div {
  display: flex;
  justify-content: space-between;
  font-size: calc(12px * var(--font-scale));
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.info-kv-list span {
  color: var(--muted);
}

.info-kv-list .text-emerald {
  color: var(--emerald-mid);
}

.disclaimer-note {
  background: #f8fafc;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 11px !important;
  color: var(--muted);
}

/* التصحيح التلقائي بالمستشار الآلي */
.robo-status-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.robo-badge {
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}

.robo-badge.balanced {
  background: #d1fae5;
  color: #065f46;
}

.switch-control {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--navy);
}

.drift-comparison {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  margin: 11px 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.drift-row {
  display: flex;
  justify-content: space-between;
  font-size: calc(12px * var(--font-scale));
}

.log-list {
  padding-right: 16px;
  font-size: calc(11.5px * var(--font-scale));
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* المسارات الاستثمارية */
.path-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  margin-bottom: 6px;
}

.pill-emerald { background: #d1fae5; color: #065f46; }
.pill-navy { background: #dbeafe; color: #1e3a8a; }

.guarantee-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #065f46;
  padding: 9px 11px;
  border-radius: 11px;
  font-size: calc(11.5px * var(--font-scale));
  line-height: 1.5;
  margin: 9px 0;
}

.weight-adjust-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
}

.weight-adjust-row button {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px 10px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* الحاسبة */
.persona-switch-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.p-chip {
  flex: 1;
  padding: 7px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.p-chip.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.calc-control {
  margin-bottom: 12px;
}

.cc-top {
  display: flex;
  justify-content: space-between;
  font-size: calc(12px * var(--font-scale));
  margin-bottom: 5px;
}

.cc-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-bar button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.cc-bar input[type="range"] {
  flex: 1;
  accent-color: var(--emerald-mid);
}

.calc-result-banner {
  background: var(--emerald-light);
  border: 1px solid #a7f3d0;
  border-radius: 11px;
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--emerald);
}

/* مسار المستقبل */
.masar-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 9px 0 11px;
}

.m-opt {
  text-align: right;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 9px 12px;
  border-radius: 11px;
  font-family: inherit;
  font-size: calc(12px * var(--font-scale));
  font-weight: 600;
  cursor: pointer;
}

.m-opt.active {
  background: var(--emerald-light);
  border-color: var(--emerald-mid);
  color: var(--emerald);
}

.masar-outcome {
  background: var(--navy);
  color: #ffffff;
  padding: 12px;
  border-radius: 13px;
}

.masar-outcome strong {
  display: block;
  font-size: calc(13px * var(--font-scale));
  color: #6ee7b7;
  margin-bottom: 4px;
}

.masar-outcome p {
  color: #e2e8f0;
}

/* الأمان والتحكم */
.safety-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0 12px;
}

.safety-toggles label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  padding: 9px 11px;
  border-radius: 11px;
  font-size: calc(12px * var(--font-scale));
}

.plan-control-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mature-secondary-btn {
  width: 100%;
  background: var(--emerald-mid);
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.mature-outline-btn {
  width: 100%;
  background: #ffffff;
  color: var(--navy);
  border: 1.5px solid var(--navy);
  padding: 11px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================================
   القائمة الجانبية اليمنى (Right-Side Drawer)
========================================================= */
.side-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 35;
}

.side-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.side-drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 82%;
  max-width: 310px;
  background: #ffffff;
  box-shadow: -12px 0 32px rgba(15, 23, 42, 0.18);
  transform: translateX(105%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
}

.side-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.drawer-header strong {
  display: block;
  font-size: 15px;
  color: var(--navy);
}

.drawer-header small {
  font-size: 11px;
  color: var(--muted);
}

.drawer-close {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #f8fafc;
  cursor: pointer;
}

.drawer-nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
}

.drawer-item {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.drawer-item span {
  font-size: 20px;
}

.drawer-item strong {
  display: block;
  font-size: 12.5px;
  color: var(--navy);
}

.drawer-item small {
  font-size: 10.5px;
  color: var(--muted);
}

.drawer-item.active {
  background: var(--emerald-light);
  border-color: #a7f3d0;
}

.drawer-item.active strong {
  color: var(--emerald);
}

.drawer-footer {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.drawer-logout-btn {
  width: 100%;
  padding: 10px;
  border-radius: 11px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================================
   تطبيق الملاحظات (iOS Notes)
========================================================= */
.util-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.util-back {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #d97706;
  cursor: pointer;
}

.util-action {
  background: #fef3c7;
  border: none;
  padding: 5px 10px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #b45309;
  cursor: pointer;
}

.notes-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fffbeb;
}

.notes-list-bar {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  background: #fef3c7;
  border-bottom: 1px solid #fde68a;
}

.note-tab-chip {
  background: #ffffff;
  border: 1px solid #fcd34d;
  border-radius: 9px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.note-tab-chip.active {
  background: #d97706;
  color: #ffffff;
  border-color: #d97706;
}

.note-editor-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.note-title-input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  margin-bottom: 4px;
}

.note-timestamp {
  font-size: 11px;
  color: #92400e;
  margin-bottom: 10px;
}

.note-body-textarea {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.75;
  color: #1e293b;
  resize: none;
  outline: none;
}

/* =========================================================
   تطبيق واتساب (WhatsApp)
========================================================= */
.wa-window {
  background: #efeae2;
}

.wa-list-view,
.wa-thread-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wa-header {
  background: #075e54;
  color: #ffffff;
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.white-back {
  color: #ffffff;
}

.wa-status-dot {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.16);
  padding: 3px 9px;
  border-radius: 99px;
}

.wa-chats-container {
  flex: 1;
  background: #ffffff;
  overflow-y: auto;
}

.wa-chat-row {
  width: 100%;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: right;
  font-family: inherit;
  cursor: pointer;
}

.wa-chat-row:hover {
  background: #f8fafc;
}

.wa-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.av-abyan { background: linear-gradient(135deg, #065f46, #0b1f3a); font-size: 13px; }
.av-faisal { background: #2563eb; font-size: 17px; }
.av-umm { background: #7c3aed; font-size: 15px; }

.wa-chat-meta {
  flex: 1;
  min-width: 0;
}

.wa-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.wa-row-top strong {
  font-size: 13.5px;
  color: #0f172a;
}

.verified-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  font-size: 10px;
}

.wa-row-top time {
  font-size: 11px;
  color: #64748b;
}

.wa-chat-meta p {
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-thread-title {
  text-align: center;
}

.wa-thread-title strong {
  display: block;
  font-size: 14px;
}

.wa-thread-title small {
  font-size: 10.5px;
  color: #a7f3d0;
}

.wa-messages-feed {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wa-bubble {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wa-bubble.in {
  background: #ffffff;
  align-self: flex-start;
  border-top-right-radius: 4px;
}

.wa-bubble.out {
  background: #d9fdd3;
  align-self: flex-end;
  border-top-left-radius: 4px;
}

.wa-bubble time {
  display: block;
  font-size: 10px;
  color: #64748b;
  text-align: left;
  margin-top: 3px;
}

.wa-quick-replies {
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  overflow-x: auto;
  background: #f0f2f5;
}

.wa-qr-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 99px;
  padding: 5px 11px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: #075e54;
  white-space: nowrap;
  cursor: pointer;
}

.wa-composer {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  background: #f0f2f5;
}

.wa-composer input {
  flex: 1;
  border: none;
  border-radius: 99px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.wa-composer button {
  background: #075e54;
  color: #ffffff;
  border: none;
  border-radius: 99px;
  padding: 0 15px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================================================
   تطبيق الرسائل النصية (SMS)
========================================================= */
.sms-header .util-back {
  color: #2563eb;
}

.sms-count-pill {
  font-size: 11px;
  background: #dbeafe;
  color: #1e40af;
  padding: 3px 9px;
  border-radius: 99px;
  font-weight: 600;
}

.sms-sender-banner {
  background: #ffffff;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sms-sender-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sms-sender-banner strong {
  display: block;
  font-size: 13.5px;
  color: var(--navy);
}

.sms-sender-banner small {
  font-size: 11px;
  color: var(--muted);
}

.sms-feed {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
}

.sms-card {
  background: #e9e9eb;
  color: #0f172a;
  padding: 11px 14px;
  border-radius: 18px;
  border-bottom-right-radius: 5px;
  font-size: 12.5px;
  line-height: 1.55;
  max-width: 90%;
}

.sms-card time {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-top: 5px;
}

/* إشعار عائم Toast */
.ios-toast {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 70;
  white-space: nowrap;
}

.ios-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
