/* ==========================================================================
   نظام إدارة المدرسة الذكي - الأنماط والتصميم الحديث (RTL)
   Smart Arabic School Management System - Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
  /* لوحة الألوان الأساسية */
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-focus: rgba(37, 99, 235, 0.25);
  
  --secondary-color: #0d9488;
  --secondary-light: #f0fdfa;
  
  --accent-color: #8b5cf6;
  --accent-light: #f5f3ff;
  
  --success-color: #10b981;
  --success-light: #ecfdf5;
  --warning-color: #f59e0b;
  --warning-light: #fffbeb;
  --danger-color: #ef4444;
  --danger-light: #fef2f2;
  --info-color: #0284c7;
  --info-light: #f0f9ff;

  /* درجات الرمادي والأسطح */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-surface: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  
  /* ألوان النصوص */
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;

  /* الشريط الجانبي */
  --sidebar-width: 275px;
  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active-bg: rgba(37, 99, 235, 0.15);
  --sidebar-active-text: #60a5fa;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.05);

  /* الظلال */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* نصف القطر والانتقالات */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Tajawal', system-ui, -apple-system, sans-serif;
  --app-font-size: 15px;
}

/* الوضع الليلي (Dark Mode) */
[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-card: #131b2e;
  --bg-surface: #1e293b;
  --bg-input: #1e293b;
  --border-color: #27354f;
  --border-light: #1e293b;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --sidebar-bg: #090d16;
  --primary-light: rgba(37, 99, 235, 0.18);
  --secondary-light: rgba(13, 148, 136, 0.18);
  --success-light: rgba(16, 185, 129, 0.18);
  --warning-light: rgba(245, 158, 11, 0.18);
  --danger-light: rgba(239, 68, 68, 0.18);

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* إعادة تعيين العناصر الأساسية */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--app-font-size, 15px);
  scroll-behavior: smooth;
  font-variant-numeric: tabular-nums lining-nums;
  -moz-font-feature-settings: "lnum" 1, "tnum" 1;
  -webkit-font-feature-settings: "lnum" 1, "tnum" 1;
  font-feature-settings: "lnum" 1, "tnum" 1;
  transition: font-size 0.15s ease;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

/* ==========================================================================
   التحكم العام في سُمك الخط (Global Font Weight System)
   ========================================================================== */
html[data-font-weight="normal"] body {
  font-weight: 400;
}

html[data-font-weight="medium"] body,
html[data-font-weight="medium"] p,
html[data-font-weight="medium"] td,
html[data-font-weight="medium"] label,
html[data-font-weight="medium"] input,
html[data-font-weight="medium"] select,
html[data-font-weight="medium"] textarea,
html[data-font-weight="medium"] button,
html[data-font-weight="medium"] .form-control,
html[data-font-weight="medium"] .nav-item a,
html[data-font-weight="medium"] .stat-label,
html[data-font-weight="medium"] .dropdown-item,
html[data-font-weight="medium"] .table-data td {
  font-weight: 600 !important;
}

html[data-font-weight="medium"] h1,
html[data-font-weight="medium"] h2,
html[data-font-weight="medium"] h3,
html[data-font-weight="medium"] h4,
html[data-font-weight="medium"] th,
html[data-font-weight="medium"] strong,
html[data-font-weight="medium"] b,
html[data-font-weight="medium"] .stat-val {
  font-weight: 800 !important;
}

html[data-font-weight="bold"] body,
html[data-font-weight="bold"] p,
html[data-font-weight="bold"] td,
html[data-font-weight="bold"] label,
html[data-font-weight="bold"] input,
html[data-font-weight="bold"] select,
html[data-font-weight="bold"] textarea,
html[data-font-weight="bold"] button,
html[data-font-weight="bold"] .form-control,
html[data-font-weight="bold"] .nav-item a,
html[data-font-weight="bold"] .stat-label,
html[data-font-weight="bold"] a {
  font-weight: 700 !important;
}

html[data-font-weight="bold"] h1,
html[data-font-weight="bold"] h2,
html[data-font-weight="bold"] h3,
html[data-font-weight="bold"] h4,
html[data-font-weight="bold"] th,
html[data-font-weight="bold"] strong,
html[data-font-weight="bold"] b,
html[data-font-weight="bold"] .stat-val {
  font-weight: 900 !important;
}

html[data-font-weight="extra-bold"] body,
html[data-font-weight="extra-bold"] p,
html[data-font-weight="extra-bold"] td,
html[data-font-weight="extra-bold"] th,
html[data-font-weight="extra-bold"] label,
html[data-font-weight="extra-bold"] input,
html[data-font-weight="extra-bold"] select,
html[data-font-weight="extra-bold"] textarea,
html[data-font-weight="extra-bold"] button,
html[data-font-weight="extra-bold"] a,
html[data-font-weight="extra-bold"] span:not(.badge),
html[data-font-weight="extra-bold"] .form-control,
html[data-font-weight="extra-bold"] .nav-item a {
  font-weight: 800 !important;
}

