/* ============================================================
   PORTAL LUXURY SUITE — EL NAJAH SCHOOL (فضاء الولي الفاخر)
   Full-Screen 100% Viewport Background & Wide Fluid Zero-Gap Layout
   ============================================================ */

:root {
  --portal-bg: #060A14;
  --portal-bg-surface: #0A1122;
  --portal-card-glass: rgba(10, 17, 34, 0.78);
  --portal-card-glass-hover: rgba(16, 26, 52, 0.92);
  
  --portal-blue: #2563EB;
  --portal-blue-light: #38BDF8;
  --portal-blue-glow: rgba(37, 99, 235, 0.35);

  --portal-gold: #F59E0B;
  --portal-gold-light: #FBBF24;
  --portal-gold-glow: rgba(245, 158, 11, 0.28);
  --portal-gold-soft: rgba(245, 158, 11, 0.12);

  --portal-emerald: #10B981;
  --portal-emerald-light: #34D399;
  --portal-emerald-glow: rgba(168, 85, 247, 0.30);
  --portal-emerald-soft: rgba(16, 185, 129, 0.14);

  --portal-purple: #A855F7;
  --portal-purple-light: #C084FC;
  --portal-purple-glow: rgba(168, 85, 247, 0.28);

  --portal-danger: #EF4444;
  --portal-danger-soft: rgba(239, 68, 68, 0.14);

  --portal-border: rgba(255, 255, 255, 0.08);
  --portal-border-hover: rgba(56, 189, 248, 0.45);
  --portal-border-gold: rgba(245, 158, 11, 0.35);

  --portal-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --portal-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 1. Full-Screen Shell Overrides (100% Background Coverage) ── */
body.portal-active {
  background: var(--portal-bg) !important;
  color: #EDF2FA !important;
  direction: rtl !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.portal-active #app,
body.portal-active .app-container {
  background: transparent !important;
  max-width: 100vw !important;
  width: 100% !important;
  min-height: 100vh !important;
}

body.portal-active .main-content {
  background: transparent !important;
  margin-right: var(--sidebar-width, 272px) !important;
  margin-left: 0 !important;
  width: calc(100% - var(--sidebar-width, 272px)) !important;
  max-width: calc(100% - var(--sidebar-width, 272px)) !important;
  box-sizing: border-box !important;
  padding: 0 !important;
}

/* Fluid Page Content (Zero Awkward Margins / Voids) */
body.portal-active main.main-content > div.page-content,
body.portal-active .page-content {
  background: transparent !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 24px 30px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  transform: none !important;
  animation: none !important;
}

body.portal-active .app-view-pane {
  background: transparent !important;
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  transform: none !important;
  animation: none !important;
}

/* Glassmorphic Sidebar in Parent Portal (Translucent to show full-screen background) */
body.portal-active .sidebar {
  right: 0 !important;
  left: auto !important;
  background: rgba(6, 10, 20, 0.45) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-right: none !important;
  box-shadow: -6px 0 35px rgba(0, 0, 0, 0.6) !important;
}

body.portal-active .sidebar .brand-title,
body.portal-active .sidebar .brand-name,
body.portal-active .sidebar .user-name {
  color: #F8FAFC !important;
}

body.portal-active .sidebar .nav-item,
body.portal-active .sidebar .nav-link,
body.portal-active .sidebar .user-role {
  color: #94A3B8 !important;
}

body.portal-active .sidebar .nav-item:hover,
body.portal-active .sidebar .nav-link:hover {
  background: rgba(37, 99, 235, 0.16) !important;
  color: #38BDF8 !important;
}

body.portal-active .sidebar .nav-item.active,
body.portal-active .sidebar .nav-link.active {
  background: linear-gradient(270deg, rgba(37, 99, 235, 0.32) 0%, rgba(37, 99, 235, 0.10) 100%) !important;
  color: #38BDF8 !important;
  border-right: 3px solid #38BDF8 !important;
  box-shadow: inset 1px 0 10px rgba(37, 99, 235, 0.25) !important;
}

/* Glassmorphic Topbar in Parent Portal (Translucent to show full-screen background) */
body.portal-active .topbar {
  background: rgba(6, 10, 20, 0.40) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #F8FAFC !important;
}

body.portal-active .topbar h1,
body.portal-active .topbar .page-title,
body.portal-active .topbar span {
  color: #F8FAFC !important;
}

body.portal-active .topbar .btn-icon,
body.portal-active .topbar button {
  color: #CBD5E1 !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.portal-active .topbar .btn-icon:hover,
body.portal-active .topbar button:hover {
  background: rgba(37, 99, 235, 0.18) !important;
  color: #38BDF8 !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

/* ── 2. Full-Screen Canvas & Ambient Veil (100% Window Coverage) ── */
.portal-bg-canvas {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 0 !important;
  opacity: 1 !important;
}

.portal-bg-veil {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 0 !important;
  background:
    radial-gradient(1100px 580px at 85% -5%, rgba(37, 99, 235, 0.22), transparent 60%),
    radial-gradient(850px 480px at 8% 18%, rgba(245, 158, 11, 0.14), transparent 60%),
    radial-gradient(950px 580px at 50% 105%, rgba(16, 185, 129, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(6, 10, 20, 0.20), rgba(6, 10, 20, 0.65) 55%, rgba(6, 10, 20, 0.94));
}

.portal-orb {
  position: fixed !important;
  border-radius: 50% !important;
  filter: blur(85px) !important;
  pointer-events: none !important;
  z-index: 0 !important;
  opacity: 0.50;
  animation: portalOrbFloat 10s ease-in-out infinite alternate;
}
.portal-orb-1 { width: 440px; height: 440px; background: var(--portal-blue); top: -90px; left: 8%; }
.portal-orb-2 { width: 340px; height: 340px; background: var(--portal-gold); top: 32%; right: -50px; animation-delay: -3.5s; opacity: 0.38; }
.portal-orb-3 { width: 380px; height: 380px; background: var(--portal-emerald); bottom: -100px; left: 30%; animation-delay: -6.5s; opacity: 0.35; }

@keyframes portalOrbFloat {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(45px) scale(1.10); }
}

/* Content Container (Zero Awkward Gaps, 100% Fluid Width) */
.portal-ambient-wrapper {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.portal-content-layer {
  position: relative;
  z-index: 1;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* ── 3. OTP-Style Glowing Floating Icon Rings ──────────────── */
.portal-icon-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.38) 0%, rgba(10, 17, 34, 0.60) 75%);
  border: 2px solid rgba(56, 189, 248, 0.50);
  color: var(--portal-blue-light);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 25px var(--portal-blue-glow), inset 0 2px 4px rgba(255, 255, 255, 0.30);
  animation: portalIconLevitate 4.5s ease-in-out infinite;
  flex-shrink: 0;
  transition: transform 0.3s var(--portal-ease-spring), box-shadow 0.3s ease;
  position: relative;
  z-index: 3;
}

.portal-icon-ring.gold {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(10, 17, 34, 0.60) 75%);
  border-color: rgba(245, 158, 11, 0.60);
  color: var(--portal-gold);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 25px var(--portal-gold-glow), inset 0 2px 4px rgba(255, 255, 255, 0.30);
}

.portal-icon-ring.emerald {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(10, 17, 34, 0.60) 75%);
  border-color: rgba(16, 185, 129, 0.60);
  color: var(--portal-emerald);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 25px var(--portal-emerald-glow), inset 0 2px 4px rgba(255, 255, 255, 0.30);
}

.portal-icon-ring.purple {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, rgba(10, 17, 34, 0.60) 75%);
  border-color: rgba(168, 85, 247, 0.60);
  color: var(--portal-purple-light);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 25px var(--portal-purple-glow), inset 0 2px 4px rgba(255, 255, 255, 0.30);
}

