/* =========================================================
   المتغيرات العامة - بنفسجي ووردي
   ========================================================= */
:root {
  --purple-1: #2d1b69;
  --purple-2: #4c1d95;
  --purple-3: #7c3aed;
  --purple-light: #a78bfa;
  --pink-1: #ec4899;
  --pink-2: #f472b6;
  --pink-light: #fbcfe8;
  --rose-bg: #fdf2f8;
  --rose-bg-2: #fce7f3;
  --cream: #fff7ed;
  
  --bg-page: #1a0b3d;
  --bg-page-2: #2d1b69;
  --bg-card: #241454;
  --bg-card-2: #2d1b69;
  --bg-input: #2d1b69;
  --bg-input-focus: #3a2478;
  
  --text-primary: #ffffff;
  --text-secondary: #fbcfe8;
  --text-muted: #a78bfa;
  --text-dark-on-cream: #1f1b2e;
  --text-medium: #8b7fa8;
  
  --gold: #ec4899;
  --gold-light: #f472b6;
  --gold-dark: #a78bfa;
  --gold-bright: #fbcfe8;
  
  --gradient-main: linear-gradient(135deg, #7c3aed, #ec4899);
  --gradient-hover: linear-gradient(135deg, #ec4899, #7c3aed);
  
  --border: rgba(236, 72, 153, 0.2);
  --border-focus: rgba(236, 72, 153, 0.6);
  
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  
  --shadow-card: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  --shadow-gold: 0 20px 60px -15px rgba(236, 72, 153, 0.4);
}

body.light-mode {
  --bg-page: #fdf2f8;
  --bg-page-2: #fce7f3;
  --bg-card: #ffffff;
  --bg-card-2: #fff7ed;
  --bg-input: #fdf2f8;
  --bg-input-focus: #fce7f3;
  
  --text-primary: #1f1b2e;
  --text-secondary: #be185d;
  --text-muted: #8b7fa8;
  --text-dark-on-cream: #1f1b2e;
  
  --border: rgba(124, 58, 237, 0.15);
  --border-focus: rgba(236, 72, 153, 0.5);
  
  --shadow-card: 0 30px 80px -20px rgba(124, 58, 237, 0.15);
  --shadow-gold: 0 20px 60px -15px rgba(236, 72, 153, 0.25);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  direction: rtl;
  transition: background 0.5s ease, color 0.5s ease;
  position: relative;
}

.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  background-image: radial-gradient(circle, var(--gold) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.04;
  pointer-events: none;
}

/* =========================================================
   أزرار عامة
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s ease;
}

.btn:hover::before { left: 100%; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--purple-3), var(--pink-1));
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--pink-1), var(--purple-3));
  box-shadow: 0 15px 35px -10px var(--shadow-gold);
}

.btn-success { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
.btn-danger { background: linear-gradient(135deg, #dc2626, #ef4444); color: #fff; }
.btn-accent { background: linear-gradient(135deg, var(--purple-3), var(--pink-1)); color: #fff; }
.btn-whatsapp { background: linear-gradient(135deg, #128c7e, #25d366); color: #fff; }
.btn-warning { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }
.btn-info { background: linear-gradient(135deg, #1e40af, #3b82f6); color: #fff; }

.btn-sm { width: auto; padding: 8px 14px; font-size: 0.8rem; }
.btn-full { width: 100%; margin-top: 10px; }

.pulse-btn { animation: pulseBtn 2s infinite; }

@keyframes pulseBtn {
  0% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.5); }
  70% { box-shadow: 0 0 0 15px rgba(236, 72, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

/* =========================================================
   حقول الإدخال
   ========================================================= */
.input-field { margin-bottom: 16px; text-align: right; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

input, select, textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--bg-input);
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.1);
  transform: translateY(-1px);
}

select { cursor: pointer; }
select option { background: var(--bg-card); color: var(--text-primary); }

.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* =========================================================
   شريط الإعلانات
   ========================================================= */
.announcement-bar {
  width: 100%;
  background: linear-gradient(90deg, var(--purple-3), var(--pink-1), var(--purple-3));
  color: #fff;
  padding: 10px 0;
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 20px rgba(236, 72, 153, 0.4);
  position: relative;
  z-index: 100;
}

.announcement-track {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-100%, 0); }
}

/* =========================================================
   الشريط العلوي
   ========================================================= */
.top-nav-bar {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: 14px;
  margin: 14px 10px;
  border: 1px solid var(--border);
  color: var(--text-primary);
  position: relative;
  z-index: 100;
  box-shadow: var(--shadow-card);
}

.nav-brand {
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.nav-brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pink-1);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
}

.notification-bell-container { position: relative; display: inline-block; }

.notification-bell-btn {
  background: rgba(236, 72, 153, 0.15);
  color: var(--pink-1);
  border: 1.5px solid rgba(236, 72, 153, 0.3);
  padding: 6px 12px;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.notification-bell-btn:hover {
  background: rgba(236, 72, 153, 0.3);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
}

.notification-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 50%;
  border: 2px solid var(--bg-page);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.7);
}

.notifications-dropdown {
  position: absolute;
  top: 52px;
  left: 0;
  width: 350px;
  max-width: 90vw;
  max-height: 460px;
  overflow-y: auto;
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  color: var(--text-primary);
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
  border: 1.5px solid var(--border);
  z-index: 99999;
  padding: 16px;
  display: none;
  text-align: right;
}

.notifications-dropdown.show {
  display: block;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-item-card {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.notif-item-card:hover {
  border-color: var(--pink-1);
  transform: translateX(-4px);
  box-shadow: 0 5px 20px rgba(236, 72, 153, 0.25);
}

.notif-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  padding-left: 20px;
}

.notif-item-body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.notif-free-special {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(167, 139, 250, 0.15)) !important;
  border: 1.5px solid var(--pink-1) !important;
  box-shadow: 0 5px 20px rgba(236, 72, 153, 0.3) !important;
}

.btn-notif-delete {
  position: absolute;
  top: 8px;
  left: 8px;
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  transition: all 0.2s;
}

.btn-notif-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  transform: scale(1.1);
}

.nav-btn-menu {
  background: rgba(236, 72, 153, 0.15);
  color: var(--pink-1);
  border: 1.5px solid rgba(236, 72, 153, 0.3);
  padding: 8px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-btn-menu:hover {
  background: rgba(236, 72, 153, 0.3);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
}

/* =========================================================
   القائمة الجانبية
   ========================================================= */
.nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  z-index: 20000;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  padding: 22px;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 1.5px solid var(--border);
  overflow-y: auto;
}

.nav-drawer.open { right: 0; }

.nav-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.nav-drawer-close {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s;
}

.nav-drawer-close:hover {
  color: var(--pink-1);
  transform: rotate(90deg);
}

.nav-drawer-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 19999;
  display: none;
  backdrop-filter: blur(4px);
}

.drawer-overlay.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.main-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 14px 30px;
  position: relative;
  z-index: 1;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(25px) saturate(180%);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: background 0.5s ease, border-color 0.5s ease;
}

.hidden { display: none !important; }

/* =========================================================
   كروت الدروس
   ========================================================= */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.lesson-card {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}

.lesson-card:hover {
  transform: translateY(-6px);
  border-color: var(--pink-1);
  box-shadow: 0 20px 40px -12px rgba(236, 72, 153, 0.4);
}

.lesson-thumb-wrapper {
  width: 100%;
  height: 150px;
  background: var(--bg-page);
  position: relative;
  overflow: hidden;
}

.lesson-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.lesson-card:hover .lesson-thumb-img { transform: scale(1.08); }

.lesson-card-body {
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.lesson-card h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 800;
  line-height: 1.4;
}

.lesson-card.free-lesson-card {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(167, 139, 250, 0.15));
  border: 2px solid var(--pink-1);
  box-shadow: 0 10px 30px -8px rgba(236, 72, 153, 0.5);
  animation: pulseFreeCard 2.5s infinite;
}

@keyframes pulseFreeCard {
  0% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.5); }
  70% { box-shadow: 0 0 0 15px rgba(236, 72, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

.free-ribbon {
  position: absolute;
  top: 15px;
  left: -35px;
  background: linear-gradient(90deg, var(--purple-3), var(--pink-1));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 4px 32px;
  transform: rotate(-45deg);
  z-index: 10;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.completed-badge-ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--success);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 10;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.status-pill {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: auto;
}

.status-locked {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-unlocked {
  background: rgba(236, 72, 153, 0.15);
  color: var(--pink-light);
  border: 1px solid rgba(236, 72, 153, 0.3);
}

/* =========================================================
   كروت المجموعات (Terms)
   ========================================================= */
.term-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(236, 72, 153, 0.1));
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.term-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.term-card:hover::before { opacity: 1; }

.term-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--pink-1);
  box-shadow: 0 25px 60px -15px rgba(236, 72, 153, 0.5);
}

.term-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--purple-3), var(--pink-1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 900;
  box-shadow: 0 10px 30px -8px rgba(236, 72, 153, 0.6);
  flex-shrink: 0;
}

.term-card-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.3;
}

.term-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.6;
}

.term-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.term-price-badge {
  background: linear-gradient(135deg, var(--purple-3), var(--pink-1));
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 900;
  font-size: 0.85rem;
  box-shadow: 0 5px 15px rgba(236, 72, 153, 0.4);
}

.term-videos-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.term-status-badge {
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
}

.term-status-locked {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.term-status-unlocked {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.term-status-free {
  background: rgba(236, 72, 153, 0.15);
  color: var(--pink-light);
  border: 1px solid rgba(236, 72, 153, 0.3);
}

/* =========================================================
   أزرار القائمة الجانبية
   ========================================================= */
.side-nav-btn {
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-align: right;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  width: 100%;
}

.side-nav-btn:hover {
  background: rgba(236, 72, 153, 0.1);
  border-color: rgba(236, 72, 153, 0.25);
  color: var(--pink-1);
  transform: translateX(-3px);
}

.side-nav-btn.active {
  background: linear-gradient(135deg, var(--purple-3), var(--pink-1));
  color: #fff;
  box-shadow: 0 8px 25px -8px rgba(236, 72, 153, 0.6);
  border-color: transparent;
  transform: translateX(0);
}

.btn-logout-side {
  color: var(--danger) !important;
  border-color: rgba(239, 68, 68, 0.2) !important;
  margin-top: 8px;
}

.btn-logout-side:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

/* =========================================================
   Dashboard Layout
   ========================================================= */
.dashboard-layout-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
  width: 100%;
}

#student-dashboard { grid-template-columns: 1fr; }
#student-dashboard .adaptive-sidebar { display: none !important; }

.adaptive-sidebar {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 20px;
}

.sidebar-menu { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.main-content-panel { min-height: 500px; width: 100%; }

.dash-box {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.dash-box:hover { border-color: rgba(236, 72, 153, 0.4); }

.box-title {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.box-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(180deg, var(--purple-3), var(--pink-1));
  border-radius: 2px;
  box-shadow: 0 0 10px var(--pink-1);
}

/* 🔽🔽🔽 المرحلة 1 انتهت هنا — المرحلة 2: صور الطلاب / التقدم / الجداول / المودالات / البطاقات 🔽🔽🔽 */
/* =========================================================
   صور الطلاب
   ========================================================= */
.student-avatar-container {
  position: relative;
  width: 95px;
  height: 95px;
  min-width: 95px;
  margin: 0 auto;
}

.student-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--pink-1);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.25), 0 10px 30px -5px rgba(236, 72, 153, 0.5);
}

.avatar-edit-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: linear-gradient(135deg, var(--purple-3), var(--pink-1));
  color: #fff;
  border: 2px solid var(--bg-page);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.6);
  transition: all 0.3s;
}

.avatar-edit-badge:hover { transform: scale(1.15); }

.code-pill {
  background: rgba(236, 72, 153, 0.15);
  color: var(--pink-light);
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 800;
  border: 1px solid rgba(236, 72, 153, 0.3);
  font-family: 'Courier New', monospace;
}

.student-profile-summary-box {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  font-size: 0.88rem;
}

.profile-details-grid span { color: var(--text-muted); font-weight: 600; }

/* =========================================================
   شريط التقدم
   ========================================================= */
.progress-bar-container {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  height: 12px;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-3), var(--pink-1), var(--pink-2));
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.7);
}

/* =========================================================
   إحصائيات
   ========================================================= */
.student-analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-analytics-box {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.stat-analytics-box:hover {
  border-color: var(--pink-1);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -10px rgba(236, 72, 153, 0.4);
}

.sa-icon { font-size: 28px; filter: drop-shadow(0 0 10px currentColor); }
.sa-info { flex: 1; }
.sa-info h4 { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; font-weight: 600; }
.sa-val { font-size: 1.15rem; font-weight: 800; color: var(--pink-light); }

/* =========================================================
   الجداول
   ========================================================= */
.table-responsive { overflow-x: auto; margin-top: 10px; border-radius: 12px; }

.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: right;
}

.custom-table th, .custom-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}

.custom-table th {
  background: rgba(236, 72, 153, 0.1);
  font-weight: 800;
  color: var(--pink-1);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.custom-table tr:hover { background: rgba(236, 72, 153, 0.05); }

.status-badge-active {
  background: rgba(236, 72, 153, 0.15);
  color: var(--pink-light);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid rgba(236, 72, 153, 0.3);
  font-size: 0.78rem;
}

.status-badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 0.78rem;
}

.badge-score-pill {
  background: rgba(236, 72, 153, 0.15);
  color: var(--pink-light);
  padding: 4px 12px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.82rem;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.pill-grade {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.views-badge {
  background: rgba(236, 72, 153, 0.15);
  color: var(--pink-light);
  padding: 5px 12px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

/* =========================================================
   النوافذ المنبثقة
   ========================================================= */
.quiz-popup-modal, .cert-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 15px;
}

.quiz-modal-content {
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  border-radius: 20px;
  padding: 26px;
  max-width: 650px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
  border: 1.5px solid var(--border);
  position: relative;
}

.quiz-modal-content::-webkit-scrollbar { width: 6px; }
.quiz-modal-content::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 10px; }
.quiz-modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--purple-3), var(--pink-1));
  border-radius: 10px;
}

/* =========================================================
   بوابة الدفع (القديمة)
   ========================================================= */
.payment-gate-box {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(167, 139, 250, 0.1));
  border: 2px dashed var(--pink-1);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  margin-top: 16px;
}

.lock-icon {
  font-size: 42px;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 15px rgba(236, 72, 153, 0.7));
}

.price-tag {
  font-size: 1.2rem;
  color: var(--pink-light);
  margin: 12px 0;
  font-weight: 800;
}

.quick-code-box {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin: 14px auto;
  max-width: 480px;
}

.payment-methods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 460px;
  margin: 14px auto;
}

.pay-card {
  padding: 16px;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

.pay-card:hover { transform: translateY(-3px); }
.v-cash { background: linear-gradient(135deg, #e11d48, #be123c); }
.e-cash { background: linear-gradient(135deg, #059669, #047857); }

.wallet-num {
  font-size: 1.05rem;
  display: block;
  margin-top: 6px;
  letter-spacing: 1px;
  font-family: 'Courier New', monospace;
}

/* =========================================================
   فيديو محمي
   ========================================================= */
.secure-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
  background: #000;
  user-select: none;
  border: 1px solid var(--border);
}

.secure-video-wrapper iframe, .secure-video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-anti-piracy-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 2px, transparent 2px, transparent 42px);
}

.video-security-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 25;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(26, 11, 61, 0.8);
  border: 1px solid rgba(236, 72, 153, 0.5);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.7rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.floating-watermark {
  position: absolute;
  z-index: 30;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  font-weight: 900;
  pointer-events: none;
  background: rgba(26, 11, 61, 0.7);
  padding: 5px 10px;
  border-radius: 6px;
  transition: all 1.2s ease-in-out;
  user-select: none;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(236, 72, 153, 0.4);
}

.video-control-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
  background: var(--bg-input);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* =========================================================
   كروت الشحن
   ========================================================= */
.printable-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.scratch-card-mini {
  border: 2px dashed var(--pink-1);
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  background: var(--bg-input);
  color: var(--text-primary);
  box-shadow: 0 5px 20px rgba(236, 72, 153, 0.2);
  position: relative;
  transition: all 0.3s;
}

.scratch-card-mini:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4);
}

.scratch-card-mini h5 { font-size: 0.82rem; color: var(--pink-1); margin-bottom: 6px; }

.scratch-card-mini .card-code-val {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--pink-light);
  background: rgba(236, 72, 153, 0.15);
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
  margin: 6px 0;
  border: 1px solid rgba(236, 72, 153, 0.3);
  font-family: 'Courier New', monospace;
}

.btn-card-del {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-card-del:hover { transform: scale(1.15) rotate(90deg); }

/* =========================================================
   السوشيال ميديا
   ========================================================= */
.teacher-social-bar {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 0 10px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 50px;
  color: #fff !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  font-family: 'Cairo', sans-serif;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  min-width: 140px;
}

.social-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s ease;
}

.social-btn:hover::before { left: 100%; }

.social-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.4);
}

.social-btn:active { transform: translateY(-2px) scale(1.02); }

.social-btn-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.social-btn:hover .social-btn-icon { transform: scale(1.2) rotate(-8deg); }
.social-btn-text { display: inline-block; letter-spacing: 0.5px; white-space: nowrap; }

.social-fb { background: linear-gradient(135deg, #1877f2, #0c63d4); box-shadow: 0 8px 25px rgba(24, 119, 242, 0.35); }
.social-tt { background: linear-gradient(135deg, #000000, #2d2d2d); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45); }
.social-yt { background: linear-gradient(135deg, #ff0000, #cc0000); box-shadow: 0 8px 25px rgba(255, 0, 0, 0.35); }
.social-wa { background: linear-gradient(135deg, #25d366, #128c7e); box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4); }

.auth-social-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 32px 0 20px;
  padding: 20px 10px 0;
  border-top: 1px solid rgba(236, 72, 153, 0.25);
  position: relative;
  animation: fadeIn 1s ease 1.5s backwards;
}

.auth-social-bar::before {
  content: 'تابعنا على منصاتنا';
  position: absolute;
  top: -10px;
  right: 50%;
  transform: translateX(50%);
  background: linear-gradient(135deg, #fdf2f8, #fce7f3);
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.social-btn-mini {
  padding: 9px 16px;
  min-width: auto;
  gap: 7px;
  font-size: 0.8rem;
  border-radius: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-btn-mini .social-btn-icon { width: 18px; height: 18px; }
.social-btn-mini .social-btn-text { font-size: 0.8rem; }

.social-btn-mini:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.social-btn-mini:hover .social-btn-icon { transform: scale(1.25) rotate(-10deg); }

/* =========================================================
   الفوتر
   ========================================================= */
.designer-footer { margin-top: 30px; text-align: center; width: 100%; }

.footer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  padding: 10px 22px;
  border-radius: 30px;
  color: var(--text-primary);
  font-size: 0.82rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.footer-badge strong { color: var(--pink-light); }
.dev-divider { color: var(--text-muted); }

.dev-contact-btn {
  background: linear-gradient(135deg, #128c7e, #25d366);
  color: #ffffff !important;
  text-decoration: none;
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
}

.dev-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* =========================================================
   أنيميشن احترافي
   ========================================================= */
.anime-fade-in { animation: fadeIn 0.5s ease-out forwards; }
.anime-slide-up { animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.anime-slide-down { animation: slideDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.anime-scale-in { animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.anime-slide-in-right { animation: slideInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.anime-slide-in-left { animation: slideInLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.anime-rotate-in { animation: rotateIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(80px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-80px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes rotateIn {
  from { opacity: 0; transform: rotate(-15deg) scale(0.8); }
  to { opacity: 1; transform: rotate(0) scale(1); }
}

.ltr-field { direction: ltr !important; text-align: left !important; }

.dash-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.menu-toggle-btn {
  background: rgba(236, 72, 153, 0.15);
  border: 1.5px solid rgba(236, 72, 153, 0.3);
  color: var(--pink-1);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-family: inherit;
  transition: all 0.3s;
}

.menu-toggle-btn:hover { background: rgba(236, 72, 153, 0.3); transform: scale(1.03); }

.exam-status-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  transition: all 0.3s;
}

.exam-status-item:hover { border-color: var(--pink-1); transform: translateX(-3px); }

.exams-status-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 350px;
  overflow-y: auto;
  padding-right: 4px;
}

.exams-status-list::-webkit-scrollbar { width: 5px; }
.exams-status-list::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 10px; }
.exams-status-list::-webkit-scrollbar-thumb { background: var(--pink-1); border-radius: 10px; }

.system-msg {
  margin-top: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 20px;
}

/* 🔽🔽🔽 المرحلة 2 انتهت هنا — المرحلة 3: صفحة تسجيل الدخول Split Screen + Animations 🔽🔽🔽 */
/* =========================================================
   صفحة تسجيل الدخول - Split Screen
   ========================================================= */
.auth-split-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  position: relative;
}

.visual-side {
  position: relative;
  background: linear-gradient(135deg, #1a0b3d 0%, #2d1b69 50%, #1a0b3d 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
}

.visual-side::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(236, 72, 153, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.35) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(167, 139, 250, 0.15) 0%, transparent 60%);
  animation: bgRotate 25s linear infinite;
}

@keyframes bgRotate {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.15); }
  to { transform: rotate(360deg) scale(1); }
}

.waves-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  opacity: 0.3;
}

.wave-path { animation: waveMove 8s ease-in-out infinite; }
.wave-path:nth-child(2) { animation-delay: -2s; animation-duration: 10s; }
.wave-path:nth-child(3) { animation-delay: -4s; animation-duration: 12s; }

@keyframes waveMove {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-30px); }
}

.stars-container, .particles-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fbcfe8;
  border-radius: 50%;
  box-shadow: 0 0 10px #fbcfe8, 0 0 20px rgba(236, 72, 153, 0.8);
  animation: twinkleStar 3s infinite ease-in-out;
}

@keyframes twinkleStar {
  0%, 100% { opacity: 0.1; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.8); }
}

.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 20px #ec4899, 0 0 40px #a78bfa;
  animation: shootingStar 4s linear infinite;
}

.shooting-star::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, #fff, transparent);
  transform: rotate(-45deg);
  transform-origin: right center;
}

@keyframes shootingStar {
  0% { transform: translate(0, 0) rotate(-45deg); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate(500px, 500px) rotate(-45deg); opacity: 0; }
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(236, 72, 153, 0.6);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.9);
  animation: particleBurst 8s infinite ease-in-out;
}

@keyframes particleBurst {
  0%, 100% { transform: translate(0, 0) scale(0.5); opacity: 0; }
  20% { transform: translate(20px, -40px) scale(1.5); opacity: 1; }
  50% { transform: translate(-30px, -80px) scale(1); opacity: 0.7; }
  80% { transform: translate(40px, -120px) scale(1.3); opacity: 0.4; }
}

.visual-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.visual-decoration::before,
.visual-decoration::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.visual-decoration::before {
  width: 900px;
  height: 900px;
  border: 2px solid rgba(236, 72, 153, 0.15);
  animation: rotateDecor 60s linear infinite;
}

.visual-decoration::after {
  width: 700px;
  height: 700px;
  border: 2px dashed rgba(167, 139, 250, 0.15);
  animation: rotateDecor 90s linear infinite reverse;
}

@keyframes rotateDecor {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.visual-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 480px;
}

.teacher-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 0 auto 40px;
  animation: floatPhoto 5s ease-in-out infinite;
}

@keyframes floatPhoto {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-15px) rotate(-2deg); }
  75% { transform: translateY(-15px) rotate(2deg); }
}