html[data-font-weight="extra-bold"] h1,
html[data-font-weight="extra-bold"] h2,
html[data-font-weight="extra-bold"] h3,
html[data-font-weight="extra-bold"] h4,
html[data-font-weight="extra-bold"] strong,
html[data-font-weight="extra-bold"] b,
html[data-font-weight="extra-bold"] .stat-val {
  font-weight: 900 !important;
}

/* شريط التمرير */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   تخطيط التطبيق العام (App Layout)
   ========================================================================== */

#appLayout {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* الشريط الجانبي (Sidebar) */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.school-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  padding: 2px;
  flex-shrink: 0;
}

.brand-icon-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-icon-box svg {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #94a3b8;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.nav-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  padding: 10px 14px 6px;
  letter-spacing: 0.5px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-item a:hover {
  background-color: var(--sidebar-hover-bg);
  color: #ffffff;
}

.nav-item.active a {
  background-color: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 700;
}

.nav-item.active a::before {
  content: '';
  position: absolute;
  right: -12px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background-color: var(--primary-color);
  border-radius: 4px 0 0 4px;
}

.nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-badge {
  margin-right: auto;
  font-size: 0.75rem;
  padding: 2px 7px;
  background-color: var(--primary-color);
  color: #ffffff;
  border-radius: 20px;
  font-weight: 700;
}

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}

.sidebar-meta-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-meta-icon {
  width: 32px;
  height: 32px;
  background: rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
  flex-shrink: 0;
}

.sidebar-meta-info {
  font-size: 0.78rem;
  line-height: 1.3;
}

.sidebar-meta-label {
  color: #94a3b8;
}

.sidebar-meta-val {
  font-weight: 700;
  color: #f1f5f9;
}

/* ==========================================================================
   المحتوى الرئيسي والشريط العلوي
   ========================================================================== */

.app-main {
  flex: 1;
  margin-right: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: var(--transition);
}

/* الشريط العلوي (Topbar) */
.app-header {
  height: 70px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.page-title-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title-badge h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.academic-badge {
  font-size: 0.8rem;
  font-weight: 600;
  background-color: var(--primary-light);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* البحث الشامل */
.header-search {
  position: relative;
  width: 280px;
}

.header-search input {
  width: 100%;
  height: 38px;
  padding: 0 38px 0 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

/* عناصر وأزرار الشريط العلوي */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.action-icon-btn:hover {
  background-color: var(--bg-surface);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.notif-pulse {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 8px;
  height: 8px;
  background-color: var(--danger-color);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* بطاقة المستخدم في الشريط العلوي */
.user-profile-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 6px;
  border-radius: 30px;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  transition: var(--transition);
}

.user-profile-menu:hover {
  border-color: var(--primary-color);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.user-text-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ==========================================================================
   حاوية العرض والمحتوى (Main Content Area)
   ========================================================================== */

.content-container {
  flex: 1;
  padding: 24px 28px 40px;
  max-width: 1600px;
  width: 100%;
}

/* رؤوس الصفحات (Page Header) */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.view-header-title h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
}

.view-header-title p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.view-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   بطاقات الإحصائيات (Stat Cards)
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
  transition: var(--transition);
}

.trend-up {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.trend-up svg {
  color: var(--success-color);
  animation: trendArrowUp 1.8s ease-in-out infinite alternate;
}

.trend-down {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.trend-down svg {
  color: var(--danger-color);
  animation: trendArrowDown 1.8s ease-in-out infinite alternate;
}

.trend-neutral {
  color: #0369a1;
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

@keyframes trendArrowUp {
  0% {
    transform: translateY(1px);
  }
  100% {
    transform: translateY(-4px);
  }
}

@keyframes trendArrowDown {
  0% {
    transform: translateY(-1px);
  }
  100% {
    transform: translateY(4px);
  }
}

/* زر مؤشر النزول والطلوع العائم للتنقل السريع في لوحة التحكم (Floating Scroll Up/Down Controls) */
.dashboard-scroll-nav {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 990;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s;
}

.dashboard-scroll-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--bg-surface);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
}

.dashboard-scroll-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.dashboard-scroll-btn.btn-scroll-up:hover svg {
  animation: scrollFloatUp 0.8s ease-in-out infinite alternate;
}

.dashboard-scroll-btn.btn-scroll-down:hover svg {
  animation: scrollFloatDown 0.8s ease-in-out infinite alternate;
}

@keyframes scrollFloatUp {
  0% { transform: translateY(0); }
  100% { transform: translateY(-3px); }
}

@keyframes scrollFloatDown {
  0% { transform: translateY(0); }
  100% { transform: translateY(3px); }
}

.stat-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-blue { background: var(--primary-light); color: var(--primary-color); }
.icon-green { background: var(--success-light); color: var(--success-color); }
.icon-amber { background: var(--warning-light); color: var(--warning-color); }
.icon-purple { background: var(--accent-light); color: var(--accent-color); }
.icon-teal { background: var(--secondary-light); color: var(--secondary-color); }
.icon-red { background: var(--danger-light); color: var(--danger-color); }

/* ==========================================================================
   حركة النبض الحي للفت الانتباه لبطاقة غياب الطلبة (Alert Heartbeat Pulse)
   ========================================================================== */

@keyframes heartbeatPulse {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.10);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.06);
  }
  70% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes heartbeatRipple {
  0% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.32);
    opacity: 0;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

@keyframes cardHeartbeatGlow {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.22), 0 4px 14px rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.35);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.32), 0 6px 20px rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.85);
  }
}