.portal-icon-ring:hover {
  transform: translateY(-11px) scale(1.14) !important;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.7), 0 0 40px var(--portal-blue-glow) !important;
}

/* 3D Floating Icon Keyframes (تعوم فوق الخلفية المتحركة بانعدام الجاذبية) */
@keyframes portalIconLevitate {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5), 0 0 18px rgba(37, 99, 235, 0.35);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
  }
  50% {
    transform: translateY(-11px) rotate(2.5deg) scale(1.08);
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.7), 0 0 32px rgba(56, 189, 248, 0.65), 0 0 15px rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 18px rgba(56, 189, 248, 0.5));
  }
}

/* Staggered Floating Levitation for child cards */
.child-portal-card-luxury:nth-child(1) .student-vector-avatar { animation: portalIconLevitate 4.2s ease-in-out infinite 0s; }
.child-portal-card-luxury:nth-child(2) .student-vector-avatar { animation: portalIconLevitate 4.6s ease-in-out infinite -1.4s; }
.child-portal-card-luxury:nth-child(3) .student-vector-avatar { animation: portalIconLevitate 4.0s ease-in-out infinite -2.8s; }
.child-portal-card-luxury:nth-child(4) .student-vector-avatar { animation: portalIconLevitate 4.8s ease-in-out infinite -4.2s; }

/* ── 4. Parent Hero Card (Translucent Luxury Glass) ────────── */
.portal-hero-card-luxury {
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(14, 30, 66, 0.36) 0%, rgba(10, 17, 34, 0.48) 100%) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  backdrop-filter: blur(12px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
  padding: 28px 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  transform-style: preserve-3d;
}

