/* ==========================================================================
   SANAD | سند — Mature Private-Wealth & iOS Experience Stylesheet
   ========================================================================== */

:root {
  --navy-950: #071324;
  --navy-900: #0b1f3a;
  --navy-800: #132d52;
  --emerald-800: #064e3b;
  --emerald-700: #047857;
  --emerald-600: #059669;
  --emerald-50: #ecfdf5;
  --gold-700: #b45309;
  --gold-600: #d97706;
  --gold-50: #fffbeb;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --danger-700: #b91c1c;
  --danger-50: #fef2f2;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --font-main: 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
  --scale: 1;
}

[data-large-text="true"] {
  --scale: 1.14;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background: radial-gradient(circle at 20% 15%, #dce6f2 0%, #cfdbe9 45%, #c4d1e2 100%);
  color: var(--slate-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  padding: 12px;
  font-size: calc(14px * var(--scale));
  line-height: 1.55;
}

.num {
  font-variant-numeric: tabular-nums;
  direction: ltr;
  display: inline-block;
}

/* Studio Top Utility Bar (Discreet, Sanad-Only) */
.studio-bar {
  width: 100%;
  max-width: 500px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(11, 31, 58, 0.06);
  font-size: 12px;
  color: var(--navy-900);
}

.studio-bar-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.studio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-700);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.18);
}

.studio-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.studio-btn {
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--navy-900);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.studio-btn:hover {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.studio-btn.active {
  background: var(--emerald-700);
  color: var(--white);
  border-color: var(--emerald-700);
}

/* ==========================================================================
   iPhone 16 Pro Max Hardware Chassis
   ========================================================================== */
.iphone-frame {
  position: relative;
  width: 472px;
  max-width: 97vw;
  height: 880px;
  max-height: 90vh;
  background: #141923;
  border-radius: 54px;
  padding: 12px;
  box-shadow:
    0 30px 70px -15px rgba(7, 19, 36, 0.38),
    0 0 0 2px #364152,
    0 0 0 5px #1e2634,
    inset 0 0 12px rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  user-select: none;
}

/* Side Hardware Buttons */
.iphone-frame::before {
  content: '';
  position: absolute;
  right: -7px;
  top: 185px;
  width: 4px;
  height: 82px;
  background: #2c3545;
  border-radius: 0 4px 4px 0;
}

.iphone-frame::after {
  content: '';
  position: absolute;
  left: -7px;
  top: 155px;
  width: 4px;
  height: 115px;
  background: #2c3545;
  border-radius: 4px 0 0 4px;
}

.iphone-screen {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  background: var(--slate-50);
  border-radius: 43px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Dynamic Island & iOS Status Bar */
.ios-statusbar {
  position: relative;
  z-index: 40;
  height: 44px;
  padding: 10px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  direction: ltr;
  flex-shrink: 0;
  transition: color 0.3s ease, background 0.3s ease;
}

.ios-statusbar.light-text {
  color: var(--white);
}

.ios-statusbar.dark-text {
  color: var(--slate-900);
  background: var(--white);
}

.dynamic-island {
  position: absolute;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  width: 116px;
  height: 30px;
  background: #05070b;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.dynamic-island-lens {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a4365 0%, #090d16 70%);
  border: 1px solid #1e293b;
}

.ios-status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* iOS Home Indicator Bar */
.ios-home-bar-wrap {
  position: relative;
  z-index: 40;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  background: transparent;
}

.ios-home-bar-wrap.white-bg {
  background: var(--white);
}

.ios-home-bar {
  width: 134px;
  height: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.28);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ios-home-bar.light {
  background: rgba(255, 255, 255, 0.55);
}

.ios-home-bar-wrap:hover .ios-home-bar {
  transform: scaleX(1.06);
}

/* ==========================================================================
   SCREEN 1: iPhone Home Screen (Only Sanad App Icon)
   ========================================================================== */
.ios-homescreen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 24px 14px;
  background:
    radial-gradient(circle at 80% 18%, rgba(4, 120, 87, 0.42) 0%, transparent 48%),
    radial-gradient(circle at 18% 72%, rgba(180, 83, 9, 0.24) 0%, transparent 45%),
    linear-gradient(165deg, #071324 0%, #0f294a 52%, #0a1c36 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
  transition: opacity 0.35s ease;
}

.ios-clock-widget {
  text-align: center;
  margin-top: 12px;
}

.ios-date-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 0.2px;
}

.ios-time-big {
  font-size: 68px;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.78) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ios-app-center-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto 0;
  gap: 14px;
}

.sanad-icon-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  outline: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.sanad-icon-btn:active {
  transform: scale(0.94);
}