@keyframes alertDotBlink {
  0% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1.25);
  }
}

.alert-pulse-card {
  border-color: rgba(239, 68, 68, 0.45) !important;
  animation: cardHeartbeatGlow 2.4s ease-in-out infinite;
}

.pulse-alert-icon {
  position: relative;
  animation: heartbeatPulse 1.8s ease-in-out infinite;
}

.pulse-alert-icon::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid var(--danger-color, #ef4444);
  animation: heartbeatRipple 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  pointer-events: none;
}

.pulse-heartbeat-badge {
  display: inline-flex !important;
  align-items: center;
  animation: heartbeatPulse 1.8s ease-in-out infinite;
  transform-origin: center right;
}

.pulse-heartbeat-text {
  animation: heartbeatPulse 1.8s ease-in-out infinite;
  display: inline-block;
  transform-origin: center right;
}

.live-alert-dot {
  width: 6px;
  height: 6px;
  background-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #ffffff;
  animation: alertDotBlink 0.9s infinite alternate;
}

/* ==========================================================================
   أيقونة الجرس المتحركة والمهتزة دائماً (Continuous Bell Ringing & Vibration)
   ========================================================================== */

.bell-icon-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.bell-ringing-icon {
  display: inline-block;
  transform-origin: 50% 12%;
  animation: bellRingVibrate 2.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
  color: #f59e0b;
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.35));
}

