@font-face {
    font-family: 'JannaLT-Regular';
    src: url(JannaLT-Regular.ttf);
}

:root {
  --primary: #8E0806;
  --primary-dark: #6C0604;
  --primary-light: #A60A07;
  --accent: #B39A4C;
  --bg: #ffffff;
  --white: #FFFFFF;
  --surface: #ffffff;
  --border: #E8E8E8;
  --text-primary: #222222;
  --text-secondary: #6c757d;
  --text-muted: #9CA3AF;
  --success: #429145;
  --error: #df1529;
  --warning: #D97706;
  --font-ar: 'JannaLT-Regular', sans-serif;
  --font-en: 'JannaLT-Regular', sans-serif;
  --ease: cubic-bezier(0.4,0,0.2,1);
  /* وحدات ارتفاع سائلة متوافقة مع شريط العناوين/الكيبورد */
  --vh: 100vh;
  --app-h: 100vh;
}
@supports (height: 100svh) {
  :root { --vh: 100svh; --app-h: 100dvh; }
}
/* على الموبايل نفضل svh (يتجنب القفز عند ظهور شريط العناوين/الكيبورد) */
@supports (height: 100svh) {
  @media (max-width: 768px) {
    :root { --vh: 100svh; --app-h: 100svh; }
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text-primary);
  direction: rtl;
  overflow: hidden;
  height: var(--vh);
  font-size: clamp(14px, 3.6vw, 16px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  text-size-adjust: 100%;
  padding-bottom: env(safe-area-inset-bottom);
}

.screen { 
  display: none; 
  width: 100%; 
  height: var(--vh); 
  flex-direction: column; 
  background: var(--bg);
  position: relative;
}

@media (min-width: 481px) {
  .screen {
    height: 90vh;
    max-height: 900px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    overflow: hidden;
  }
  body {
    background: #e9ecef;
  }
}

/* أجهزة لوحية (iPad عمودي/أفقي): ارتفاع أكبر وأوسع */
@media (min-width: 481px) and (max-width: 1024px) {
  .screen {
    height: 94vh;
    max-height: 1100px;
    width: min(92vw, 820px);
    margin: 3vh auto;
  }
  .services-section {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    padding: 28px;
  }
  .login-wrap, .page-inner, .pending-wrap { max-width: 560px; }
}

.screen.active { display: flex; animation: fadeUp 0.35s var(--ease) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.header {
  height: clamp(96px, 14vh, 120px);
  min-height: 96px;
  background: linear-gradient(145deg, #C8403D 0%, var(--primary) 50%, var(--primary-dark) 100%);
  display: flex;
  align-items: center;
  padding: 0 clamp(14px, 4vw, 20px);
  gap: clamp(10px, 3vw, 14px);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(196,32,32,0.4);
}
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.header::after {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}

.header-badge {
  background: linear-gradient(135deg, #F4C842, #E6A820);
  border-radius: 16px;
  width: clamp(68px, 20vw, 82px);
  min-width: 68px;
  height: clamp(60px, 18vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
  position: relative;
  z-index: 1;
}
.header-badge-text {
  font-family: var(--font-ar);
  font-size: clamp(10px, 2.8vw, 13px);
  font-weight: 800;
  color: #3D2000;
  text-align: center;
  line-height: 1.45;
}
.header-sep {
  width: 1.5px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.4), transparent);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.header-brand {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  position: relative;
  z-index: 1;
}
.header-brand-ar {
  font-size: clamp(13px, 3.6vw, 17px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.header-brand-en {
  font-family: var(--font-en);
  font-size: clamp(9.5px, 2.6vw, 12px);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  direction: ltr;
  text-align: right;
}

/* Corporate Internet Banking Header */
.cib-header {
  display: flex;
  height: clamp(72px, 10vh, 92px);
  background-color: #bb8b16;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  width: 100%;
  position: relative;
  direction: ltr;
}
.cib-header-left {
  background-color: #a11a19;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 5vw, 40px) 0 clamp(14px, 4vw, 24px);
  clip-path: polygon(0 0, 100% 0, calc(100% - 25px) 100%, 0 100%);
  color: #fff;
  min-width: max-content;
}
.cib-logo {
  height: clamp(40px, 7vw, 52px);
  width: auto;
  display: block;
}
.cib-header-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-right: clamp(16px, 5vw, 30px);
  padding-left: clamp(12px, 4vw, 20px);
  color: #fff;
  font-size: clamp(15px, 4vw, 21px);
  font-weight: 600;
  direction: rtl;
  font-family: var(--font-ar);
}
@media (max-width: 768px) {
  .cib-header { height: auto; flex-direction: column; }
  .cib-header-left { padding: 15px; clip-path: none; width: 100%; justify-content: center; }
  .cib-header-right { padding: 15px; text-align: center; justify-content: center; font-size: 15px; }
}

.body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  padding-bottom: env(safe-area-inset-bottom);
  scroll-behavior: smooth;
}
.body > * { scroll-margin-bottom: calc(env(safe-area-inset-bottom) + 24px); }
.inp, .otp-cell, .custom-select, .btn-primary, .resend-row {
  scroll-margin-top: 16px;
  scroll-margin-bottom: calc(env(safe-area-inset-bottom) + 90px);
}
.body::-webkit-scrollbar { width: 4px; }
.body::-webkit-scrollbar-track { background: transparent; }
.body::-webkit-scrollbar-thumb { background: rgba(196,32,32,0.18); border-radius: 4px; }

.home-header {
  background: linear-gradient(160deg, #E03030 0%, #C42020 50%, #A81818 100%);
  padding: 44px 28px 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(196,32,32,0.4);
}
.home-header::before {
  content: '';
  position: absolute;
  top: -50px; right: -50px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}
.home-header::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -30px;
  width: 200px; height: 200px;
  background: rgba(0,0,0,0.07);
  border-radius: 50%;
  pointer-events: none;
}
.home-logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
  z-index: 1;
}
.home-logo-ar {
  font-family: var(--font-ar);
  font-size: 56px;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1;
  letter-spacing: -2px;
}
.home-logo-ar span {
  color: #F4C842;
}
.home-logo-en {
  font-family: var(--font-en);
  font-size: 26px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 3px;
  opacity: 0.95;
  direction: ltr;
}
.home-logo-en b {
  color: #F4C842;
  font-weight: 900;
}
.home-logo-tag {
  font-family: var(--font-en);
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 3.5px;
  margin-top: 5px;
  direction: ltr;
}

.home-hero {
  background:
    radial-gradient(circle at 15% 0%, rgba(255,255,255,0.08) 0%, transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(244,200,66,0.12) 0%, transparent 50%),
    linear-gradient(155deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 32px 24px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.5;
  pointer-events: none;
}
.hero-greeting {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.8px;
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.1);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
}
.hero-title {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.hero-subtitle {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.68);
  position: relative;
  z-index: 1;
  max-width: 280px;
  margin: 0 auto;
  line-height: 1.6;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}
.hero-stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.hero-stat-pill svg { width: 14px; height: 14px; flex-shrink: 0; }

.services-section {
  padding: 0 16px 110px;
  margin-top: -36px;
  position: relative;
  z-index: 2;
}
.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}
.section-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.section-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(196,32,32,0.08);
  padding: 4px 10px;
  border-radius: 100px;
}

.svc-card {
  background: var(--white);
  border-radius: 18px;
  padding: 0;
  margin-bottom: 10px;
  display: flex;
  align-items: stretch;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 1px 3px rgba(16,24,40,0.06);
  transition: all 0.25s var(--ease);
  overflow: hidden;
  position: relative;
  width: 100%;
}
.svc-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(196,32,32,0.025) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  pointer-events: none;
}
.svc-card:hover {
  border-color: rgba(196,32,32,0.15);
  box-shadow: 0 4px 12px rgba(16,24,40,0.06), 0 12px 28px rgba(196,32,32,0.12);
  transform: translateY(-3px);
}
.svc-card:hover::after { opacity: 1; }
.svc-card:active { transform: scale(0.985) translateY(-1px); }