.sanad-app-squircle {
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 21px;
  background: linear-gradient(145deg, #0d2b4e 0%, #064e3b 100%);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.22),
    inset 0 2px 4px rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sanad-app-squircle::after {
  content: '';
  position: absolute;
  top: -35%;
  left: -20%;
  width: 140%;
  height: 70%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(-12deg);
  pointer-events: none;
}

.sanad-pulse-ring {
  position: absolute;
  inset: -8px;
  border-radius: 27px;
  border: 1.5px solid rgba(52, 211, 153, 0.45);
  animation: pulseRing 2.4s infinite cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

@keyframes pulseRing {
  0% { transform: scale(0.96); opacity: 0.85; }
  70% { transform: scale(1.13); opacity: 0; }
  100% { transform: scale(1.13); opacity: 0; }
}

.sanad-icon-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.ios-tap-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ios-page-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.ios-page-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.ios-page-dots span.active {
  background: var(--white);
}

.ios-empty-dock {
  height: 78px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

/* Smooth iOS App Open Spring Transition */
.app-launch-overlay {
  position: absolute;
  inset: 0;
  z-index: 35;
  background: linear-gradient(155deg, #0b1f3a 0%, #064e3b 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--white);
  animation: iosSpringOpen 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes iosSpringOpen {
  0% {
    opacity: 0.3;
    transform: scale(0.22);
    border-radius: 90px;
  }
  100% {
    opacity: 1;
    transform: scale(1);
    border-radius: 0;
  }
}

.screen-fade-in {
  animation: screenSlideUp 0.36s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes screenSlideUp {
  0% { opacity: 0; transform: translateY(12px) scale(0.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   SCREEN 2: Login & Welcome Screen
   ========================================================================== */
.login-screen {
  flex: 1;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
  padding: 18px 22px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.login-brand-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 6px;
}

.login-logo-mark {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(145deg, #0b1f3a 0%, #047857 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(11, 31, 58, 0.18);
  margin-bottom: 10px;
}

.login-brand-title {
  font-size: calc(22px * var(--scale));
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: -0.3px;
}

.login-brand-sub {
  font-size: calc(12px * var(--scale));
  color: var(--slate-500);
  margin-top: 2px;
}

.login-welcome-box {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  margin: 12px 0;
}

.login-welcome-title {
  font-size: calc(16px * var(--scale));
  font-weight: 700;
  color: var(--navy-900);
}

.login-welcome-desc {
  font-size: calc(12px * var(--scale));
  color: var(--slate-500);
  margin-top: 3px;
}

.profile-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 12px 0 14px;
}

.profile-pill {
  padding: 8px 6px;
  border-radius: 12px;
  border: 1.5px solid var(--slate-200);
  background: var(--slate-50);
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.profile-pill.active {
  border-color: var(--emerald-700);
  background: var(--emerald-50);
  color: var(--emerald-800);
}

.profile-pill-name {
  font-size: calc(12px * var(--scale));
  font-weight: 700;
  display: block;
}

.profile-pill-role {
  font-size: 10px;
  color: var(--slate-500);
  display: block;
  margin-top: 1px;
}

.input-group {
  margin-bottom: 12px;
}

.input-label {
  display: block;
  font-size: calc(12px * var(--scale));
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 5px;
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  border-radius: 12px;
  border: 1.5px solid var(--slate-200);
  background: var(--slate-50);
  font-family: inherit;
  font-size: calc(14px * var(--scale));
  color: var(--slate-900);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.password-input:focus {
  outline: none;
  border-color: var(--navy-900);
  background: var(--white);
}

.eye-btn {
  position: absolute;
  left: 10px;
  background: none;
  border: none;
  color: var(--slate-500);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.btn-primary-sanad {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 13px;
  background: linear-gradient(135deg, #0b1f3a 0%, #047857 100%);
  color: var(--white);
  font-family: inherit;
  font-size: calc(14px * var(--scale));
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(4, 120, 87, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary-sanad:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(4, 120, 87, 0.28);
}

.btn-faceid {
  width: 100%;
  height: 44px;
  margin-top: 9px;
  border-radius: 13px;
  border: 1.5px solid var(--slate-200);
  background: var(--white);
  color: var(--navy-900);
  font-family: inherit;
  font-size: calc(13px * var(--scale));
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-faceid:hover {
  border-color: var(--emerald-700);
  background: var(--emerald-50);
  color: var(--emerald-800);
}

.login-footer-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--slate-500);
  padding-top: 6px;
}

/* Face ID Modal Overlay */
.faceid-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(7, 19, 36, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.faceid-card {
  width: 210px;
  padding: 24px 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  text-align: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
}

.faceid-ring {
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  border-radius: 20px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--emerald-600);
  animation: pulseFace 1s infinite alternate;
}

@keyframes pulseFace {
  from { transform: scale(0.95); }
  to { transform: scale(1.04); }
}

/* ==========================================================================
   SCREEN 3: Main Sanad App Shell (Top Header + Right Sidebar + Scroll Content)
   ========================================================================== */
.app-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--slate-50);
  overflow: hidden;
}

.app-topbar {
  height: 50px;
  padding: 0 14px;
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.app-topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-mini-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0b1f3a, #047857);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.app-topbar-title {
  font-size: calc(14px * var(--scale));
  font-weight: 700;
  color: var(--navy-900);
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-chip-btn {
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--navy-900);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lock-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lock-icon-btn:hover {
  background: var(--danger-50);
  color: var(--danger-700);
  border-color: #fecaca;
}

/* Body with Right-Side Navigation Menu */
.app-body-split {
  flex: 1;
  display: flex;
  flex-direction: row; /* In RTL, first child is on the RIGHT! */
  overflow: hidden;
  position: relative;
}

/* Right-Side Navigation Menu */
.right-nav-rail {
  width: 78px;
  background: var(--white);
  border-left: 1px solid var(--slate-200);
  display: flex;
  flex-direction: column;
  padding: 8px 5px;
  gap: 4px;
  flex-shrink: 0;
  overflow-y: auto;
  transition: width 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 20;
}

.right-nav-rail.expanded {
  width: 176px;
  padding: 8px 8px;
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.08);
}

.nav-expand-btn {
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--slate-700);
  border-radius: 10px;
  padding: 6px;
  margin-bottom: 4px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-rail-item {
  border: none;
  background: transparent;
  border-radius: 12px;
  padding: 8px 4px;
  cursor: pointer;
  font-family: inherit;
  color: var(--slate-500);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  transition: all 0.18s ease;
  position: relative;
}

.right-nav-rail.expanded .nav-rail-item {
  flex-direction: row;
  justify-content: flex-start;
  text-align: right;
  padding: 9px 10px;
  gap: 9px;
}

.nav-rail-item:hover {
  background: var(--slate-100);
  color: var(--navy-900);
}

.nav-rail-item.active {
  background: var(--emerald-50);
  color: var(--emerald-800);
  font-weight: 700;
}

.nav-rail-item.active::before {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 3.5px;
  border-radius: 4px 0 0 4px;
  background: var(--emerald-700);
}

.nav-rail-text {
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 600;
}

.right-nav-rail.expanded .nav-rail-text {
  font-size: 12px;
}

/* Main Scrollable Content Area */
.main-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.main-viewport::-webkit-scrollbar,
.right-nav-rail::-webkit-scrollbar {
  width: 4px;
}

.main-viewport::-webkit-scrollbar-thumb,
.right-nav-rail::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

/* ==========================================================================
   Reusable Cards, Badges, Sliders & Controls
   ========================================================================== */
.hero-summary-card {
  background: linear-gradient(140deg, #0b1f3a 0%, #102a4c 55%, #064e3b 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 15px;
  box-shadow: 0 12px 28px rgba(11, 31, 58, 0.16);
  position: relative;
  overflow: hidden;
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.hero-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.28);
}

.hero-main-label {
  font-size: calc(11.5px * var(--scale));
  color: rgba(255, 255, 255, 0.78);
  margin-top: 10px;
}

.hero-main-value {
  font-size: calc(25px * var(--scale));
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hero-main-unit {
  font-size: 12px;
  font-weight: 400;
  color: #a7f3d0;
}

.hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-metric-box {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  padding: 7px 8px;
}

.hero-metric-lbl {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.74);
}

.hero-metric-val {
  font-size: calc(12.5px * var(--scale));
  font-weight: 700;
  margin-top: 2px;
}

.card-box {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  padding: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.025);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-title {
  font-size: calc(13.5px * var(--scale));
  font-weight: 700;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-sub {
  font-size: calc(11.5px * var(--scale));
  color: var(--slate-500);
  margin-bottom: 10px;
}

/* Two-Fund Allocation Stacked Bar */
.split-bar-track {
  height: 11px;
  width: 100%;
  background: var(--slate-100);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  margin: 8px 0;
}

.split-bar-sukuk {
  background: linear-gradient(90deg, #0b1f3a, #1d4ed8);
  height: 100%;
  transition: width 0.25s ease;
}

.split-bar-re {
  background: linear-gradient(90deg, #047857, #10b981);
  height: 100%;
  transition: width 0.25s ease;
}

.two-funds-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.fund-mini-pill {
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
}

.fund-mini-pill.sukuk {
  border-right: 3.5px solid #1d4ed8;
}

.fund-mini-pill.realestate {
  border-right: 3.5px solid var(--emerald-700);
}

/* Custom Range Sliders */
.slider-field {
  margin-bottom: 11px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: calc(12px * var(--scale));
  margin-bottom: 4px;
}

.slider-label-row span:first-child {
  color: var(--slate-700);
  font-weight: 600;
}

.slider-val-badge {
  font-weight: 700;
  color: var(--navy-900);
  background: var(--slate-100);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--slate-200);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--navy-900);
  border: 2.5px solid var(--white);
  box-shadow: 0 2px 6px rgba(11, 31, 58, 0.35);
  cursor: pointer;
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}

/* Quick Preset Chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  color: var(--slate-700);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.chip-btn:hover {
  border-color: var(--emerald-700);
  color: var(--emerald-800);
}

.chip-btn.active {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}

.chip-btn.emerald-solid {
  background: var(--emerald-700);
  color: var(--white);
  border-color: var(--emerald-700);
}

/* Status & Alert Boxes */
.status-banner {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: calc(11.5px * var(--scale));
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

.status-banner.ok {
  background: var(--emerald-50);
  color: var(--emerald-800);
  border: 1px solid #a7f3d0;
}

.status-banner.warn {
  background: var(--gold-50);
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-banner.danger {
  background: var(--danger-50);
  color: var(--danger-700);
  border: 1px solid #fecaca;
}

/* Toggle Switch Row */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--slate-100);
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-info-title {
  font-size: calc(12.5px * var(--scale));
  font-weight: 700;
  color: var(--slate-900);
}

.toggle-info-sub {
  font-size: 11px;
  color: var(--slate-500);
}

.ios-switch {
  position: relative;
  width: 44px;
  height: 25px;
  border-radius: 999px;
  background: var(--slate-300, #cbd5e1);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.22s ease;
}

.ios-switch.on {
  background: var(--emerald-600);
}

.ios-switch::after {
  content: '';
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.ios-switch.on::after {
  transform: translateX(19px);
}

/* SMS / WhatsApp Notification Mockup */
.sms-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--slate-200);
}

.sms-header {
  background: #075e54;
  color: var(--white);
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sms-body {
  background: #efeae2;
  padding: 10px;
}

.sms-bubble {
  background: var(--white);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: calc(11.5px * var(--scale));
  color: #111b21;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  line-height: 1.5;
}

/* Holding Item Rows inside Funds */
.holding-item {
  padding: 9px 10px;
  border-radius: 11px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  margin-bottom: 7px;
  font-size: 11.5px;
}

.holding-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  color: var(--navy-900);
}

.holding-meta {
  display: flex;
  justify-content: space-between;
  color: var(--slate-500);
  font-size: 10.5px;
  margin-top: 3px;
}

/* Voice Assistant Wave */
.voice-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 26px;
}

.voice-wave span {
  width: 4px;
  height: 10px;
  border-radius: 999px;
  background: var(--emerald-600);
  animation: waveBar 0.8s infinite ease-in-out alternate;
}

.voice-wave span:nth-child(2) { animation-delay: 0.15s; height: 18px; }
.voice-wave span:nth-child(3) { animation-delay: 0.3s; height: 24px; }
.voice-wave span:nth-child(4) { animation-delay: 0.45s; height: 16px; }
.voice-wave span:nth-child(5) { animation-delay: 0.6s; height: 11px; }

@keyframes waveBar {
  from { transform: scaleY(0.45); }
  to { transform: scaleY(1.15); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========================================================================== 
   SANAD v2 — iPhone-first presentation and compact right-side navigation
   ========================================================================== */
html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
}

html {
  height: 100%;
  background: #071324;
}

body {
  height: 100dvh;
  min-height: 100dvh;
  padding: 18px;
  overflow: hidden;
  justify-content: center;
  align-items: center;
}

#app-root {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.iphone-frame {
  width: 430px;
  height: min(920px, calc(100dvh - 36px));
  max-width: calc(100vw - 36px);
  max-height: none;
  min-height: 0;
  padding: 10px;
  border-radius: 50px;
  flex: 0 1 auto;
}

.iphone-screen {
  min-height: 0;
  border-radius: 41px;
  isolation: isolate;
}

.ios-statusbar {
  height: calc(44px + env(safe-area-inset-top, 0px));
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
}

.ios-home-bar-wrap {
  height: calc(25px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Keep the simulated phone app as the only visible product surface. */
.studio-bar {
  display: none !important;
}

.app-shell {
  min-height: 0;
  min-width: 0;
}

.app-topbar {
  height: 56px;
  padding-inline: 13px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.025);
}

.app-topbar-title {
  font-size: calc(14px * var(--scale));
}

.app-body-split {
  min-height: 0;
  min-width: 0;
}

.right-nav-rail {
  position: relative;
  width: 66px;
  padding: 9px 4px;
  gap: 5px;
  overflow-x: hidden;
  border-left-color: #edf1f5;
  box-shadow: 1px 0 0 rgba(15, 23, 42, 0.015);
}

.right-nav-rail.expanded {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(198px, 72%);
  padding: 10px 9px;
  overflow-y: auto;
  border-left: 1px solid var(--slate-200);
  border-radius: 0 0 0 16px;
  box-shadow: -12px 6px 28px rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(18px);
}

.nav-expand-btn {
  min-height: 37px;
  padding: 7px 4px;
  gap: 4px;
  border-radius: 11px;
  font-size: 9.5px;
  white-space: nowrap;
}

.nav-rail-item {
  min-height: 55px;
  padding: 7px 2px;
  border-radius: 11px;
  gap: 4px;
}

.nav-rail-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.nav-rail-text {
  width: 100%;
  font-size: 9px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.right-nav-rail.expanded .nav-rail-item {
  min-height: 43px;
  padding: 9px 10px;
  gap: 10px;
}

.right-nav-rail.expanded .nav-rail-text {
  font-size: 12px;
}

.main-viewport {
  min-width: 0;
  min-height: 0;
  padding: 11px 10px 14px;
  gap: 10px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.hero-summary-card {
  border-radius: 18px;
  padding: 14px;
}

.hero-metrics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-metric-box:last-child {
  grid-column: 1 / -1;
}

.card-box {
  border-radius: 17px;
  padding: 13px;
  scroll-margin-top: 12px;
}

.card-header {
  align-items: flex-start;
}

.card-title {
  line-height: 1.4;
}

.demo-profile-label {
  margin-top: 12px;
  color: var(--slate-700);
  font-size: 11px;
  font-weight: 700;
}

.login-error {
  min-height: 0;
  color: var(--danger-700);
  font-size: 11px;
  line-height: 1.4;
  margin: -5px 1px 8px;
}

.login-demo-note {
  color: var(--slate-500);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 8px 10px;
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
  margin: 0 0 8px;
}

.login-footer-badges {
  font-size: 9.5px;
  gap: 6px;
  padding-bottom: 2px;
}

.login-screen {
  justify-content: flex-start;
  gap: 9px;
  padding: 15px 19px 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.login-brand-head {
  margin-top: 4px;
}

.login-welcome-box {
  margin: 5px 0;
  padding: 14px;
}

.profile-pills {
  margin: 9px 0 12px;
}

.profile-pill {
  padding: 8px 4px;
}

.login-footer-badges {
  margin-top: auto;
}

.ios-homescreen {
  padding-top: max(26px, env(safe-area-inset-top, 0px));
  padding-bottom: 14px;
}

.ios-tap-hint {
  text-align: center;
}

/* Responsive device shell: on an iPhone the webpage itself becomes the phone. */
@media (max-width: 600px) {
  body {
    padding: 0;
    background: #071324;
  }

  #app-root {
    width: 100vw;
    height: 100dvh;
  }

  .iphone-frame {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }

  .iphone-frame::before,
  .iphone-frame::after {
    display: none;
  }

  .iphone-screen {
    border-radius: 0;
  }
}

@media (max-width: 380px) {
  .right-nav-rail {
    width: 59px;
  }

  .nav-rail-text {
    font-size: 8px;
  }

  .main-viewport {
    padding-inline: 8px;
  }

  .hero-summary-card,
  .card-box {
    padding: 11px;
  }

  .hero-main-value {
    font-size: calc(22px * var(--scale));
  }

  .two-funds-mini-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Prevent the scroll-column flex layout from shrinking dashboard cards. */
.main-viewport > * {
  flex: 0 0 auto;
}

.hero-summary-card {
  min-height: 184px;
}


.prototype-ribbon {
  min-height: 25px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #475569;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 9.5px;
  line-height: 1.35;
  flex: 0 0 auto;
}

/* Company companion app: analytics & retiree financial dashboard */
/* =====================================================================
   Home screen: three apps
   ===================================================================== */
.company-homescreen{background:linear-gradient(145deg,#071324,#153454 62%,#24516a)!important;}
.app-grid-stage{display:grid!important;grid-template-columns:repeat(3,1fr);align-items:start;justify-items:center;max-width:320px;margin:auto;gap:14px 12px;}
.grid-hint{grid-column:1/-1;margin-top:8px!important;max-width:260px;line-height:1.7}
.app-grid-stage .sanad-app-squircle,.company-app-squircle,.reg-app-squircle{width:72px;height:72px;border-radius:21px;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 10px 25px #0003,inset 0 1px 2px #fff9;}
.company-app-squircle{background:linear-gradient(145deg,#f5fafc,#d4e7ef 50%,#adc9d8);color:#153454;}
.reg-app-squircle{background:linear-gradient(145deg,#0f766e,#065f46);}
.company-app-mark{font-family:Arial,sans-serif;font-size:35px;font-weight:800;line-height:.95;color:#153454;}
.company-app-mini{font-family:Arial,sans-serif;font-size:6px;font-weight:800;letter-spacing:2px;margin-top:4px;color:#436c83;}
.company-launch-screen{flex:1;background:linear-gradient(145deg,#071324,#143956);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;}
.company-launch-screen p{color:#b9d2df;font-size:13px}
.company-app-squircle.launch-logo{width:88px;height:88px;border-radius:26px;margin-bottom:10px}
.launch-loader{width:28px;height:28px;border:3px solid #ffffff40;border-top-color:#a7f3d0;border-radius:50%;animation:company-spin .8s linear infinite;margin-top:12px}
@keyframes company-spin{to{transform:rotate(360deg)}}

/* =====================================================================
   Abyan Finance analytics
   ===================================================================== */
.company-shell{background:#f3f6f9;flex:1;min-height:0;overflow-y:auto;padding:6px 16px 26px;color:#12243a;font-family:var(--font-main);}
.company-shell[dir=rtl]{direction:rtl;text-align:right}.company-shell[dir=ltr]{direction:ltr;text-align:left}
.company-shell::-webkit-scrollbar{width:3px}.company-shell::-webkit-scrollbar-thumb{background:#ccd7e1;border-radius:5px}
.co2 button{font-family:var(--font-main);cursor:pointer}
.co2 button:focus-visible,.co2 select:focus-visible,.co2 input:focus-visible{outline:2px solid #059669;outline-offset:2px}

.co-top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0 14px}
.co-title small{display:block;font-size:11px;color:#6b7c8f}
.co-title h2{font-size:20px;line-height:1.3;margin:2px 0 0;color:#0b1f3a}
.co-top-actions{display:flex;align-items:center;gap:8px}
.co-lang{display:flex;background:#e3eaf1;border-radius:11px;padding:3px}
.co-lang button{border:0;background:transparent;min-width:34px;height:30px;border-radius:8px;font-size:12px;font-weight:700;color:#4a5d72}
.co-lang button.on{background:#0b1f3a;color:#fff}
.co-home{border:0;background:#e3eaf1;border-radius:12px;width:38px;height:38px;font-size:21px;color:#17354f}

.co-seg{display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:6px;margin-bottom:10px}
.co-seg button{border:1px solid #d6dfe8;background:#fff;color:#334155;border-radius:11px;padding:8px 6px;font-size:12.5px;font-weight:600}
.co-seg button.on{background:#0b1f3a;border-color:#0b1f3a;color:#fff}

.co-tabs{position:sticky;top:-6px;z-index:5;display:flex;background:#f3f6f9;border-bottom:1px solid #dbe3eb;margin:0 -16px 14px;padding:4px 10px 0}
.co-tabs button{flex:1;border:0;background:transparent;padding:10px 2px 11px;font-size:13px;font-weight:600;color:#6b7c8f;border-bottom:2.5px solid transparent;margin-bottom:-1px}
.co-tabs button.on{color:#0b1f3a;border-bottom-color:#059669}

.co-body{display:flex;flex-direction:column;gap:14px}
.co-panel{background:#fff;border:1px solid #e3e9ef;border-radius:18px;padding:16px}
.co-panel>header{margin-bottom:12px}
.co-panel h3{font-size:15px;line-height:1.4;margin:0;color:#0b1f3a}
.co-panel>header p{font-size:12px;color:#6b7c8f;line-height:1.7;margin:3px 0 0}
.co-sub{font-size:13px;color:#0b1f3a;margin:16px 0 4px}
.co-foot{font-size:11px;color:#8795a4;line-height:1.7;text-align:center;margin:2px 8px 0}

.co-hero{background:#0b1f3a;color:#fff;border-radius:20px;padding:18px}
.co-hero>small{font-size:12px;color:#a9c1d6}
.co-hero>b{display:block;font-size:34px;line-height:1.2;margin:2px 0 14px}
.co-hero dl{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0;border-top:1px solid #ffffff22;padding-top:12px}
.co-hero dt{font-size:11px;color:#a9c1d6}.co-hero dd{margin:2px 0 0;font-size:17px;font-weight:700}

.co-durs{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.co-dur{background:#fff;border:2px solid #e5e9f2;border-radius:22px;padding:15px 14px}
.co-dur small{display:block;font-size:12.5px;font-weight:700;color:#64748b;line-height:1.5}
.co-dur b{display:block;font-size:28px;line-height:1.2;margin:8px 0 6px;color:#a8581f}
.co-dur.pay b{color:#047857}
.co-dur p{margin:0;font-size:11px;color:#7a8399;line-height:1.6}

.co-row{margin:0 0 12px}.co-row:last-child{margin-bottom:0}
.co-row-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:13px;color:#24384e;margin-bottom:5px}
.co-row-head b{font-size:14px;color:#0b1f3a}
.co-track{height:10px;background:#e9eef3;border-radius:6px;overflow:hidden}
.co-fill{display:block;height:100%;border-radius:6px;background:#059669}.co-fill.gold{background:#d97706}.co-fill.navy{background:#132d52}
.co-row small{display:block;font-size:11px;color:#7a8a9b;margin-top:4px}

.co-cmp{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:0;font-size:12.5px}
.co-cmp>*{padding:9px 4px;border-bottom:1px solid #edf1f5}
.co-cmp>span{color:#5b6e82}.co-cmp>span:nth-child(-n+3){font-size:11.5px;font-weight:700;color:#6b7c8f;border-bottom-color:#dbe3eb}
.co-cmp>b{color:#0b1f3a;font-weight:700}
.co-cmp>*:nth-last-child(-n+3){border-bottom:0}

.company-line-chart svg{width:100%;height:130px;overflow:visible}
.chart-axis{display:flex;justify-content:space-between;color:#8493a2;font-size:11px}
.co-legend{display:flex;gap:16px;font-size:12px;color:#5b6e82;margin-top:10px}
.co-legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-inline-end:6px;vertical-align:-1px}

.co-callout{background:#fff7ed;border:1px solid #fed7aa;border-radius:18px;padding:16px}
.co-callout small{font-size:12px;font-weight:700;color:#9a4a0c}
.co-callout b{display:block;font-size:22px;line-height:1.35;color:#7c2d12;margin:4px 0}
.co-callout p{margin:0;font-size:12.5px;color:#9a4a0c}

.co-page{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #edf1f5}
.co-page:last-child{border-bottom:0;padding-bottom:0}.co-page:first-of-type{padding-top:0}
.co-page-no{width:28px;height:28px;border-radius:50%;background:#e8f3ee;color:#047857;font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:center;flex:none}
.co-page>div{flex:1;min-width:0}.co-page b{display:block;font-size:13.5px;color:#0b1f3a}.co-page small{font-size:11.5px;color:#6b7c8f}
.co-page strong{font-size:16px;color:#0b1f3a}

.co-step{display:grid;grid-template-columns:1fr 52px 48px;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid #f0f3f6;font-size:12.5px}
.co-step.lv{grid-template-columns:1fr 50px 46px 44px}
.co-step-head{font-size:11px;font-weight:700;color:#6b7c8f;border-bottom:1px solid #dbe3eb;padding-top:0}
.co-step-name span{display:block;color:#24384e;line-height:1.45}
.co-step-name i{display:block;height:4px;border-radius:3px;background:#9fd8c3;margin-top:5px;max-width:100%}
.co-step-n{color:#6b7c8f;text-align:end}
.co-step>b{text-align:end;color:#0b1f3a}.co-step>em{font-style:normal;text-align:end;color:#047857;font-weight:700}
.co-step-head>b,.co-step-head>em{color:#6b7c8f;font-weight:700}
.co-step.slow{background:#fff7ed;margin:0 -8px;padding-inline:8px;border-radius:10px;border-bottom-color:transparent}
.co-step.slow .co-step-name i{background:#d97706}.co-step.slow>b{color:#9a4a0c}
.co-step-group{font-size:12px;font-weight:700;color:#047857;padding:14px 0 4px}

.co-drop{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 12px;border-radius:12px;background:#f8fafc;border:1px solid #e6ecf1;margin-bottom:8px;font-size:13px}
.co-drop:last-child{margin-bottom:0}
.co-drop b{color:#0b1f3a}.co-drop small{display:block;color:#6b7c8f;font-size:11.5px;margin-top:2px}
.co-drop strong{font-size:16px;color:#334155;flex:none}
.co-drop.hot{background:#fef2f2;border-color:#fecaca}.co-drop.hot strong{color:#b91c1c}

.co-kpis{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.co-kpis article{background:#fff;border:1px solid #e3e9ef;border-radius:16px;padding:13px 14px}
.co-kpis small{display:block;font-size:12px;color:#6b7c8f;line-height:1.5}
.co-kpis b{display:block;font-size:19px;color:#0b1f3a;margin-top:6px}

.co-hours{display:flex;align-items:flex-end;gap:2px;height:90px}
.co-hours i{flex:1;background:#b7e2d3;border-radius:3px 3px 0 0;min-height:2px}.co-hours i.pk{background:#059669}
.co-axis{display:flex;justify-content:space-between;font-size:10.5px;color:#7a8a9b;margin-top:5px}

.co-facts{display:flex;flex-direction:column}
.co-facts>div{display:flex;align-items:baseline;gap:12px;padding:9px 0;border-bottom:1px solid #f0f3f6}
.co-facts b{min-width:56px;font-size:17px;color:#0b1f3a}.co-facts span{font-size:12.5px;color:#4a5d72;line-height:1.6}

.co-tools{display:flex;flex-direction:column;gap:8px}
.co-select{width:100%;padding:11px 12px;border:1px solid #d5dee8;border-radius:12px;background:#f8fafc;font:600 13px var(--font-main);color:#0f172a}
.co-search{display:flex;gap:8px}
.co-search input{flex:1;min-width:0;padding:10px 12px;border:1px solid #d5dee8;border-radius:12px;background:#f8fafc;font:500 14px var(--font-main);color:#0f172a}
.co-search button{border:0;background:#0b1f3a;color:#fff;border-radius:12px;padding:0 16px;font-size:13px;font-weight:700}
.co-count{font-size:12px;color:#6b7c8f;margin:12px 0 8px}
.co-logwrap{overflow-x:auto;margin:0 -4px}
.co-log{width:100%;border-collapse:collapse;font-size:12.5px;color:#0f172a}
.co-log th{background:#f1f5f9;color:#475569;font-weight:700;padding:10px 8px;text-align:start;border-bottom:2px solid #e2e8f0;font-size:12px}
.co-log td{padding:10px 8px;border-bottom:1px solid #e9eef3;vertical-align:top;text-align:start}
.co-log td:first-child{white-space:nowrap;font-weight:600;width:1%;color:#24384e}
.co-log small{display:block;color:#6b7c8f;font-size:10.5px;font-weight:400;margin-top:4px;line-height:1.6}
.co-log tr.is-live td{background:#ecfdf5}
.co-empty{text-align:center!important;color:#6b7c8f;white-space:normal!important;padding:22px 8px!important}
.co-pill{display:inline-block;padding:4px 10px;border-radius:999px;font:600 11.5px/1.4 ui-monospace,Menlo,Consolas,monospace;direction:ltr;overflow-wrap:anywhere}
.co-pill.reg{background:#eef2ff;color:#3b3fcf}.co-pill.ver{background:#e0f2fe;color:#075985}.co-pill.fund{background:#e8f3ee;color:#1f5a3a}.co-pill.use{background:#f1e8fb;color:#6d28d9}.co-pill.warn{background:#fdf2cc;color:#9a4a0c}
.co-pager{display:flex;align-items:center;justify-content:space-between;margin-top:12px;font-size:12.5px;color:#4a5d72}
.co-pager button{border:1px solid #d5dee8;background:#fff;border-radius:10px;padding:8px 16px;font-size:13px;font-weight:600;color:#0b1f3a}
.co-pager button:disabled{opacity:.4;cursor:default}

@media(max-width:380px){.co-durs{grid-template-columns:1fr}.co-hero dd{font-size:15px}.co-seg button{font-size:11.5px}.co-tabs button{font-size:12px}}

/* =====================================================================
   SANAD registration app — Arabic only, medium type
   ===================================================================== */
.reg-shell{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;background:#fff;color:#0f2a27;font-family:var(--font-main);direction:rtl;text-align:right}
.reg-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 18px 10px}
.reg-icon-btn{width:40px;height:40px;border-radius:12px;border:0;background:#eef3f2;color:#0f2a27;font-size:19px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-family:var(--font-main)}
.reg-ghost{background:transparent}
.reg-steps{display:flex;gap:6px;flex:1;max-width:180px;margin:0 auto}
.reg-steps i{flex:1;height:6px;border-radius:4px;background:#e2e8e7}.reg-steps i.done{background:#059669}.reg-steps i.now{background:#0f766e}
.reg-body{flex:1;min-height:0;overflow-y:auto;padding:6px 20px 24px}
.reg-kicker{font-size:14px;font-weight:600;color:#0f766e;margin:0}
.reg-body h1{font-size:25px;line-height:1.4;margin:4px 0 4px;color:#0b1f1d}
.reg-sub{font-size:15px;color:#52665f;line-height:1.7;margin:0 0 20px}
.reg-form{display:flex;flex-direction:column;gap:18px}
.reg-field label,.reg-label{display:block;font-size:15px;font-weight:600;color:#1d3a35;margin-bottom:7px}
.reg-input{position:relative;display:flex;align-items:center}
.reg-input input{width:100%;height:54px;padding:0 14px;border:1.5px solid #cfdbd8;border-radius:14px;background:#f8fbfa;font:500 17px var(--font-main);color:#0b1f1d;outline:none;-webkit-appearance:none;appearance:none}
.reg-input input[dir=ltr],.reg-input input[type=date]{text-align:right}
.reg-input input{padding-left:44px}.reg-input:has(.reg-unit) input{padding-left:84px}
.reg-input input[type=date]{padding-left:14px}.reg-input input[type=date]~.reg-tick{display:none}
.reg-input input:focus{border-color:#0f766e;background:#fff;box-shadow:0 0 0 4px #0f766e1f}
.reg-unit{position:absolute;left:40px;font-size:14px;color:#6b7f79;pointer-events:none}
.reg-tick{position:absolute;left:14px;font-size:16px;font-weight:700;color:#059669;opacity:0;transition:opacity .15s}
.reg-field.is-ok .reg-tick{opacity:1}.reg-field.is-ok .reg-input input{border-color:#7cc7a8}
.reg-field small{display:block;font-size:13.5px;color:#6b7f79;margin-top:6px;line-height:1.6}
.reg-field.is-err .reg-input input{border-color:#dc2626;background:#fff}.reg-field.is-err small{color:#b91c1c}
.reg-choice{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.reg-choice button{height:52px;border:1.5px solid #cfdbd8;border-radius:14px;background:#f8fbfa;font:600 16px var(--font-main);color:#1d3a35;cursor:pointer}
.reg-choice button.on{border-color:#0f766e;background:#e6f4f1;color:#0f766e}
.reg-card{border:1.5px solid #dbe5e3;border-radius:18px;padding:16px;background:#fbfdfc}
.reg-card.is-ok{border-color:#9fd8c3;background:#f0faf6}
.reg-card-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:6px}
.reg-card-head b{font-size:16.5px;color:#0b1f1d}
.reg-done{font-size:14px;font-weight:700;color:#047857;white-space:nowrap}
.reg-card p{font-size:15px;color:#4c625b;line-height:1.7;margin:0 0 12px}.reg-card.is-ok p{margin:0}
.reg-btn{width:100%;height:50px;border:0;border-radius:14px;background:#0f766e;color:#fff;font:700 16px var(--font-main);cursor:pointer}
.reg-btn:active,.reg-next:active{transform:scale(.98)}
.reg-link{border:0;background:none;color:#0f766e;font:600 15px var(--font-main);padding:8px 0 0;cursor:pointer}
.reg-otp{width:100%;height:58px;border:1.5px solid #cfdbd8;border-radius:14px;background:#fff;text-align:center;font:700 26px var(--font-main);letter-spacing:12px;color:#0b1f1d;outline:none}
.reg-otp:focus{border-color:#0f766e;box-shadow:0 0 0 4px #0f766e1f}
.reg-card-err{display:block;min-height:20px;font-size:14px;color:#b91c1c;margin-top:6px}
.reg-mail{border:1px solid #dbe5e3;background:#fff;border-radius:14px;padding:12px 14px;margin-bottom:12px;display:flex;flex-direction:column;gap:3px}
.reg-mail-from{font-size:13px;color:#6b7f79}.reg-mail b{font-size:16px;color:#0b1f1d}.reg-mail span:last-child{font-size:14px;color:#4c625b}
.reg-nafath{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid #dbe5e3;border-radius:14px;padding:12px 14px;margin-bottom:12px}
.reg-nafath b{font-size:34px;line-height:1;color:#0f766e;min-width:56px;text-align:center}.reg-nafath span{font-size:15px;color:#4c625b;line-height:1.6}
.reg-check{display:flex;gap:12px;align-items:flex-start;font-size:15.5px;line-height:1.7;color:#1d3a35;padding:4px 2px;cursor:pointer}
.reg-check input{width:24px;height:24px;margin-top:3px;accent-color:#0f766e;flex:none}
.reg-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px 14px;border-top:1px solid #e4ecea;background:#fff}
.reg-foot span{font-size:15px;font-weight:600;color:#4c625b}
.reg-next{width:58px;height:58px;border-radius:50%;border:0;background:#0f766e;color:#fff;font-size:26px;line-height:1;cursor:pointer;flex:none;box-shadow:0 8px 20px #0f766e40;transition:background .15s,box-shadow .15s}
.reg-next:disabled{background:#cfdbd8;box-shadow:none;cursor:not-allowed}
.reg-icon-btn:focus-visible,.reg-btn:focus-visible,.reg-next:focus-visible,.reg-choice button:focus-visible,.reg-link:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
.reg-banner{position:absolute;top:6px;left:10px;right:10px;z-index:20;background:#ffffffee;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid #e2e8e7;border-radius:18px;padding:12px 14px;box-shadow:0 12px 30px #0f2a2733;display:flex;flex-direction:column;gap:2px;animation:reg-drop .35s ease-out}
.reg-banner span{font-size:12.5px;color:#6b7f79}.reg-banner b{font-size:15px;color:#0b1f1d;line-height:1.5}
@keyframes reg-drop{from{transform:translateY(-120%);opacity:0}to{transform:none;opacity:1}}
.reg-success{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px}
.reg-success-mark{width:76px;height:76px;border-radius:50%;background:#059669;color:#fff;font-size:38px;display:flex;align-items:center;justify-content:center;margin-bottom:18px}
.reg-success h2{font-size:24px;margin:0 0 8px;color:#0b1f1d}.reg-success p{font-size:16px;color:#4c625b;line-height:1.7;margin:0}
@media(prefers-reduced-motion:reduce){.reg-banner{animation:none}.launch-loader{animation-duration:2s}}