@keyframes bellRingVibrate {
  0% {
    transform: rotate(0deg) scale(1);
  }
  4% {
    transform: rotate(26deg) scale(1.15);
  }
  8% {
    transform: rotate(-24deg) scale(1.15);
  }
  12% {
    transform: rotate(20deg) scale(1.1);
  }
  16% {
    transform: rotate(-18deg) scale(1.1);
  }
  20% {
    transform: rotate(14deg) scale(1.06);
  }
  24% {
    transform: rotate(-12deg) scale(1.06);
  }
  28% {
    transform: rotate(8deg) scale(1.03);
  }
  32% {
    transform: rotate(-6deg) scale(1.03);
  }
  36% {
    transform: rotate(4deg) scale(1.01);
  }
  40% {
    transform: rotate(-2deg) scale(1.01);
  }
  44% {
    transform: rotate(0deg) scale(1);
  }
  /* رنين واهتزاز سريع متتابع (Continuous Live Buzz) */
  55% {
    transform: rotate(0deg) scale(1);
  }
  60% {
    transform: rotate(12deg) scale(1.08);
  }
  64% {
    transform: rotate(-12deg) scale(1.08);
  }
  68% {
    transform: rotate(8deg) scale(1.04);
  }
  72% {
    transform: rotate(-8deg) scale(1.04);
  }
  76% {
    transform: rotate(4deg) scale(1.02);
  }
  80% {
    transform: rotate(0deg) scale(1);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

.bell-alert-ping {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background-color: var(--danger-color, #ef4444);
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.85);
  animation: bellPing 1.6s infinite;
}

@keyframes bellPing {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.85);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* حركة واهتزاز جرس زر الإشعارات في الشريط العلوي وقائمة التنقل */
.header-actions .action-icon-btn[title*="الإشعارات"] svg,
.nav-item[data-view="notifications"] .nav-icon svg {
  transform-origin: 50% 12%;
  animation: bellRingVibrate 2.2s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;
}

/* ==========================================================================
   شبكة لوحة التحكم (Dashboard Grid)
   ========================================================================== */

.dashboard-layout {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 22px;
  margin-bottom: 24px;
}

.card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.card-header-flex h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   الجداول وقوائم البيانات (Tables)
   ========================================================================== */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.92rem;
}

.modern-table th {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.modern-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.modern-table tbody tr {
  transition: var(--transition);
}

.modern-table tbody tr:hover {
  background-color: var(--bg-surface);
}

/* شارات الحالة (Badges) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-success { background: var(--success-light); color: var(--success-color); }
.badge-warning { background: var(--warning-light); color: var(--warning-color); }
.badge-danger { background: var(--danger-light); color: var(--danger-color); }
.badge-info { background: var(--info-light); color: var(--info-color); }
.badge-secondary { background: var(--bg-surface); color: var(--text-muted); }

/* أزرار الإجراءات في الجداول */
.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-btn {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.table-btn:hover {
  background: var(--bg-surface);
  border-color: var(--text-muted);
}

.table-btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.table-btn-danger:hover {
  background: var(--danger-light);
  border-color: var(--danger-color);
  color: var(--danger-color);
}

/* ==========================================================================
   الأزرار العامة (Buttons)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

.btn-success {
  background-color: var(--success-color);
  color: #ffffff;
}

.btn-success:hover {
  background-color: #059669;
}

.btn-danger {
  background-color: var(--danger-color);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1.05rem;
}

/* ==========================================================================
   شريط التصفية والبحث (Filter & Action Bar)
   ========================================================================== */

.filters-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.filters-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.form-control, .form-select {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

/* ==========================================================================
   النماذج وحقول الإدخال (Forms)
   ========================================================================== */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-group .form-control, .form-group .form-select {
  width: 100%;
}

.form-group textarea.form-control {
  height: auto;
  min-height: 80px;
  padding: 10px 14px;
}

.form-help {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   النوافذ المنبثقة (Modals)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-dialog.modal-lg {
  max-width: 900px;
}

.modal-dialog.modal-sm {
  max-width: 440px;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: var(--bg-surface);
  color: var(--danger-color);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-surface);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   إشعارات التوست (Toast Alerts)
   ========================================================================== */

#toastContainer {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-right: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 0.92rem;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 280px;
  max-width: 420px;
}

.toast-message.toast-success { border-right-color: var(--success-color); }
.toast-message.toast-danger { border-right-color: var(--danger-color); }
.toast-message.toast-warning { border-right-color: var(--warning-color); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   شاشة تسجيل الدخول (Login Overlay)
   ========================================================================== */

.login-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top right, #1e3a8a, #0f172a);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 460px;
  padding: 36px 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.login-logo {
  width: 90px;
  height: 90px;
  background: #ffffff;
  border-radius: 20px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  padding: 4px;
}

.login-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-logo svg {
  width: 38px;
  height: 38px;
  color: var(--primary-color);
}

.login-card h2 {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 6px;
  color: var(--text-main);
}

.login-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.demo-roles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
}

.role-quick-btn {
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.role-quick-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-light);
}

.role-btn-with-photo {
  padding: 6px 12px;
}

.role-btn-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.role-btn-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   المخططات البيانية المخصصة (Charts)
   ========================================================================== */

.donut-chart-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.svg-donut-box {
  position: relative;
}

.donut-center-title {
  font-size: 1.15rem;
  font-weight: 800;
  fill: var(--text-main);
}

.donut-center-subtitle {
  font-size: 0.8rem;
  fill: var(--text-muted);
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.legend-val {
  margin-right: auto;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* مخطط الأعمدة */
.custom-bar-chart {
  width: 100%;
  padding-top: 15px;
}

.bars-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  width: 100%;
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bar-track {
  width: 100%;
  max-width: 38px;
  background: var(--bg-surface);
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-end;
  position: relative;
}

.bar-fill {
  width: 100%;
  border-radius: 6px 6px 0 0;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.bar-value-tooltip {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.bar-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

/* ==========================================================================
   مؤشر تقييم الأداء للمعلمين ثلاثي الأبعاد (3D Performance Chart)
   ========================================================================== */
.chart-3d-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 4px 0;
  perspective: 1000px;
}

.chart-3d-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0.2, 1);
  cursor: grab;
  padding: 4px;
  border-radius: var(--radius-lg);
}

.chart-3d-stage:active {
  cursor: grabbing;
}

.chart-3d-stage.live-vibrating {
  animation: stageGentleFloat 4.5s ease-in-out infinite alternate;
}

@keyframes stageGentleFloat {
  0% {
    transform: rotateX(0deg) rotateY(0deg);
  }
  50% {
    transform: rotateX(2.5deg) rotateY(-2deg);
  }
  100% {
    transform: rotateX(-2deg) rotateY(2.5deg);
  }
}

.chart-3d-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.09));
}

.chart-3d-btn-toggle {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3px;
  gap: 3px;
}

.btn-toggle-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-toggle-item:hover {
  color: var(--text-main);
}

.btn-toggle-item.active {
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}

.uae-curriculum-bottom-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(13, 148, 136, 0.35);
  border-radius: 24px;
  padding: 6px 18px;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.12);
  transition: var(--transition);
}

.uae-curriculum-bottom-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.22);
  border-color: rgba(13, 148, 136, 0.55);
}

.legend-3d-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 14px;
}

.legend-3d-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
}

.legend-3d-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.legend-3d-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.legend-3d-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.legend-3d-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-3d-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-3d-val {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary-color);
}

.legend-3d-bar-track {
  width: 100%;
  height: 5px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.legend-3d-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease-out;
}

/* ==========================================================================
   الجداول الأسبوعية (Timetable Matrix)
   ========================================================================== */

.timetable-grid {
  width: 100%;
  border-collapse: collapse;
}

.timetable-grid th, .timetable-grid td {
  border: 1px solid var(--border-color);
  padding: 10px;
  text-align: center;
}