.svc-icon-wrap {
  width: 70px;
  min-width: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0 16px 14px;
  flex-shrink: 0;
}
.svc-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(150deg, #E03030, #C42020 60%, #A81818);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px -2px rgba(168,24,24,0.4), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: all 0.25s var(--ease);
  position: relative;
}
.svc-card:hover .svc-icon-circle {
  box-shadow: 0 6px 16px -2px rgba(196,32,32,0.45), inset 0 1px 0 rgba(255,255,255,0.25);
  transform: scale(1.07) rotate(-3deg);
}
.svc-icon-circle svg { width: 24px; height: 24px; position: relative; z-index: 1; }

.svc-content {
  flex: 1;
  padding: 14px 14px 14px 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
  min-width: 0;
  border-right: 1px solid #F1F2F4;
}
.svc-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.35;
  letter-spacing: -0.15px;
}
.svc-desc {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.5;
}

.svc-arrow {
  display: flex;
  align-items: center;
  padding: 0 16px;
  flex-shrink: 0;
}
.svc-arrow svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  opacity: 0.7;
  transition: all 0.25s var(--ease);
}
.svc-card:hover .svc-arrow svg { opacity: 1; color: var(--primary); transform: translateX(-3px); }

.home-prefooter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 40px 30px;
  margin: 20px 0 0;
  border-radius: 0;
  width: 100%;
  position: relative;
  z-index: 1;
}
.home-prefooter::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50vw;
  right: -50vw;
  background-color: #B59B4D;
  z-index: -1;
}
@media (max-width: 768px) {
  .home-prefooter {
    flex-direction: column;
    text-align: center;
    gap: 36px;
  }
  .pf-end { align-items: center !important; text-align: center !important; direction: ltr !important; }
  .pf-stores { justify-content: center !important; flex-direction: row !important; }
  .custom-search { max-width: 400px; margin: 0 auto; }
}
.pf-block { flex: 1; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pf-center { align-items: center; text-align: center; }
.pf-end { align-items: flex-end; text-align: right; direction: ltr; }
.pf-title { font-size: clamp(15px, 4.2vw, 20px); color: #fff; line-height: 1.4; font-weight: 700; margin: 0; }
.pf-msg { font-size: 11.5px; font-weight: 700; min-height: 14px; color: #fff; }
.pf-msg.ok { color: #fff; }
.pf-msg.err { color: #FFF3F3; }

.custom-search { display: flex; flex-direction: row-reverse; gap: 0; width: 100%; border-radius: 4px; overflow: hidden; }
.custom-search-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  background: #fff;
  border: none;
  border-radius: 0;
  font-family: var(--font-ar);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  text-align: left;
  direction: ltr;
  transition: all 0.2s var(--ease);
}
.custom-search-input:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--primary); }
.custom-search-botton {
  flex-shrink: 0;
  padding: 0 24px;
  border: none;
  border-radius: 0;
  background-color: #8E0806;
  background: #8E0806;
  color: #fff;
  font-family: var(--font-ar);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
  box-shadow: 0 4px 12px -3px rgba(142,8,6,0.45);
}
.custom-search-botton:hover { transform: translateY(-1px); background-color: #6C0604; background: #6C0604; }
.custom-search-botton:active { transform: scale(0.98); }

.webreview { display: flex; gap: 16px; margin-top: 8px; }
.webreview .emoji {
  width: 55px; height: 55px;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  background: transparent;
  border: none;
  transition: transform 0.25s var(--ease), filter 0.2s var(--ease);
}
.webreview .emoji:hover { transform: translateY(-4px) scale(1.08); filter: drop-shadow(0 8px 10px rgba(142,8,6,0.35)); }
.webreview .emoji:active { transform: translateY(-1px) scale(1.02); }
.webreview .emoji.selected { transform: translateY(-3px) scale(1.05); filter: drop-shadow(0 6px 8px rgba(142,8,6,0.4)); }

.pf-stores { display: flex; gap: 14px; flex-direction: row; justify-content: flex-end; width: 100%; }
.pf-stores a { display: inline-flex; }
.pf-stores img {
  border-radius: 6px;
  display: block;
  height: 44px !important;
  width: auto !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pf-stores a:hover img { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0,0,0,0.25); }

.home-footer {
  background: var(--white);
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.04);
  padding: 22px 20px 16px;
  margin-top: 14px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.footer-col { display: flex; align-items: center; }
.footer-social-col, .footer-contact-col { justify-content: center; }
.footer-logo-img { max-width: 100%; height: auto; display: block; }
@media (min-width: 320px) and (max-width: 575px) {
  .footer-logo-img { width: 60%; }
}
@media (max-width: 992px) {
  .footer-logo-img { width: 65%; }
}
@media (min-width: 993px) {
  .footer-logo-img { height: 70px; width: auto; }
}
.footer-follow { font-size: 13px; color: var(--text-secondary); margin: 0 8px 0 0; font-weight: 700; }
.footer-socials {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.social-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: #fff;
  border: 1px solid #E3E6EA;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  text-decoration: none;
}
.social-btn svg { fill: #111 !important; }
.social-btn:hover { transform: translateY(-2px); background: #F4F5F7; box-shadow: 0 4px 10px rgba(0,0,0,0.12); }
.footer-contact { display: flex; align-items: center; gap: 10px; }
.footer-contact p { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; margin: 0; font-weight: 600; }
.footer-phone-icon {
  width: 34px; height: 34px;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--primary-light), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px -1px rgba(196,32,32,0.3);
}
.footer-copy {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  margin-top: 14px;
}

.btn-primary {
  width: 100%;
  padding: clamp(14px, 2vh, 18px) 20px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 55%, var(--primary-light));
  border: none;
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-ar);
  font-size: clamp(14px, 3.8vw, 16.5px);
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.05), 0 10px 24px -6px rgba(196,32,32,0.45);
  transition: all 0.22s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15), transparent 60%);
  pointer-events: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(16,24,40,0.05), 0 14px 30px -6px rgba(196,32,32,0.5); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-ghost {
  width: 100%;
  padding: 14px 20px;
  background: var(--white);
  border: 1.5px solid #E5E7EB;
  border-radius: 14px;
  color: var(--text-primary);
  font-family: var(--font-ar);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.22s var(--ease);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: rgba(196,32,32,0.03); }