.teacher-orb {
  position: absolute;
  inset: -60px;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 30% 30%, rgba(236, 72, 153, 0.6), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(124, 58, 237, 0.6), transparent 50%);
  filter: blur(30px);
  animation: orbPulse 4s ease-in-out infinite;
  z-index: 0;
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
}

.teacher-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 3;
  padding: 6px;
  background: #1a0b3d;
  box-shadow: 
    0 0 0 3px rgba(236, 72, 153, 0.5),
    0 0 0 6px rgba(124, 58, 237, 0.3),
    0 30px 80px -20px rgba(236, 72, 153, 0.7);
}

.teacher-ring {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0%,
    #ec4899 10%,
    #f472b6 20%,
    #a78bfa 30%,
    #7c3aed 40%,
    transparent 50%,
    transparent 60%,
    #ec4899 70%,
    #f472b6 80%,
    #a78bfa 90%,
    transparent 100%);
  animation: spinRing 3s linear infinite;
  filter: blur(2px);
  z-index: 1;
}

@keyframes spinRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.teacher-ring-2 {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  border: 2px dashed rgba(244, 114, 182, 0.6);
  animation: spinRing 15s linear infinite reverse;
  z-index: 1;
}

.teacher-ring-3 {
  position: absolute;
  inset: -50px;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.4);
  animation: spinRing 25s linear infinite;
  z-index: 1;
}

.teacher-ring-4 {
  position: absolute;
  inset: -70px;
  border-radius: 50%;
  border: 1px dotted rgba(236, 72, 153, 0.3);
  animation: spinRing 40s linear infinite reverse;
  z-index: 1;
}

.teacher-shine {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
  animation: shinePass 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 4;
}

@keyframes shinePass {
  0%, 100% { opacity: 0; transform: translateX(-100%) rotate(0deg); }
  50% { opacity: 1; transform: translateX(100%) rotate(180deg); }
}

.visual-title {
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
  line-height: 1.3;
  background: linear-gradient(90deg, #fff, #fbcfe8, #a78bfa, #fff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: 
    fadeInUp 0.8s ease-out 0.3s backwards,
    titleGradient 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 30px rgba(236, 72, 153, 0.6));
}

@keyframes titleGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.visual-subtitle {
  font-size: 14px;
  color: #fbcfe8;
  letter-spacing: 10px;
  font-weight: 800;
  margin-bottom: 34px;
  animation: 
    fadeInUp 0.8s ease-out 0.5s backwards,
    letterGlow 3s ease-in-out infinite;
}

@keyframes letterGlow {
  0%, 100% { text-shadow: 0 0 15px rgba(236, 72, 153, 0.5); }
  50% { text-shadow: 0 0 30px rgba(236, 72, 153, 1), 0 0 60px rgba(124, 58, 237, 0.8); }
}

.visual-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 28px 0;
  animation: fadeInUp 0.8s ease-out 0.7s backwards;
}

.visual-divider-line {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ec4899, #a78bfa, transparent);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.8);
}

.visual-divider-diamond {
  color: #fbcfe8;
  font-size: 18px;
  animation: 
    rotateDiamond 3s linear infinite,
    diamondGlow 2s ease-in-out infinite;
}

@keyframes rotateDiamond {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.3); }
  to { transform: rotate(360deg) scale(1); }
}

@keyframes diamondGlow {
  0%, 100% { text-shadow: 0 0 15px #fbcfe8; }
  50% { text-shadow: 0 0 30px #ec4899, 0 0 60px #a78bfa; }
}

.visual-teacher-name {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 2px;
  font-weight: 700;
  animation: fadeInUp 0.8s ease-out 0.9s backwards;
  text-shadow: 0 4px 30px rgba(236, 72, 153, 0.8);
}

.visual-tagline {
  font-size: 15px;
  color: rgba(251, 207, 232, 0.85);
  line-height: 1.9;
  margin-top: 14px;
  animation: fadeInUp 0.8s ease-out 1.1s backwards;
}

.form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 50%, #fff7ed 100%);
  position: relative;
  overflow: hidden;
}

.form-side::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, transparent 70%);
  animation: orbFloat 12s ease-in-out infinite;
}

.form-side::after {
  content: '';
  position: absolute;
  bottom: -200px;
  left: -150px;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, transparent 70%);
  animation: orbFloat 15s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 50px) scale(1.2); }
}

.form-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: slideInLeft 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s backwards;
}

.welcome-header { margin-bottom: 30px; text-align: center; }

.welcome-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(124, 58, 237, 0.15));
  color: #be185d;
  padding: 8px 22px;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 16px;
  border: 1.5px solid rgba(236, 72, 153, 0.3);
  animation: 
    bounceIn 0.8s ease-out 0.5s backwards,
    badgeGlow 3s ease-in-out infinite;
  box-shadow: 0 5px 20px rgba(236, 72, 153, 0.2);
}

@keyframes badgeGlow {
  0%, 100% { box-shadow: 0 5px 20px rgba(236, 72, 153, 0.2); }
  50% { box-shadow: 0 8px 30px rgba(236, 72, 153, 0.5); }
}

@keyframes bounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 1; transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.welcome-header h2 {
  font-size: 34px;
  font-weight: 900;
  color: var(--text-dark-on-cream);
  margin-bottom: 10px;
  animation: fadeInUp 0.8s ease-out 0.7s backwards;
}

.welcome-header p {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  animation: fadeInUp 0.8s ease-out 0.9s backwards;
}

.tabs {
  display: flex;
  margin-bottom: 28px;
  background: rgba(236, 72, 153, 0.08);
  border-radius: 14px;
  padding: 5px;
  animation: fadeInUp 0.8s ease-out 1s backwards;
  position: relative;
}

.tab-btn {
  flex: 1;
  padding: 13px 8px;
  background: transparent;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.tab-btn.active {
  background: linear-gradient(135deg, #ec4899, #a78bfa);
  color: #fff;
  box-shadow: 0 8px 25px -5px rgba(236, 72, 153, 0.6);
  transform: translateY(-2px);
}

.tab-btn:not(.active):hover {
  color: var(--text-dark-on-cream);
  background: rgba(236, 72, 153, 0.1);
}

.auth-form { animation: formFadeIn 0.6s ease-out; }

@keyframes formFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-group {
  margin-bottom: 22px;
  position: relative;
  animation: formSlide 0.6s ease-out backwards;
}

.form-group:nth-of-type(1) { animation-delay: 1.1s; }
.form-group:nth-of-type(2) { animation-delay: 1.2s; }
.form-group:nth-of-type(3) { animation-delay: 1.3s; }
.form-group:nth-of-type(4) { animation-delay: 1.4s; }

@keyframes formSlide {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-medium);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
  background: #ffffff;
  border: 2px solid rgba(236, 72, 153, 0.15);
  border-radius: 14px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.input-wrapper::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #ec4899, #a78bfa, #ec4899);
  background-size: 200% 100%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px #ec4899;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.input-wrapper:focus-within {
  border-color: #ec4899;
  box-shadow: 
    0 10px 30px -10px rgba(236, 72, 153, 0.5),
    0 0 0 4px rgba(236, 72, 153, 0.1);
  transform: translateY(-3px);
}

.input-wrapper:focus-within::before { width: 100%; }

.form-input {
  width: 100%;
  padding: 15px 45px 15px 45px;
  background: transparent;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark-on-cream);
  outline: none;
}

.form-input::placeholder { color: #c4b5d4; font-weight: 500; }

.input-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 17px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.input-wrapper:focus-within .input-icon {
  color: #ec4899;
  transform: translateY(-50%) scale(1.3) rotate(-10deg);
}

.toggle-password {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 17px;
  padding: 4px;
  transition: all 0.4s ease;
}

.toggle-password:hover {
  color: #ec4899;
  transform: translateY(-50%) scale(1.3) rotate(15deg);
}

select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ec4899' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 16px;
  cursor: pointer;
}

.btn-submit {
  width: 100%;
  padding: 17px 24px;
  background: linear-gradient(135deg, #7c3aed, #ec4899, #a78bfa);
  background-size: 200% 200%;
  border: none;
  border-radius: 14px;
  font-family: 'Cairo', sans-serif;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  margin-top: 16px;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 10px 30px -10px rgba(124, 58, 237, 0.6),
    0 10px 30px -10px rgba(236, 72, 153, 0.4);
  animation: 
    btnGradient 4s ease-in-out infinite,
    btnPulseMulti 3s ease-in-out 2s infinite;
}

@keyframes btnGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes btnPulseMulti {
  0%, 100% { 
    box-shadow: 
      0 10px 30px -10px rgba(124, 58, 237, 0.6),
      0 10px 30px -10px rgba(236, 72, 153, 0.4); 
  }
  50% { 
    box-shadow: 
      0 15px 40px -5px rgba(124, 58, 237, 0.9),
      0 15px 40px -5px rgba(236, 72, 153, 0.7),
      0 0 0 8px rgba(236, 72, 153, 0.1); 
  }
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transition: left 0.8s ease;
}

.btn-submit:hover::before { left: 100%; }

.btn-submit:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 
    0 25px 60px -10px rgba(124, 58, 237, 0.8),
    0 25px 60px -10px rgba(236, 72, 153, 0.6);
}

.btn-green {
  background: linear-gradient(135deg, #047857, #10b981, #34d399) !important;
  box-shadow: 
    0 10px 30px -10px rgba(5, 150, 105, 0.6),
    0 10px 30px -10px rgba(52, 211, 153, 0.4) !important;
}

.btn-blue {
  background: linear-gradient(135deg, #1e40af, #3b82f6, #60a5fa) !important;
  box-shadow: 
    0 10px 30px -10px rgba(30, 64, 175, 0.6),
    0 10px 30px -10px rgba(96, 165, 250, 0.4) !important;
}

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  background: none;
  border: none;
  width: 100%;
}

.forgot-link:hover {
  color: #ec4899;
  transform: translateX(-5px);
  text-shadow: 0 0 15px rgba(236, 72, 153, 0.5);
}

/* =========================================================
   قائمة الأبناء (لولي الأمر)
   ========================================================= */
.parent-children-card {
  background: #ffffff;
  border: 2px solid rgba(236, 72, 153, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-wrap: wrap;
}

.parent-children-card:hover {
  border-color: #ec4899;
  box-shadow: 0 10px 30px -10px rgba(236, 72, 153, 0.5);
  transform: translateY(-3px);
}

.parent-children-card img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #ec4899;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.parent-children-card .child-info { text-align: right; flex: 1; }
.parent-children-card .child-name { font-weight: 800; color: #1f1b2e; font-size: 0.92rem; margin-bottom: 4px; }
.parent-children-card .child-grade { font-size: 0.78rem; color: #8b7fa8; font-weight: 600; }
.parent-children-card .child-code { font-size: 0.72rem; color: #ec4899; font-weight: 700; margin-top: 2px; }

.parent-children-card .enter-btn {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  border: none;
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(236, 72, 153, 0.4);
}

.parent-children-card .enter-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.6);
}

.footer-note {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  animation: fadeIn 0.8s ease 1.9s backwards;
}

/* =========================================================
   نظام الصلاحيات (Permissions)
   ========================================================= */
.permission-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.88rem;
  font-weight: 700;
  position: relative;
}

.permission-item:hover {
  border-color: var(--pink-1);
  background: rgba(236, 72, 153, 0.08);
}

.permission-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ec4899;
  cursor: pointer;
  flex-shrink: 0;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.role-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.role-admin {
  background: linear-gradient(135deg, #ec4899, #a78bfa);
  color: #fff;
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4);
}

.role-limited {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1.5px solid rgba(59, 130, 246, 0.3);
}

.assistant-card {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  transition: all 0.3s;
  flex-wrap: wrap;
}

.assistant-card:hover {
  border-color: var(--pink-1);
  box-shadow: 0 10px 30px -10px rgba(236, 72, 153, 0.3);
}

.section-pill {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--purple-light);
  border: 1.5px solid rgba(124, 58, 237, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  margin: 4px 4px 4px 0;
}

/* =========================================================
   نافذة استعادة كلمة المرور
   ========================================================= */
.reset-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 11, 61, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  padding: 15px;
  animation: fadeIn 0.3s ease;
}

.reset-modal-content {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
  animation: resetSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes resetSlideIn {
  from { opacity: 0; transform: translateY(-30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.reset-modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.2), transparent 70%);
  pointer-events: none;
}

.reset-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
  color: #fff;
  box-shadow: 0 15px 40px -10px rgba(236, 72, 153, 0.6);
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.reset-title {
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.reset-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
  margin-bottom: 24px;
  font-weight: 600;
}

/* =========================================================
   صفحة تغيير كلمة المرور
   ========================================================= */
.reset-password-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a0b3d 0%, #2d1b69 50%, #1a0b3d 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100001;
  padding: 15px;
  overflow-y: auto;
}

.reset-password-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(236, 72, 153, 0.25) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.35) 0%, transparent 45%);
  animation: bgRotate 25s linear infinite;
  pointer-events: none;
}

.reset-page-content {
  background: rgba(36, 20, 84, 0.95);
  backdrop-filter: blur(30px);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 36px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 50px 120px -20px rgba(0, 0, 0, 0.9);
  position: relative;
  z-index: 2;
  animation: resetSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reset-password-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: block;
  border: 3px solid var(--pink-1);
  box-shadow: 0 0 40px rgba(236, 72, 153, 0.6);
  object-fit: cover;
  animation: floatPhoto 5s ease-in-out infinite;
}

.password-strength-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid rgba(236, 72, 153, 0.15);
}

.password-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: all 0.4s ease;
}

.password-strength-text {
  font-size: 0.75rem;
  font-weight: 800;
  margin-top: 6px;
  text-align: right;
}

.match-indicator {
  font-size: 0.75rem;
  font-weight: 800;
  margin-top: 6px;
  text-align: right;
  display: none;
}

/* 🔽🔽🔽 المرحلة 3 انتهت هنا — المرحلة 4: Responsive + Print + Reduced Motion + Overrides + نهاية CSS 🔽🔽🔽 */
/* =========================================================
   الموبايل - Responsive
   ========================================================= */
@media (max-width: 900px) {
  .dashboard-layout-wrapper {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  
  .adaptive-sidebar { padding: 14px; position: static; }
  
  .sidebar-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  
  .side-nav-btn {
    font-size: 0.8rem;
    padding: 10px 8px;
    justify-content: center;
    text-align: center;
  }
  
  .student-analytics-grid { grid-template-columns: repeat(2, 1fr); }
  
  .grid-2col, .grid-3col, .payment-methods-grid { grid-template-columns: 1fr; }
  
  .teacher-social-bar { gap: 12px; }
  .social-btn { padding: 10px 18px; font-size: 0.82rem; min-width: 120px; }
  .social-btn-icon { width: 20px; height: 20px; }
  
  .auth-split-screen { grid-template-columns: 1fr; }
  
  .visual-side {
    min-height: 45vh;
    padding: 40px 20px;
  }
  
  .teacher-wrapper { width: 150px; height: 150px; }
  .visual-title { font-size: 26px; }
  .visual-teacher-name { font-size: 20px; }
  .visual-tagline { font-size: 12px; }
  
  .form-side { padding: 40px 20px; }
  .welcome-header h2 { font-size: 26px; }
  
  .permissions-grid { grid-template-columns: 1fr; }
  
  .glass-card,
  .adaptive-sidebar,
  .top-nav-bar,
  .notifications-dropdown {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

@media (max-width: 500px) {
  .auth-social-bar {
    gap: 8px;
    margin: 26px 0 16px;
    padding: 16px 5px 0;
  }
  
  .social-btn-mini { padding: 8px 12px; font-size: 0.74rem; gap: 6px; }
  .social-btn-mini .social-btn-icon { width: 16px; height: 16px; }
  .social-btn-mini .social-btn-text { font-size: 0.74rem; }
  
  .grid-2col, .grid-3col { grid-template-columns: 1fr; }
  .parent-children-card { padding: 12px; }
  .parent-children-card img { width: 42px; height: 42px; }
  
  .reset-modal-content, .reset-page-content { padding: 24px; }
  .reset-title { font-size: 1.15rem; }
}

@media (max-width: 380px) {
  .social-btn { padding: 9px 14px; font-size: 0.78rem; min-width: 100px; gap: 7px; }
  .social-btn-icon { width: 18px; height: 18px; }
  .social-btn-mini .social-btn-text { display: none; }
  .social-btn-mini {
    padding: 10px;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    min-width: auto;
  }
  .social-btn-mini .social-btn-icon { width: 20px; height: 20px; }
}

/* =========================================================
   EL-AFENDI PLATFORM — PROFESSIONAL UI OVERRIDES
   ========================================================= */
:root {
  --brand-name-en: "El-Afendi Platform";
  --brand-purple-deep: #16082f;
  --brand-purple: #4c1d95;
  --brand-violet: #7c3aed;
  --brand-pink: #ec4899;
  --brand-pink-soft: #f9a8d4;
  --surface-glass: rgba(36, 20, 84, 0.88);
  --surface-light: rgba(255, 255, 255, 0.94);
  --focus-ring: 0 0 0 4px rgba(236, 72, 153, 0.16);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --content-width: 1280px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  min-width: 280px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 280px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  -webkit-appearance: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(236, 72, 153, 0.42);
  outline-offset: 2px;
}

button:disabled,
.btn:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none !important;
  filter: none !important;
}

h1, h2, h3, h4, h5, h6, p, label, button, a, td, th, span {
  overflow-wrap: anywhere;
}

img, video, iframe {
  max-width: 100%;
}

img {
  height: auto;
}

#platform-wrapper,
#auth-section,
#leaderboard-section {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
}

.top-nav-bar {
  width: calc(100% - 20px);
  max-width: var(--content-width);
  margin: 12px auto;
  min-height: 68px;
  padding: 10px 16px;
  gap: 12px;
}

.nav-brand {
  min-width: 0;
  max-width: 70%;
}

.nav-brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-brand-logo {
  flex: 0 0 42px;
}

.platform-brand-name,
.el-afendi-brand,
[data-brand="el-afendi"] {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-weight: 900;
  color: var(--text-primary);
}

.glass-card,
.dash-box,
.student-profile-summary-box,
.adaptive-sidebar,
.lesson-card,
.term-card,
.stat-analytics-box,
.assistant-card,
.permission-item,
.notifications-dropdown,
.reset-modal-content,
.reset-page-content {
  isolation: isolate;
}

.glass-card {
  width: 100%;
  max-width: 100%;
}

.lessons-grid,
.terms-grid,
#terms-grid-container,
#lessons-grid-container {
  width: 100%;
  contain: layout paint;
}

.lesson-card,
.term-card,
.stat-analytics-box {
  min-width: 0;
}

.btn,
.side-nav-btn,
.menu-toggle-btn,
.nav-btn-menu,
.notification-bell-btn,
.tab-btn,
.toggle-password {
  touch-action: manipulation;
}

.side-nav-btn {
  min-height: 44px;
}