.timetable-grid th {
  background: var(--bg-surface);
  font-weight: 700;
}

.timetable-cell {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: var(--transition);
  border: 1px dashed var(--border-color);
}

.timetable-cell:hover {
  border-color: var(--primary-color);
  background: var(--primary-light);
}

.tt-subject {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary-color);
}

.tt-teacher {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.tt-room {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* ==========================================================================
   سند القبض الرسمي القابل للطباعة (Official Payment Receipt)
   ========================================================================== */

.official-receipt {
  background: #ffffff;
  color: #1e293b;
  border: 2px solid #0f172a;
  border-radius: 12px;
  padding: 28px;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  font-family: var(--font-family);
}

.receipt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px dashed #cbd5e1;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.receipt-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
  font-size: 5rem;
  font-weight: 900;
  color: rgba(16, 185, 129, 0.08);
  pointer-events: none;
  white-space: nowrap;
}

.receipt-title-box {
  text-align: center;
}

.receipt-title-box h2 {
  font-size: 1.4rem;
  font-weight: 900;
  color: #0f172a;
}

.receipt-number {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2563eb;
}

.receipt-details-table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

.receipt-details-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
}

.receipt-details-table td.label {
  font-weight: 700;
  color: #475569;
  width: 30%;
  background: #f8fafc;
}

.receipt-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.receipt-sig-col {
  text-align: center;
  width: 40%;
}

.receipt-sig-line {
  margin-top: 40px;
  border-top: 1px dashed #94a3b8;
}

/* ==========================================================================
   شهادات الشكر والتفوق (Certificate of Excellence)
   ========================================================================== */

.certificate-sheet {
  background: #ffffff;
  color: #1e293b;
  border: 14px solid #1e3a8a;
  outline: 4px solid #d97706;
  outline-offset: -8px;
  padding: 40px 50px;
  border-radius: 8px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.cert-header {
  margin-bottom: 20px;
}

.cert-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #1e3a8a;
  margin-top: 10px;
  letter-spacing: 1px;
}

.cert-body {
  font-size: 1.15rem;
  line-height: 2;
  margin: 30px 0;
}

.cert-student-name {
  font-size: 1.8rem;
  font-weight: 900;
  color: #d97706;
  display: inline-block;
  border-bottom: 2px solid #d97706;
  padding: 0 16px;
  margin: 10px 0;
}

.cert-footer {
  display: flex;
  justify-content: space-around;
  margin-top: 40px;
}

/* ==========================================================================
   بطاقة الطالب الذكية (Student ID Card)
   ========================================================================== */

.student-id-card {
  width: 340px;
  background: linear-gradient(145deg, #1e3a8a, #0f172a);
  color: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.id-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.id-card-body {
  display: flex;
  gap: 16px;
  align-items: center;
}

.id-card-avatar {
  width: 70px;
  height: 85px;
  background: #ffffff;
  color: #1e293b;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  flex-shrink: 0;
}

.id-card-fields {
  font-size: 0.82rem;
  line-height: 1.6;
}

.id-card-fields b {
  color: #60a5fa;
}

.id-card-barcode {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-family: monospace;
  font-size: 1.1rem;
  letter-spacing: 4px;
}

/* ==========================================================================
   التنسيق للطباعة (Print Media Styles)
   ========================================================================== */

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .app-sidebar,
  .app-header,
  .view-header-actions,
  .filters-bar,
  .table-actions,
  .btn,
  .no-print,
  #toastContainer {
    display: none !important;
  }

  /* عند طباعة النوافذ المنبثقة كالتقارير والسندات والشهادات */
  body.modal-open #appLayout {
    display: none !important;
  }

  body.modal-open .modal-backdrop {
    position: static !important;
    background: transparent !important;
    display: block !important;
    padding: 0 !important;
    overflow: visible !important;
    inset: auto !important;
  }

  body.modal-open .modal-dialog {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
  }

  body.modal-open .modal-header,
  body.modal-open .modal-footer {
    display: none !important;
  }

  body.modal-open .modal-body {
    padding: 0 !important;
    overflow: visible !important;
    max-height: none !important;
  }

  body:not(.modal-open) .modal-backdrop {
    display: none !important;
  }

  .app-main {
    margin: 0 !important;
    padding: 0 !important;
  }

  .content-container {
    padding: 0 !important;
    max-width: 100% !important;
  }

  .card-box {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .official-receipt,
  .certificate-sheet,
  .student-id-card {
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .teacher-evaluation-report {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .report-page-1 {
    page-break-after: always !important;
    break-after: page !important;
    min-height: 260mm;
    padding: 15mm 15mm 10mm 15mm !important;
    box-sizing: border-box;
  }

  .report-page-2 {
    page-break-before: always !important;
    break-before: page !important;
    min-height: 260mm;
    padding: 15mm 15mm 10mm 15mm !important;
    box-sizing: border-box;
  }
}

/* ==========================================================================
   تقرير تقييم الأداء المهني للمعلم للطباعة (Teacher Evaluation Formal Report)
   ========================================================================== */
.teacher-evaluation-report {
  background: #ffffff;
  border: 2px solid #0d9488;
  border-radius: 12px;
  padding: 26px 28px;
  color: #1e293b;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  font-family: var(--font-family);
  direction: rtl;
}

.report-official-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 18px;
  gap: 16px;
}

.report-header-col-right {
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #334155;
}

.uae-country-title {
  font-weight: 900;
  font-size: 0.98rem;
  color: #0f172a;
}

.uae-ministry-title {
  font-weight: 700;
  color: #0d9488;
}

.uae-center-title {
  font-weight: 800;
  color: #047857;
}

.uae-dept-title {
  font-size: 0.74rem;
  color: #64748b;
}

.report-header-logo-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.report-emblem-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.report-official-badge {
  font-size: 0.68rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(16, 185, 129, 0.12));
  color: #0d9488;
  border: 1px solid rgba(13, 148, 136, 0.3);
  padding: 2px 8px;
  border-radius: 10px;
}