.page-inner { padding: clamp(16px, 4vw, 28px) clamp(12px, 3vw, 24px) clamp(28px, 6vh, 48px); }

.login-wrap { padding: 0; }
.login-header-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(244,200,66,0.15) 0%, transparent 55%),
    linear-gradient(150deg, var(--primary), var(--primary-dark));
  padding: 36px 24px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-header-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.5;
}
.login-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.login-card-title {
  font-size: clamp(19px, 5.5vw, 26px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
  letter-spacing: -0.3px;
}
.login-card-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  position: relative;
  z-index: 1;
}

.form-card {
  background: var(--white);
  border-radius: 22px;
  padding: 26px 20px 22px;
  box-shadow: 0 -8px 24px rgba(16,24,40,0.04);
  margin: -32px 14px 16px;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(0,0,0,0.03);
}

.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-align: right;
  letter-spacing: -0.1px;
}
.inp-wrap { position: relative; margin-bottom: 16px; }
.inp {
  width: 100%;
  padding: 15px 16px;
  background: #F8F9FB;
  border: 1.5px solid #ECEEF1;
  border-radius: 13px;
  font-family: var(--font-ar);
  font-size: 14.5px;
  color: var(--text-primary);
  outline: none;
  text-align: right;
  direction: rtl;
  transition: all 0.2s var(--ease);
}
.inp:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(196,32,32,0.08);
}
.inp::placeholder { color: var(--text-muted); font-size: 13.5px; }
.inp-has-icon { padding-left: 48px; }
.inp-icon-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  left: 14px;
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center;
  transition: color 0.2s;
}
.inp-icon-btn:hover { color: var(--primary); }