.table-responsive {
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.custom-table {
  min-width: 620px;
}

.custom-table th,
.custom-table td {
  vertical-align: middle;
}

.secure-video-wrapper {
  width: 100%;
  contain: layout paint;
}

.secure-video-wrapper iframe,
.secure-video-wrapper video {
  display: block;
}

.video-control-bar .btn {
  min-height: 42px;
}

.quiz-popup-modal,
.cert-modal,
.reset-modal {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: max(15px, env(safe-area-inset-top));
  padding-bottom: max(15px, calc(15px + var(--safe-bottom)));
}

.quiz-modal-content,
.reset-modal-content,
.reset-page-content {
  overscroll-behavior: contain;
}

.notifications-dropdown {
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

input,
select,
textarea {
  min-height: 46px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  min-height: auto;
  width: 18px;
  height: 18px;
  accent-color: var(--pink-1);
}

.search-input,
input[type="search"] {
  padding-inline-start: 44px;
}

.search-wrap,
.search-box,
.platform-search {
  position: relative;
  width: 100%;
}

.search-wrap::before,
.search-box::before,
.platform-search::before {
  content: "⌕";
  position: absolute;
  z-index: 2;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.25rem;
  pointer-events: none;
}

.is-loading,
.loading-state {
  pointer-events: none;
  user-select: none;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  animation: skeletonShimmer 1.25s infinite;
}

@keyframes skeletonShimmer {
  100% { transform: translateX(100%); }
}

.empty-state,
.error-state,
.success-state,
.loading-state {
  width: 100%;
  padding: 28px 18px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  color: var(--text-muted);
  background: var(--bg-input);
}

.error-state {
  border-color: rgba(239,68,68,.35);
  color: #fca5a5;
}

.success-state {
  border-color: rgba(16,185,129,.35);
  color: #6ee7b7;
}

.dash-header-flex h2 {
  line-height: 1.35;
}

.dash-header-flex > * {
  min-width: 0;
}

.profile-details-grid > div {
  min-width: 0;
}

.code-pill {
  direction: ltr;
  unicode-bidi: plaintext;
  display: inline-block;
}

.payment-methods-grid {
  width: 100%;
}

.pay-card {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.social-btn,
.social-btn-mini {
  touch-action: manipulation;
}

.social-btn-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.designer-footer {
  padding-bottom: calc(18px + var(--safe-bottom));
}

/* =========================================================
   Print Styles
   ========================================================= */
@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  .bg-pattern,
  .announcement-bar,
  .top-nav-bar,
  .nav-drawer,
  .drawer-overlay,
  .teacher-social-bar,
  .auth-social-bar,
  .designer-footer,
  .btn,
  button {
    display: none !important;
  }

  .glass-card,
  .dash-box,
  .student-profile-summary-box {
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  .custom-table {
    min-width: 0;
    color: #111 !important;
  }

  .custom-table th,
  .custom-table td {
    color: #111 !important;
    background: #fff !important;
  }
}

/* =========================================================
   Reduced Motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }

  .announcement-track {
    animation: none !important;
    padding-inline-start: 0;
  }
}

/* =========================================================
   Responsive Tweaks
   ========================================================= */
@media (max-width: 1100px) {
  .main-wrapper {
    padding-inline: 12px;
  }

  .dashboard-layout-wrapper {
    grid-template-columns: 240px 1fr;
    gap: 14px;
  }

  .lessons-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .student-analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  body {
    font-size: 14px;
  }

  .announcement-bar {
    font-size: .78rem;
    padding-block: 8px;
  }

  .top-nav-bar {
    width: calc(100% - 12px);
    margin: 8px auto;
    padding: 9px 10px;
    border-radius: 12px;
  }

  .nav-brand {
    max-width: 62%;
    gap: 8px;
    font-size: .82rem;
  }

  .nav-brand-logo {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .notification-bell-btn {
    width: 38px;
    height: 38px;
  }

  .main-wrapper {
    padding: 0 8px calc(20px + var(--safe-bottom));
  }

  .glass-card {
    border-radius: 16px;
    padding: 16px;
  }

  .dash-box {
    padding: 15px;
  }

  .lessons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .lesson-thumb-wrapper {
    height: 120px;
  }

  .lesson-card-body {
    padding: 11px;
  }

  .lesson-card h4 {
    font-size: .82rem;
  }

  .term-card {
    padding: 16px;
  }

  .term-card-title {
    font-size: 1rem;
  }

  .term-card-icon {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }

  .student-analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stat-analytics-box {
    padding: 11px;
    gap: 8px;
  }

  .sa-icon {
    font-size: 22px;
  }

  .sa-val {
    font-size: 1rem;
  }

  .sidebar-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .notifications-dropdown {
    position: fixed;
    top: 70px;
    inset-inline: 8px;
    width: auto;
    max-width: none;
    max-height: 70vh;
  }

  .payment-methods-grid {
    grid-template-columns: 1fr;
  }

  .teacher-social-bar {
    gap: 8px;
  }

  .social-btn {
    min-width: 0;
    flex: 1 1 45%;
    padding: 10px 12px;
  }
}

@media (max-width: 420px) {
  .lessons-grid {
    grid-template-columns: 1fr;
  }

  .student-analytics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sidebar-menu {
    grid-template-columns: 1fr;
  }

  .side-nav-btn {
    justify-content: flex-start;
    text-align: right;
  }

  .dash-header-flex {
    align-items: stretch;
  }

  .dash-header-flex > div {
    width: 100%;
  }

  .dash-header-flex .btn {
    width: 100%;
  }

  .form-container {
    max-width: 100%;
  }

  .social-btn {
    flex-basis: 100%;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  .visual-side {
    min-height: 100vh;
    padding-block: 24px;
  }

  .form-side {
    padding-block: 24px;
  }

  .notifications-dropdown {
    max-height: 78vh;
  }
}

/* =========================================================
   Light Mode Overrides
   ========================================================= */
body.light-mode .input-wrapper {
  background: #fff;
}

body.light-mode .form-input {
  color: #1f1b2e;
}

body.light-mode .parent-children-card {
  background: #fff;
}

body:not(.light-mode) .input-wrapper {
  background: rgba(45,27,105,.72);
}

body:not(.light-mode) .form-input {
  color: #fff;
}

/* =========================================================
   LTR Helpers
   ========================================================= */
[dir="ltr"],
.ltr {
  direction: ltr;
}

[dir="ltr"] input,
[dir="ltr"] textarea,
[dir="ltr"] select,
.ltr-field {
  direction: ltr !important;
  text-align: left !important;
}

/* =========================================================
   Overflow Fixes
   ========================================================= */
#platform-wrapper,
#student-dashboard,
#teacher-dashboard,
#leaderboard-section,
.auth-split-screen {
  overflow-x: clip;
}

#lessons-grid-container,
#terms-grid-container,
#teacher-students-list,
#teacher-results-list,
#teacher-homework-list,
#teacher-questions-list,
#leaderboard-cards-container {
  contain: content;
}

/* =========================================================
   END — EL-AFENDI PLATFORM PROFESSIONAL CSS
   ========================================================= */

/* =========================================================
   AUTH V2 - تسجيل احترافي / مركز / أونلاين / ولي الأمر
   ========================================================= */
.study-mode-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.study-mode-option{
  margin:0;
  cursor:pointer;
}
.study-mode-option input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.study-mode-card{
  min-height:78px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  border:1.5px solid var(--border);
  border-radius:15px;
  background:linear-gradient(145deg,rgba(124,58,237,.12),rgba(236,72,153,.08));
  transition:all .25s ease;
  text-align:center;
}
.study-mode-card strong{font-size:.98rem;color:var(--text-primary)}
.study-mode-card small{font-size:.72rem;color:var(--text-muted)}
.study-mode-option:hover .study-mode-card{
  transform:translateY(-2px);
  border-color:var(--pink-1);
}
.study-mode-option input:checked + .study-mode-card{
  border-color:var(--pink-1);
  box-shadow:0 0 0 3px rgba(236,72,153,.12),0 12px 30px rgba(124,58,237,.18);
  background:linear-gradient(145deg,rgba(124,58,237,.28),rgba(236,72,153,.20));
}
.study-mode-option input:checked + .study-mode-card::after{
  content:"✓";
  position:absolute;
  margin-top:-58px;
  margin-right:145px;
  width:22px;
  height:22px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--success);
  color:#fff;
  font-weight:900;
}
.signup-code-preview{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:4px 0 16px;
  padding:12px 14px;
  border-radius:14px;
  border:1px dashed rgba(236,72,153,.45);
  background:rgba(236,72,153,.07);
}
.signup-code-label{font-size:.78rem;color:var(--text-muted);font-weight:800}
#signup-code-preview-value{
  font-family:'Montserrat','Cairo',sans-serif;
  letter-spacing:1.2px;
  color:var(--pink-light);
  font-size:.82rem;
  direction:ltr;
}
.google-auth-btn{
  width:100%;
  margin-top:10px;
  min-height:48px;
  border:1px solid rgba(148,163,184,.35);
  border-radius:13px;
  background:#fff;
  color:#202124;
  font-family:'Cairo',sans-serif;
  font-weight:800;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  transition:transform .2s ease,box-shadow .2s ease;
}
.google-auth-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 28px rgba(0,0,0,.18);
}
.google-g-icon{
  width:25px;height:25px;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;
  font-family:Arial,sans-serif;font-weight:900;font-size:16px;
  background:#fff;
  border:1px solid #e5e7eb;
  color:#4285f4;
}
.parent-code-input{
  direction:ltr!important;
  text-align:left!important;
  text-transform:uppercase;
  font-family:'Montserrat','Cairo',sans-serif!important;
  letter-spacing:1px;
}
.parent-code-help{
  display:block;
  margin-top:7px;
  color:var(--text-muted);
  font-size:.72rem;
  line-height:1.6;
}
@media(max-width:600px){
  .study-mode-grid{grid-template-columns:1fr}
  .signup-code-prepare{flex-direction:column;align-items:flex-start}
  .signup-code-preview{flex-direction:column;align-items:flex-start}
}

/* ============================================================
   🔽🔽🔽 [إضافة جديدة] بوابة الدفع الفاخرة الاحترافية 🔽🔽🔽
   ============================================================ */

/* الحركات والأنيميشن */
@keyframes luxuryModalEntrance {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(40px);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes luxuryBadgeShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

@keyframes luxuryFloatCoin {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}

@keyframes luxurySuccessGlow {
  0% { transform: scale(0.9); opacity: 0; }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}

/* النافذة الشاملة */
.luxury-payment-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 1, 14, 0.92);
  backdrop-filter: blur(25px) saturate(190%);
  -webkit-backdrop-filter: blur(25px) saturate(190%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.luxury-payment-modal.show {
  opacity: 1;
  pointer-events: auto;
}

/* الكارت الرئيسي */
.luxury-payment-card {
  width: 100%;
  max-width: 590px;
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 28px;
  padding: 26px 22px;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 40px 140px -20px rgba(0, 0, 0, 0.98);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  margin: auto;
}

.luxury-payment-modal.show .luxury-payment-card {
  animation: luxuryModalEntrance 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.luxury-payment-card::-webkit-scrollbar { width: 5px; }
.luxury-payment-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
}

/* الثيمات اللونية */
.luxury-payment-card.theme-vodafone {
  background: radial-gradient(circle at 15% 15%, rgba(225, 29, 72, 0.35) 0%, transparent 60%),
              radial-gradient(circle at 85% 85%, rgba(159, 18, 57, 0.45) 0%, transparent 60%),
              linear-gradient(160deg, #24050d 0%, #120207 100%);
  border-color: #e11d48;
  box-shadow: 0 25px 80px rgba(225, 29, 72, 0.45), 0 0 35px rgba(225, 29, 72, 0.25);
}

.luxury-payment-card.theme-instapay {
  background: radial-gradient(circle at 15% 15%, rgba(124, 58, 237, 0.4) 0%, transparent 60%),
              radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.45) 0%, transparent 60%),
              linear-gradient(160deg, #170a30 0%, #090317 100%);
  border-color: #7c3aed;
  box-shadow: 0 25px 80px rgba(124, 58, 237, 0.45), 0 0 35px rgba(124, 58, 237, 0.25);
}

.luxury-payment-card.theme-fawry {
  background: radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.35) 0%, transparent 60%),
              radial-gradient(circle at 85% 85%, rgba(180, 83, 9, 0.45) 0%, transparent 60%),
              linear-gradient(160deg, #281a02 0%, #130c01 100%);
  border-color: #f59e0b;
  box-shadow: 0 25px 80px rgba(245, 158, 11, 0.45), 0 0 35px rgba(245, 158, 11, 0.25);
}

/* زر الإغلاق */
.luxury-payment-modal .modal-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  font-size: 1rem;
  font-weight: 900;
}

.luxury-payment-modal .modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.35);
  transform: rotate(90deg);
}

/* شارة الأمان */
.luxury-payment-modal .payment-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
}

/* العنوان */
.luxury-payment-modal .pay-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  text-align: center;
  margin: 10px 0 4px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* صندوق المبلغ */
.luxury-payment-modal .payment-amount-box {
  border-radius: 20px;
  padding: 14px;
  text-align: center;
  margin: 14px 0 18px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
  position: relative;
}

.luxury-payment-modal .amount-val {
  font-size: 2.5rem;
  font-weight: 900;
  color: #ffffff;
  display: inline-block;
  line-height: 1.1;
  animation: luxuryFloatCoin 4s ease-in-out infinite;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
}

.luxury-payment-modal .currency {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
  margin-right: 6px;
}

/* شبكة اختيار وسيلة الدفع */
.luxury-payment-modal .pay-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.luxury-payment-modal .pay-option-card {
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 14px 6px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  color: #fff;
}

.luxury-payment-modal .pay-option-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.35);
}

.luxury-payment-modal .pay-logo-wrap {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  padding: 6px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition: transform 0.35s ease;
}

.luxury-payment-modal .pay-option-card:hover .pay-logo-wrap {
  transform: scale(1.12) rotate(-5deg);
}

.luxury-payment-modal .pay-brand-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.luxury-payment-modal #lux-opt-vodafone.selected {
  border-color: #e11d48;
  background: rgba(225, 29, 72, 0.28);
}

.luxury-payment-modal #lux-opt-instapay.selected {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.28);
}

.luxury-payment-modal #lux-opt-fawry.selected {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.28);
}

.luxury-payment-modal .pay-option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.luxury-payment-modal .soon-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #f59e0b;
  color: #000;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
}

/* أزرار التحويل المباشر */
.luxury-payment-modal .direct-action-btn {
  width: 100%;
  padding: 17px;
  border: none;
  border-radius: 16px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
  text-decoration: none;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.luxury-payment-modal .direct-action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.6s ease;
}

.luxury-payment-modal .direct-action-btn:hover::before { left: 120%; }
.luxury-payment-modal .direct-action-btn:hover { transform: translateY(-3px) scale(1.015); filter: brightness(1.15); }
.luxury-payment-modal .direct-action-btn:active { transform: scale(0.98); }

.luxury-payment-card.theme-vodafone .direct-action-btn { background: linear-gradient(135deg, #e11d48, #9f1239); }
.luxury-payment-card.theme-instapay .direct-action-btn { background: linear-gradient(135deg, #7c3aed, #4338ca); }
.luxury-payment-card.theme-fawry .direct-action-btn { background: linear-gradient(135deg, #f59e0b, #b45309); color: #000; }

.luxury-payment-modal .direct-pay-hint {
  font-size: 0.88rem;
  color: #fbcfe8;
  font-weight: 800;
  line-height: 1.5;
  margin-top: 10px;
}

/* بنر الرقم والنسخ */
.luxury-payment-modal .copy-number-banner {
  background: rgba(0, 0, 0, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.luxury-payment-modal .copy-number-banner strong {
  font-size: 1.35rem;
  color: #ffffff;
  letter-spacing: 1.5px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
}

.luxury-payment-modal .copy-btn {
  border: none;
  border-radius: 12px;
  padding: 9px 18px;
  font-weight: 900;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
}

.luxury-payment-modal .copy-btn:hover { transform: scale(1.05); }

.luxury-payment-card.theme-vodafone .copy-btn { background: #e11d48; color: #fff; }
.luxury-payment-card.theme-instapay .copy-btn { background: #7c3aed; color: #fff; }
.luxury-payment-card.theme-fawry .copy-btn { background: #f59e0b; color: #000; }

/* صندوق التأكيد */
.luxury-payment-modal .confirm-transfer-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 16px;
  margin-top: 16px;
  color: #fff;
}

/* بطاقة الانتظار */
.luxury-payment-modal .waiting-notification-card {
  background: linear-gradient(135deg, #064e3b, #047857);
  border: 2px solid #34d399;
  border-radius: 20px;
  padding: 22px;
  text-align: center;
  display: none;
  animation: luxurySuccessGlow 0.45s ease forwards;
  box-shadow: 0 15px 45px rgba(16, 185, 129, 0.4);
  color: #fff;
  margin-top: 16px;
}

/* بطاقة فوري */
.luxury-payment-modal .fawry-soon-box {
  background: rgba(0, 0, 0, 0.55);
  border: 2px dashed #f59e0b;
  border-radius: 18px;
  padding: 22px 16px;
  text-align: center;
  display: none;
  color: #fff;
}

/* Responsive لبوابة الدفع */
@media (max-width: 600px) {
  .luxury-payment-card {
    padding: 20px 16px;
    border-radius: 22px;
  }
  .luxury-payment-modal .pay-title { font-size: 1.2rem; }
  .luxury-payment-modal .amount-val { font-size: 2rem; }
  .luxury-payment-modal .pay-options-grid { gap: 8px; }
  .luxury-payment-modal .pay-logo-wrap { width: 44px; height: 44px; }
  .luxury-payment-modal .pay-option-card strong { font-size: 0.78rem; }
  .luxury-payment-modal .copy-number-banner strong { font-size: 1.1rem; }
}

@media (max-width: 380px) {
  .luxury-payment-modal .pay-options-grid { grid-template-columns: 1fr; }
  .luxury-payment-modal .pay-option-card { flex-direction: row; gap: 10px; padding: 10px; }
  .luxury-payment-modal .pay-logo-wrap { margin-bottom: 0; }
}

/* =========================================================
   [إضافة] أنماط قسم رصد الدرجات + سجل الحضور + إدارة QR
   ========================================================= */
#gradebook-table-body input[type="number"] {
  width: 80px;
  padding: 6px 8px;
  text-align: center;
  font-weight: 800;
}

#qr-manager-cards-grid .scratch-card-mini {
  padding: 18px 14px;
}

#qr-manager-cards-grid .scratch-card-mini img {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  border: 2px solid var(--pink-1);
  margin: 6px auto;
  display: block;
  background: #fff;
  padding: 4px;
}

#std-attendance-log-table td {
  font-size: 0.82rem;
  vertical-align: middle;
}

#std-attendance-log-table td:nth-child(2) {
  font-weight: 800;
}

/* =========================================================
   END — EL-AFENDI FULL STYLESHEET
   ========================================================= */
   /* =========================================================
   [Phase 1 - Updated] حجب أزرار يوتيوب (3 طبقات)
   ========================================================= */

/* الطبقة الأساسية */
.yt-block-overlay {
  position: absolute;
  z-index: 26;
  pointer-events: auto;
  background: transparent;
  cursor: default;
}

/* 🔹 الطبقة 1: أعلى اليمين (زر "المزيد من الفيديوهات") */
.yt-block-top-right {
  top: 0;
  right: 0;
  width: 180px;
  height: 60px;
}

/* 🔹 الطبقة 2: أسفل اليسار (شعار يوتيوب + عنوان الفيديو) */
.yt-block-bottom-left {
  bottom: 0;
  left: 0;
  width: 180px;
  height: 55px;
}

/* 🔹 الطبقة 3: أسفل اليمين (المشاركة + مشاهدة لاحقاً + الإعدادات + علامة يوتيوب) */
.yt-block-bottom-right {
  bottom: 0;
  right: 0;
  width: 260px;
  height: 55px;
}

/* إخفاء شعار يوتيوب (بعض الإصدارات) */
.secure-video-wrapper iframe {
  pointer-events: auto;
}

/* تحسين زر التكبير */
#btn-vid-fullscreen {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  padding: 8px 16px !important;
  font-weight: 900;
  box-shadow: 0 5px 15px -5px rgba(124, 58, 237, 0.5);
  transition: all 0.3s ease;
}

#btn-vid-fullscreen:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -5px rgba(236, 72, 153, 0.6);
}

#btn-vid-fullscreen svg {
  flex-shrink: 0;
}
/* =========================================================
   وضع Fullscreen للفيديو — Native + CSS Fallback (Final)
   ========================================================= */

/* ============ Native Fullscreen ============ */

.secure-video-wrapper:fullscreen,
.secure-video-wrapper:-webkit-full-screen,
.secure-video-wrapper:-moz-full-screen,
.secure-video-wrapper:-ms-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
  z-index: 999999 !important;
  display: block !important;
}

/* الـ container — z-index واطي عشان الـ overlays تبقى فوقه */
.secure-video-wrapper:fullscreen #video-player-container,
.secure-video-wrapper:-webkit-full-screen #video-player-container,
.secure-video-wrapper:-moz-full-screen #video-player-container,
.secure-video-wrapper:-ms-fullscreen #video-player-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 1 !important;
}

/* الـ iframe / video */
.secure-video-wrapper:fullscreen iframe,
.secure-video-wrapper:fullscreen video,
.secure-video-wrapper:-webkit-full-screen iframe,
.secure-video-wrapper:-webkit-full-screen video,
.secure-video-wrapper:-moz-full-screen iframe,
.secure-video-wrapper:-moz-full-screen video,
.secure-video-wrapper:-ms-fullscreen iframe,
.secure-video-wrapper:-ms-fullscreen video {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  z-index: 1 !important;
}

/* 🔽 مهم: إبقاء overlays الحجب ظاهرة فوق الفيديو 🔽 */
.secure-video-wrapper:fullscreen .yt-block-overlay,
.secure-video-wrapper:-webkit-full-screen .yt-block-overlay,
.secure-video-wrapper:-moz-full-screen .yt-block-overlay,
.secure-video-wrapper:-ms-fullscreen .yt-block-overlay {
  display: block !important;
  pointer-events: auto !important;
  z-index: 50 !important;
}

/* توسيع الطبقات في fullscreen عشان تغطي الأزرار */
.secure-video-wrapper:fullscreen .yt-block-top-right,
.secure-video-wrapper:-webkit-full-screen .yt-block-top-right,
.secure-video-wrapper.video-fullscreen-mode .yt-block-top-right {
  top: 0 !important;
  right: 0 !important;
  width: 240px !important;
  height: 90px !important;
}

.secure-video-wrapper:fullscreen .yt-block-bottom-left,
.secure-video-wrapper:-webkit-full-screen .yt-block-bottom-left,
.secure-video-wrapper.video-fullscreen-mode .yt-block-bottom-left {
  bottom: 0 !important;
  left: 0 !important;
  width: 280px !important;
  height: 90px !important;
}

.secure-video-wrapper:fullscreen .yt-block-bottom-right,
.secure-video-wrapper:-webkit-full-screen .yt-block-bottom-right,
.secure-video-wrapper.video-fullscreen-mode .yt-block-bottom-right {
  bottom: 0 !important;
  right: 0 !important;
  width: 420px !important;
  height: 90px !important;
}

/* إخفاء شارة الأمان فقط (مش الـ overlays) في fullscreen */
.secure-video-wrapper:fullscreen .video-security-badge,
.secure-video-wrapper:-webkit-full-screen .video-security-badge,
.secure-video-wrapper.video-fullscreen-mode .video-security-badge {
  display: none !important;
}

/* ============ CSS Fallback ============ */

.secure-video-wrapper.video-fullscreen-mode {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  padding-bottom: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
  z-index: 999999 !important;
}

.secure-video-wrapper.video-fullscreen-mode #video-player-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 1 !important;
}

.secure-video-wrapper.video-fullscreen-mode iframe,
.secure-video-wrapper.video-fullscreen-mode video {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  z-index: 1 !important;
}

/* ============ منع scroll الصفحة ============ */
body.video-fs-active {
  overflow: hidden !important;
}
.secure-video-wrapper:fullscreen iframe,
.secure-video-wrapper:fullscreen video,
.secure-video-wrapper:-webkit-full-screen iframe,
.secure-video-wrapper:-webkit-full-screen video {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}


/* تكبير الفيديو في وضع fullscreen */
.secure-video-wrapper:fullscreen,
.secure-video-wrapper:-webkit-full-screen {
  padding-bottom: 0;
  height: 100vh;
  width: 100vw;
  border-radius: 0;
}