.report-header-col-left {
  flex: 1;
  text-align: left;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.6;
}

.report-main-title-box {
  text-align: center;
  margin: 18px 0 16px;
  background: linear-gradient(135deg, #f0fdfa, #ecfdf5);
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: 8px;
  padding: 10px 16px;
}

.report-main-title-box h2 {
  font-size: 1.3rem;
  font-weight: 900;
  color: #0f766e;
  margin: 0 0 3px;
  letter-spacing: -0.2px;
}

.report-main-title-box p {
  font-size: 0.82rem;
  color: #047857;
  margin: 0;
  font-weight: 700;
}

.report-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.report-info-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
}

.report-info-cell .info-label {
  color: #64748b;
  font-weight: 700;
}

.report-info-cell .info-val {
  color: #0f172a;
}

.report-summary-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1.5px solid #10b981;
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 16px;
  gap: 16px;
}

.summary-score-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-left: 2px solid #e2e8f0;
  padding-left: 20px;
}

.summary-score-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: #047857;
  line-height: 1;
}

.summary-score-label {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 700;
  margin-top: 4px;
}

.summary-level-col {
  flex: 1;
}

.summary-level-title {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 4px;
}

.summary-level-badge {
  font-size: 1.05rem;
  font-weight: 900;
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 4px;
}

.summary-level-badge.badge-outstanding {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #10b981;
}

.summary-level-badge.badge-very-good {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #0d9488;
}

.summary-level-badge.badge-good {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #3b82f6;
}

.summary-level-badge.badge-acceptable {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #f59e0b;
}

.summary-level-badge.badge-needs-dev {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #ef4444;
}

.summary-level-desc {
  font-size: 0.78rem;
  color: #475569;
}

.report-criteria-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.84rem;
}

.report-criteria-table th {
  background: #0f766e;
  color: #ffffff;
  padding: 8px 10px;
  border: 1px solid #0f766e;
  font-weight: 800;
  text-align: right;
}

.report-criteria-table td {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  vertical-align: middle;
}

.report-criteria-table tr:nth-child(even) {
  background: #f8fafc;
}

.crit-subtext {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.3;
}

.score-highlight {
  font-size: 0.95rem;
  color: #0f766e;
}

.level-tag {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
}

.table-total-row {
  background: #f0fdfa !important;
  font-weight: 800;
}

.report-notes-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.report-notes-box h4 {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f766e;
  margin: 0 0 6px;
}

.report-notes-box p {
  font-size: 0.82rem;
  color: #334155;
  margin: 0;
  line-height: 1.5;
}

.report-signatures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
  padding-top: 10px;
}

.signature-cell {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  min-height: 105px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.signature-cell.stamp-cell {
  position: relative;
  border-color: #0d9488;
  background: rgba(13, 148, 136, 0.02);
}

.sig-title {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 700;
}

.sig-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

.sig-line {
  font-size: 0.72rem;
  color: #94a3b8;
}

.report-official-stamp {
  width: 78px;
  height: 78px;
  border: 2px solid #0d9488;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 0;
  transform: rotate(-12deg);
  opacity: 0.85;
}

.stamp-inner {
  width: 68px;
  height: 68px;
  border: 1px dashed #0d9488;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.55rem;
  color: #0f766e;
  font-weight: 700;
  line-height: 1.1;
}

.stamp-inner b {
  font-size: 0.78rem;
  font-weight: 900;
  color: #047857;
  letter-spacing: 1px;
}

.report-footer-bar {
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #64748b;
}

/* تنسيق الورقتين لتقرير تقييم الأداء */
.report-page-1,
.report-page-2 {
  background: #ffffff;
  border: 2px solid #0d9488;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  position: relative;
}

.report-page-number-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0d9488;
  background: rgba(13, 148, 136, 0.1);
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid rgba(13, 148, 136, 0.25);
  display: inline-block;
}

