html {
  font-size: 13px;
  font-weight: 400;
  font-family: Inter,Helvetica,sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.page-loading {
  margin: 0;
  height: 100%;
  overflow: hidden;
  transition: none !important;
}

/* Splash visibility mechanism (kept from original) */
.splash-screen {
  display: none;
}

.page-loading .splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ===== Al Jazirah loading screen design ===== */
.aj-loading-root {
  background: linear-gradient(160deg, #0D2B5E 0%, #1B4F8A 45%, #0D2B5E 100%);
  position: relative;
  overflow: hidden;
  font-family: 'Tajawal', sans-serif;
}

.aj-bg-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.aj-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(184,212,232,0.08);
}
.aj-ring-1 { width: 680px; height: 680px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.aj-ring-2 { width: 520px; height: 520px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.aj-ring-3 { width: 360px; height: 360px; top: 50%; left: 50%; transform: translate(-50%,-50%); }

.aj-glow-top {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(184,212,232,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.aj-glow-bottom {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(232,137,10,0.10) 0%, transparent 70%);
  pointer-events: none;
}

.aj-logo-wrapper {
  position: relative;
  margin-bottom: 28px;
  animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.aj-logo-ring-outer {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 2.5px solid rgba(232,137,10,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: rotateSlow 12s linear infinite;
}

.aj-logo-ring-outer::before {
  content: '';
  position: absolute;
  top: -3px; left: 30px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #E8890A;
  box-shadow: 0 0 8px rgba(232,137,10,0.8);
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.aj-logo-inner {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: rotateSlow 12s linear infinite reverse;
}

.aj-logo-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #fff;
}

.aj-logo-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1B4F8A, #0D2B5E);
  border: 2px solid rgba(184,212,232,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.aj-logo-placeholder span {
  color: #B8D4E8;
  font-size: 9px;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  line-height: 1.4;
}

.aj-system-name {
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 6px;
  text-align: center;
  direction: rtl;
}

.aj-system-sub {
  color: rgba(184,212,232,0.75);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Barlow', sans-serif;
  margin-bottom: 36px;
  text-align: center;
}

.aj-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #E8890A, transparent);
  margin: 0 auto 36px;
  border-radius: 2px;
}

.aj-progress-container {
  width: 280px;
  margin-bottom: 16px;
}

.aj-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  direction: rtl;
}

.aj-progress-label span {
  color: rgba(184,212,232,0.7);
  font-size: 12px;
  font-family: 'Barlow', sans-serif;
}

.aj-progress-label .pct {
  color: #E8890A;
  font-weight: 600;
  font-size: 13px;
  min-width: 36px;
  text-align: left;
}

.aj-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.aj-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #1B4F8A, #E8890A);
  width: 0%;
  animation: loadProgress 3s ease-in-out forwards;
  position: relative;
}

@keyframes loadProgress {
  0% { width: 0%; }
  20% { width: 25%; }
  45% { width: 52%; }
  70% { width: 74%; }
  88% { width: 88%; }
  100% { width: 100%; }
}

.aj-progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E8890A;
  box-shadow: 0 0 6px rgba(232,137,10,0.9);
}

.aj-status-msg {
  color: rgba(184,212,232,0.55);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-align: center;
  min-height: 18px;
  margin-bottom: 32px;
  direction: rtl;
  font-family: 'Tajawal', sans-serif;
}

.aj-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.aj-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
}
.aj-dot.active {
  background: #E8890A;
  box-shadow: 0 0 6px rgba(232,137,10,0.7);
}

.aj-footer {
  position: absolute;
  bottom: 20px;
  left: 0; right: 0;
  text-align: center;
}

.aj-footer span {
  color: rgba(184,212,232,0.3);
  font-size: 11px;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.aj-footer strong {
  color: rgba(184,212,232,0.5);
  font-weight: 500;
}

.aj-corner-badge {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  direction: rtl;
}

.aj-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 8px rgba(74,222,128,0.7);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.3); }
}

.aj-badge-text {
  color: rgba(184,212,232,0.5);
  font-size: 11px;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 0.5px;
}

.aj-version {
  position: absolute;
  top: 18px;
  left: 20px;
  color: rgba(184,212,232,0.3);
  font-size: 11px;
  font-family: 'Barlow', sans-serif;
  letter-spacing: 1px;
}