.secure-video-wrapper:fullscreen #video-player-container,
.secure-video-wrapper:-webkit-full-screen #video-player-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.secure-video-wrapper:fullscreen iframe,
.secure-video-wrapper:fullscreen video,
.secure-video-wrapper:-webkit-full-screen iframe,
.secure-video-wrapper:-webkit-full-screen video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
/* =========================================================
   [Phase 1] علامة صح واضحة على صلاحيات المساعد
   ========================================================= */
.permission-item input[type="checkbox"] {
  width: 22px !important;
  height: 22px !important;
  min-height: auto !important;
  accent-color: #10b981 !important;
  cursor: pointer;
  flex-shrink: 0;
  transform: scale(1.1);
  transition: all 0.2s ease;
}

.permission-item input[type="checkbox"]:hover {
  transform: scale(1.2);
}

.permission-item input[type="checkbox"]:checked {
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.7));
}

.permission-item input[type="checkbox"]:checked ~ span {
  color: #10b981 !important;
  font-weight: 900;
}

.permission-item:has(input[type="checkbox"]:checked) {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.08) !important;
}
/* =========================================================
   [Final] زر تصغير الفيديو داخل الـ wrapper
   ========================================================= */

/* زر التصغير — مخفي افتراضياً */
.video-fullscreen-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 200;
  background: rgba(236, 72, 153, 0.95);
  color: #fff;
  border: 2.5px solid #fff;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(236, 72, 153, 0.5);
  transition: all 0.3s ease;
  font-family: inherit;
  padding: 0;
}

/* إظهار الزر في وضع Fullscreen (Native + CSS) */
.secure-video-wrapper:fullscreen .video-fullscreen-close-btn,
.secure-video-wrapper:-webkit-full-screen .video-fullscreen-close-btn,
.secure-video-wrapper:-moz-full-screen .video-fullscreen-close-btn,
.secure-video-wrapper:-ms-fullscreen .video-fullscreen-close-btn,
.secure-video-wrapper.video-fullscreen-mode .video-fullscreen-close-btn {
  display: flex !important;
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  z-index: 2147483647 !important;
  animation: fsButtonPulse 2s ease-in-out infinite;
}

.video-fullscreen-close-btn:hover {
  background: #ef4444;
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 15px 40px rgba(239, 68, 68, 0.9);
}

.video-fullscreen-close-btn:active {
  transform: scale(0.95) rotate(90deg);
}

@keyframes fsButtonPulse {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(236, 72, 153, 0.5);
  }
  50% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 35px rgba(236, 72, 153, 0.9);
  }
}

/* =========================================================
   [إصلاح] إبقاء overlays الحجب ظاهرة في وضع Fullscreen
   ========================================================= */

/* إبقاء overlays الحجب ظاهرة فوق الفيديو */
.secure-video-wrapper:fullscreen .yt-block-overlay,
.secure-video-wrapper:-webkit-full-screen .yt-block-overlay,
.secure-video-wrapper:-moz-full-screen .yt-block-overlay,
.secure-video-wrapper:-ms-fullscreen .yt-block-overlay,
.secure-video-wrapper.video-fullscreen-mode .yt-block-overlay {
  display: block !important;
  pointer-events: auto !important;
  z-index: 50 !important;
}

/* توسيع الطبقات في fullscreen عشان تغطي الأزرار */
.secure-video-wrapper:fullscreen .yt-block-top-right,
.secure-video-wrapper:-webkit-full-screen .yt-block-top-right,
.secure-video-wrapper.video-fullscreen-mode .yt-block-top-right {
  top: 0 !important;
  right: 0 !important;
  width: 240px !important;
  height: 90px !important;
}

.secure-video-wrapper:fullscreen .yt-block-bottom-left,
.secure-video-wrapper:-webkit-full-screen .yt-block-bottom-left,
.secure-video-wrapper.video-fullscreen-mode .yt-block-bottom-left {
  bottom: 0 !important;
  left: 0 !important;
  width: 280px !important;
  height: 90px !important;
}

.secure-video-wrapper:fullscreen .yt-block-bottom-right,
.secure-video-wrapper:-webkit-full-screen .yt-block-bottom-right,
.secure-video-wrapper.video-fullscreen-mode .yt-block-bottom-right {
  bottom: 0 !important;
  right: 0 !important;
  width: 420px !important;
  height: 90px !important;
}

/* إخفاء شارة الأمان فقط في وضع Fullscreen */
.secure-video-wrapper:fullscreen .video-security-badge,
.secure-video-wrapper:-webkit-full-screen .video-security-badge,
.secure-video-wrapper.video-fullscreen-mode .video-security-badge {
  display: none !important;
}

/* العلامة المائية تفضل شغالة لكن بشفافية أقل */
.secure-video-wrapper:fullscreen .floating-watermark,
.secure-video-wrapper:-webkit-full-screen .floating-watermark,
.secure-video-wrapper.video-fullscreen-mode .floating-watermark {
  opacity: 0.5;
  font-size: 0.75rem;
}
/* =========================================================
   🎯 EL-AFENDI V3 — UPGRADE PACK (بدون تعديل أي كود أصلي)
   ========================================================= */

/* ============ 1. خانات الاختيار — علامة ✓ واضحة ============ */
#term-is-free,
#edit-term-is-free,
#teacher-quiz-has-cert,
.assistant-perm,
input[type="checkbox"] {
  width: 22px !important;
  height: 22px !important;
  min-height: 22px !important;
  accent-color: #10b981 !important;
  cursor: pointer !important;
  transform: scale(1.1);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

#term-is-free:hover,
#edit-term-is-free:hover,
.assistant-perm:hover {
  transform: scale(1.2);
}

#term-is-free:checked,
#edit-term-is-free:checked,
.assistant-perm:checked {
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.9));
}

/* تلوين العنصر الأب عند الفحص */
.permission-item:has(input[type="checkbox"]:checked) {
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.1) !important;
  box-shadow: 0 5px 20px -5px rgba(16, 185, 129, 0.4);
}

.permission-item:has(input[type="checkbox"]:checked) span {
  color: #10b981;
  font-weight: 900;
}

.permission-item input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  color: #10b981;
  font-weight: 900;
  font-size: 1.1rem;
}

/* ============ 2. الملف الشخصي — تخطيط جانبي ============ */
.profile-layout-new {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 768px) {
  .profile-layout-new {
    grid-template-columns: 1fr;
  }
}

.profile-info-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-info-side .info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.profile-info-side .info-row:hover {
  border-color: var(--pink-1);
  transform: translateX(-3px);
}

.profile-info-side .info-row span:first-child {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.profile-info-side .info-row strong {
  color: var(--pink-light);
  font-weight: 800;
  font-size: 0.9rem;
}

.profile-qr-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(236, 72, 153, 0.15));
  border: 2px solid var(--pink-1);
  border-radius: 20px;
}

/* ============ 3. محرر الصور ============ */
.avatar-editor-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(15px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.avatar-editor-modal.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.avatar-editor-box {
  background: var(--bg-card);
  border: 2px solid var(--pink-1);
  border-radius: 24px;
  padding: 24px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
}

.avatar-editor-preview {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  margin: 0 auto 20px;
  border: 4px solid var(--pink-1);
  overflow: hidden;
  position: relative;
  background: #000;
}

.avatar-editor-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.2s ease;
}

.avatar-editor-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.avatar-editor-controls input[type="range"] {
  width: 100%;
  accent-color: var(--pink-1);
}

.avatar-editor-btn-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ 4. سجل الحضور التفصيلي ============ */
.attendance-log-row {
  display: grid;
  grid-template-columns: 40px 100px 1fr 1fr 1fr 100px;
  gap: 10px;
  padding: 12px;
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 0.85rem;
}

.attendance-status-present {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.78rem;
  text-align: center;
}

.attendance-status-absent {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 3px 10px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 0.78rem;
  text-align: center;
}

/* ============ 5. كروت QR الاحترافية للطباعة ============ */
.qr-card-designer {
  width: 350px;
  height: 500px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #fdf2f8 100%);
  border: 4px solid #ec4899;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  box-shadow: 0 15px 40px rgba(236, 72, 153, 0.3);
  margin: 10px;
}

.qr-card-designer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #7c3aed, #ec4899, #7c3aed);
  border-radius: 20px 20px 0 0;
}

.qr-card-designer .qr-header {
  width: 100%;
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 2px dashed #ec4899;
}

.qr-card-designer .qr-header h3 {
  font-family: 'Cinzel', serif;
  color: #1a0b3d;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 2px;
  margin: 0;
}

.qr-card-designer .qr-header p {
  color: #7c3aed;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 4px;
}

.qr-card-designer .qr-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-card-designer .qr-body img {
  width: 200px;
  height: 200px;
  border-radius: 14px;
  border: 3px solid #ec4899;
  background: #fff;
  padding: 8px;
}

.qr-card-designer .qr-name {
  font-size: 1.05rem;
  font-weight: 900;
  color: #1a0b3d;
  text-align: center;
}

.qr-card-designer .qr-grade {
  font-size: 0.82rem;
  color: #7c3aed;
  font-weight: 700;
}

.qr-card-designer .qr-code {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 900;
  color: #be185d;
  padding: 6px 14px;
  background: rgba(236, 72, 153, 0.1);
  border: 2px dashed #ec4899;
  border-radius: 10px;
  letter-spacing: 1px;
}

.qr-card-designer .qr-footer {
  width: 100%;
  text-align: center;
  padding-top: 12px;
  border-top: 2px dashed #ec4899;
  font-size: 0.72rem;
  color: #7c3aed;
  font-weight: 700;
}

/* ============ 6. رسالة الترحيب ============ */
.welcome-msg-banner {
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 2px solid #34d399;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
  animation: slideDown 0.5s ease;
}

.welcome-msg-banner h3 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.welcome-msg-banner p {
  color: #d1fae5;
  font-size: 0.88rem;
  line-height: 1.6;
}

.welcome-msg-banner strong {
  color: #fff;
  font-weight: 900;
}

/* ============ 7. جرس إشعارات المستر ============ */
.teacher-notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(236, 72, 153, 0.15);
  color: var(--pink-1);
  border: 1.5px solid rgba(236, 72, 153, 0.3);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.teacher-notif-bell:hover {
  background: rgba(236, 72, 153, 0.3);
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.5);
}

.teacher-notif-bell.has-notif {
  animation: bellShake 1.5s infinite;
}

@keyframes bellShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-12deg); }
  75% { transform: rotate(12deg); }
}

.teacher-notif-dropdown {
  position: absolute;
  top: 55px;
  left: 0;
  width: 380px;
  max-width: 90vw;
  max-height: 500px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 2px solid var(--pink-1);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7);
  z-index: 99999;
  display: none;
}

.teacher-notif-dropdown.show {
  display: block;
  animation: slideDown 0.3s ease;
}

/* ============ 8. قسم تفعيل الحصص ============ */
.activate-lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.activate-lesson-card {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  transition: all 0.3s ease;
  position: relative;
}

.activate-lesson-card:hover {
  border-color: var(--pink-1);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px -10px rgba(236, 72, 153, 0.4);
}

.activate-lesson-card.is-active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
}

.activate-lesson-card.is-active::after {
  content: "✓ مفعل";
  position: absolute;
  top: 10px;
  left: 10px;
  background: #10b981;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 10px;
}

/* ============ 9. Excel ملون للدرجات ============ */
.grade-excel-excellent { background: #d1fae5 !important; color: #065f46 !important; }
.grade-excel-good { background: #fef3c7 !important; color: #92400e !important; }
.grade-excel-fail { background: #fee2e2 !important; color: #991b1b !important; }
.grade-excel-locked { background: #fef3c7 !important; color: #b45309 !important; font-weight: 900; }

/* ============ 10. البحث عن طالب للتفعيل ============ */
.student-activate-search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.student-activate-search-box input {
  flex: 1;
  min-width: 200px;
}

.student-activate-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
  transition: all 0.3s ease;
}

.student-activate-result:hover {
  border-color: var(--pink-1);
  transform: translateX(-3px);
}
/* =========================================================
   🎨 [Profile V2] الملف الشخصي الاحترافي
   ========================================================= */

.profile-v2-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 18px;
}

@media (max-width: 768px) {
  .profile-v2-wrapper {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ============ اليمين: البيانات ============ */
.profile-v2-info-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-v2-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.profile-v2-info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(236, 72, 153, 0.05));
  border: 1.5px solid var(--border);
  border-radius: 14px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.profile-v2-info-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--purple-3), var(--pink-1));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s ease;
}

.profile-v2-info-item:hover {
  border-color: var(--pink-1);
  transform: translateX(-4px);
  box-shadow: 0 10px 30px -12px rgba(236, 72, 153, 0.5);
}

.profile-v2-info-item:hover::before {
  transform: scaleY(1);
}

.pvi-icon {
  font-size: 1.4rem;
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--purple-3), var(--pink-1));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px -6px rgba(236, 72, 153, 0.6);
  transition: transform 0.35s ease;
}

.profile-v2-info-item:hover .pvi-icon {
  transform: scale(1.1) rotate(-6deg);
}

.pvi-content {
  flex: 1;
  min-width: 0;
}

.pvi-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}

.profile-v2-info-item strong {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 800;
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

/* Pills */
.mode-pill,
.status-pill {
  display: inline-block !important;
  padding: 5px 14px !important;
  border-radius: 12px !important;
  font-size: 0.82rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.3px;
}

.mode-pill.center {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(124, 58, 237, 0.15)) !important;
  color: #a78bfa !important;
  border: 1.5px solid rgba(124, 58, 237, 0.5) !important;
  box-shadow: 0 4px 12px -4px rgba(124, 58, 237, 0.4);
}

.mode-pill.online {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.15)) !important;
  color: #60a5fa !important;
  border: 1.5px solid rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 4px 12px -4px rgba(59, 130, 246, 0.4);
}

.status-pill.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.15)) !important;
  color: #10b981 !important;
  border: 1.5px solid rgba(16, 185, 129, 0.5) !important;
  box-shadow: 0 4px 12px -4px rgba(16, 185, 129, 0.4);
  animation: statusActivePulse 2.5s ease-in-out infinite;
}

.status-pill.pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.15)) !important;
  color: #f59e0b !important;
  border: 1.5px solid rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 4px 12px -4px rgba(245, 158, 11, 0.4);
}

@keyframes statusActivePulse {
  0%, 100% { box-shadow: 0 4px 12px -4px rgba(16, 185, 129, 0.4); }
  50%      { box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.8); }
}

/* XP Bar */
.profile-v2-xp-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(236, 72, 153, 0.08));
  border: 2px solid var(--gold);
  border-radius: 16px;
  box-shadow: 0 12px 32px -14px rgba(251, 191, 36, 0.5);
  position: relative;
  overflow: hidden;
}

.profile-v2-xp-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  animation: xpShimmer 3s infinite;
}

@keyframes xpShimmer {
  100% { transform: translateX(100%); }
}

.profile-v2-xp-bar .xp-icon {
  font-size: 1.9rem;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.9));
  animation: xpFloat 3s ease-in-out infinite;
}

@keyframes xpFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(8deg); }
}

.profile-v2-xp-bar .xp-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-v2-xp-bar .xp-info span {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 800;
  letter-spacing: 0.3px;
}

.profile-v2-xp-bar .xp-info strong {
  font-size: 1.25rem;
  color: var(--gold);
  font-weight: 900;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
}

/* ============ الشمال: الصورة + QR ============ */
.profile-v2-visual-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* كارت الصورة */
.profile-v2-avatar-card {
  padding: 26px 20px 20px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(236, 72, 153, 0.1));
  border: 2px solid var(--pink-1);
  border-radius: 22px;
  text-align: center;
  box-shadow: 0 18px 45px -18px rgba(236, 72, 153, 0.5);
  position: relative;
  overflow: hidden;
}

.profile-v2-avatar-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.12), transparent 60%);
  animation: avatarOrb 8s linear infinite;
  pointer-events: none;
}

@keyframes avatarOrb {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.profile-v2-avatar-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 12px;
  z-index: 1;
}

.profile-v2-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--pink-1);
  background: #fff;
  box-shadow:
    0 0 0 6px rgba(236, 72, 153, 0.15),
    0 15px 45px -12px rgba(236, 72, 153, 0.7);
  transition: transform 0.4s ease;
}

.profile-v2-avatar-img:hover {
  transform: scale(1.04);
}

.profile-v2-camera-badge {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-3), var(--pink-1));
  border: 3px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  box-shadow: 0 8px 20px -4px rgba(236, 72, 153, 0.7);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.profile-v2-camera-badge:hover {
  transform: scale(1.15) rotate(10deg);
  box-shadow: 0 12px 30px -4px rgba(236, 72, 153, 1);
}

.profile-v2-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 700;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

/* كارت QR */
.profile-v2-qr-card {
  padding: 22px 20px 22px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(236, 72, 153, 0.1));
  border: 2px solid var(--pink-1);
  border-radius: 22px;
  text-align: center;
  box-shadow: 0 18px 45px -18px rgba(236, 72, 153, 0.5);
}

.profile-v2-qr-card h4 {
  color: var(--pink-light);
  font-size: 1.05rem;
  font-weight: 900;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.profile-v2-qr-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 600;
}

.profile-v2-qr-wrap {
  display: inline-block;
  padding: 14px;
  background: #ffffff;
  border-radius: 18px;
  border: 3px solid var(--pink-1);
  box-shadow:
    0 0 30px rgba(236, 72, 153, 0.5),
    inset 0 0 20px rgba(236, 72, 153, 0.08);
  transition: transform 0.4s ease;
}

.profile-v2-qr-wrap:hover {
  transform: scale(1.03);
}

.profile-v2-qr-wrap img {
  width: 170px;
  height: 170px;
  display: block;
  border-radius: 10px;
}

.btn-qr-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  width: 100%;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--purple-3), var(--pink-1));
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 900;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 12px 30px -10px rgba(236, 72, 153, 0.7);
  position: relative;
  overflow: hidden;
}

.btn-qr-download::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.7s ease;
}

.btn-qr-download:hover::before { left: 100%; }

.btn-qr-download:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -10px rgba(236, 72, 153, 0.9);
  filter: brightness(1.08);
}

.btn-qr-download:active {
  transform: translateY(-1px);
}

/* الموبايل */
@media (max-width: 500px) {
  .profile-v2-avatar-wrap { width: 120px; height: 120px; }
  .profile-v2-qr-wrap img  { width: 140px; height: 140px; }
  .pvi-icon                { width: 40px; height: 40px; min-width: 40px; font-size: 1.2rem; }
  .profile-v2-info-item    { padding: 12px 14px; }
}
/* 🚀 Skeleton Loading Spinner */
@keyframes spinLoader {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* =========================================================
   🏆 Parent Gold Page — صفحة ولي الأمر الذهبية
   ========================================================= */
.parent-gold-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a0f00 0%, #2d1810 50%, #1a0f00 100%);
  padding: 20px;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  color: #fff;
  direction: rtl;
}

/* ============ الهيدر ============ */
.parent-gold-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(184, 134, 11, 0.15));
  border: 2px solid #d4af37;
  border-radius: 18px;
  margin-bottom: 24px;
  box-shadow: 0 15px 40px -10px rgba(212, 175, 55, 0.4);
  max-width: 900px;
  margin-inline: auto;
}

.parent-gold-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.parent-gold-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #d4af37;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.7);
  object-fit: cover;
}

.parent-gold-brand h1 {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffd700;
  margin: 0;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.parent-gold-brand p {
  font-size: 0.72rem;
  color: #fbbf24;
  margin: 3px 0 0;
  letter-spacing: 1px;
  font-weight: 700;
}

.parent-gold-logout {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
  border: 2px solid #fbbf24;
  padding: 10px 22px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 900;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px -5px rgba(220, 38, 38, 0.6);
}

.parent-gold-logout:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -5px rgba(220, 38, 38, 0.9);
}

/* ============ الهيرو ============ */
.parent-gold-hero {
  text-align: center;
  padding: 30px 20px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(184, 134, 11, 0.05));
  border: 2px dashed #d4af37;
  border-radius: 22px;
  max-width: 900px;
  margin-inline: auto;
  position: relative;
  overflow: hidden;
}

.parent-gold-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.15), transparent 60%);
  animation: goldShine 8s linear infinite;
  pointer-events: none;
}

@keyframes goldShine {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.parent-gold-badge {
  display: inline-block;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #1a0f00;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 14px;
  box-shadow: 0 6px 20px -5px rgba(212, 175, 55, 0.7);
  position: relative;
  z-index: 1;
}

.parent-gold-hero h2 {
  font-size: 2rem;
  font-weight: 900;
  color: #ffd700;
  margin: 0 0 8px;
  text-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

.parent-gold-hero p {
  font-size: 0.95rem;
  color: #fbbf24;
  margin: 0;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

/* ============ الكروت ============ */
.parent-gold-card {
  max-width: 900px;
  margin-inline: auto;
  margin-bottom: 20px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(184, 134, 11, 0.04));
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 20px;
  box-shadow: 0 15px 40px -15px rgba(212, 175, 55, 0.3);
  transition: all 0.3s ease;
}

.parent-gold-card:hover {
  border-color: #d4af37;
  box-shadow: 0 20px 50px -15px rgba(212, 175, 55, 0.5);
}

.parent-gold-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
  flex-wrap: wrap;
}

.parent-gold-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

.parent-gold-card-header h3 {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffd700;
  margin: 0;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
  flex: 1;
}

.parent-gold-count {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #1a0f00;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 4px 12px -3px rgba(212, 175, 55, 0.6);
}

/* ============ شبكة البيانات ============ */
.parent-gold-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.parent-gold-info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  border-radius: 14px;
  transition: all 0.3s ease;
}

.parent-gold-info-item:hover {
  border-color: #d4af37;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px -10px rgba(212, 175, 55, 0.5);
}

.parent-gold-label {
  font-size: 0.75rem;
  color: #fbbf24;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.parent-gold-info-item strong {
  font-size: 1rem;
  color: #fff;
  font-weight: 900;
  line-height: 1.4;
  word-break: break-word;
}

.parent-gold-code {
  font-family: 'Courier New', monospace;
  color: #ffd700 !important;
  letter-spacing: 1.5px;
  font-size: 1.05rem !important;
}

/* ============ القوايم ============ */
.parent-gold-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.parent-gold-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  transition: all 0.3s ease;
  flex-wrap: wrap;
}

.parent-gold-list-item:hover {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.08);
  transform: translateX(-4px);
}

.parent-gold-list-left {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.parent-gold-list-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
}