.report-section-banner {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-right: 4px solid #0d9488;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-section-banner h3 {
  font-size: 0.96rem;
  font-weight: 800;
  color: #0f766e;
  margin: 0;
}

.report-page-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
}

.report-page-divider::before,
.report-page-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #cbd5e1;
}

/* ==========================================================================
   التجاوب مع الشاشات (Responsive Breakpoints)
   ========================================================================== */

@media (max-width: 1024px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --sidebar-width: 260px;
  }

  .app-sidebar {
    transform: translateX(100%);
  }

  .app-sidebar.sidebar-open {
    transform: translateX(0);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 95;
  }

  .app-main {
    margin-right: 0;
  }

  .mobile-toggle-btn {
    display: block;
  }

  .header-search {
    display: none;
  }

  .content-container {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .view-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .view-header-actions {
    width: 100%;
  }
  
  .view-header-actions .btn {
    flex: 1;
  }
}

/* ==========================================================================
   المؤثرات التفاعلية لمؤشر الحضور والموسيقى الخلفية
   ========================================================================== */

/* أشرطة التردد الصوتي للموسيقى الخلفية (Music Wave Bars) */
.music-wave-bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  margin-right: 3px;
}

.music-wave-bars span {
  display: inline-block;
  width: 2.5px;
  background-color: var(--primary-color, #0d9488);
  border-radius: 2px;
  height: 4px;
}

.music-wave-bars.playing {
  display: inline-flex !important;
}

.music-wave-bars.playing span:nth-child(1) {
  animation: musicBounce 0.9s ease-in-out infinite alternate;
}

.music-wave-bars.playing span:nth-child(2) {
  animation: musicBounce 0.65s ease-in-out infinite alternate 0.2s;
}

.music-wave-bars.playing span:nth-child(3) {
  animation: musicBounce 0.8s ease-in-out infinite alternate 0.4s;
}

@keyframes musicBounce {
  0% {
    height: 3px;
  }
  100% {
    height: 14px;
  }
}

.action-icon-btn.music-active {
  color: var(--primary-color);
  background: rgba(13, 148, 136, 0.12);
  border-color: rgba(13, 148, 136, 0.3);
}

/* مؤثرات دائرة الحضور والانضباط المتحركة (Animated Attendance Circle) */
.attendance-circle-container {
  transition: transform 0.3s ease;
}

.attendance-circle-container:hover {
  transform: scale(1.02);
}

/* حركة بطيئة وانسيابية لقوس الدائرة والنقطة المدارية (3.4 ثوانٍ) */
#attendanceCircleArc {
  transition: stroke-dashoffset 3.4s cubic-bezier(0.25, 1, 0.4, 1);
  will-change: stroke-dashoffset;
}

#orbitalDotGroup {
  transition: transform 3.4s cubic-bezier(0.25, 1, 0.4, 1);
  will-change: transform;
}

/* الحلقة المدارية الخارجية الدوّارة باستمرار */
.circle-orbital-track {
  transform-origin: 105px 105px;
  animation: orbitalSpin 24s linear infinite;
  will-change: transform;
}

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

/* هالة النقطة المدارية النبضية */
.orbital-pulse-halo {
  animation: orbitalPulse 1.8s ease-in-out infinite alternate;
}

@keyframes orbitalPulse {
  0% {
    r: 7;
    opacity: 0.3;
  }
  100% {
    r: 12;
    opacity: 0.65;
  }
}

/* نقطة النبض الحي الصغير */
.live-pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--success-color, #10b981);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: liveDotPulse 1.6s infinite;
}

@keyframes liveDotPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* نبض شارة حالة الانضباط */
#circleStatusBadge .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.12);
  font-weight: 700;
  letter-spacing: -0.2px;
}

/* ==========================================================================
   بطاقة تقييم الأداء للمعلمين - معايير دولة الإمارات العربية المتحدة ومؤشر متحرك
   (UAE Teacher Performance Evaluation Card & Animated Live Gauge)
   ========================================================================== */

/* بطاقة المعلم في شبكة المعلمين */
.teacher-uae-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.teacher-uae-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.teacher-card-badge-uae {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.1), rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(13, 148, 136, 0.25);
  color: var(--primary-color);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.teacher-eval-meter-box {
  margin-top: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
}

.mini-gauge-wrapper {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-gauge-svg {
  width: 58px;
  height: 58px;
  transform: rotate(-90deg);
}

.mini-gauge-val {
  position: absolute;
  font-size: 0.92rem;
  font-weight: 900;
  font-feature-settings: 'tnum';
}

.teacher-eval-info {
  flex: 1;
  min-width: 0;
}

.teacher-crit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.teacher-crit-pill {
  font-size: 0.68rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

/* نافذة بطاقة التقييم التفاعلية (Evaluation Modal) */
.eval-modal-header {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.eval-uae-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #10b98144;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #047857;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* المؤشر الدائري المتحرك لتقييم الأداء */
.eval-live-gauge-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.eval-live-gauge-svg-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.eval-live-gauge-content {
  position: absolute;
  text-align: center;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eval-live-score {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-main);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: 'lnum' 1, 'tnum' 1;
  transition: color 0.3s ease;
}

.eval-live-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 3px;
}

.eval-live-info-panel {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eval-rating-badge {
  font-size: 1.05rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  width: fit-content;
  transition: all 0.3s ease;
}

.eval-framework-notice {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  background: var(--bg-card);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--primary-color);
}

/* بطاقات المعايير الخمسة وفق منهاج دولة الإمارات */
.uae-crit-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.uae-crit-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.uae-crit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}

.uae-crit-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.uae-crit-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.uae-crit-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.uae-crit-score-badge {
  font-size: 0.95rem;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary-color);
  font-feature-settings: 'tnum';
}