.forgot-link {
  display: block;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  margin-bottom: 20px;
  transition: opacity 0.2s;
}
.forgot-link:hover { opacity: 0.7; }

.err-box {
  display: none;
  align-items: flex-start;
  gap: 8px;
  background: #FEF2F2;
  border: 1px solid rgba(220,38,38,0.15);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--error);
  margin-bottom: 16px;
  text-align: right;
  line-height: 1.5;
  animation: slideDown 0.2s var(--ease);
}
.err-box.show { display: flex; }
@keyframes slideDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

.spinner {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-left: 7px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-bar {
  display: flex;
  gap: 5px;
  margin-bottom: 22px;
}
.prog-pip {
  height: 4px;
  flex: 1;
  border-radius: 3px;
  background: #E8EAED;
  transition: background 0.35s var(--ease);
}
.prog-pip.done   { background: var(--primary); }
.prog-pip.active { background: linear-gradient(90deg, var(--primary), var(--accent)); }

.section-card {
  background: var(--white);
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 4px 16px rgba(16,24,40,0.05);
  margin-bottom: 16px;
  border: 1px solid rgba(0,0,0,0.03);
}
.section-heading { font-size: 18.5px; font-weight: 900; color: var(--text-primary); margin-bottom: 6px; letter-spacing: -0.3px; }
.section-desc    { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 22px; line-height: 1.6; }

.custom-select { position: relative; margin-bottom: 16px; }
.cs-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 15px 16px;
  background: #F8F9FB;
  border: 1.5px solid #ECEEF1;
  border-radius: 13px;
  font-family: var(--font-ar);
  font-size: 14.5px;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  text-align: right;
  direction: rtl;
  transition: all 0.2s var(--ease);
}
.cs-trigger.active,
.cs-trigger:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(196,32,32,0.08); }
.cs-placeholder { color: var(--text-muted); font-size: 13.5px; }
.cs-chevron { color: var(--text-muted); flex-shrink: 0; transition: transform 0.25s var(--ease); }
.cs-trigger.active .cs-chevron { transform: rotate(180deg); color: var(--primary); }

