/* ==========================================================================
   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}}


/* =====================================================================
   v4 additions
   ===================================================================== */

/* ---------- Abyan: header, alerts, database chip ---------- */
.co-bell{position:relative;border:0;background:#e3eaf1;border-radius:12px;width:38px;height:38px;font-size:17px}
.co-bell span{position:absolute;top:-4px;inset-inline-end:-4px;min-width:18px;height:18px;border-radius:9px;background:#dc2626;color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 4px}
.co-top-actions{gap:6px}
.co-db{display:block;font-size:11.5px;font-weight:600;margin:-6px 0 10px;line-height:1.5}
.co-db.on{color:#047857}.co-db.off{color:#7a8a9b}
.co-alerts-pop{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.co-alert{border-radius:14px;padding:11px 13px;border:1px solid #e3e9ef;background:#f8fafc}
.co-alert b{display:block;font-size:13.5px;color:#0b1f3a}
.co-alert p{margin:3px 0 0;font-size:12px;line-height:1.7;color:#4a5d72}
.co-alert.high{background:#fef2f2;border-color:#fecaca}.co-alert.high b{color:#991b1b}
.co-alert.mid{background:#fffbeb;border-color:#fde68a}.co-alert.mid b{color:#92400e}
.co-alert.ok{background:#ecfdf5;border-color:#a7f3d0}.co-alert.ok b{color:#065f46}
.co-panel .co-alert+.co-alert{margin-top:8px}

/* tabs scroll horizontally once there are seven */
.co-tabs{overflow-x:auto;scrollbar-width:none;gap:2px}
.co-tabs::-webkit-scrollbar{display:none}
.co-tabs button{flex:0 0 auto;padding-inline:11px}

/* ---------- Abyan: summary (#10) ---------- */
.co-exec{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.co-exec article{background:#fff;border:1px solid #e3e9ef;border-radius:18px;padding:14px}
.co-exec article.big{grid-column:1/-1;background:#0b1f3a;border-color:#0b1f3a}
.co-exec small{display:block;font-size:12px;color:#6b7c8f;line-height:1.5}
.co-exec .big small{color:#a9c1d6}
.co-exec b{display:block;font-size:24px;line-height:1.25;color:#0b1f3a;margin:6px 0 4px}
.co-exec .big b{font-size:38px;color:#fff;margin-bottom:0}
.co-delta{display:inline-block;font-size:11.5px;font-weight:700;border-radius:8px;padding:2px 7px}
.co-delta.good{background:#dcfce7;color:#166534}.co-delta.bad{background:#fee2e2;color:#991b1b}.co-delta.flat{background:#f1f5f9;color:#64748b}
.co-more{width:100%;border:1px solid #0b1f3a;background:#fff;color:#0b1f3a;border-radius:14px;padding:13px;font-size:14px;font-weight:700}
.co-insights{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}
.co-insights li{position:relative;padding-inline-start:16px;font-size:13px;line-height:1.75;color:#24384e}
.co-insights li::before{content:'';position:absolute;inset-inline-start:0;top:9px;width:7px;height:7px;border-radius:50%;background:#059669}
.co-note{font-size:12px;color:#6b7c8f;line-height:1.7;margin:10px 0 0}
.co-title h2{font-size:18px!important}
.co-text{font-size:13px;line-height:1.8;color:#24384e;margin:0}

/* ---------- Abyan: period comparison (#2) ---------- */
.co-seg2{grid-template-columns:1fr 1fr;margin-bottom:12px}
.co-seg3{grid-template-columns:repeat(3,1fr)}
.co-cmp2{display:flex;flex-direction:column}
.co-cmp2-row{display:grid;grid-template-columns:1fr auto;grid-template-areas:"l v" "w d";gap:2px 8px;padding:10px 0;border-bottom:1px solid #edf1f5}
.co-cmp2-row:last-child{border-bottom:0;padding-bottom:0}
.co-cmp2-row>span{grid-area:l;font-size:13px;color:#24384e}
.co-cmp2-row>b{grid-area:v;font-size:15px;color:#0b1f3a;text-align:end}
.co-cmp2-row>em{grid-area:w;font-style:normal;font-size:11.5px;color:#7a8a9b}
.co-cmp2-row>.co-delta{grid-area:d;justify-self:end}

/* ---------- Abyan: funnel (#1) ---------- */
.co-funnel{display:flex;flex-direction:column}
.co-funnel-head{display:grid;grid-template-columns:1fr auto 52px;gap:8px;align-items:baseline;font-size:13px;margin-bottom:5px}
.co-funnel-head span{color:#24384e}.co-funnel-head b{color:#0b1f3a}.co-funnel-head em{font-style:normal;font-size:11.5px;color:#6b7c8f;text-align:end}
.co-funnel-track{height:16px;display:flex;justify-content:center}
.co-funnel-track i{display:block;height:100%;border-radius:5px;background:linear-gradient(90deg,#0b1f3a,#145c55)}
.co-funnel-row:nth-last-child(-n+3) .co-funnel-track i{background:linear-gradient(90deg,#b45309,#d97706)}
.co-funnel-gap{font-size:11px;font-weight:600;color:#b91c1c;text-align:center;padding:5px 0 7px}

/* ---------- Abyan: segments (#5) ---------- */
.co-segtab{font-size:12.5px}
.co-segtab-h,.co-segtab-r{display:grid;grid-template-columns:1.35fr .8fr .9fr .9fr .8fr;gap:4px;align-items:center;padding:9px 0;border-bottom:1px solid #edf1f5}
.co-segtab-h{font-size:11px;font-weight:700;color:#6b7c8f;border-bottom-color:#dbe3eb;padding-top:0}
.co-segtab-h span:not(:first-child),.co-segtab-r b{text-align:end}
.co-segtab-r span{color:#24384e}.co-segtab-r b{color:#0b1f3a;font-weight:600}
.co-segtab-r b.hi{color:#047857;font-weight:800}.co-segtab-r b.lo{color:#b91c1c;font-weight:800}

/* ---------- Abyan: cohorts (#3) ---------- */
.co-coh{overflow-x:auto;font-size:11px}
.co-coh-h,.co-coh-r{display:grid;grid-template-columns:52px 30px repeat(8,minmax(0,1fr));gap:2px;align-items:center}
.co-coh-h{font-weight:700;color:#6b7c8f;padding-bottom:6px}
.co-coh-r{margin-bottom:3px}
.co-coh-r>span{color:#24384e}
.co-coh-r>i{font-style:normal;height:28px;border-radius:5px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:10px;min-width:0}
.co-coh-r>i.na{background:#f1f5f9}

/* ---------- Registration: autosave, money words, calculators, OTP, password ---------- */
.reg-info{display:flex;flex-direction:column;gap:4px;background:#ecfdf5;border:1px solid #a7f3d0;border-radius:14px;padding:12px 14px;margin-bottom:14px;font-size:14.5px;color:#065f46;line-height:1.7}
.reg-info .reg-link{align-self:flex-start;padding:0}
.reg-saved{color:#6b7f79;font-weight:500}
.reg-field small.reg-words{color:#0f766e;font-weight:600}
.reg-calc-toggle{display:block;margin-top:2px}
.reg-calc{margin-top:10px;border:1.5px solid #cfe5df;background:#f3faf8;border-radius:16px;padding:14px;display:flex;flex-direction:column;gap:10px}
.reg-calc-title{font-size:16px;color:#0b1f1d}
.reg-calc-grid{display:grid;grid-template-columns:1fr;gap:10px}
.reg-calc-grid label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600;color:#1d3a35}
.reg-calc-grid input{height:48px;border:1.5px solid #cfdbd8;border-radius:12px;background:#fff;padding:0 12px;font:500 16px var(--font-main);color:#0b1f1d;text-align:right;outline:none;min-width:0}
.reg-calc-grid input:focus{border-color:#0f766e;box-shadow:0 0 0 3px #0f766e1f}
.reg-calc .reg-label{margin-bottom:0}
.reg-choice.small button{height:44px;font-size:14px}
.reg-choice.three{grid-template-columns:1fr;gap:8px}
.reg-calc-out{background:#fff;border:1px solid #dbe5e3;border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:3px}
.reg-calc-out strong{font-size:22px;color:#0f766e}
.reg-calc-out span{font-size:14px;color:#4c625b;line-height:1.6}
.reg-calc-out em{font-style:normal;font-size:13.5px;color:#b45309;line-height:1.6}
.reg-calc-note{font-size:13px;color:#6b7f79;line-height:1.7;margin:0}
.reg-btn:disabled{background:#cfdbd8;cursor:not-allowed}
.reg-btn.ghost{background:#fff;color:#0f766e;border:1.5px solid #cfdbd8}
.reg-row2{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.reg-row2.links{display:flex;justify-content:space-between;margin-top:4px}
.reg-link:disabled{color:#94a3a0;cursor:default}
.reg-card .reg-input{margin-bottom:2px}
.reg-eye{position:absolute;left:8px;border:0;background:#eef3f2;color:#0f766e;font:600 13px var(--font-main);border-radius:10px;padding:8px 10px;cursor:pointer}
.reg-input:has(.reg-eye) input{padding-left:76px}
.reg-meter{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-top:10px}
.reg-meter i{height:6px;border-radius:4px;background:#e2e8e7}
.reg-meter.s1 i:nth-child(-n+1){background:#dc2626}
.reg-meter.s2 i:nth-child(-n+2){background:#f59e0b}
.reg-meter.s3 i:nth-child(-n+3){background:#10b981}
.reg-meter.s4 i{background:#047857}
.reg-meter-lbl{display:block;font-size:13.5px;color:#4c625b;margin-top:6px}
.reg-rules{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-direction:column;gap:4px}
.reg-rules li{font-size:14px;color:#6b7f79}
.reg-rules li.ok{color:#047857;font-weight:600}

/* ---------- SANAD: shared ---------- */
.app-shell{position:relative}
.gl-q{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;border:1px solid #94a3b8;background:#fff;color:#334155;font:700 11px var(--font-main);cursor:pointer;vertical-align:middle;margin-inline-start:4px;padding:0;line-height:1}
.gl-q:focus-visible,.sx-quick-btn:focus-visible,.cal-d:focus-visible{outline:2px solid #047857;outline-offset:2px}
.sx-quick{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
.sx-quick-btn{border:1px solid var(--slate-200);background:#fff;border-radius:14px;padding:10px 4px;font:600 calc(11.5px * var(--scale)) var(--font-main);color:var(--navy-900);cursor:pointer;line-height:1.4}
.sx-rebal{background:#fffbeb;border:1px solid #fde68a;border-radius:var(--radius-xl);padding:13px 14px;display:flex;flex-direction:column;gap:10px}
.sx-rebal b{font-size:calc(13px * var(--scale));color:#92400e}
.sx-rebal p{margin:4px 0 0;font-size:calc(12px * var(--scale));color:#78350f;line-height:1.7}
.sx-rebal-btns{display:grid;grid-template-columns:1.4fr 1fr;gap:8px}
.sx-rebal-btns .btn-primary-sanad{margin:0;padding:10px}
.sx-easy{min-width:34px;height:30px;border-radius:9px;border:1px solid var(--slate-200);background:#fff;font:700 13px var(--font-main);color:var(--navy-900);cursor:pointer;padding:0 7px}
.sx-easy.on{background:var(--navy-900);color:#fff;border-color:var(--navy-900)}

/* overlays */
.sx-sheet-bg,.sx-report-bg{position:absolute;inset:0;background:rgba(7,19,36,.45);z-index:40}
.sx-sheet{position:absolute;left:0;right:0;bottom:0;z-index:41;background:#fff;border-radius:24px 24px 0 0;padding:20px 18px 24px;box-shadow:0 -10px 30px rgba(7,19,36,.2);max-height:86%;overflow-y:auto;animation:sx-up .25s ease-out}
@keyframes sx-up{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
.sx-sheet-t{display:block;font-size:calc(17px * var(--scale));color:var(--navy-900);margin-bottom:8px}
.sx-sheet-p{font-size:calc(14px * var(--scale));line-height:1.8;color:#334155;margin:0 0 14px}
.sx-cancel{width:100%;margin-top:8px;padding:11px;font-size:13px}
.op-sum{margin:0 0 14px;display:flex;flex-direction:column}
.op-sum div{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid #eef2f6;font-size:calc(13px * var(--scale))}
.op-sum dt{color:#64748b}.op-sum dd{margin:0;color:#0b1f3a;font-weight:600;text-align:end}
.op-err{display:block;min-height:20px;color:#b91c1c;font-size:13px;margin:6px 0}
.sx-banner{z-index:50}
.sx-toast{position:absolute;left:14px;right:14px;bottom:36px;z-index:60;background:#0b1f3a;color:#fff;border-radius:14px;padding:12px 14px;font-size:calc(13px * var(--scale));font-weight:600;text-align:center;box-shadow:0 10px 26px rgba(7,19,36,.3);animation:sx-up .25s ease-out}

/* #3 calendar */
.cal-total{font-size:12px;font-weight:700;color:#047857}
.cal-week,.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}
.cal-week span{font-size:10.5px;color:#64748b;font-weight:600;padding-bottom:4px}
.cal-d{border:0;background:#f8fafc;border-radius:9px;min-height:38px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:600 calc(12px * var(--scale)) var(--font-main);color:#334155;cursor:default;padding:2px}
.cal-d.has{background:#ecfdf5;color:#065f46;cursor:pointer;box-shadow:inset 0 0 0 1px #a7f3d0}
.cal-d.sel{background:#065f46;color:#fff}
.cal-d em{display:flex;gap:2px}
.cal-d em b,.cal-legend b{width:6px;height:6px;border-radius:50%;display:inline-block}
.pen{background:#1d4ed8}.suk{background:#047857}.re{background:#d97706}.rent{background:#7c3aed}
.cal-legend{display:flex;flex-wrap:wrap;gap:12px;font-size:11px;color:#475569;margin:10px 0 6px}
.cal-legend b{margin-inline-end:5px}
.cal-item{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:9px 0;border-top:1px solid #eef2f6;font-size:calc(12.5px * var(--scale))}
.cal-day{font-weight:700;color:#0b1f3a;min-width:70px}
.cal-item b{color:#047857}
.cal-pd{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;font-size:12px;color:#475569}
.cal-pd select{border:1px solid var(--slate-200);border-radius:9px;padding:6px 8px;font:600 12px var(--font-main);background:#fff}

/* #7 goals */
.goal{border:1px solid #eef2f6;border-radius:14px;padding:12px;margin-top:8px}
.goal-top{display:flex;justify-content:space-between;align-items:center}
.goal-top b{font-size:calc(14px * var(--scale));color:var(--navy-900)}
.goal-del{border:0;background:#f1f5f9;border-radius:8px;width:28px;height:28px;color:#64748b;cursor:pointer}
.goal-amt{display:flex;justify-content:space-between;font-size:calc(12px * var(--scale));color:#475569;margin:8px 0 5px}
.goal-bar{height:9px;background:#eef2f6;border-radius:6px;overflow:hidden}
.goal-bar i{display:block;height:100%;background:#047857;border-radius:6px}
.goal-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;font-size:calc(11.5px * var(--scale));color:#475569;margin-top:8px}
.goal-meta b{color:#0b1f3a}
.goal-add{display:flex;gap:5px}.goal-add .chip-btn{padding:5px 8px}
.goal-done{color:#047857;font-weight:700}
.goal-form{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.goal-form label{min-width:0;display:flex;flex-direction:column;gap:5px;font-size:calc(11.5px * var(--scale));font-weight:600;color:#334155}
.goal-form label.full{grid-column:1/-1}
.goal-form input,.goal-form select{width:100%;box-sizing:border-box;height:42px;border:1px solid var(--slate-200);border-radius:11px;padding:0 10px;font:500 calc(13px * var(--scale)) var(--font-main);background:#f8fafc;color:#0b1f3a;min-width:0;outline:none}
.goal-form input:focus,.goal-form select:focus{border-color:#047857;background:#fff}
.goal-err{min-height:18px;margin:8px 0 2px;font-size:12px;color:#b91c1c}

/* #4 family */
.fam-m{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #eef2f6}
.fam-m b{display:block;font-size:calc(13px * var(--scale));color:#0b1f3a}
.fam-m small{font-size:11.5px;color:#64748b}
.fam-perm{list-style:none;margin:12px 0 0;padding:0;display:flex;flex-direction:column;gap:5px;font-size:calc(12px * var(--scale));color:#334155}
.fam-ribbon{background:#1d4ed8;color:#fff;font-size:12px;font-weight:700;text-align:center;padding:9px 12px}
.fam-view .main-viewport{display:block}
.fam-locked{margin-top:12px;background:#f1f5f9;border-radius:12px;padding:11px 12px;font-size:12px;color:#475569;text-align:center}

/* #5 report */
.sx-report{position:absolute;inset:12px 10px 30px;z-index:41;background:#fff;border-radius:20px;overflow-y:auto;padding:18px 16px;box-shadow:0 20px 40px rgba(7,19,36,.3)}
.rp-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;border-bottom:2px solid #0b1f3a;padding-bottom:10px;margin-bottom:12px}
.rp-head small{font-size:11px;color:#64748b}
.rp-head h2{font-size:18px;margin:2px 0;color:#0b1f3a}
.rp-head p{margin:0;font-size:12px;color:#475569}
.rp-x{border:0;background:#f1f5f9;border-radius:10px;width:34px;height:34px;cursor:pointer;flex:none}
.rp-kpis{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.rp-kpis div{background:#f8fafc;border-radius:12px;padding:10px}
.rp-kpis small{display:block;font-size:11px;color:#64748b}
.rp-kpis b{font-size:15px;color:#0b1f3a}
.sx-report h3{font-size:13.5px;color:#0b1f3a;margin:16px 0 6px}
.rp-t{width:100%;border-collapse:collapse;font-size:12.5px}
.rp-t td{padding:7px 0;border-bottom:1px solid #eef2f6;color:#334155}
.rp-t td:last-child{text-align:left;font-weight:600;color:#0b1f3a}
.rp-t tr.tot td{border-top:1.5px solid #cbd5e1;border-bottom:0;color:#b45309}
.rp-split{display:flex;height:10px;border-radius:6px;overflow:hidden}
.rp-split i:first-child{background:#1e3a8a}.rp-split i:last-child{background:#047857}
.rp-p{font-size:12.5px;color:#334155;line-height:1.7;margin:6px 0}
.rp-note{font-size:11px;color:#64748b;margin-top:14px;border-top:1px dashed #cbd5e1;padding-top:8px}
.rp-actions{display:grid;grid-template-columns:1.3fr 1fr;gap:8px;margin-top:12px}
.rp-actions .btn-primary-sanad{margin:0;padding:11px}
.rp-wa{display:flex;align-items:center;justify-content:center;text-decoration:none;background:#16a34a;color:#fff;border-color:#16a34a}

/* #9 high contrast */
:root[data-contrast="true"]{--slate-500:#1e293b;--slate-400:#334155;--slate-700:#0f172a;--slate-200:#64748b}
:root[data-contrast="true"] .card-box{border-width:1.5px}
:root[data-contrast="true"] .card-sub,:root[data-contrast="true"] .holding-meta,:root[data-contrast="true"] .toggle-info-sub{color:#1e293b}
:root[data-contrast="true"] .prototype-ribbon{background:#0b1f3a;color:#fff}

@media print{
  body *{visibility:hidden!important}
  #sanad-report,#sanad-report *{visibility:visible!important}
  .iphone-frame,.iphone-screen,.app-shell{overflow:visible!important;transform:none!important;height:auto!important;box-shadow:none!important}
  #sanad-report{position:fixed!important;inset:0!important;box-shadow:none!important;border-radius:0!important;overflow:visible!important;padding:24px!important}
  .rp-actions,.rp-x{display:none!important}
}
@media(prefers-reduced-motion:reduce){.sx-sheet,.sx-toast{animation:none}}
@media(max-width:380px){.co-exec b{font-size:21px}.co-funnel-row{grid-template-columns:1fr 42px 42px}.co-funnel-gap{margin-inline-end:84px}}

/* =====================================================================
   v5: simpler SANAD shell, home summary + alerts, funds accordion,
   change password, registration tweaks
   ===================================================================== */
.co-segtab-h.vm,.co-segtab-r.vm{grid-template-columns:1.3fr 1fr 1fr 1fr}

.sx-v5 .app-body-split{display:block;flex:1;min-height:0;overflow:hidden}
.sx-v5 .main-viewport{height:100%;padding-bottom:84px}
.sx-tabbar{position:absolute;left:0;right:0;bottom:0;z-index:30;display:grid;grid-template-columns:repeat(5,1fr);background:rgba(255,255,255,.97);border-top:1px solid var(--slate-200);padding:6px 4px 22px;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.sx-tabbar button{border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:3px;padding:5px 0;color:#64748b;font:600 calc(10.5px * var(--scale)) var(--font-main);cursor:pointer;border-radius:12px}
.sx-tabbar button svg{width:21px;height:21px}
.sx-tabbar button.on{color:#047857}
.sx-tabbar button.on svg{stroke:#047857}
.sx-tabbar button:focus-visible{outline:2px solid #047857;outline-offset:-2px}
.sx-v5 ~ .ios-home-bar-wrap,.sx-v5 + .ios-home-bar-wrap{position:relative;z-index:31}
.sx-topbtn{width:32px;height:30px;border-radius:9px;border:1px solid var(--slate-200);background:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;color:var(--navy-900);padding:0}
.sx-topbtn svg{width:16px;height:16px}

.sx-subhead{display:flex;align-items:center;gap:10px;margin-bottom:2px}
.sx-subhead b{font-size:calc(17px * var(--scale));color:var(--navy-900)}
.sx-back{width:36px;height:36px;border-radius:11px;border:1px solid var(--slate-200);background:#fff;font-size:17px;cursor:pointer;color:var(--navy-900)}

.hx-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.hx-grid>div{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:12px;padding:9px 10px}
.hx-grid small{display:block;font-size:calc(10.5px * var(--scale));color:#cbd5e1}
.hx-grid b{display:block;font-size:calc(14.5px * var(--scale));color:#fff;margin-top:2px}
.hx-grid .gl-q{width:16px;height:16px;font-size:10px;background:transparent;color:#cbd5e1;border-color:#64748b}
.hx-foot{margin-top:10px;font-size:calc(12px * var(--scale));font-weight:700;border-radius:10px;padding:8px 10px}
.hx-foot.ok{background:rgba(16,185,129,.16);color:#a7f3d0}.hx-foot.warn{background:rgba(245,158,11,.18);color:#fde68a}
.hx-alerts{display:flex;flex-direction:column;gap:8px}
.hx-alerts-h{display:flex;justify-content:space-between;align-items:center}
.hx-alerts-h b{display:flex;align-items:center;gap:6px;font-size:calc(14.5px * var(--scale));color:var(--navy-900)}
.hx-alerts-h svg{width:17px;height:17px}
.hx-alert{display:flex;justify-content:space-between;align-items:center;gap:10px;border-radius:14px;padding:11px 12px;border:1px solid #e2e8f0;background:#fff}
.hx-alert b{display:block;font-size:calc(12.5px * var(--scale));color:#0b1f3a;line-height:1.5}
.hx-alert p{margin:2px 0 0;font-size:calc(11.5px * var(--scale));color:#475569;line-height:1.6}
.hx-alert .chip-btn{flex:none;white-space:nowrap}
.hx-alert.warn{background:#fffbeb;border-color:#fde68a}.hx-alert.warn b{color:#92400e}
.hx-alert.ok{background:#ecfdf5;border-color:#a7f3d0}
.hx-alert.info{background:#f8fafc}

.fx-acc{padding:0;overflow:hidden}
.fx-acc-head{width:100%;border:0;background:none;display:flex;justify-content:space-between;align-items:center;padding:14px;cursor:pointer;font-family:var(--font-main);text-align:right}
.fx-acc-head>span{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.fx-acc-head b{font-size:calc(14px * var(--scale));color:var(--navy-900)}
.fx-acc-head small{font-size:calc(11px * var(--scale));color:#64748b;width:100%;padding-inline-start:26px}
.fx-acc-head svg{width:18px;height:18px}
.fx-acc-head i{font-style:normal;font-size:14px;color:#047857}
.fx-acc-sub{display:flex;flex-direction:column;gap:6px;padding:0 14px 14px}
.fx-sub{display:flex;justify-content:space-between;align-items:center;gap:8px;border:1px solid var(--slate-200);background:#f8fafc;border-radius:12px;padding:11px 12px;font:600 calc(12.5px * var(--scale)) var(--font-main);color:var(--navy-900);cursor:pointer;text-align:right}
.fx-sub b{color:#047857}
.fx-sub.on{border-color:#047857;background:#ecfdf5}

.login-pass-link{display:block;margin:10px auto 0;border:0;background:none;color:#047857;font:600 13px var(--font-main);cursor:pointer;padding:6px}
.pw-form{display:flex;flex-direction:column;gap:10px}
.pw-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;color:#334155}
.pw-form input{height:46px;border:1px solid var(--slate-200);border-radius:12px;padding:0 12px;font:500 15px var(--font-main);background:#f8fafc;outline:none}
.pw-form input:focus{border-color:#047857;background:#fff}
.pw-form .reg-rules li{font-size:12.5px}
.screen-has-sheet{position:relative}

.reg-q-hint{display:block;font-size:13.5px;color:#6b7f79;margin:-3px 0 8px}
.reg-vm{display:flex;flex-direction:column;gap:8px}
.reg-vm button{display:flex;flex-direction:column;align-items:flex-start;gap:3px;border:1.5px solid #cfdbd8;border-radius:14px;background:#f8fbfa;padding:12px 14px;cursor:pointer;text-align:right;font-family:var(--font-main)}
.reg-vm button b{font-size:16px;color:#0b1f1d;display:flex;align-items:center;gap:8px}
.reg-vm button em{font-style:normal;font-size:12px;font-weight:700;color:#047857;background:#dcfce7;border-radius:8px;padding:1px 7px}
.reg-vm button span{font-size:14px;color:#52665f}
.reg-vm button.on{border-color:#0f766e;background:#e6f4f1}
.reg-vm button:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
.reg-card-head .reg-link{padding:0;font-size:14px}
@keyframes reg-pulse{0%,100%{box-shadow:0 0 0 0 rgba(15,118,110,0)}50%{box-shadow:0 0 0 6px rgba(15,118,110,.25)}}
.reg-pulse{animation:reg-pulse .8s ease-in-out 2;border-radius:12px}
@media(prefers-reduced-motion:reduce){.reg-pulse{animation:none}}

.login-welcome-box .input-group{margin-top:16px}
.fx-sub span{flex:1}

/* =====================================================================
   v7 additions
   ===================================================================== */

/* ---------- محفظتي: plain fund list ---------- */
.fx-list{display:flex;flex-direction:column;gap:8px}
.fx-list-h{display:flex;align-items:center;gap:8px;margin-bottom:2px}
.fx-list-h b{font-size:calc(14px * var(--scale));color:var(--navy-900)}
.fx-list-h svg{width:18px;height:18px}
.fx-row{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;border:1px solid var(--slate-200);background:#f8fafc;border-radius:14px;padding:12px 14px;cursor:pointer;font-family:var(--font-main);text-align:right}
.fx-row b{display:block;font-size:calc(13.5px * var(--scale));color:var(--navy-900)}
.fx-row small{display:block;font-size:calc(11.5px * var(--scale));color:#047857;font-weight:600;margin-top:2px}
.fx-row strong{font-size:calc(13.5px * var(--scale));color:var(--navy-900);white-space:nowrap}
.fx-row:focus-visible{outline:2px solid #047857;outline-offset:2px}

/* ---------- sukuk "التفاصيل" ---------- */
.sk-details{padding:0;overflow:hidden}
.sk-head{width:100%;display:flex;justify-content:space-between;align-items:center;gap:10px;border:0;background:#eff6ff;padding:14px;cursor:pointer;font-family:var(--font-main);text-align:right}
.sk-head b{display:block;font-size:calc(15px * var(--scale));color:#1e3a8a}
.sk-head small{display:block;font-size:calc(11.5px * var(--scale));color:#475569;margin-top:2px}
.sk-head i{font-style:normal;font-size:12px;font-weight:700;color:#1d4ed8;background:#fff;border:1px solid #bfdbfe;border-radius:999px;padding:4px 12px;flex:none}
.sk-details.open .sk-head{border-bottom:1px solid #dbeafe}
.sk-risk{margin:12px 12px 0;background:#fff7ed;border:1px solid #fdba74;border-radius:12px;padding:10px 12px}
.sk-risk b{display:block;font-size:calc(12.5px * var(--scale));color:#9a3412;margin-bottom:3px}
.sk-risk p{margin:0;font-size:calc(11.5px * var(--scale));line-height:1.75;color:#7c2d12}
.sk-note{margin:10px 12px 0;font-size:calc(11px * var(--scale));color:#64748b;line-height:1.7}
.sk-card{margin:12px;border:1px solid #dbe3ec;border-radius:16px;background:#fff;box-shadow:0 2px 10px rgba(11,31,58,.05);overflow:hidden}
.sk-card-h{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;align-items:center;padding:12px 12px 10px;border-bottom:1px solid #eef2f6}
.sk-idx{grid-row:span 2;width:28px;height:28px;border-radius:9px;background:#1e3a8a;color:#fff;font-weight:800;font-size:13px;display:flex;align-items:center;justify-content:center}
.sk-card-h b{display:block;font-size:calc(13.5px * var(--scale));color:#0b1f3a;line-height:1.4}
.sk-card-h small{display:block;font-size:calc(11px * var(--scale));color:#64748b}
.sk-weight{grid-column:2;justify-self:start;font-size:10.5px;font-weight:700;color:#1d4ed8;background:#eff6ff;border-radius:999px;padding:2px 9px}
.sk-money{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px}
.sk-money>div{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:9px 10px}
.sk-money>div.hl{background:#ecfdf5;border-color:#a7f3d0}
.sk-money small{display:block;font-size:calc(10.5px * var(--scale));color:#64748b;line-height:1.4}
.sk-money b{display:block;font-size:calc(13.5px * var(--scale));color:#0b1f3a;margin-top:3px;direction:ltr;text-align:right}
.sk-money .hl b{color:#047857}
.sk-rates{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:0 12px 12px}
.sk-rates>div{text-align:center;border-radius:12px;background:#eff6ff;padding:10px 4px}
.sk-rates b{display:block;font-size:calc(17px * var(--scale));font-weight:800;color:#1d4ed8;direction:ltr}
.sk-rates small{display:block;font-size:calc(9.5px * var(--scale));color:#475569;margin-top:2px}
.sk-meta{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:0 12px 12px}
.sk-meta>div{border:1px dashed #cbd5e1;border-radius:10px;padding:7px 8px}
.sk-meta small{display:block;font-size:calc(10px * var(--scale));color:#64748b}
.sk-meta b{display:block;font-size:calc(11.5px * var(--scale));color:#0b1f3a;margin-top:2px}
.sk-guar{background:#f8fafc;border-top:1px solid #e2e8f0;padding:12px}
.sk-guar-t{display:block;font-size:calc(12.5px * var(--scale));color:#0b1f3a;margin-bottom:8px}
.sk-g{display:flex;gap:9px;align-items:flex-start;margin-bottom:8px}
.sk-g .ok{width:20px;height:20px;border-radius:50%;background:#047857;color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;flex:none;margin-top:1px}
.sk-g b{display:block;font-size:calc(12px * var(--scale));color:#0b1f3a}
.sk-g small{display:block;font-size:calc(10.5px * var(--scale));color:#475569;line-height:1.6}
.sk-cov{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:10px}
.sk-cov-h{display:flex;justify-content:space-between;align-items:center}
.sk-cov-h b{font-size:calc(12px * var(--scale));color:#0b1f3a}
.sk-cov-h strong{font-size:calc(17px * var(--scale));color:#047857}
.sk-cov-bar{height:10px;border-radius:6px;background:#e2e8f0;overflow:hidden;margin:7px 0 3px;direction:ltr}
.sk-cov-bar i{display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,#34d399,#047857)}
.sk-cov-x{display:flex;justify-content:space-between;direction:ltr;font-size:9.5px;color:#94a3b8}
.sk-cov small{display:block;font-size:calc(10.5px * var(--scale));color:#475569;margin-top:5px;line-height:1.6}
.sk-foot{margin:0 12px 12px;font-size:calc(10.5px * var(--scale));color:#64748b;line-height:1.6}

/* ---------- login: forgot password ---------- */
.login-forgot{display:block;margin:6px 0 0 auto;border:0;background:none;color:#047857;font:600 13px var(--font-main);cursor:pointer;padding:4px 2px}
.login-forgot:focus-visible,.rec-link:focus-visible,.rec-back:focus-visible{outline:2px solid #047857;outline-offset:2px}
.rec-screen{justify-content:flex-start;gap:14px;padding-top:12px;position:relative}
.rec-back{align-self:flex-start;border:1px solid var(--slate-200);background:#fff;border-radius:11px;padding:8px 14px;font:600 13px var(--font-main);color:#0b1f3a;cursor:pointer}
.rec-steps{display:flex;justify-content:space-between;gap:6px;width:100%}
.rec-steps span{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:11.5px;color:#94a3b8;font-weight:600}
.rec-steps i{font-style:normal;width:28px;height:28px;border-radius:50%;border:2px solid #cbd5e1;display:flex;align-items:center;justify-content:center;font-size:12px}
.rec-steps .now{color:#047857}.rec-steps .now i{border-color:#047857;background:#ecfdf5}
.rec-steps .done{color:#047857}.rec-steps .done i{border-color:#047857;background:#047857;color:#fff}
.rec-card{width:100%;background:#fff;border:1px solid var(--slate-200);border-radius:20px;padding:20px 18px;display:flex;flex-direction:column;gap:12px}
.rec-card h2{margin:0;font-size:19px;color:#0b1f3a}
.rec-card p{margin:0;font-size:14px;line-height:1.8;color:#475569}
.rec-card .btn-primary-sanad{margin:4px 0 0}
.rec-link{border:0;background:none;color:#047857;font:600 13.5px var(--font-main);cursor:pointer;align-self:flex-start;padding:2px}
.rec-link:disabled{color:#94a3b8;cursor:default}
.rec-done{width:64px;height:64px;border-radius:50%;background:#047857;color:#fff;font-size:32px;display:flex;align-items:center;justify-content:center;align-self:center}
.rec-card .rec-done+h2,.rec-card .rec-done~p{text-align:center}

/* ---------- name chip ---------- */
.user-chip-btn .chip-name{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;vertical-align:bottom}

/* ---------- voices ---------- */
.sx-voice-opts{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sx-voice-opts button{border:1.5px solid var(--slate-200);background:#fff;border-radius:14px;padding:12px 10px;cursor:pointer;font-family:var(--font-main);text-align:center}
.sx-voice-opts b{display:block;font-size:calc(14px * var(--scale));color:var(--navy-900)}
.sx-voice-opts small{display:block;font-size:calc(11.5px * var(--scale));color:#64748b;margin-top:2px}
.sx-voice-opts button.on{border-color:#047857;background:#ecfdf5}
.sx-voice-opts button.on b{color:#065f46}
.sx-voice-note{margin:8px 0 0;font-size:11px;color:#64748b}

/* =====================================================================
   Abyan: category chooser + dashboard
   ===================================================================== */
.ab-shell{background:#f3f6fa}
.ab-top{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 0 12px}
.ab-top small{display:block;font-size:11.5px;color:#64748b}
.ab-top h2{margin:2px 0 0;font-size:20px;color:#0b1f3a}
.ab-top-a{display:flex;gap:8px;align-items:center}
.ab-change{border:1px solid #cbd5e1;background:#fff;border-radius:12px;padding:9px 12px;font:600 12.5px var(--font-main);color:#0b1f3a;cursor:pointer}
.ab-lead{font-size:15px;color:#334155;margin:6px 0 14px}
.ab-cats{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ab-cat{display:flex;flex-direction:column;align-items:flex-start;gap:6px;background:#fff;border:1px solid #e2e8f0;border-radius:20px;padding:16px 14px;box-shadow:0 4px 14px rgba(11,31,58,.06);cursor:pointer;text-align:right;font-family:var(--font-main);transition:transform .15s,box-shadow .15s}
.ab-cat:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(11,31,58,.1)}
.ab-cat-i{font-size:28px;width:48px;height:48px;border-radius:14px;background:#eff6ff;display:flex;align-items:center;justify-content:center}
.ab-cat b{font-size:15.5px;color:#0b1f3a}
.ab-cat small{font-size:12px;color:#64748b;line-height:1.6}
.ab-all{margin:12px auto 0;width:78%;align-items:center;text-align:center;border-color:#2563eb;border-width:1.5px}
.ab-all .ab-cat-i{background:#2563eb;color:#fff}
.ab-switch,.ab-period,.ab-views{display:flex;gap:6px;margin-bottom:10px}
.ab-switch button,.ab-period button{flex:1;border:1px solid #d6dfe8;background:#fff;border-radius:11px;padding:8px 4px;font:600 12px var(--font-main);color:#334155;cursor:pointer}
.ab-switch button.on{background:#0b1f3a;border-color:#0b1f3a;color:#fff}
.ab-period button.on{background:#eff6ff;border-color:#2563eb;color:#1d4ed8}
.ab-views{border-bottom:1px solid #dbe3eb;gap:0}
.ab-views button{flex:1;border:0;background:none;padding:10px 4px 11px;font:700 13.5px var(--font-main);color:#64748b;border-bottom:2.5px solid transparent;margin-bottom:-1px;cursor:pointer}
.ab-views button.on{color:#0b1f3a;border-bottom-color:#2563eb}
.ab-rbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.ab-back{border:1px solid #cbd5e1;background:#fff;border-radius:11px;padding:8px 12px;font:600 13px var(--font-main);color:#0b1f3a;cursor:pointer}
.ab-shell button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}
.ab-anim{animation:ab-in .28s ease-out}
@keyframes ab-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.ab-anim{animation:none}.ab-cat{transition:none}}

.ab-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px}
.ab-w{background:#fff;border:1px solid #e6ecf2;border-radius:18px;box-shadow:0 2px 12px rgba(11,31,58,.05);padding:14px;min-width:0}
.ab-w.wide{grid-column:1/-1}
.ab-wh{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.ab-wt h3{margin:0;font-size:14.5px;color:#0b1f3a}
.ab-wt i{display:block;width:28px;height:3px;border-radius:2px;margin-top:5px}
.ab-wa{display:flex;gap:5px}
.ab-ib{width:26px;height:26px;border-radius:50%;border:1px solid #cbd5e1;background:#fff;color:#475569;font:700 12px var(--font-main);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.ab-ib.on{background:#0b1f3a;color:#fff;border-color:#0b1f3a}
.ab-info{margin:10px 0 0;background:#f1f5f9;border-radius:10px;padding:9px 11px;font-size:12px;line-height:1.7;color:#334155}
.ab-wb{margin-top:12px}
.ab-w.min .ab-wh{align-items:center}
.ab-wf{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:12px;padding-top:10px;border-top:1px solid #eef2f6}
.ab-wf small{font-size:10.5px;color:#94a3b8}
.ab-full{border:0;background:#eff6ff;color:#1d4ed8;border-radius:10px;padding:7px 11px;font:700 11.5px var(--font-main);cursor:pointer;white-space:nowrap}

.ab-kpis{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ab-k{border:1px solid #eef2f6;border-radius:14px;padding:10px 11px;min-width:0}
.ab-k b{display:block;font-size:22px;font-weight:800;color:#1d4ed8;line-height:1.2}
.ab-k small{display:block;font-size:11.5px;color:#475569;margin:2px 0 4px}
.ab-k em{display:block;font-style:normal;font-size:10.5px;color:#2563eb;margin-top:4px}
.ab-chg{display:inline-block;font-size:11px;font-weight:700;border-radius:7px;padding:1px 6px}
.ab-chg.up{background:#dcfce7;color:#15803d}.ab-chg.down{background:#fee2e2;color:#b91c1c}.ab-chg.flat{background:#f1f5f9;color:#64748b}
.ab-spark{display:block;width:100%;height:26px;margin-top:6px}
.ab-cmp-note{margin:8px 0 0;font-size:10.5px;color:#94a3b8}
.ab-gauge-row{display:flex;align-items:center;gap:10px}
.ab-gauge{width:56%;flex:none}
.ab-gauge-side{flex:1;display:flex;flex-direction:column;gap:6px}
.ab-gs{border-radius:10px;padding:6px 9px;background:#f8fafc}
.ab-gs small{display:block;font-size:10.5px;color:#64748b}
.ab-gs b{font-size:15px}
.ab-gs.ok b{color:#047857}.ab-gs.mid b{color:#b45309}.ab-gs.low b{color:#b91c1c}
.ab-gs.err{background:#fef2f2}.ab-gs.err b{color:#dc2626}
.ab-gs.warn{background:#fff7ed}.ab-gs.warn b{color:#ea580c}
.ab-donut-row{display:flex;align-items:center;gap:12px}
.ab-donut{width:42%;flex:none}
.ab-legend{list-style:none;margin:0;padding:0;flex:1;display:flex;flex-direction:column;gap:8px;min-width:0}
.ab-legend li{display:grid;grid-template-columns:10px 1fr;gap:2px 7px;align-items:center;font-size:11.5px;color:#334155}
.ab-legend i,.ab-seg-leg i,.ab-leg-inline i{width:10px;height:10px;border-radius:3px;display:inline-block}
.ab-legend b{grid-column:2;font-size:12px;color:#0b1f3a}
.ab-line-top{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.ab-line-top b{font-size:20px;font-weight:800;color:#1d4ed8}
.ab-line-top small{font-size:11.5px;color:#64748b}
.ab-area{display:block;width:100%;height:auto;direction:ltr}
.ab-leg-inline{display:flex;gap:12px;flex-wrap:wrap;font-size:11.5px;color:#475569;margin-top:4px}
.ab-leg-inline i{margin-inline-end:5px;vertical-align:-1px}
.ab-seg{display:flex;height:16px;border-radius:8px;overflow:hidden;gap:2px;direction:rtl}
.ab-seg i{display:block;height:100%}
.ab-seg-leg{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:7px}
.ab-seg-leg li{display:grid;grid-template-columns:10px 1fr auto 40px;gap:8px;align-items:center;font-size:12px;color:#334155}
.ab-seg-leg b{color:#0b1f3a}.ab-seg-leg em{font-style:normal;color:#64748b;text-align:end}
.ab-t{width:100%;border-collapse:collapse;font-size:12px}
.ab-t th{font-size:11px;color:#64748b;font-weight:700;text-align:start;padding:6px 4px;border-bottom:1.5px solid #e2e8f0}
.ab-t td{padding:8px 4px;border-bottom:1px solid #eef2f6;color:#0b1f3a}
.ab-t th:not(:first-child),.ab-t td:not(:first-child){text-align:end}
.ab-t tr.tot td{font-weight:800;border-bottom:0}
.ab-t.cmp td:not(:first-child){font-weight:700}
.ab-link{border:0;background:none;padding:0;color:#2563eb;font:600 12px var(--font-main);text-decoration:underline;cursor:pointer}
.ab-tools{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.ab-tools>div{background:#f8fafc;border:1px solid #eef2f6;border-radius:12px;padding:10px}
.ab-tools span{font-size:18px}
.ab-tools b{display:block;font-size:19px;font-weight:800;color:#1d4ed8;margin-top:2px}
.ab-tools small{display:block;font-size:11px;color:#475569}
.ab-rate{border-radius:14px;padding:14px;text-align:center}
.ab-rate b{display:block;font-size:30px;font-weight:800}
.ab-rate p{margin:6px 0 0;font-size:12.5px;line-height:1.7;color:#334155}
.ab-rate.hi{background:#ecfdf5}.ab-rate.hi b{color:#047857}
.ab-rate.mid{background:#fffbeb}.ab-rate.mid b{color:#b45309}
.ab-rate.lo{background:#fef2f2}.ab-rate.lo b{color:#b91c1c}
.ab-report{display:flex;flex-direction:column;gap:12px}
.ab-sim-note{margin:0;font-size:11.5px;color:#64748b;text-align:center}
.ab-classic{display:flex;flex-direction:column;gap:14px}
.ab-classic>.co-foot{display:none}