.parent-gold-list-sub {
  font-size: 0.75rem;
  color: #fbbf24;
  font-weight: 600;
}

.parent-gold-list-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.parent-gold-score {
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.parent-gold-score-excellent {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 5px 15px -5px rgba(16, 185, 129, 0.6);
}

.parent-gold-score-good {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 5px 15px -5px rgba(245, 158, 11, 0.6);
}

.parent-gold-score-weak {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 5px 15px -5px rgba(239, 68, 68, 0.6);
}

.parent-gold-badge-status {
  padding: 5px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 900;
}

.parent-gold-badge-present {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1.5px solid #10b981;
}

.parent-gold-badge-absent {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1.5px solid #ef4444;
}

/* ============ إحصائيات الحضور ============ */
.parent-gold-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.parent-gold-stat-present,
.parent-gold-stat-absent {
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 900;
}

.parent-gold-stat-present {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1.5px solid #10b981;
}

.parent-gold-stat-absent {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1.5px solid #ef4444;
}

/* ============ الفاضي ============ */
.parent-gold-empty {
  text-align: center;
  padding: 30px 20px;
  color: #fbbf24;
  font-size: 0.9rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.2);
  border: 1.5px dashed rgba(212, 175, 55, 0.3);
  border-radius: 14px;
}

.parent-gold-empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
  opacity: 0.6;
}

/* ============ الفوتر ============ */
.parent-gold-footer {
  text-align: center;
  padding: 20px;
  margin-top: 30px;
  color: #fbbf24;
  font-size: 0.8rem;
  font-weight: 700;
  border-top: 2px dashed rgba(212, 175, 55, 0.3);
  max-width: 900px;
  margin-inline: auto;
}

/* ============ Responsive ============ */
@media (max-width: 600px) {
  .parent-gold-wrapper { padding: 12px; }
  .parent-gold-header { padding: 12px 16px; }
  .parent-gold-brand h1 { font-size: 0.95rem; }
  .parent-gold-logo { width: 42px; height: 42px; }
  .parent-gold-hero h2 { font-size: 1.4rem; }
  .parent-gold-hero { padding: 22px 14px; }
  .parent-gold-card { padding: 16px; }
  .parent-gold-info-grid { grid-template-columns: 1fr; }
  .parent-gold-list-item { flex-direction: column; align-items: flex-start; }
  .parent-gold-list-right { width: 100%; justify-content: flex-start; }
}
/* =========================================================
   🔐 AUTH V4 — تصميم تسجيل الدخول الجديد (معزول تماماً)
   ========================================================= */
.auth-v4-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 15px;
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 55%, #fdf2f8 100%);
  overflow: hidden;
  direction: rtl;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

.auth-v4-bg-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.auth-v4-bg-glow::before,
.auth-v4-bg-glow::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}

.auth-v4-bg-glow::before {
  width: 450px;
  height: 450px;
  background: rgba(236, 72, 153, 0.18);
  top: -120px;
  right: -120px;
  animation: authV4Float 14s ease-in-out infinite;
}

.auth-v4-bg-glow::after {
  width: 380px;
  height: 380px;
  background: rgba(168, 85, 247, 0.15);
  bottom: -120px;
  left: -120px;
  animation: authV4Float 18s ease-in-out infinite reverse;
}

@keyframes authV4Float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-35px, 35px) scale(1.12); }
}

.auth-v4-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 470px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  padding: 34px 28px 26px;
  box-shadow:
    0 30px 80px -25px rgba(168, 85, 247, 0.28),
    0 15px 40px -20px rgba(236, 72, 153, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  animation: authV4SlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authV4SlideIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-v4-badge-wrap { text-align: center; }

.auth-v4-badge {
  display: inline-block;
  padding: 7px 22px;
  background: #ffffff;
  color: #db2777;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 30px;
  border: 1.5px solid rgba(236, 72, 153, 0.28);
  box-shadow: 0 4px 15px -5px rgba(236, 72, 153, 0.25);
  letter-spacing: 0.3px;
}

.auth-v4-title {
  font-size: 1.95rem;
  font-weight: 900;
  color: #1a1a2e;
  text-align: center;
  margin: 18px 0 6px;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.auth-v4-subtitle {
  font-size: 0.9rem;
  color: #9ca3af;
  text-align: center;
  font-weight: 600;
  margin-bottom: 24px;
}

/* Tabs */
.auth-v4-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(236, 72, 153, 0.07);
  border-radius: 16px;
  margin-bottom: 22px;
}

.auth-v4-tab {
  flex: 1;
  padding: 13px 12px;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  color: #8b7fa8;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.3px;
}

.auth-v4-tab:hover:not(.active) {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.06);
}

.auth-v4-tab.active {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #ffffff;
  box-shadow:
    0 10px 25px -8px rgba(168, 85, 247, 0.55),
    0 5px 15px -5px rgba(236, 72, 153, 0.45);
  transform: translateY(-1px);
}

/* Forms */
.auth-v4-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: authV4FadeIn 0.4s ease-out;
}

@keyframes authV4FadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-v4-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.auth-v4-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1a1a2e;
  letter-spacing: 0.2px;
}

.auth-v4-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid transparent;
  border-radius: 14px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.045),
    0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
  overflow: hidden;
}

.auth-v4-input-wrap:focus-within {
  border-color: #ec4899;
  box-shadow:
    0 4px 20px -5px rgba(236, 72, 153, 0.4),
    0 0 0 4px rgba(236, 72, 153, 0.08);
  transform: translateY(-1px);
}

.auth-v4-input {
  flex: 1;
  width: 100%;
  padding: 15px 16px;
  padding-right: 50px;
  background: transparent !important;
  border: none !important;
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a2e !important;
  box-shadow: none !important;
  min-height: auto;
  direction: rtl;
}

.auth-v4-input::placeholder {
  color: #c4b5d4;
  font-weight: 500;
}

.auth-v4-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #c4b5d4;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color 0.3s ease;
}

.auth-v4-icon svg { width: 100%; height: 100%; display: block; }

.auth-v4-input-wrap:focus-within .auth-v4-icon { color: #ec4899; }

.auth-v4-icon-left { right: auto; left: 15px; }

.auth-v4-eye {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #c4b5d4;
  width: 22px;
  height: 22px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease, transform 0.3s ease;
}

.auth-v4-eye svg { width: 100%; height: 100%; }

.auth-v4-eye:hover { color: #ec4899; transform: translateY(-50%) scale(1.1); }

.auth-v4-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: none;
  padding-right: 50px;
}

/* Submit */
.auth-v4-submit {
  position: relative;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.3px;
  box-shadow:
    0 12px 30px -10px rgba(168, 85, 247, 0.55),
    0 8px 20px -8px rgba(236, 72, 153, 0.45);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.auth-v4-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transition: left 0.7s ease;
}

.auth-v4-submit:hover::before { left: 100%; }

.auth-v4-submit:hover {
  transform: translateY(-3px);
  box-shadow:
    0 18px 45px -10px rgba(168, 85, 247, 0.75),
    0 12px 30px -8px rgba(236, 72, 153, 0.6);
}

.auth-v4-submit:active { transform: translateY(-1px); }

.auth-v4-arrow { width: 18px; height: 18px; }

.auth-v4-submit-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow:
    0 12px 30px -10px rgba(16, 185, 129, 0.55),
    0 8px 20px -8px rgba(5, 150, 105, 0.45);
}

.auth-v4-submit-green:hover {
  box-shadow:
    0 18px 45px -10px rgba(16, 185, 129, 0.75),
    0 12px 30px -8px rgba(5, 150, 105, 0.6);
}

.auth-v4-submit-blue { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }

/* Google */
.auth-v4-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  color: #1a1a2e;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.auth-v4-google:hover {
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: 0 8px 25px -8px rgba(0, 0, 0, 0.14);
  transform: translateY(-2px);
}

.auth-v4-google-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Forgot */
.auth-v4-forgot {
  display: block;
  width: 100%;
  text-align: center;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 12px 0 4px;
  transition: color 0.3s ease;
}

.auth-v4-forgot:hover { color: #ec4899; }

/* Study mode cards */
.auth-v4-study-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-v4-study-card {
  margin: 0;
  cursor: pointer;
  position: relative;
  display: block;
}

.auth-v4-study-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-v4-study-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 10px;
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-height: 105px;
}

.auth-v4-study-inner::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ec4899;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px -2px rgba(236, 72, 153, 0.6);
}

.auth-v4-study-card:hover .auth-v4-study-inner {
  border-color: rgba(236, 72, 153, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(236, 72, 153, 0.25);
}

.auth-v4-study-card input:checked ~ .auth-v4-study-inner {
  border-color: #ec4899;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.06), rgba(168, 85, 247, 0.06));
  box-shadow:
    0 8px 25px -8px rgba(236, 72, 153, 0.4),
    0 0 0 4px rgba(236, 72, 153, 0.08);
}

.auth-v4-study-card input:checked ~ .auth-v4-study-inner::after {
  opacity: 1;
  transform: scale(1);
}

.auth-v4-study-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a855f7;
  transition: color 0.3s ease, transform 0.3s ease;
}

.auth-v4-study-icon svg { width: 100%; height: 100%; display: block; }

.auth-v4-study-card input:checked ~ .auth-v4-study-inner .auth-v4-study-icon {
  color: #ec4899;
  transform: scale(1.08);
}

.auth-v4-study-inner strong {
  font-size: 0.95rem;
  font-weight: 900;
  color: #1a1a2e;
}

.auth-v4-study-inner small {
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ca3af;
}

/* Code preview */
.auth-v4-code-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(236, 72, 153, 0.06);
  border: 1.5px dashed rgba(236, 72, 153, 0.4);
  border-radius: 14px;
}

.auth-v4-code-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #db2777;
  white-space: nowrap;
}

.auth-v4-code-preview strong {
  font-size: 0.82rem;
  font-weight: 900;
  color: #7c3aed;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  direction: ltr;
  text-align: left;
  overflow-wrap: anywhere;
}

/* Grid 2 */
.auth-v4-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Parent form */
.auth-v4-parent-hint {
  font-size: 0.85rem;
  color: #9ca3af;
  text-align: center;
  line-height: 1.7;
  margin-bottom: 8px;
  font-weight: 600;
}

.auth-v4-parent-code {
  direction: ltr !important;
  text-align: left !important;
  font-family: 'Courier New', monospace !important;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding-left: 50px !important;
  padding-right: 16px !important;
}

.auth-v4-parent-help {
  display: block;
  margin-top: 6px;
  font-size: 0.74rem;
  color: #9ca3af;
  font-weight: 600;
  line-height: 1.6;
}

/* System message */
.auth-v4-msg {
  margin-top: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  min-height: 20px;
}

/* Parent switch link */
.auth-v4-parent-switch {
  text-align: center;
  margin-top: 18px;
  padding-top: 4px;
}

.auth-v4-parent-link {
  background: transparent;
  border: none;
  color: #7c3aed;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-v4-parent-link:hover {
  color: #ec4899;
  background: rgba(236, 72, 153, 0.08);
  transform: translateX(-3px);
}

.auth-v4-parent-arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.auth-v4-parent-link:hover .auth-v4-parent-arrow {
  transform: translateX(-4px);
}

/* Social */
.auth-v4-social { margin-top: 24px; }

.auth-v4-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-v4-divider::before,
.auth-v4-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(236, 72, 153, 0.35), transparent);
}

.auth-v4-divider span {
  font-size: 0.78rem;
  font-weight: 800;
  color: #9ca3af;
  letter-spacing: 0.3px;
}

.auth-v4-social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  direction: ltr;
}

.auth-v4-social-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.auth-v4-social-icon svg {
  width: 22px;
  height: 22px;
  position: relative;
  z-index: 1;
}

.auth-v4-social-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-v4-social-icon:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.4);
}

.auth-v4-social-icon:hover::before { opacity: 1; }

.auth-v4-wa { background: linear-gradient(135deg, #25d366, #128c7e); }
.auth-v4-yt { background: linear-gradient(135deg, #ff0000, #cc0000); }
.auth-v4-tt { background: linear-gradient(135deg, #000000, #2d2d2d); }
.auth-v4-fb { background: linear-gradient(135deg, #1877f2, #0c63d4); }

/* Footer */
.auth-v4-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.78rem;
  color: #9ca3af;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 520px) {
  .auth-v4-section { padding: 20px 12px; }
  .auth-v4-container {
    padding: 26px 18px 22px;
    border-radius: 22px;
  }
  .auth-v4-title { font-size: 1.55rem; margin: 14px 0 5px; }
  .auth-v4-subtitle { font-size: 0.85rem; margin-bottom: 18px; }
  .auth-v4-tab { font-size: 0.85rem; padding: 12px 8px; }
  .auth-v4-grid2 { grid-template-columns: 1fr; }
  .auth-v4-input { font-size: 0.88rem; padding: 14px 44px 14px 14px; }
  .auth-v4-input-icon, .auth-v4-icon { right: 13px; width: 18px; height: 18px; }
  .auth-v4-icon-left { right: auto; left: 13px; }
  .auth-v4-eye { left: 13px; width: 20px; height: 20px; }
  .auth-v4-social-icon { width: 42px; height: 42px; }
  .auth-v4-social-icon svg { width: 20px; height: 20px; }
  .auth-v4-study-inner { padding: 14px 8px; min-height: 98px; }
  .auth-v4-study-icon { width: 34px; height: 34px; }
  .auth-v4-study-inner strong { font-size: 0.88rem; }
  .auth-v4-study-inner small { font-size: 0.68rem; }
}

/* Force light theme in auth (design is light) */
body.light-mode #auth-section,
body:not(.light-mode) #auth-section {
  --text-primary: #1a1a2e;
  --text-muted: #9ca3af;
}
/* 🔧 Fix 1 — عرض الفورم Responsive */
.auth-v4-container {
  max-width: 600px;    /* كان 470px */
}

@media (min-width: 1200px) {
  .auth-v4-container {
    max-width: 640px;
    padding: 40px 36px 30px;
  }
}

@media (max-width: 520px) {
  .auth-v4-container {
    max-width: 100%;
  }
}

/* تكبير خفيف للحقول والعناصر */
.auth-v4-input {
  padding: 16px 18px;
  padding-right: 52px;
  font-size: 0.95rem;
}

.auth-v4-icon {
  right: 17px;
  width: 22px;
  height: 22px;
}

.auth-v4-eye {
  left: 17px;
  width: 24px;
  height: 24px;
}

.auth-v4-icon-left { right: auto; left: 17px; }

.auth-v4-submit,
.auth-v4-google {
  padding: 17px 24px;
  font-size: 1rem;
}
/* 🔧 Fix 2 — قائمة الصف الدراسي أبيض بنص أسود */
.auth-v4-select {
  color-scheme: light;     /* ✅ يجبر المتصفح على ستايل فاتح */
  color: #1a1a2e;
  background: #ffffff;
}

.auth-v4-select option {
  background: #ffffff !important;
  color: #1a1a2e !important;
  font-weight: 700;
  padding: 12px 16px;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

.auth-v4-select option:checked,
.auth-v4-select option:hover {
  background: #fdf2f8 !important;
  color: #ec4899 !important;
}

/* للـ select نفسه عشان المتصفح مايبقاش يفتحه غامق */
.auth-v4-input-wrap:has(.auth-v4-select) {
  background: #ffffff;
}
/* 🔧 Fix 3 — تحسين شكل اختيار سنتر/أونلاين */
.auth-v4-study-inner {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-v4-study-card input:not(:checked) ~ .auth-v4-study-inner {
  opacity: 0.85;
}

.auth-v4-study-card input:checked ~ .auth-v4-study-inner {
  opacity: 1;
  transform: translateY(-2px);
}
/* 🔧 Fix 4 — كود الطالب بلون واضح */
.auth-v4-code-preview {
  padding: 12px 14px;
  background: #fdf2f8;
  border: 1.5px dashed rgba(236, 72, 153, 0.5);
  border-radius: 14px;
  gap: 10px;
}

.auth-v4-code-label {
  color: #be185d;
  font-size: 0.85rem;
  font-weight: 900;
  flex-shrink: 0;
}

.auth-v4-code-preview strong {
  color: #1a1a2e !important;              /* أسود واضح */
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-family: 'Cairo', 'Tajawal', sans-serif !important;  /* يدعم العربي */
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  unicode-bidi: plaintext;                /* يتعامل تلقائياً مع العربي والإنجليزي */
  text-align: right;
  flex: 1;
  box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.12);
  line-height: 1.5;
}

/* لما يتحول لكود فعلي (CE-XXXX أو ON-XXXX) يبقى monospace */
.auth-v4-code-preview strong:not(:empty) {
  font-family: 'Courier New', monospace !important;
  letter-spacing: 1px;
  direction: ltr;
  text-align: left;
}
/* ═══════════════════════════════════════════════════════════
    Welcome Landing V1
   ═══════════════════════════════════════════════════════════ */
.welcome-landing-v1 {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 100px 20px 40px;
  background: linear-gradient(135deg, #1a0b3d 0%, #2d1b69 50%, #1a0b3d 100%);
  overflow: hidden;
  direction: rtl;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  color: #ffffff;
}

.welcome-landing-v1.hidden { display: none !important; }

/* خلفية النجوم */
.wl-bg-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.wl-bg-stars .wl-star {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #fbcfe8, 0 0 16px rgba(236, 72, 153, 0.7);
  animation: wlTwinkle 3s ease-in-out infinite;
}

@keyframes wlTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.6); }
  50%      { opacity: 1; transform: scale(1.6); }
}

/* هالات */
.wl-bg-orbs { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.wl-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}

.wl-orb-1 {
  width: 400px; height: 400px;
  background: rgba(236, 72, 153, 0.28);
  top: -100px; right: -100px;
  animation: wlOrbFloat 14s ease-in-out infinite;
}

.wl-orb-2 {
  width: 350px; height: 350px;
  background: rgba(124, 58, 237, 0.35);
  bottom: -120px; left: -120px;
  animation: wlOrbFloat 18s ease-in-out infinite reverse;
}

.wl-orb-3 {
  width: 280px; height: 280px;
  background: rgba(167, 139, 250, 0.22);
  top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  animation: wlOrbFloat 22s ease-in-out infinite;
}

@keyframes wlOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-30px, 40px) scale(1.15); }
}

/* أزرار علوية */
.wl-top-actions {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.wl-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wl-action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px -8px rgba(236, 72, 153, 0.55);
}

.wl-action-login {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(236, 72, 153, 0.35));
  border-color: rgba(255, 255, 255, 0.35);
}

.wl-action-signup {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
}

.wl-action-signup:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
}

.wl-action-btn svg { flex-shrink: 0; }

/* المحتوى الرئيسي */
.wl-main {
  position: relative;
  z-index: 2;
  max-width: 780px;
  width: 100%;
  text-align: center;
}

/* الصورة */
.wl-photo-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 30px;
}

.wl-photo-glow {
  position: absolute;
  inset: -50px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(236, 72, 153, 0.65) 0%,
    rgba(124, 58, 237, 0.4) 45%,
    transparent 70%);
  filter: blur(35px);
  animation: wlOrbPulse 4s ease-in-out infinite;
  z-index: 0;
}

@keyframes wlOrbPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%      { transform: scale(1.2); opacity: 1; }
}

.wl-photo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 3;
  padding: 4px;
  background: #1a0b3d;
  box-shadow:
    0 0 0 3px rgba(236, 72, 153, 0.55),
    0 0 0 7px rgba(124, 58, 237, 0.3),
    0 25px 70px -15px rgba(236, 72, 153, 0.8);
  animation: wlPhotoFloat 6s ease-in-out infinite;
}

@keyframes wlPhotoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.wl-photo-ring {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
}

.wl-photo-ring-1 {
  inset: -15px;
  background: conic-gradient(from 0deg,
    transparent 0%, #ec4899 15%, #f472b6 30%, #a78bfa 45%, transparent 60%,
    transparent 65%, #ec4899 80%, #a78bfa 95%, transparent 100%);
  filter: blur(2px);
  animation: wlRingSpin 4s linear infinite;
}

.wl-photo-ring-2 {
  inset: -30px;
  border: 2px dashed rgba(244, 114, 182, 0.55);
  animation: wlRingSpin 18s linear infinite reverse;
}

.wl-photo-ring-3 {
  inset: -48px;
  border: 1px dotted rgba(167, 139, 250, 0.4);
  animation: wlRingSpin 35s linear infinite;
}

@keyframes wlRingSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* الأسماء */
.wl-brand-title {
  font-family: 'Reem Kufi', 'Cairo', sans-serif;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #fff 0%, #fbcfe8 40%, #a78bfa 70%, #fff 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: wlTitleGradient 5s ease-in-out infinite;
  filter: drop-shadow(0 4px 25px rgba(236, 72, 153, 0.5));
}

@keyframes wlTitleGradient {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.wl-brand-subtitle {
  font-size: 0.82rem;
  color: #fbcfe8;
  letter-spacing: 10px;
  font-weight: 800;
  margin-bottom: 26px;
  text-shadow: 0 0 20px rgba(236, 72, 153, 0.6);
}

/* فاصل */
.wl-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px 0;
}

.wl-divider-line {
  width: 70px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #ec4899, #a78bfa, transparent);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.7);
}

.wl-divider-icon {
  color: #fbcfe8;
  font-size: 14px;
  animation: wlDiamondSpin 4s linear infinite;
}

@keyframes wlDiamondSpin {
  from { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.3); }
  to   { transform: rotate(360deg) scale(1); }
}

/* اسم المستر */
.wl-teacher-name {
  font-family: 'Playfair Display', 'Cinzel', serif;
  font-size: 2.2rem;
  color: #ffffff;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 4px 30px rgba(236, 72, 153, 0.7);
}

.wl-teacher-role {
  font-size: 1.05rem;
  color: #fbcfe8;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

/* الشارات */
.wl-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.wl-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(236, 72, 153, 0.35);
  border-radius: 22px;
  color: #fbcfe8;
  font-size: 0.82rem;
  font-weight: 800;
  transition: all 0.35s ease;
}

.wl-badge:hover {
  background: rgba(236, 72, 153, 0.18);
  border-color: #ec4899;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -8px rgba(236, 72, 153, 0.6);
}

.wl-badge svg { color: #ec4899; flex-shrink: 0; }

/* الوصف */
.wl-description {
  font-size: 1rem;
  color: rgba(251, 207, 232, 0.85);
  line-height: 1.9;
  margin-bottom: 34px;
  font-weight: 500;
}

/* شبكة المميزات */
.wl-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 34px;
}