.portal-hero-card-luxury::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--portal-blue-light), var(--portal-gold), transparent);
}

/* ── 5. Stat Matrix Chips ─────────────────────────────────── */
.portal-stat-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  padding: 14px 18px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s var(--portal-ease-spring), border-color 0.3s ease, box-shadow 0.3s ease;
}

.portal-stat-chip:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ── 6. Quick Action Services Bar ─────────────────────────── */
.portal-service-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1.5px solid var(--portal-border);
  background: rgba(10, 17, 34, 0.38) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  cursor: pointer;
  transition: all 0.28s var(--portal-ease-spring);
  color: var(--btn-color, #EDF2FA);
  text-decoration: none;
}

.portal-service-btn:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--btn-color, var(--portal-blue-light));
  background: var(--btn-bg-hover, rgba(37, 99, 235, 0.22)) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35), 0 0 16px var(--btn-glow, var(--portal-blue-glow));
}

.portal-service-btn:active {
  transform: scale(0.96);
}

.portal-service-btn .btn-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--btn-icon-bg, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--btn-icon-border, rgba(255, 255, 255, 0.16));
  transition: transform 0.28s var(--portal-ease-spring);
  animation: portalMicroIconFloat 3.8s ease-in-out infinite;
}

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

.portal-service-btn:hover .btn-icon-box {
  transform: scale(1.15) rotate(-4deg) !important;
}

/* ── 7. Child Card Luxury Suite (Translucent Glassmorphism) ── */
.child-portal-card-luxury {
  border-radius: 20px;
  background: rgba(10, 17, 34, 0.42) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.09) !important;
  backdrop-filter: blur(12px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(160%) !important;
  padding: 24px 26px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.40), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
  transition: all 0.35s var(--portal-ease-spring);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  transform-style: preserve-3d;
}

.child-portal-card-luxury::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.child-portal-card-luxury:hover {
  transform: translateY(-8px) scale(1.012);
  border-color: rgba(56, 189, 248, 0.50);
  background: rgba(14, 25, 48, 0.58) !important;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.60), 0 0 30px rgba(37, 99, 235, 0.30);
}

.child-portal-card-luxury:hover::before {
  opacity: 1;
}

/* ── 8. Child Micro-Service Grid Buttons ───────────────────── */
.child-micro-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-color, #CBD5E1);
  cursor: pointer;
  transition: all 0.22s var(--portal-ease-spring);
  text-decoration: none;
}

.child-micro-btn:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--hover-border, var(--portal-blue-light));
  background: var(--hover-bg, rgba(37, 99, 235, 0.16));
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.child-micro-btn:active {
  transform: scale(0.95);
}

/* ── 9. Vector Student Avatars (Floating In Space Above Background) ── */
.student-vector-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.40) 0%, rgba(10, 17, 34, 0.65) 80%);
  border: 1.5px solid rgba(56, 189, 248, 0.50);
  color: var(--portal-blue-light);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 0 20px rgba(37, 99, 235, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.30);
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  transition: transform 0.35s var(--portal-ease-spring), border-color 0.3s ease, box-shadow 0.3s ease;
}

.child-portal-card-luxury:hover .student-vector-avatar {
  transform: translateY(-8px) scale(1.16) rotate(-4deg);
  border-color: var(--portal-gold);
  color: var(--portal-gold-light);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6), 0 0 32px var(--portal-gold-glow);
}

/* ── 10. Document Progress Bar ────────────────────────────── */
.portal-progress-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.portal-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--portal-blue), var(--portal-emerald));
  transition: width 0.6s var(--portal-ease-spring);
}

.portal-progress-fill.full {
  background: linear-gradient(90deg, var(--portal-emerald), var(--portal-emerald-light));
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* ── 11. Luxury Date of Birth Picker (اختيار تاريخ الميلاد الذكي) ── */
.dob-picker-wrapper {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  transition: all 0.3s ease;
}

.dob-picker-wrapper:focus-within {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
  background: rgba(14, 25, 48, 0.35);
}

.dob-select {
  background: rgba(10, 17, 34, 0.75) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  color: #F8FAFC !important;
  border-radius: 10px !important;
  padding: 9px 10px !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.dob-select:hover {
  border-color: rgba(56, 189, 248, 0.45) !important;
  background: rgba(14, 25, 48, 0.85) !important;
}

.dob-select:focus {
  border-color: #38BDF8 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35) !important;
  outline: none !important;
}

.dob-select option {
  background: #0A1122 !important;
  color: #F8FAFC !important;
  padding: 8px !important;
}