.cs-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  box-shadow: 0 12px 32px -8px rgba(16,24,40,0.18);
  padding: 6px;
  z-index: 30;
  max-height: 264px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top;
  pointer-events: none;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.cs-menu.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.cs-option {
  padding: 12px 14px;
  border-radius: 10px;
  font-family: var(--font-ar);
  font-size: 13.5px;
  color: var(--text-primary);
  text-align: right;
  direction: rtl;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.cs-option:hover { background: #FEF2F2; color: var(--primary); }
.cs-option:active { background: #FBE9E9; }

.q-reveal-box {
  background: linear-gradient(135deg, #FFF7F7, #FFF1F1);
  border: 1px solid rgba(196,32,32,0.12);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.q-icon-bg {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--primary-light), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px -1px rgba(196,32,32,0.3);
}
.q-text { font-size: 13.5px; font-weight: 600; color: var(--text-primary); line-height: 1.55; padding-top: 6px; }

.timer-wrap { display: flex; flex-direction: column; align-items: center; margin: 16px 0 20px; }
.timer-ring { width: 104px; height: 104px; position: relative; display: flex; align-items: center; justify-content: center; }
.timer-glow {
  position: absolute;
  width: 88px; height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,32,32,0.12), transparent 70%);
  filter: blur(4px);
}
.timer-ring svg { position: absolute; top:0; left:0; transform: rotate(-90deg); overflow: visible; }
.timer-ring circle { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke 0.4s var(--ease); }
.t-bg { stroke: #F1F2F4; stroke-width: 7; }
.t-fg { stroke: url(#timerGrad); stroke-width: 7; stroke-dasharray: 276.46; filter: drop-shadow(0 2px 5px rgba(196,32,32,0.28)); }
.t-num { position: relative; font-size: 24px; font-weight: 900; color: var(--primary); font-family: var(--font-en); letter-spacing: -0.5px; }
.timer-ring.warn .t-num { color: #DC2626; animation: timerPulse 1s ease-in-out infinite; }
.timer-ring.warn .t-glow { background: radial-gradient(circle, rgba(220,38,38,0.18), transparent 70%); }
@keyframes timerPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.t-label { font-size: 11px; color: var(--text-muted); margin-top: 10px; letter-spacing: 1px; font-weight: 600; }

.notice {
  border-radius: 13px;
  padding: 13px 16px;
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
  display: none;
  animation: slideDown 0.22s var(--ease);
  font-weight: 600;
}
.notice.show { display: block; }
.n-wait  { background: #FFFBEB; border: 1px solid rgba(217,119,6,0.2); color: #92400E; }
.n-ready { background: #F0FDF4; border: 1px solid rgba(22,163,74,0.2); color: #14532D; }

/* ── OTP CELLS ── */
.otp-grid {
  display: flex;
  gap: 9px;
  justify-content: center;
  margin: 22px 0;
  direction: ltr;
}
.otp-cell {
  width: 46px;
  height: 58px;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  font-family: var(--font-en);
  border-radius: 13px;
  border: 1.5px solid #ECEEF1;
  background: #F8F9FB;
  color: var(--text-primary) !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  outline: none;
  padding: 0 !important;
  transition: all 0.2s var(--ease);
  caret-color: var(--primary);
}
.otp-cell:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(196,32,32,0.1);
  transform: scale(1.04);
}
.otp-cell.filled {
  background: linear-gradient(150deg, #fff5f5, #fff0f0);
  border-color: var(--primary);
  color: var(--primary) !important;
  -webkit-text-fill-color: var(--primary) !important;
}

.resend-row { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--text-muted); }
.resend-link {
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.pending-wrap { padding: 28px 16px 40px; text-align: center; }
.pending-animation {
  width: 88px; height: 88px;
  margin: 0 auto 22px;
  background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
  border: 2px solid rgba(234,88,12,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: pendingPulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(234,88,12,0.15);
}
@keyframes pendingPulse {
  0%   { box-shadow: 0 0 0 0 rgba(234,88,12,0.2); }
  50%  { box-shadow: 0 0 0 14px rgba(234,88,12,0); }
  100% { box-shadow: 0 0 0 0 rgba(234,88,12,0); }
}
.pending-title {
  font-size: 22px;
  font-weight: 900;
  color: #C2410C;
  margin-bottom: 10px;
  letter-spacing: -0.4px;
}
.pending-sub {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.pending-status-card {
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 4px 14px rgba(16,24,40,0.05);
  border: 1px solid rgba(0,0,0,0.03);
}
.pending-status-header {
  background: linear-gradient(135deg, #FFF7ED, #FFEDD5);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(234,88,12,0.1);
}
.pending-status-title {
  font-size: 13px;
  font-weight: 800;
  color: #9A3412;
}
.pending-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #FEF3C7;
  border: 1px solid rgba(217,119,6,0.25);
  border-radius: 100px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #92400E;
}
.pending-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #D97706;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.p-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 13px 18px;
  border-bottom: 1px solid #F3F4F6;
}
.p-row:last-child { border-bottom: none; }
.p-lbl { color: var(--text-secondary); font-weight: 500; }
.p-val-ok  { color: var(--success); font-weight: 700; font-size: 12.5px; }
.p-val-wait {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #D97706;
  font-weight: 700;
  font-size: 12.5px;
}

.whatsapp-btn {
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, #16A34A, #15803D);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-ar);
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px -4px rgba(22,163,74,0.4);
  transition: all 0.22s var(--ease);
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}
.whatsapp-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent 60%);
  pointer-events: none;
}
.whatsapp-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -4px rgba(22,163,74,0.45); }
.whatsapp-btn:active { transform: scale(0.98); }

/* Desktop responsive layout */
@media (min-width: 768px) {
  body { overflow-y: auto; height: auto; min-height: var(--vh); }
  .screen {
    height: auto;
    min-height: var(--vh);
    justify-content: flex-start;
  }
  .services-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    padding: 40px;
    margin-top: 0;
  }
  .svc-card { margin-bottom: 0; }
  .home-prefooter, .home-footer { grid-column: 1 / -1; }
  .login-wrap, .page-inner, .pending-wrap {
    max-width: 500px;
    margin: 40px auto;
  }
  .header { justify-content: center; }
}

@media (max-width: 640px) {
  .home-prefooter { grid-template-columns: 1fr; text-align: right; }
  .pf-center { align-items: flex-start; text-align: right; }
  .pf-end { align-items: flex-start; }
  .custom-search { flex-direction: column; }
  .custom-search-botton { padding: 12px; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 14px; }
  .footer-col { justify-content: center; }
  .footer-follow { margin: 0 0 8px; }
  .footer-social-col { flex-direction: column; }
  .footer-logo-col { width: 100%; }
  .footer-logo-img { width: 100%; height: auto; }

  /* حماية الأزرار السفلية من شريط التنقل في الموبايل */
  .btn-primary { margin-bottom: calc(env(safe-area-inset-bottom) + 8px); }
  .form-card { padding-bottom: env(safe-area-inset-bottom); }
  .resend-row { padding-bottom: env(safe-area-inset-bottom); }
}

/* احترام تفضيل تقليل الحركة لذوي الحساسية */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .screen.active { animation: none; }
}

/* تحسين عرض مناطق اللمس على الموبايل ومنع تحديد النص غير المقصود */
button, .btn-primary, .btn-ghost, .social-btn, .whatsapp-btn, .custom-search-botton, .webreview .emoji {
  touch-action: manipulation;
}