.wl-feature-card {
  padding: 20px 14px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.wl-feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(236, 72, 153, 0.5);
  background: rgba(236, 72, 153, 0.08);
  box-shadow: 0 20px 45px -12px rgba(236, 72, 153, 0.5);
}

.wl-feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(236, 72, 153, 0.35));
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: var(--icon-color, #ec4899);
  transition: all 0.4s ease;
}

.wl-feature-card:hover .wl-feature-icon {
  transform: scale(1.1) rotate(-8deg);
  box-shadow: 0 10px 25px -5px var(--icon-color, #ec4899);
}

.wl-feature-icon svg { width: 26px; height: 26px; }

.wl-feature-card h4 {
  font-size: 0.92rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 5px;
}

.wl-feature-card p {
  font-size: 0.74rem;
  color: rgba(251, 207, 232, 0.7);
  font-weight: 600;
  line-height: 1.5;
}

/* CTA */
.wl-cta-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 34px;
}

.wl-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 42px;
  border: none;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 900;
  color: #ffffff;
  cursor: pointer;
  letter-spacing: 0.4px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow:
    0 15px 40px -10px rgba(236, 72, 153, 0.7),
    0 10px 25px -8px rgba(168, 85, 247, 0.5);
}

.wl-cta-primary {
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
}

.wl-cta-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: left 0.8s ease;
}

.wl-cta-btn:hover::before { left: 100%; }

.wl-cta-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 22px 55px -10px rgba(236, 72, 153, 0.9),
    0 15px 35px -8px rgba(168, 85, 247, 0.7);
}

.wl-cta-btn:active { transform: translateY(-2px) scale(1); }

/* سوشيال */
.wl-footer-social {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 22px;
  text-align: center;
}

.wl-footer-label {
  display: block;
  font-size: 0.78rem;
  color: rgba(251, 207, 232, 0.6);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: 0.4px;
}

.wl-footer-icons {
  display: flex;
  justify-content: center;
  gap: 12px;
  direction: ltr;
}

.wl-social {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.5);
}

.wl-social svg { width: 22px; height: 22px; }

.wl-social:hover { transform: translateY(-5px) scale(1.12); box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.6); }

.wl-social-wa { background: linear-gradient(135deg, #25d366, #128c7e); }
.wl-social-yt { background: linear-gradient(135deg, #ff0000, #cc0000); }
.wl-social-tt { background: linear-gradient(135deg, #000, #2d2d2d); }
.wl-social-fb { background: linear-gradient(135deg, #1877f2, #0c63d4); }

/* Responsive */
@media (max-width: 900px) {
  .wl-features { grid-template-columns: repeat(2, 1fr); }
  .wl-brand-title { font-size: 2rem; }
  .wl-teacher-name { font-size: 1.6rem; }
  .wl-photo-wrap { width: 160px; height: 160px; }
  .wl-brand-subtitle { letter-spacing: 6px; font-size: 0.72rem; }
}

@media (max-width: 500px) {
  .welcome-landing-v1 { padding: 90px 14px 26px; }
  .wl-top-actions { top: 14px; left: 14px; gap: 8px; }
  .wl-action-btn { padding: 9px 14px; font-size: 0.78rem; gap: 6px; }
  .wl-action-btn svg { width: 14px; height: 14px; }
  .wl-photo-wrap { width: 130px; height: 130px; margin-bottom: 22px; }
  .wl-brand-title { font-size: 1.7rem; }
  .wl-teacher-name { font-size: 1.35rem; letter-spacing: 1px; }
  .wl-teacher-role { font-size: 0.92rem; }
  .wl-badges { gap: 7px; }
  .wl-badge { padding: 7px 12px; font-size: 0.72rem; }
  .wl-description { font-size: 0.88rem; margin-bottom: 26px; }
  .wl-features { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 26px; }
  .wl-feature-card { padding: 16px 10px; }
  .wl-feature-icon { width: 44px; height: 44px; }
  .wl-feature-icon svg { width: 22px; height: 22px; }
  .wl-feature-card h4 { font-size: 0.82rem; }
  .wl-feature-card p { font-size: 0.68rem; }
  .wl-cta-btn { padding: 15px 30px; font-size: 0.95rem; }
  .wl-social { width: 42px; height: 42px; }
  .wl-social svg { width: 20px; height: 20px; }
}

@media (max-width: 380px) {
  .wl-features { grid-template-columns: 1fr; }
  .wl-action-btn span:not(.wl-action-icon) { display: none; }
  .wl-action-btn { padding: 10px; width: 42px; height: 42px; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   🤖 Elite Bot V1
   ═══════════════════════════════════════════════════════════ */
.elite-bot-v1 {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 99998;
  font-family: 'Cairo', 'Tajawal', sans-serif;
  direction: rtl;
}

/* زر التشغيل */
.elite-bot-toggle {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 15px 35px -10px rgba(236, 72, 153, 0.75),
    0 8px 20px -6px rgba(168, 85, 247, 0.6);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: eliteBotFloat 3s ease-in-out infinite;
}

@keyframes eliteBotFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.elite-bot-toggle:hover {
  transform: scale(1.1) rotate(-6deg);
  box-shadow:
    0 22px 50px -10px rgba(236, 72, 153, 1),
    0 12px 30px -6px rgba(168, 85, 247, 0.8);
}

.elite-bot-v1.bot-open .elite-bot-toggle {
  animation: none;
  transform: rotate(180deg);
}

.elite-bot-toggle-icon,
.elite-bot-toggle-close {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* نقطة الإشعار */
.elite-bot-notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2.5px solid #1a0b3d;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.9);
  animation: eliteBotPulse 1.6s ease-in-out infinite;
}

.elite-bot-v1.bot-open .elite-bot-notif-dot,
.elite-bot-v1.bot-seen .elite-bot-notif-dot { display: none; }

@keyframes eliteBotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

/* نافذة الشات */
.elite-bot-window {
  position: absolute;
  bottom: 82px;
  left: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 130px);
  background: linear-gradient(160deg, #241454 0%, #1a0b3d 100%);
  border: 1.5px solid rgba(236, 72, 153, 0.35);
  border-radius: 22px;
  box-shadow:
    0 35px 90px -15px rgba(0, 0, 0, 0.85),
    0 0 60px -20px rgba(236, 72, 153, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.elite-bot-v1.bot-open .elite-bot-window {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* الهيدر */
.elite-bot-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.elite-bot-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.elite-bot-header-info { flex: 1; min-width: 0; }

.elite-bot-header-info h4 {
  font-size: 0.95rem;
  font-weight: 900;
  margin: 0 0 2px;
  color: #fff;
}

.elite-bot-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
}

.elite-bot-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: eliteBotStatusPulse 2s ease-in-out infinite;
}

@keyframes eliteBotStatusPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

.elite-bot-minimize {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.elite-bot-minimize:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* الرسائل */
.elite-bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.elite-bot-messages::-webkit-scrollbar { width: 5px; }
.elite-bot-messages::-webkit-scrollbar-track { background: transparent; }
.elite-bot-messages::-webkit-scrollbar-thumb {
  background: rgba(236, 72, 153, 0.4);
  border-radius: 10px;
}

/* الرسالة */
.bot-msg {
  display: flex;
  gap: 8px;
  max-width: 88%;
  animation: botMsgIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes botMsgIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bot-msg-bot { align-self: flex-start; flex-direction: row; }
.bot-msg-user { align-self: flex-end; flex-direction: row-reverse; }

.bot-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  border: 2px solid rgba(255,255,255,0.15);
}

.bot-msg-user .bot-msg-avatar {
  background: linear-gradient(135deg, #10b981, #059669);
}

.bot-msg-bubble {
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.87rem;
  line-height: 1.7;
  font-weight: 600;
  word-break: break-word;
  white-space: pre-line;
}

.bot-msg-bot .bot-msg-bubble {
  background: rgba(255, 255, 255, 0.08);
  color: #fbcfe8;
  border: 1px solid rgba(236, 72, 153, 0.2);
  border-top-right-radius: 6px;
}

.bot-msg-user .bot-msg-bubble {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.25));
  color: #d1fae5;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-top-left-radius: 6px;
}

/* أزرار الاختيارات */
.bot-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.bot-option-btn {
  padding: 12px 16px;
  background: rgba(236, 72, 153, 0.12);
  border: 1.5px solid rgba(236, 72, 153, 0.35);
  border-radius: 12px;
  color: #fbcfe8;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  text-align: right;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bot-option-btn:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(236, 72, 153, 0.35));
  border-color: #ec4899;
  transform: translateX(-4px);
  box-shadow: 0 8px 20px -6px rgba(236, 72, 153, 0.5);
}

.bot-option-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(236, 72, 153, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

/* أزرار التواصل (واتساب/تليجرام) */
.bot-contact-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.bot-contact-btn {
  flex: 1;
  min-width: 130px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 14px;
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 20px -8px rgba(0,0,0,0.5);
}

.bot-contact-btn:hover { transform: translateY(-3px) scale(1.02); }

.bot-contact-wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 8px 20px -6px rgba(37, 211, 102, 0.7);
}

.bot-contact-wa:hover { box-shadow: 0 14px 30px -6px rgba(37, 211, 102, 1); }

.bot-contact-tg {
  background: linear-gradient(135deg, #29a9eb, #0088cc);
  box-shadow: 0 8px 20px -6px rgba(41, 169, 235, 0.7);
}

.bot-contact-tg:hover { box-shadow: 0 14px 30px -6px rgba(41, 169, 235, 1); }

.bot-contact-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* كارت بيانات (للاستفسار) */
.bot-data-card {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.7;
  border: 1.5px solid;
  background: rgba(255, 255, 255, 0.04);
}

.bot-data-card-exam {
  border-color: rgba(168, 85, 247, 0.5);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(124, 58, 237, 0.05));
}

.bot-data-card-exam .bot-data-title { color: #c4b5fd; }

.bot-data-card-dictation {
  border-color: rgba(59, 130, 246, 0.5);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
}

.bot-data-card-dictation .bot-data-title { color: #93c5fd; }

.bot-data-card-attendance {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
}

.bot-data-card-attendance .bot-data-title { color: #6ee7b7; }

.bot-data-title {
  font-size: 0.92rem;
  font-weight: 900;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bot-data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 0.82rem;
  gap: 8px;
}

.bot-data-row:last-child { margin-bottom: 0; }

.bot-data-row strong { font-weight: 900; }

.bot-score-excellent { color: #10b981; }
.bot-score-good      { color: #fbbf24; }
.bot-score-weak      { color: #f87171; }

.bot-empty-note {
  text-align: center;
  padding: 12px;
  color: #9ca3af;
  font-size: 0.82rem;
  font-weight: 700;
  font-style: italic;
}

/* منطقة الإدخال */
.elite-bot-input-area {
  display: none;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(236, 72, 153, 0.2);
  align-items: center;
  flex-shrink: 0;
}

.elite-bot-input-area.active { display: flex; }

.elite-bot-input-area input {
  flex: 1;
  padding: 11px 15px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(236, 72, 153, 0.25);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  transition: all 0.3s ease;
  min-height: auto;
}

.elite-bot-input-area input::placeholder { color: rgba(251, 207, 232, 0.45); }

.elite-bot-input-area input:focus {
  border-color: #ec4899;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
}

#elite-bot-send {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

#elite-bot-send:hover {
  transform: scale(1.08) rotate(-6deg);
  box-shadow: 0 8px 20px -5px rgba(236, 72, 153, 0.8);
}

/* Footer البوت */
.elite-bot-footer {
  padding: 8px 14px;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(236, 72, 153, 0.15);
  font-size: 0.7rem;
  color: rgba(251, 207, 232, 0.55);
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* مؤشر الكتابة */
.bot-typing-indicator {
  display: inline-flex;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.bot-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ec4899;
  animation: botTyping 1.4s ease-in-out infinite;
}

.bot-typing-dot:nth-child(2) { animation-delay: 0.2s; background: #a855f7; }
.bot-typing-dot:nth-child(3) { animation-delay: 0.4s; background: #f472b6; }

@keyframes botTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Responsive البوت */
@media (max-width: 500px) {
  .elite-bot-v1 { bottom: 16px; left: 14px; }
  .elite-bot-toggle { width: 54px; height: 54px; }
  .elite-bot-window {
    bottom: 72px;
    width: calc(100vw - 28px);
    height: calc(100vh - 130px);
    max-height: 620px;
    border-radius: 20px;
  }
  .bot-msg { max-width: 92%; }
  .bot-contact-row { flex-direction: column; }
}
/* ═══════════════════════════════════════════════════════════
   ✏️ Edit Profile V1 — تعديل بيانات الطالب
   ═══════════════════════════════════════════════════════════ */

/* زر التعديل */
.edit-profile-v1-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
  border: 1.5px solid rgba(236, 72, 153, 0.4);
  border-radius: 14px;
  color: var(--pink-light, #fbcfe8);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}

.edit-profile-v1-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s ease;
}

.edit-profile-v1-btn:hover::before { left: 100%; }

.edit-profile-v1-btn:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
  border-color: var(--pink-1, #ec4899);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(236, 72, 153, 0.6);
}

.edit-profile-v1-btn svg { flex-shrink: 0; }

/* النافذة */
.edit-prof-v1-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  direction: rtl;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

.edit-prof-v1-modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.edit-prof-v1-card {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(160deg, #241454 0%, #1a0b3d 100%);
  border: 1.5px solid rgba(236, 72, 153, 0.35);
  border-radius: 24px;
  padding: 26px 24px;
  box-shadow:
    0 40px 100px -20px rgba(0, 0, 0, 0.9),
    0 0 60px -20px rgba(236, 72, 153, 0.4);
  max-height: 92vh;
  overflow-y: auto;
  animation: editProfV1SlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
}

@keyframes editProfV1SlideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.edit-prof-v1-card::-webkit-scrollbar { width: 5px; }
.edit-prof-v1-card::-webkit-scrollbar-thumb {
  background: rgba(236, 72, 153, 0.4);
  border-radius: 10px;
}

/* الهيدر */
.edit-prof-v1-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1.5px solid rgba(236, 72, 153, 0.2);
  position: relative;
}

.edit-prof-v1-header-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 22px -6px rgba(236, 72, 153, 0.7);
}

.edit-prof-v1-header-text { flex: 1; min-width: 0; }

.edit-prof-v1-header-text h3 {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  margin: 0 0 3px;
  letter-spacing: 0.2px;
}

.edit-prof-v1-header-text p {
  font-size: 0.8rem;
  color: rgba(251, 207, 232, 0.7);
  margin: 0;
  font-weight: 600;
}

.edit-prof-v1-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 900;
  transition: all 0.3s ease;
  flex-shrink: 0;
  padding: 0;
}

.edit-prof-v1-close:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
  transform: rotate(90deg) scale(1.08);
}

/* الفورم */
.edit-prof-v1-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.edit-prof-v1-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.edit-prof-v1-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fbcfe8;
  letter-spacing: 0.2px;
}

.edit-prof-v1-label-icon {
  font-size: 1rem;
  filter: drop-shadow(0 0 6px rgba(236, 72, 153, 0.5));
}

.edit-prof-v1-input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(236, 72, 153, 0.25);
  border-radius: 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  transition: all 0.3s ease;
  min-height: auto;
}

.edit-prof-v1-input::placeholder {
  color: rgba(251, 207, 232, 0.35);
  font-weight: 500;
}

.edit-prof-v1-input:focus {
  border-color: #ec4899;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.12);
  transform: translateY(-1px);
}

.edit-prof-v1-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.edit-prof-v1-select {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ec4899' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 16px center;
  background-size: 16px;
  padding-left: 46px;
  cursor: pointer;
}

.edit-prof-v1-select option {
  background: #241454;
  color: #fff;
  padding: 10px;
  font-weight: 700;
}

/* hint */
.edit-prof-v1-hint {
  font-size: 0.76rem;
  font-weight: 700;
  min-height: 16px;
  padding-right: 4px;
  line-height: 1.5;
}

/* Warning */
.edit-prof-v1-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.12));
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  border-radius: 12px;
  color: #fbbf24;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.6;
  animation: editProfV1WarnPulse 2s ease-in-out infinite;
}

.edit-prof-v1-warning svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #fbbf24;
}

@keyframes editProfV1WarnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  50%      { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.1); }
}

/* كروت نوع التسجيل */
.edit-prof-v1-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.edit-prof-v1-mode-card {
  margin: 0;
  cursor: pointer;
  position: relative;
  display: block;
}

.edit-prof-v1-mode-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.edit-prof-v1-mode-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(236, 72, 153, 0.2);
  border-radius: 14px;
  text-align: center;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 90px;
  position: relative;
}

.edit-prof-v1-mode-inner::after {
  content: '✓';
  position: absolute;
  top: 7px;
  right: 7px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.edit-prof-v1-mode-card:hover .edit-prof-v1-mode-inner {
  border-color: rgba(236, 72, 153, 0.5);
  background: rgba(236, 72, 153, 0.08);
  transform: translateY(-2px);
}

.edit-prof-v1-mode-card input:checked ~ .edit-prof-v1-mode-inner {
  border-color: #ec4899;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.15));
  box-shadow: 0 10px 25px -10px rgba(236, 72, 153, 0.6);
}

.edit-prof-v1-mode-card input:checked ~ .edit-prof-v1-mode-inner::after {
  opacity: 1;
  transform: scale(1);
}

.edit-prof-v1-mode-icon {
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.5));
}

.edit-prof-v1-mode-inner strong {
  font-size: 0.92rem;
  font-weight: 900;
  color: #fff;
}

.edit-prof-v1-mode-inner small {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(251, 207, 232, 0.65);
}

/* شبكة 2 عمود */
.edit-prof-v1-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* الرسائل */
.edit-prof-v1-msg {
  font-size: 0.85rem;
  font-weight: 800;
  text-align: center;
  min-height: 20px;
  margin: 4px 0;
  line-height: 1.6;
}

/* الأزرار */
.edit-prof-v1-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.edit-prof-v1-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 14px;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.edit-prof-v1-btn-save {
  flex: 2;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(16, 185, 129, 0.6);
}

.edit-prof-v1-btn-save::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.7s ease;
}

.edit-prof-v1-btn-save:hover::before { left: 100%; }

.edit-prof-v1-btn-save:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px -10px rgba(16, 185, 129, 0.85);
}

.edit-prof-v1-btn-save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.edit-prof-v1-btn-cancel {
  flex: 1;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1.5px solid rgba(239, 68, 68, 0.35);
}

.edit-prof-v1-btn-cancel:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
  transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 520px) {
  .edit-prof-v1-card { padding: 22px 16px; border-radius: 20px; }
  .edit-prof-v1-grid2 { grid-template-columns: 1fr; }
  .edit-prof-v1-header-text h3 { font-size: 1rem; }
  .edit-prof-v1-header-icon { width: 40px; height: 40px; }
  .edit-prof-v1-input { padding: 12px 14px; font-size: 0.87rem; }
  .edit-prof-v1-btn { padding: 12px 16px; font-size: 0.87rem; }
  .edit-prof-v1-actions { flex-direction: column-reverse; }
  .edit-prof-v1-btn-save, .edit-prof-v1-btn-cancel { flex: 1; width: 100%; }
}
/* ═══════════════════════════════════════════════════════════
   📚 Courses V2 — التصميم الجديد للمحاضرات والمجموعات
   ═══════════════════════════════════════════════════════════ */

/* الهيدر الرئيسي */
.courses-v2-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}

.courses-v2-grade-tag {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
  border: 1px solid rgba(236, 72, 153, 0.35);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--pink-light, #fbcfe8);
  margin-right: 8px;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

/* Wrapper يجمع القسمين */
.courses-v2-dual-wrapper {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* كل بلوك */
.courses-v2-block {
  position: relative;
  padding: 22px 20px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(36, 20, 84, 0.55), rgba(26, 11, 61, 0.55));
  border: 1.5px solid rgba(236, 72, 153, 0.18);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.courses-v2-block::before {
  content: '';
  position: absolute;
  top: 0;
  right: 30px;
  width: 90px;
  height: 3px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, transparent, var(--pink-1, #ec4899), var(--purple-3, #7c3aed), transparent);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.6);
  transition: width 0.4s ease;
}

.courses-v2-block:hover {
  border-color: rgba(236, 72, 153, 0.4);
  box-shadow: 0 15px 40px -15px rgba(236, 72, 153, 0.35);
}

.courses-v2-block:hover::before {
  width: 150px;
}

/* بلوك المجموعات — تمييز لوني */
.courses-v2-block-terms::before {
  background: linear-gradient(90deg, transparent, var(--purple-3, #7c3aed), var(--pink-1, #ec4899), transparent);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.6);
}

/* هيدر البلوك */
.courses-v2-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.courses-v2-block-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 200px;
}

.courses-v2-block-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.courses-v2-block:hover .courses-v2-block-icon {
  transform: scale(1.08) rotate(-5deg);
}

.courses-v2-icon-lessons {
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  box-shadow: 0 10px 25px -8px rgba(59, 130, 246, 0.8);
}

.courses-v2-icon-terms {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: 0 10px 25px -8px rgba(236, 72, 153, 0.8);
}

.courses-v2-block-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-primary, #fff);
  margin: 0 0 4px;
  letter-spacing: 0.2px;
  line-height: 1.35;
}

.courses-v2-block-sub {
  font-size: 0.78rem;
  color: var(--text-muted, #a78bfa);
  margin: 0;
  font-weight: 600;
  line-height: 1.5;
}

/* عدّاد */
.courses-v2-counter {
  padding: 7px 14px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
  border: 1.5px solid rgba(236, 72, 153, 0.35);
  border-radius: 22px;
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--pink-light, #fbcfe8);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.courses-v2-block:hover .courses-v2-counter {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3));
  border-color: var(--pink-1, #ec4899);
  transform: scale(1.05);
}

/* تحسين مظهر الحالة الفارغة */
.courses-v2-block .lessons-grid:empty::after {
  content: '📭 لا يوجد محتوى في هذا القسم حتى الآن';
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted, #a78bfa);
  font-size: 0.88rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  border: 1.5px dashed rgba(236, 72, 153, 0.2);
  display: block;
}

/* responsive */
@media (max-width: 700px) {
  .courses-v2-block {
    padding: 18px 14px 20px;
    border-radius: 16px;
  }
  .courses-v2-block-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }
  .courses-v2-block-icon svg {
    width: 22px;
    height: 22px;
  }
  .courses-v2-block-title {
    font-size: 1rem;
  }
  .courses-v2-block-sub {
    font-size: 0.72rem;
  }
  .courses-v2-counter {
    font-size: 0.7rem;
    padding: 5px 11px;
  }
  .courses-v2-dual-wrapper {
    gap: 18px;
  }
}

@media (max-width: 420px) {
  .courses-v2-block-head {
    flex-direction: column;
    align-items: stretch;
  }
  .courses-v2-counter {
    align-self: flex-start;
  }
  .courses-v2-block-title-wrap {
    gap: 10px;
  }
  .courses-v2-block-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .courses-v2-block-icon svg {
    width: 20px;
    height: 20px;
  }
}
/* ═══════════════════════════════════════════════════════════
   👤 Profile V3 — redesign كامل للملف الشخصي
   (يستبدل Profile V2 مع الحفاظ على كل IDs/classes)
   ═══════════════════════════════════════════════════════════ */

/* ===== الـ Wrapper الرئيسي ===== */
#section-profile {
  padding: 0;
}

#section-profile .box-title {
  margin-bottom: 22px;
  font-size: 1.25rem;
}

/* ===== التخطيط الرئيسي (2 columns) ===== */
.profile-v2-wrapper {
  display: grid !important;
  grid-template-columns: 1.15fr 0.85fr !important;
  gap: 26px !important;
  margin-top: 18px !important;
  align-items: start !important;
}

/* ===== الجانب الأول (البيانات — يمين في RTL) ===== */
.profile-v2-info-side {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  order: 1 !important;
}

/* ===== الجانب التاني (الصورة + QR — شمال في RTL) ===== */
.profile-v2-visual-side {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  order: 2 !important;
  position: sticky;
  top: 20px;
  align-self: start;
}

/* ===== شبكة البيانات (info grid) ===== */
.profile-v2-info-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
}

/* بعض الحقول تأخذ الصف كامل (عشان الوضوح) */
.profile-v2-info-item:nth-child(1),
.profile-v2-info-item:nth-child(6) {
  grid-column: 1 / -1;
}

/* ===== كل عنصر بيانات ===== */
.profile-v2-info-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(236, 72, 153, 0.06)) !important;
  border: 1.5px solid rgba(236, 72, 153, 0.18) !important;
  border-radius: 14px !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  overflow: hidden !important;
  min-height: 66px;
}

.profile-v2-info-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #7c3aed, #ec4899);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s ease;
}