.uae-slider {
  width: 100%;
  accent-color: var(--primary-color);
  cursor: pointer;
  height: 6px;
}

/* جدول المعايير الخمسة داخل نافذة تقييم الأداء */
.eval-criteria-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg-card);
}

.eval-criteria-table th {
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 800;
  font-size: 0.84rem;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border-color);
  text-align: right;
}

.eval-criteria-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.84rem;
  vertical-align: middle;
}

.eval-criteria-table tr:last-child td {
  border-bottom: none;
}

.eval-criteria-table tr:hover td {
  background: rgba(0, 0, 0, 0.015);
}

.eval-tbl-crit-title {
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.eval-tbl-crit-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.eval-tbl-score-badge {
  font-size: 0.92rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary-color);
  display: inline-block;
  min-width: 44px;
  text-align: center;
}

.eval-history-crit-mini {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 220px;
}

.eval-history-crit-mini span {
  font-size: 0.68rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ==========================================================================
   مدرسة ليوا للتعليم المبكر - لمعة متحركة باللون الأبيض
   ========================================================================== */
.liwa-shimmer-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  padding: 4px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.liwa-shimmer-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  position: relative;
  z-index: 2;
  letter-spacing: -0.3px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 255, 255, 0.35);
}

.liwa-shimmer-light-beam {
  position: absolute;
  top: -50%;
  left: -80%;
  width: 55%;
  height: 200%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.35) 30%,
    rgba(255, 255, 255, 0.98) 50%,
    rgba(255, 255, 255, 0.35) 70%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(24deg);
  animation: liwaWhiteShimmerSweep 4.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
  filter: blur(1.5px);
  z-index: 3;
}

@keyframes liwaWhiteShimmerSweep {
  0% {
    left: -80%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  65% {
    left: 140%;
    opacity: 1;
  }
  75%, 100% {
    left: 140%;
    opacity: 0;
  }
}

/* ==========================================================================
   أنماط نافذة استيراد كشف الإكسل والـ CSV (Excel/CSV Import Modal)
   ========================================================================== */

.import-modal-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.import-notice-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.02));
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.import-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.import-dropzone:hover {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.04);
  transform: translateY(-1px);
}

.import-dropzone.drag-over {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.08);
  border-style: solid;
  box-shadow: 0 0 0 4px var(--primary-focus);
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.import-dropzone:hover .dropzone-icon {
  transform: scale(1.08);
}

.import-preview-table-wrap {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.import-preview-table-wrap::-webkit-scrollbar {
  width: 6px;
}

.import-preview-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* ==========================================================================
   قائمة تخصيص حجم وسمك الخط المنبثقة (Font Settings Popover)
   ========================================================================== */

.font-settings-wrapper {
  position: relative;
}

.font-settings-popover {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 330px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), 0 10px 30px rgba(0, 0, 0, 0.16);
  z-index: 1200;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fontPopoverFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: right;
}

@keyframes fontPopoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.font-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.font-popover-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.font-popover-title svg {
  color: var(--primary-color);
}

.font-popover-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.font-popover-close:hover {
  color: var(--danger-color);
  background: var(--danger-light);
}

.font-popover-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.font-ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.font-ctrl-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.font-ctrl-label-row label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.font-val-badge {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary-color);
  background: var(--primary-light);
  padding: 2px 9px;
  border-radius: 12px;
}

.font-size-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.font-step-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.font-step-btn:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.font-range-input {
  flex: 1;
  accent-color: var(--primary-color);
  cursor: pointer;
  height: 6px;
}

.font-presets-row {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: space-between;
}

.font-preset-chip {
  flex: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 2px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.font-preset-chip:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.font-preset-chip.active {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  font-weight: 800;
}

.font-weight-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.font-weight-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.font-weight-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.font-weight-btn.active {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 800;
  box-shadow: 0 0 0 1px var(--primary-color);
}

.font-preview-card {
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.font-preview-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.font-preview-text {
  color: var(--text-main);
  line-height: 1.4;
  font-size: 0.95rem;
  transition: var(--transition);
}

.font-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

/* التكيف مع شاشات الهواتف */
@media (max-width: 480px) {
  .font-settings-popover {
    width: min(320px, calc(100vw - 24px));
    left: -70px;
  }
}