.profile-v2-info-item:hover {
  border-color: rgba(236, 72, 153, 0.55) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 30px -12px rgba(236, 72, 153, 0.5) !important;
}

.profile-v2-info-item:hover::before {
  transform: scaleY(1);
}

/* أيقونة العنصر */
.pvi-icon {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #a855f7, #ec4899) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.3rem !important;
  box-shadow: 0 6px 18px -6px rgba(236, 72, 153, 0.65) !important;
  transition: transform 0.35s ease !important;
  flex-shrink: 0;
}

.profile-v2-info-item:hover .pvi-icon {
  transform: scale(1.1) rotate(-8deg) !important;
}

/* محتوى العنصر */
.pvi-content {
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.pvi-label {
  display: block !important;
  font-size: 0.72rem !important;
  color: rgba(167, 139, 250, 0.85) !important;
  font-weight: 700 !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase;
}

.profile-v2-info-item strong {
  display: block !important;
  font-size: 0.92rem !important;
  color: #fff !important;
  font-weight: 800 !important;
  overflow-wrap: anywhere !important;
  line-height: 1.4 !important;
}

/* Pills */
.mode-pill,
.status-pill {
  display: inline-block !important;
  padding: 5px 14px !important;
  border-radius: 12px !important;
  font-size: 0.8rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.3px !important;
  width: fit-content;
}

.mode-pill.center {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(124, 58, 237, 0.15)) !important;
  color: #c4b5fd !important;
  border: 1.5px solid rgba(124, 58, 237, 0.55) !important;
}

.mode-pill.online {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.15)) !important;
  color: #93c5fd !important;
  border: 1.5px solid rgba(59, 130, 246, 0.55) !important;
}

.status-pill.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(16, 185, 129, 0.15)) !important;
  color: #6ee7b7 !important;
  border: 1.5px solid rgba(16, 185, 129, 0.55) !important;
  animation: statusActivePulseV3 2.5s ease-in-out infinite;
}

.status-pill.pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(245, 158, 11, 0.15)) !important;
  color: #fbbf24 !important;
  border: 1.5px solid rgba(245, 158, 11, 0.55) !important;
}

@keyframes statusActivePulseV3 {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* ===== XP Bar ===== */
.profile-v2-xp-bar {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 16px 20px !important;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(236, 72, 153, 0.1)) !important;
  border: 2px solid rgba(251, 191, 36, 0.5) !important;
  border-radius: 16px !important;
  box-shadow: 0 12px 32px -14px rgba(251, 191, 36, 0.5) !important;
  position: relative !important;
  overflow: hidden !important;
  margin-top: 4px;
}

.profile-v2-xp-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  animation: xpShimmerV3 3s infinite;
}

@keyframes xpShimmerV3 {
  100% { transform: translateX(100%); }
}

.profile-v2-xp-bar .xp-icon {
  font-size: 1.9rem !important;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.9)) !important;
  animation: xpFloatV3 3s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes xpFloatV3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(8deg); }
}

.profile-v2-xp-bar .xp-info {
  flex: 1 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 10px;
}

.profile-v2-xp-bar .xp-info span {
  font-size: 0.82rem !important;
  color: #fbbf24 !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px !important;
}

.profile-v2-xp-bar .xp-info strong {
  font-size: 1.3rem !important;
  color: #fbbf24 !important;
  font-weight: 900 !important;
  text-shadow: 0 0 15px rgba(251, 191, 36, 0.7) !important;
}

/* ===== زر التعديل ===== */
.edit-profile-v1-btn {
  margin-bottom: 0 !important;
}

/* ===== كارت الصورة الشخصية ===== */
.profile-v2-avatar-card {
  padding: 24px 20px 18px !important;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(236, 72, 153, 0.12)) !important;
  border: 2px solid rgba(236, 72, 153, 0.4) !important;
  border-radius: 20px !important;
  text-align: center !important;
  box-shadow: 0 18px 45px -18px rgba(236, 72, 153, 0.55) !important;
  position: relative !important;
  overflow: hidden !important;
}

.profile-v2-avatar-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.12), transparent 60%);
  animation: avatarOrbV3 10s linear infinite;
  pointer-events: none;
}

@keyframes avatarOrbV3 {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.profile-v2-avatar-wrap {
  position: relative !important;
  width: 130px !important;
  height: 130px !important;
  margin: 0 auto 12px !important;
  z-index: 1 !important;
}

.profile-v2-avatar-img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 4px solid #ec4899 !important;
  background: #fff !important;
  box-shadow:
    0 0 0 6px rgba(236, 72, 153, 0.15),
    0 15px 45px -12px rgba(236, 72, 153, 0.75) !important;
  transition: transform 0.4s ease !important;
}

.profile-v2-avatar-img:hover {
  transform: scale(1.04) !important;
}

.profile-v2-camera-badge {
  position: absolute !important;
  bottom: 2px !important;
  left: 2px !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #a855f7, #ec4899) !important;
  border: 3px solid #241454 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 1.05rem !important;
  box-shadow: 0 8px 20px -4px rgba(236, 72, 153, 0.8) !important;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  z-index: 2 !important;
}

.profile-v2-camera-badge:hover {
  transform: scale(1.15) rotate(10deg) !important;
  box-shadow: 0 12px 30px -4px rgba(236, 72, 153, 1) !important;
}

.profile-v2-hint {
  font-size: 0.78rem !important;
  color: rgba(251, 207, 232, 0.75) !important;
  font-weight: 700 !important;
  margin-top: 4px !important;
  position: relative !important;
  z-index: 1 !important;
}

/* ===== كارت QR ===== */
.profile-v2-qr-card {
  padding: 22px 20px !important;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(236, 72, 153, 0.12)) !important;
  border: 2px solid rgba(236, 72, 153, 0.4) !important;
  border-radius: 20px !important;
  text-align: center !important;
  box-shadow: 0 18px 45px -18px rgba(236, 72, 153, 0.55) !important;
}

.profile-v2-qr-card h4 {
  color: #fbcfe8 !important;
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  margin-bottom: 6px !important;
  letter-spacing: 0.3px !important;
}

.profile-v2-qr-card p {
  font-size: 0.78rem !important;
  color: rgba(167, 139, 250, 0.8) !important;
  margin-bottom: 16px !important;
  font-weight: 600 !important;
}

.profile-v2-qr-wrap {
  display: inline-block !important;
  padding: 12px !important;
  background: #ffffff !important;
  border-radius: 18px !important;
  border: 3px solid #ec4899 !important;
  box-shadow:
    0 0 30px rgba(236, 72, 153, 0.55),
    inset 0 0 20px rgba(236, 72, 153, 0.08) !important;
  transition: transform 0.4s ease !important;
}

.profile-v2-qr-wrap:hover {
  transform: scale(1.03) !important;
}

.profile-v2-qr-wrap img {
  width: 160px !important;
  height: 160px !important;
  display: block !important;
  border-radius: 10px !important;
}

.btn-qr-download {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin-top: 16px !important;
  width: 100% !important;
  padding: 14px 22px !important;
  background: linear-gradient(135deg, #7c3aed, #ec4899) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 14px !important;
  font-family: inherit !important;
  font-weight: 900 !important;
  font-size: 0.92rem !important;
  cursor: pointer !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 12px 30px -10px rgba(236, 72, 153, 0.75) !important;
  position: relative !important;
  overflow: hidden !important;
}

.btn-qr-download::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.7s ease;
}

.btn-qr-download:hover::before { left: 100%; }

.btn-qr-download:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 18px 40px -10px rgba(236, 72, 153, 0.95) !important;
  filter: brightness(1.08) !important;
}

/* ═══════════════════════════════════════════════════════════
   📱 Responsive
   ═══════════════════════════════════════════════════════════ */

/* شاشات متوسطة (تابلت) */
@media (max-width: 1000px) {
  .profile-v2-wrapper {
    grid-template-columns: 1fr 0.9fr !important;
    gap: 18px !important;
  }
  
  .profile-v2-info-grid {
    grid-template-columns: 1fr !important;
  }
  
  .profile-v2-info-item:nth-child(1),
  .profile-v2-info-item:nth-child(6) {
    grid-column: auto !important;
  }
}

/* الجوال والتابلت الصغير */
@media (max-width: 768px) {
  .profile-v2-wrapper {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  /* على الموبايل: الصورة والـ QR فوق (ترتيب أنسب) */
  .profile-v2-visual-side {
    order: 1 !important;
    position: static !important;
  }
  
  .profile-v2-info-side {
    order: 2 !important;
  }
  
  /* كارت الصورة + QR جنب بعض على الموبايل الكبير */
  .profile-v2-visual-side {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
  }
  
  .profile-v2-avatar-card,
  .profile-v2-qr-card {
    flex: 1 1 calc(50% - 6px);
    min-width: 160px;
  }
  
  .profile-v2-info-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }
  
  .profile-v2-info-item:nth-child(1),
  .profile-v2-info-item:nth-child(6) {
    grid-column: 1 / -1 !important;
  }
  
  .profile-v2-avatar-wrap {
    width: 110px !important;
    height: 110px !important;
  }
  
  .profile-v2-qr-wrap img {
    width: 130px !important;
    height: 130px !important;
  }
  
  #section-profile .box-title {
    font-size: 1.1rem;
    margin-bottom: 18px;
  }
}

/* الجوال الصغير */
@media (max-width: 500px) {
  .profile-v2-wrapper {
    gap: 14px !important;
  }
  
  .profile-v2-visual-side {
    flex-direction: column !important;
  }
  
  .profile-v2-info-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  
  .profile-v2-info-item {
    padding: 12px 14px !important;
    min-height: 60px;
  }
  
  .pvi-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    font-size: 1.15rem !important;
  }
  
  .profile-v2-info-item strong {
    font-size: 0.88rem !important;
  }
  
  .pvi-label {
    font-size: 0.68rem !important;
  }
  
  .profile-v2-avatar-card {
    padding: 20px 16px 14px !important;
  }
  
  .profile-v2-qr-card {
    padding: 18px 16px !important;
  }
  
  .profile-v2-avatar-wrap {
    width: 100px !important;
    height: 100px !important;
  }
  
  .profile-v2-camera-badge {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
  }
  
  .profile-v2-qr-wrap img {
    width: 120px !important;
    height: 120px !important;
  }
  
  .profile-v2-xp-bar {
    padding: 14px 16px !important;
  }
  
  .profile-v2-xp-bar .xp-icon {
    font-size: 1.6rem !important;
  }
  
  .profile-v2-xp-bar .xp-info strong {
    font-size: 1.15rem !important;
  }
  
  .btn-qr-download {
    padding: 12px 18px !important;
    font-size: 0.86rem !important;
  }
}

/* الجوال الصغير جداً */
@media (max-width: 380px) {
  .profile-v2-avatar-wrap {
    width: 90px !important;
    height: 90px !important;
  }
  
  .profile-v2-qr-wrap img {
    width: 110px !important;
    height: 110px !important;
  }
  
  .pvi-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    font-size: 1rem !important;
  }
  
  .profile-v2-info-item {
    padding: 10px 12px !important;
    gap: 10px !important;
  }
  
  .profile-v2-info-item strong {
    font-size: 0.82rem !important;
  }
}

/* الوضع النهاري */
body.light-mode .profile-v2-info-item {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(236, 72, 153, 0.05)) !important;
  border-color: rgba(236, 72, 153, 0.2) !important;
}

body.light-mode .profile-v2-info-item strong {
  color: #1a1a2e !important;
}

body.light-mode .pvi-label {
  color: #6d28d9 !important;
}

body.light-mode .profile-v2-avatar-card,
body.light-mode .profile-v2-qr-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(236, 72, 153, 0.06)) !important;
  border-color: rgba(236, 72, 153, 0.35) !important;
}

body.light-mode .profile-v2-qr-card h4 {
  color: #be185d !important;
}

body.light-mode .profile-v2-qr-card p {
  color: #6d28d9 !important;
}

body.light-mode .profile-v2-hint {
  color: #6d28d9 !important;
}

body.light-mode .profile-v2-xp-bar .xp-info span {
  color: #92400e !important;
}

body.light-mode .profile-v2-xp-bar .xp-info strong {
  color: #d97706 !important;
  text-shadow: 0 0 10px rgba(217, 119, 6, 0.4) !important;
}

body.light-mode .profile-v2-xp-bar {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(236, 72, 153, 0.1)) !important;
  border-color: rgba(251, 191, 36, 0.6) !important;
}

body.light-mode .edit-profile-v1-btn {
  color: #be185d !important;
  border-color: rgba(236, 72, 153, 0.4) !important;
}
/* ═══════════════════════════════════════════════════════════
   🎫 Student ID Card V1 — كارت الطالب الأسود/الذهبي
   ═══════════════════════════════════════════════════════════ */

.student-id-card-v1 {
  background: linear-gradient(145deg, #0a0a0f 0%, #1a1a22 50%, #0a0a0f 100%) !important;
  border: 2px solid #b8860b !important;
  border-radius: 20px !important;
  padding: 8px !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 
    0 25px 60px -20px rgba(0, 0, 0, 0.9),
    0 0 40px -10px rgba(184, 134, 11, 0.4),
    inset 0 0 60px rgba(0, 0, 0, 0.5) !important;
  width: 100% !important;
  max-width: 520px;
  margin: 0 auto;
}

.student-id-card-v1::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(45deg, rgba(184, 134, 11, 0.03) 0, rgba(184, 134, 11, 0.03) 1px, transparent 1px, transparent 6px),
    radial-gradient(circle at 30% 20%, rgba(184, 134, 11, 0.1), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(184, 134, 11, 0.08), transparent 50%);
  pointer-events: none;
}

.student-id-card-v1::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 14px;
  pointer-events: none;
  box-shadow: inset 0 0 30px rgba(212, 175, 55, 0.1);
}

.sid-v1-inner {
  position: relative;
  z-index: 2;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  direction: ltr;
}

/* Header */
.sid-v1-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.sid-v1-brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sid-v1-logo-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #d4af37, #f4e5b1, #b8860b);
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.sid-v1-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #0a0a0f;
  display: block;
}

.sid-v1-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
}

.sid-v1-brand-en {
  font-family: 'Cinzel', 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 3px;
  color: #f4e5b1;
  text-shadow: 0 0 10px rgba(244, 229, 177, 0.5);
  line-height: 1;
}

.sid-v1-brand-sub {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 3px;
  color: #b8860b;
  font-weight: 700;
  line-height: 1.2;
}

.sid-v1-brand-teacher {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.5px;
  color: #d4af37;
  font-weight: 700;
  margin-top: 2px;
}

.sid-v1-id-badge {
  padding: 5px 12px;
  border: 1.5px solid #d4af37;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.15), rgba(0, 0, 0, 0.3));
  color: #f4e5b1;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 2px;
  box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.15);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Body */
.sid-v1-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 6px;
}

.sid-v1-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  min-width: 0;
}

.sid-v1-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sid-v1-field-label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 2px;
  color: #b8860b;
  font-weight: 900;
  text-transform: uppercase;
}

.sid-v1-field-value {
  color: #ffffff;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1.3;
  word-break: break-word;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

.sid-v1-name {
  font-size: 1.05rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.sid-v1-code-box {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.2), rgba(184, 134, 11, 0.08));
  border: 1.5px solid #d4af37;
  border-radius: 8px;
  color: #f4e5b1;
  font-family: 'Courier New', 'Montserrat', monospace;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 2px;
  margin-top: 2px;
  box-shadow: 
    inset 0 0 12px rgba(212, 175, 55, 0.15),
    0 0 12px rgba(212, 175, 55, 0.25);
  width: fit-content;
  max-width: 100%;
  direction: ltr;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* QR */
.sid-v1-qr-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.sid-v1-qr-box {
  width: 135px;
  height: 135px;
  padding: 8px;
  background: linear-gradient(135deg, #f5ead4, #fdfaf0);
  border-radius: 14px;
  border: 2.5px solid #d4af37;
  box-shadow: 
    0 0 25px rgba(212, 175, 55, 0.45),
    inset 0 0 20px rgba(184, 134, 11, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sid-v1-qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.sid-v1-qr-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 3px;
  color: #d4af37;
  font-weight: 900;
  text-transform: uppercase;
}

/* Footer */
.sid-v1-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  margin-top: 6px;
}

.sid-v1-footer-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.sid-v1-footer-right {
  text-align: right !important;
}

.sid-v1-footer-label {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 2px;
  color: #b8860b;
  font-weight: 900;
}

.sid-v1-footer-value {
  font-family: 'Cinzel', 'Courier New', serif;
  color: #f4e5b1;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-shadow: 0 0 8px rgba(244, 229, 177, 0.5);
}

.sid-v1-footer-decoration {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #d4af37, #8b6914);
  border: 2px solid #f4e5b1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a22;
  font-size: 1rem;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.7);
  animation: sidV1StarSpin 8s linear infinite;
  flex-shrink: 0;
}

@keyframes sidV1StarSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 500px) {
  .sid-v1-inner { padding: 10px 12px; gap: 8px; }
  .sid-v1-logo-ring { width: 42px; height: 42px; }
  .sid-v1-brand-en { font-size: 0.85rem; letter-spacing: 2px; }
  .sid-v1-brand-sub { font-size: 0.48rem; letter-spacing: 2px; }
  .sid-v1-brand-teacher { font-size: 0.52rem; }
  .sid-v1-id-badge { padding: 4px 9px; font-size: 0.55rem; letter-spacing: 1.5px; }
  .sid-v1-name { font-size: 0.9rem; }
  .sid-v1-field-value { font-size: 0.82rem; }
  .sid-v1-code-box { font-size: 0.85rem; padding: 5px 10px; letter-spacing: 1.5px; }
  .sid-v1-qr-box { width: 105px; height: 105px; padding: 6px; }
  .sid-v1-qr-label { font-size: 0.52rem; letter-spacing: 2px; }
  .sid-v1-footer-value { font-size: 0.68rem; letter-spacing: 1px; }
  .sid-v1-footer-decoration { width: 26px; height: 26px; font-size: 0.8rem; }
  .sid-v1-field-label { font-size: 0.52rem; letter-spacing: 1.5px; }
  .student-id-card-v1 { border-radius: 16px !important; padding: 6px !important; }
  .student-id-card-v1::after { inset: 8px; border-radius: 11px; }
}

@media (max-width: 380px) {
  .sid-v1-body { gap: 10px; }
  .sid-v1-qr-box { width: 90px; height: 90px; }
  .sid-v1-name { font-size: 0.82rem; }
  .sid-v1-code-box { font-size: 0.78rem; letter-spacing: 1px; padding: 4px 8px; }
  .sid-v1-field-value { font-size: 0.76rem; }
  .sid-v1-brand-en { font-size: 0.75rem; letter-spacing: 1.5px; }
  .sid-v1-brand-text { gap: 0; }
}

/* الوضع النهاري */
body.light-mode .student-id-card-v1 {
  box-shadow: 
    0 25px 60px -20px rgba(0, 0, 0, 0.4),
    0 0 40px -10px rgba(184, 134, 11, 0.3) !important;
}
/* 🔧 إخفاء زر إرسال النتيجة لولي الأمر — المستر هو اللي يبعت */
#btn-whatsapp-parent {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
/* 🔧 تثبيت عداد الامتحان فوق (Sticky) */
#quiz-popup-header-v1 {
  position: sticky !important;
  top: -26px !important;
  z-index: 100 !important;
  background: var(--bg-card) !important;
  padding: 18px 0 14px !important;
  margin: -18px -26px 14px !important;
  padding-inline: 26px !important;
  border-bottom: 2px solid rgba(236, 72, 153, 0.3) !important;
  box-shadow: 0 10px 25px -15px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(15px);
}

#quiz-popup-header-v1 .views-badge {
  font-size: 1.05rem !important;
  font-weight: 900 !important;
  padding: 8px 18px !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
  animation: timerPulseV1 1.8s ease-in-out infinite;
}

#quiz-popup-header-v1 .views-badge span {
  font-family: 'Montserrat', 'Courier New', monospace;
  font-weight: 900;
  letter-spacing: 1.5px;
  font-size: 1.1rem;
}

@keyframes timerPulseV1 {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

/* للجوال */
@media (max-width: 500px) {
  #quiz-popup-header-v1 {
    top: -20px !important;
    padding: 14px 0 10px !important;
    margin: -14px -18px 12px !important;
    padding-inline: 18px !important;
  }
  #quiz-popup-header-v1 .views-badge {
    font-size: 0.95rem !important;
    padding: 6px 14px !important;
  }
  #quiz-popup-header-v1 .views-badge span {
    font-size: 1rem;
  }
}
/* ═══════════════════════════════════════════════════════════
   🚨 Violations V1 — سجل المخالفات
   ═══════════════════════════════════════════════════════════ */

/* شريط الإحصائيات */
.violations-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.vstat-item {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(245, 158, 11, 0.05));
  border: 1.5px solid rgba(239, 68, 68, 0.25);
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.vstat-item:hover {
  transform: translateY(-3px);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 8px 20px -8px rgba(239, 68, 68, 0.4);
}

.vstat-val {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  color: #fca5a5;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 4px;
}

.vstat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* قائمة المخالفات */
.violations-list-v1 {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 4px;
}

.violations-list-v1::-webkit-scrollbar { width: 5px; }
.violations-list-v1::-webkit-scrollbar-thumb {
  background: rgba(239, 68, 68, 0.4);
  border-radius: 10px;
}

/* كارت المخالفة */
.violation-card-v1 {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), rgba(36, 20, 84, 0.5));
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  border-right: 5px solid #ef4444;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s ease;
  animation: violationSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

@keyframes violationSlideIn {
  from { opacity: 0; transform: translateX(-15px); }
  to   { opacity: 1; transform: translateX(0); }
}

.violation-card-v1:hover {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 12px 35px -12px rgba(239, 68, 68, 0.5);
  transform: translateX(-3px);
}

/* شارة النوع */
.violation-card-v1::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #ef4444);
  background-size: 200% 100%;
  animation: violationBarPulse 3s linear infinite;
}

@keyframes violationBarPulse {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.violation-card-v1.resolved {
  opacity: 0.55;
  border-color: rgba(16, 185, 129, 0.3);
  border-right-color: #10b981;
}

.violation-card-v1.resolved::before {
  background: #10b981;
  animation: none;
}

/* هيدر المخالفة */
.violation-header-v1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.violation-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.3px;
}

.violation-type-screenshot {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.12));
  color: #fca5a5;
  border: 1.5px solid rgba(239, 68, 68, 0.5);
}

.violation-type-cheat {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.12));
  color: #fbbf24;
  border: 1.5px solid rgba(245, 158, 11, 0.5);
}

.violation-type-video {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(168, 85, 247, 0.12));
  color: #c4b5fd;
  border: 1.5px solid rgba(168, 85, 247, 0.5);
}

.violation-type-devtools {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.12));
  color: #93c5fd;
  border: 1.5px solid rgba(59, 130, 246, 0.5);
}

.violation-time-v1 {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
}

/* بيانات الطالب */
.violation-student-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
}

.vs-info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.vs-info-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.vs-info-value {
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.vs-info-code {
  font-family: 'Courier New', monospace;
  color: var(--pink-light);
  letter-spacing: 1px;
}

/* السياق */
.violation-context-v1 {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1.5px dashed rgba(239, 68, 68, 0.35);
  border-radius: 10px;
  font-size: 0.84rem;
  color: #fca5a5;
  font-weight: 700;
  line-height: 1.5;
}

/* أزرار التحذير */
.violation-actions-v1 {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.violation-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  letter-spacing: 0.3px;
}

.violation-btn:hover {
  transform: translateY(-2px);
}

.violation-btn-warn-student {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(245, 158, 11, 0.7);
}

.violation-btn-warn-student:hover {
  box-shadow: 0 12px 28px -6px rgba(245, 158, 11, 0.9);
}

.violation-btn-warn-parent {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(37, 211, 102, 0.7);
}

.violation-btn-warn-parent:hover {
  box-shadow: 0 12px 28px -6px rgba(37, 211, 102, 0.9);
}

.violation-btn-resolve {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1.5px solid rgba(16, 185, 129, 0.4);
}

.violation-btn-resolve:hover {
  background: rgba(16, 185, 129, 0.3);
  color: #fff;
}

.violation-btn-delete {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  margin-right: auto;
}

.violation-btn-delete:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

/* responsive */
@media (max-width: 700px) {
  .violations-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .violation-student-info {
    grid-template-columns: 1fr;
  }
  .violation-actions-v1 {
    flex-direction: column;
  }
  .violation-btn {
    width: 100%;
    justify-content: center;
  }
  .violation-btn-delete {
    margin-right: 0;
  }
}
/* ═══════════════════════════════════════════════════════════
   🎯 Exam Scope Selector V1
   ═══════════════════════════════════════════════════════════ */
.exam-scope-selector-v1 {
  margin-bottom: 18px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(236, 72, 153, 0.05));
  border: 1.5px solid rgba(236, 72, 153, 0.25);
  border-radius: 16px;
}

.exam-scope-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--pink-light);
  margin-bottom: 12px;
}

.exam-scope-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.exam-scope-card {
  margin: 0;
  cursor: pointer;
  position: relative;
}

.exam-scope-card input { position: absolute; opacity: 0; pointer-events: none; }

.exam-scope-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(236, 72, 153, 0.2);
  border-radius: 14px;
  text-align: center;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-height: 100px;
}

.exam-scope-inner::after {
  content: '✓';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.exam-scope-card input:checked ~ .exam-scope-inner {
  border-color: #ec4899;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.15));
  box-shadow: 0 10px 25px -10px rgba(236, 72, 153, 0.6);
}

.exam-scope-card input:checked ~ .exam-scope-inner::after {
  opacity: 1;
  transform: scale(1);
}

.exam-scope-icon { font-size: 1.6rem; line-height: 1; }
.exam-scope-inner strong { font-size: 0.9rem; font-weight: 900; color: var(--text-primary); }
.exam-scope-inner small { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; }

@media (max-width: 500px) {
  .exam-scope-options { grid-template-columns: 1fr; }
}
/* ═══════════════════════════════════════════════════════════
   🔔 Smart Notifications V1
   ═══════════════════════════════════════════════════════════ */

/* إشعار محاضرة مجانية */
.notif-item-card.notif-lesson-free {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.08)) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.5) !important;
  box-shadow: 0 5px 20px -5px rgba(16, 185, 129, 0.4);
}

.notif-item-card.notif-lesson-free .notif-item-header > span:first-child {
  color: #6ee7b7 !important;
}

/* إشعار محاضرة مدفوعة */
.notif-item-card.notif-lesson-paid {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.08)) !important;
  border: 1.5px solid rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 5px 20px -5px rgba(59, 130, 246, 0.4);
}

.notif-item-card.notif-lesson-paid .notif-item-header > span:first-child {
  color: #93c5fd !important;
}

/* إشعار امتحان جديد */
.notif-item-card.notif-exam-new {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.08)) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.5) !important;
  box-shadow: 0 5px 20px -5px rgba(245, 158, 11, 0.4);
}

.notif-item-card.notif-exam-new .notif-item-header > span:first-child {
  color: #fbbf24 !important;
}

/* إشعار تحذير */
.notif-item-card.notif-warning-v1 {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(220, 38, 38, 0.1)) !important;
  border: 2px solid rgba(239, 68, 68, 0.6) !important;
  animation: warningPulseV1 2s infinite;
}

.notif-item-card.notif-warning-v1 .notif-item-header > span:first-child {
  color: #fca5a5 !important;
}

@keyframes warningPulseV1 {
  0%, 100% { box-shadow: 0 5px 20px -5px rgba(239, 68, 68, 0.4); }
  50%      { box-shadow: 0 5px 30px -5px rgba(239, 68, 68, 0.9); }
}

/* زر "فتح" */
.notif-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.notif-open-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(236, 72, 153, 0.7);
}

.notif-open-btn.notif-open-locked {
  background: linear-gradient(135deg, #64748b, #475569);
  cursor: not-allowed;
}

.notif-open-btn.notif-open-locked:hover {
  transform: none;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════
   📊 Gradebook Sessions V1 — جلسات رصد الدرجات
   ═══════════════════════════════════════════════════════════ */

/* ═══ نافذة تحذير التعديلات غير المحفوظة ═══ */
.unsaved-warning-v1 {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.unsaved-warning-content-v1 {
  background: linear-gradient(160deg, #241454, #1a0b3d);
  border: 2px solid #f59e0b;
  border-radius: 24px;
  padding: 32px 26px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.95), 0 0 60px -20px rgba(245, 158, 11, 0.5);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.unsaved-icon-v1 {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: pulse 1.5s infinite;
}

.unsaved-warning-content-v1 h3 {
  color: #fbbf24;
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.unsaved-warning-content-v1 p {
  color: #fbcfe8;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 22px;
  font-weight: 600;
}

.unsaved-actions-v1 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.unsaved-actions-v1 .btn {
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 900;
}

/* ═══ نافذة سجل الطالب ═══ */
.student-history-modal-v1 {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.student-history-content-v1 {
  background: linear-gradient(160deg, #241454, #1a0b3d);
  border: 2px solid rgba(236, 72, 153, 0.4);
  border-radius: 24px;
  width: 100%;
  max-width: 900px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.9);
}

.student-history-header-v1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 2px solid rgba(236, 72, 153, 0.3);
  background: rgba(0, 0, 0, 0.2);
}

.student-history-header-v1 h3 {
  color: #fbcfe8;
  font-size: 1.2rem;
  font-weight: 900;
  margin: 0;
}

.student-history-search-v1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(236, 72, 153, 0.15);
}

.student-history-search-v1 input,
.student-history-search-v1 select {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(236, 72, 153, 0.3);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
}

.student-history-search-v1 input::placeholder { color: rgba(251, 207, 232, 0.4); }

.student-history-list-v1 {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ═══ كارت جلسة للطالب ═══ */
.history-student-card-v1 {
  background: linear-gradient(135deg, rgba(36, 20, 84, 0.6), rgba(26, 11, 61, 0.6));
  border: 1.5px solid rgba(236, 72, 153, 0.3);
  border-right: 5px solid #ec4899;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-student-header-v1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-student-name-v1 {
  font-size: 1rem;
  font-weight: 900;
  color: #fbcfe8;
}

.history-student-meta-v1 {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.history-student-meta-v1 code {
  background: rgba(236, 72, 153, 0.15);
  color: #fbcfe8;
  padding: 3px 10px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}

.history-sessions-v1 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-session-item-v1 {
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid rgba(236, 72, 153, 0.15);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.3s ease;
}

.history-session-item-v1:hover {
  border-color: rgba(236, 72, 153, 0.4);
  background: rgba(0, 0, 0, 0.4);
}

.history-session-header-v1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.history-session-title-v1 {
  font-size: 0.92rem;
  font-weight: 900;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 6px;
}

.history-session-date-v1 {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

.history-scores-grid-v1 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.history-score-box-v1 {
  padding: 10px 12px;
  border-radius: 10px;
  text-align: center;
  border: 1.5px solid;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-score-box-v1.exam {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.4);
}

.history-score-box-v1.dictation {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.4);
}

.history-score-box-v1.combined {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.4);
}

.history-score-label-v1 {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-score-box-v1.exam .history-score-label-v1 { color: #c4b5fd; }
.history-score-box-v1.dictation .history-score-label-v1 { color: #93c5fd; }
.history-score-box-v1.combined .history-score-label-v1 { color: #6ee7b7; }

.history-score-value-v1 {
  font-size: 1.1rem;
  font-weight: 900;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.5px;
}

.history-score-box-v1.exam .history-score-value-v1 { color: #c4b5fd; }
.history-score-box-v1.dictation .history-score-value-v1 { color: #93c5fd; }
.history-score-box-v1.combined .history-score-value-v1 { color: #6ee7b7; }

.history-score-value-v1.excellent { color: #10b981 !important; }
.history-score-value-v1.good      { color: #fbbf24 !important; }
.history-score-value-v1.weak      { color: #f87171 !important; }

/* Modal responsive */
@media (max-width: 600px) {
  .student-history-search-v1 { grid-template-columns: 1fr; }
  .history-scores-grid-v1 { grid-template-columns: 1fr; }
  .history-session-header-v1 { flex-direction: column; align-items: flex-start; }
}

/* ═══ حقل عنوان الجلسة ═══ */
#gradebook-session-title {
  font-size: 1rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.3px;
}

#gradebook-session-title::placeholder {
  font-weight: 500 !important;
}
/* ═══════════════════════════════════════════════════════════
   📊 Student Requests Stats V1 — شريط الإحصائيات
   ═══════════════════════════════════════════════════════════ */

.students-requests-stats-v1 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.srs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  border-radius: 14px;
  border: 2px solid;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.srs-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  transition: width 0.35s ease;
}

.srs-item:hover {
  transform: translateY(-3px);
}

.srs-item:hover::before {
  width: 6px;
}

/* 🎯 الإجمالي */
.srs-total {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.06));
  border-color: rgba(168, 85, 247, 0.4);
}
.srs-total::before { background: linear-gradient(180deg, #a855f7, #7c3aed); }
.srs-total:hover { box-shadow: 0 12px 30px -12px rgba(168, 85, 247, 0.7); }
.srs-total .srs-value { color: #c4b5fd; }
.srs-total .srs-icon { background: rgba(168, 85, 247, 0.25); border-color: rgba(168, 85, 247, 0.5); }

/* ⏳ الانتظار */
.srs-pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(239, 68, 68, 0.06));
  border-color: rgba(245, 158, 11, 0.4);
}
.srs-pending::before { background: linear-gradient(180deg, #f59e0b, #d97706); }
.srs-pending:hover { box-shadow: 0 12px 30px -12px rgba(245, 158, 11, 0.7); }
.srs-pending .srs-value { color: #fbbf24; }
.srs-pending .srs-icon { background: rgba(245, 158, 11, 0.25); border-color: rgba(245, 158, 11, 0.5); }

/* ✅ المُفعّلين */
.srs-active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.06));
  border-color: rgba(16, 185, 129, 0.4);
}
.srs-active::before { background: linear-gradient(180deg, #10b981, #059669); }
.srs-active:hover { box-shadow: 0 12px 30px -12px rgba(16, 185, 129, 0.7); }
.srs-active .srs-value { color: #6ee7b7; }
.srs-active .srs-icon { background: rgba(16, 185, 129, 0.25); border-color: rgba(16, 185, 129, 0.5); }

/* 🆕 مضافين اليوم */
.srs-today {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.06));
  border-color: rgba(59, 130, 246, 0.4);
}
.srs-today::before { background: linear-gradient(180deg, #3b82f6, #2563eb); }
.srs-today:hover { box-shadow: 0 12px 30px -12px rgba(59, 130, 246, 0.7); }
.srs-today .srs-value { color: #93c5fd; }
.srs-today .srs-icon { background: rgba(59, 130, 246, 0.25); border-color: rgba(59, 130, 246, 0.5); }

/* أيقونة */
.srs-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1.5px solid;
  transition: transform 0.35s ease;
  flex-shrink: 0;
}

.srs-item:hover .srs-icon {
  transform: scale(1.1) rotate(-6deg);
}

/* محتوى */
.srs-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.srs-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.srs-value {
  font-size: 1.5rem;
  font-weight: 900;
  font-family: 'Montserrat', 'Cairo', sans-serif;
  line-height: 1;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════
   🖱️ Scrollable Table V1
   ═══════════════════════════════════════════════════════════ */

.table-scroll-v1 {
  max-height: 520px;
  overflow-y: auto;
  overflow-x: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 72, 153, 0.4) transparent;
  scroll-behavior: smooth;
}

/* Webkit scrollbar (Chrome/Edge/Safari) */
.table-scroll-v1::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-scroll-v1::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  margin: 4px;
}

.table-scroll-v1::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #a855f7, #ec4899);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: all 0.3s ease;
}

.table-scroll-v1::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ec4899, #a855f7);
  background-clip: padding-box;
  box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.3);
}

/* احتفظ بالـ thead ثابت فوق */
.table-scroll-v1 thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(135deg, #2d1b69, #1a0b3d) !important;
  box-shadow: 0 4px 15px -4px rgba(0, 0, 0, 0.6);
}

/* تحسين شكل الجدول */
.table-scroll-v1 table {
  margin: 0;
}

/* === Responsive === */
@media (max-width: 900px) {
  .students-requests-stats-v1 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .students-requests-stats-v1 {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .srs-item {
    padding: 12px 10px;
  }
  
  .srs-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1.3rem;
  }
  
  .srs-value {
    font-size: 1.25rem;
  }
  
  .table-scroll-v1 {
    max-height: 400px;
  }
}
/* ═══════════════════════════════════════════════════════════
   📝 Signup Fixes V1 — رسائل الخطأ + حقل التأكيد
   ═══════════════════════════════════════════════════════════ */

.signup-field-msg,
.signup-field-error {
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 6px;
  line-height: 1.5;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: right;
}

.signup-field-error {
  color: #ef4444;
}

.signup-field-error::before {
  content: "⚠️";
  font-size: 0.85rem;
  flex-shrink: 0;
}

.signup-field-msg.success {
  color: #10b981;
}

.signup-field-msg.success::before {
  content: "✓";
  font-weight: 900;
  flex-shrink: 0;
}

.signup-field-msg.error {
  color: #ef4444;
}

.signup-field-msg.error::before {
  content: "❌";
  flex-shrink: 0;
}

/* نجعل حقل الإيميل + الهاتف يأخذون حد أحمر لما فيه خطأ */
.auth-v4-input-wrap.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

/* نجعل الحقل يأخذ حد أخضر لما يكون صحيح */
.auth-v4-input-wrap.input-success {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1) !important;
}

/* حقل تأكيد كلمة المرور */
#signup-confirm-password-field .auth-v4-input-wrap {
  transition: all 0.3s ease;
}

#signup-password-match-msg {
  transition: all 0.3s ease;
}

/* شارة المطابقة */
.password-match-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.password-match-badge.match {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.password-match-badge.no-match {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

/* حالة الزر أثناء التحميل */
.auth-v4-submit[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.auth-v4-submit .btn-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: signupSpinV1 0.7s linear infinite;
  vertical-align: middle;
  margin-left: 8px;
}

@keyframes signupSpinV1 {
  to { transform: rotate(360deg); }
}

/* تنبيه الحساب القديم */
.signup-old-account-alert {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(168, 85, 247, 0.08));
  border: 1.5px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.7;
  text-align: right;
}

.signup-old-account-alert strong {
  color: #dbeafe;
  font-weight: 900;
}

.signup-old-account-alert .alert-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.signup-old-account-alert .alert-actions button,
.signup-old-account-alert .alert-actions a {
  flex: 1;
  min-width: 130px;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.signup-old-account-alert .btn-go-login {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(59, 130, 246, 0.6);
}

.signup-old-account-alert .btn-go-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(59, 130, 246, 0.8);
}

.signup-old-account-alert .btn-forgot-pass {
  background: rgba(236, 72, 153, 0.15);
  color: #fbcfe8;
  border: 1.5px solid rgba(236, 72, 153, 0.4);
}

.signup-old-account-alert .btn-forgot-pass:hover {
  background: rgba(236, 72, 153, 0.3);
  color: #fff;
  transform: translateY(-2px);
}

/* ═══ نهاية Signup Fixes V1 ═══ */
/* ═══════════════════════════════════════════════════════════
   🖼️ Image Manager V2 — تنسيقات إدارة الصور
   ═══════════════════════════════════════════════════════════ */

.image-mgr-v2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.image-mgr-v2-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(236, 72, 153, 0.05));
  border: 1.5px solid var(--border, rgba(236, 72, 153, 0.2));
  border-radius: 16px;
  padding: 16px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.image-mgr-v2-card:hover {
  border-color: var(--pink-1, #ec4899);
  transform: translateY(-3px);
  box-shadow: 0 15px 35px -10px rgba(236, 72, 153, 0.4);
}

.image-mgr-v2-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(236, 72, 153, 0.3);
}

.image-mgr-v2-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.image-mgr-v2-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  box-shadow: 0 5px 15px -3px rgba(236, 72, 153, 0.7);
}

.image-mgr-v2-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.image-mgr-v2-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.image-mgr-v2-icon {
  font-size: 1.3rem;
}

.image-mgr-v2-title strong {
  color: var(--pink-light, #fbcfe8);
  font-weight: 900;
}

.image-mgr-v2-desc {
  font-size: 0.78rem;
  color: var(--text-muted, #a78bfa);
  margin: 0;
  line-height: 1.5;
  font-weight: 600;
}

.image-mgr-v2-date {
  font-size: 0.72rem;
  color: var(--text-muted, #a78bfa);
  margin: 0;
  font-weight: 700;
  opacity: 0.8;
}

.image-mgr-v2-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.image-mgr-v2-file-input {
  display: none;
}

.image-mgr-v2-btn {
  flex: 1;
  min-width: 120px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.image-mgr-v2-btn-upload {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(236, 72, 153, 0.7);
}

.image-mgr-v2-btn-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -6px rgba(236, 72, 153, 0.95);
}

.image-mgr-v2-btn-reset {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1.5px solid rgba(239, 68, 68, 0.4);
}

.image-mgr-v2-btn-reset:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
  transform: translateY(-2px);
}

.image-mgr-v2-progress {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 4px;
}

.image-mgr-v2-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  border-radius: 10px;
  animation: imageMgrV2Progress 1.5s ease-in-out infinite;
}

@keyframes imageMgrV2Progress {
  0% { width: 5%; }
  50% { width: 80%; }
  100% { width: 95%; }
}

.image-mgr-v2-notes {
  margin-top: 24px;
  padding: 16px;
  background: rgba(59, 130, 246, 0.08);
  border: 1.5px solid rgba(59, 130, 246, 0.3);
  border-radius: 14px;
}

.image-mgr-v2-notes h5 {
  color: #93c5fd;
  font-weight: 900;
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.image-mgr-v2-notes ul {
  font-size: 0.82rem;
  color: var(--text-muted, #a78bfa);
  line-height: 1.8;
  font-weight: 600;
  padding-right: 18px;
  margin: 0;
}

.image-mgr-v2-notes li strong {
  color: #93c5fd;
}

/* Responsive */
@media (max-width: 600px) {
  .image-mgr-v2-grid {
    grid-template-columns: 1fr;
  }
}
