/* ========================================================================
   روضة الأمل - نظام الإدارة - الإصدار الرابع
   Professional Design System - Inspired by Next.js + Tailwind + shadcn/ui
   ======================================================================== */

/* ===== CSS Custom Properties - Design Tokens ===== */
:root {
  /* Radius Scale */
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Color Palette - Warm Rose + Purple */
  --background: #FFFBF5;
  --foreground: #1a0a0a;
  --card: #FFFFFF;
  --card-foreground: #1a0a0a;

  /* Primary - Deep Rose */
  --primary: #BE185D;
  --primary-hover: #9D174D;
  --primary-foreground: #FFFBF5;
  --primary-light: rgba(190, 24, 93, 0.08);

  /* Secondary */
  --secondary: #FFF1E6;
  --secondary-foreground: #3d1a1a;

  /* Accent - Purple */
  --accent: #7C3AED;
  --accent-hover: #6D28D9;
  --accent-foreground: #FFFBF5;
  --accent-light: rgba(124, 58, 237, 0.08);

  /* Muted */
  --muted: #F9F5F0;
  --muted-foreground: #6b4a4a;

  /* Destructive */
  --destructive: #DC2626;
  --destructive-light: rgba(220, 38, 38, 0.08);

  /* Success */
  --success: #059669;
  --success-light: rgba(5, 150, 105, 0.08);

  /* Warning */
  --warning: #D97706;
  --warning-light: rgba(217, 119, 6, 0.08);

  /* Borders & Input */
  --border: #F0E4D8;
  --border-light: #F8F0E8;
  --input: #F0E4D8;
  --ring: #BE185D;

  /* Sidebar */
  --sidebar-bg: linear-gradient(180deg, #6D28D9 0%, #8B1A4A 50%, #BE185D 100%);
  --sidebar-foreground: #FFFFFF;
  --sidebar-accent: rgba(255, 255, 255, 0.12);
  --sidebar-border: rgba(255, 255, 255, 0.1);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-glow-primary: 0 4px 14px rgba(190, 24, 93, 0.25);
  --shadow-glow-accent: 0 4px 14px rgba(124, 58, 237, 0.25);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Base Reset & Styles ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans Arabic', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--foreground);
  direction: rtl;
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== Keyframe Animations ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(190, 24, 93, 0.3); }
  50% { box-shadow: 0 0 20px 5px rgba(190, 24, 93, 0.15); }
}

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

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-fade-in-up { animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.animate-fade-in { animation: fadeIn 0.3s ease-out forwards; }
.animate-scale-in { animation: scaleIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.animate-slide-down { animation: slideDown 0.3s ease-out forwards; }
.animate-slide-in-right { animation: slideInRight 0.4s ease-out forwards; }
.animate-pulse-glow { animation: pulseGlow 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(190, 24, 93, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(190, 24, 93, 0.4); }

.custom-scrollbar::-webkit-scrollbar { width: 5px; height: 5px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.03); border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(190, 24, 93, 0.25); border-radius: 3px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(190, 24, 93, 0.45); }
.custom-scrollbar { scrollbar-width: thin; scrollbar-color: rgba(190, 24, 93, 0.25) transparent; }

/* ===== Gradient Presets ===== */
.gradient-rose { background: linear-gradient(135deg, #BE185D 0%, #E11D48 50%, #F43F5E 100%); }
.gradient-purple { background: linear-gradient(135deg, #6D28D9 0%, #7C3AED 50%, #8B5CF6 100%); }
.gradient-emerald { background: linear-gradient(135deg, #059669 0%, #10B981 100%); }
.gradient-amber { background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%); }
.gradient-red { background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%); }
.gradient-rose-amber { background: linear-gradient(135deg, #BE185D 0%, #9D174D 40%, #D97706 100%); }
.gradient-warm { background: linear-gradient(135deg, #FFF7ED 0%, #FEF3C7 50%, #FDF2F8 100%); }
.gradient-header { background: linear-gradient(135deg, #9D174D 0%, #BE185D 50%, #E11D48 100%); }

/* Animated gradient background */
.gradient-animated {
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

/* ===== Glass Morphism ===== */
.glass {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.glass-dark {
  background: rgba(30, 20, 20, 0.75);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Hover Effects ===== */
.hover-lift {
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.hover-glow {
  transition: box-shadow var(--transition-normal);
}
.hover-glow:hover {
  box-shadow: var(--shadow-glow-primary);
}

/* ========================================================================
   COMPONENT SYSTEM
   ======================================================================== */

/* ===== Card ===== */
.card {
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.card:hover {
  box-shadow: var(--shadow-md);
}
.card-header {
  padding: 1.25rem 1.5rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.card-header.with-gradient {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
  border-bottom: 1px solid var(--border-light);
  padding: 1rem 1.5rem;
}
.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--foreground);
  letter-spacing: -0.01em;
}
.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}
.card-content { padding: 1rem 1.5rem 1.5rem; }
.card-footer {
  padding: 0.75rem 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== Stat Card ===== */
.stat-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition-normal);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.stat-card:hover::before { opacity: 1; }

.stat-card-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}
.stat-card-icon.rose { background: linear-gradient(135deg, #BE185D, #E11D48); color: white; }
.stat-card-icon.emerald { background: linear-gradient(135deg, #059669, #10B981); color: white; }
.stat-card-icon.amber { background: linear-gradient(135deg, #D97706, #F59E0B); color: white; }
.stat-card-icon.purple { background: linear-gradient(135deg, #7C3AED, #8B5CF6); color: white; }

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--foreground);
}
.stat-card-label {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* ===== Stat Card Gradient (for Dashboard) ===== */
.stat-card-gradient {
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.stat-card-gradient:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}
.stat-card-gradient-deco {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  pointer-events: none;
}
.stat-card-gradient-deco::before {
  content: '';
  position: absolute;
  top: -1.5rem;
  left: -1.5rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}
.stat-card-gradient-deco::after {
  content: '';
  position: absolute;
  bottom: -2.5rem;
  right: -2.5rem;
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.stat-card-gradient-content { position: relative; z-index: 1; }
.stat-card-gradient-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.stat-card-gradient-emoji { font-size: 1.5rem; }
.stat-card-gradient-value { font-size: 1.75rem; font-weight: 800; }
.stat-card-gradient-label { font-size: 0.875rem; font-weight: 500; color: rgba(255, 255, 255, 0.9); }
.stat-card-gradient-sub { font-size: 0.75rem; color: rgba(255, 255, 255, 0.7); margin-top: 0.25rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.625rem 1.125rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn:active { transform: scale(0.97); }

/* Primary */
.btn-primary {
  background: linear-gradient(135deg, #7C3AED 0%, #9D174D 50%, #BE185D 100%);
  color: white;
  box-shadow: var(--shadow-glow-primary);
  background-size: 200% 200%;
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
  background-position: 100% 50%;
}
.btn-primary:active { transform: translateY(0) scale(0.97); }

/* Outline */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--foreground);
}
.btn-outline:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Ghost */
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--muted); }

/* Destructive */
.btn-destructive {
  background: linear-gradient(135deg, #DC2626, #EF4444);
  color: white;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}
.btn-destructive:hover {
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
  transform: translateY(-1px);
}

/* Secondary */
.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #fde8d8; }

/* Accent */
.btn-accent {
  background: linear-gradient(135deg, #D97706, #F59E0B);
  color: white;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.25);
}
.btn-accent:hover {
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
  transform: translateY(-1px);
}

/* Emerald */
.btn-emerald {
  background: linear-gradient(135deg, #059669, #10B981);
  color: white;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
}
.btn-emerald:hover {
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
  transform: translateY(-1px);
}

/* WhatsApp */
.btn-whatsapp {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: white;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
}
.btn-whatsapp:hover {
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
  transform: translateY(-1px);
}

/* Sizes */
.btn-sm { font-size: 0.75rem; padding: 0.375rem 0.75rem; border-radius: var(--radius-sm); gap: 0.375rem; }
.btn-lg { font-size: 1rem; padding: 0.75rem 1.5rem; border-radius: var(--radius-lg); }
.btn-icon { width: 2.25rem; height: 2.25rem; padding: 0; border-radius: var(--radius-sm); }
.btn-icon.btn-sm { width: 1.75rem; height: 1.75rem; }
.btn-icon.btn-lg { width: 2.75rem; height: 2.75rem; }
.btn-block { width: 100%; }
.btn-full { width: 100%; }

/* ===== Input ===== */
.input {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: white;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  transition: all var(--transition-normal);
  outline: none;
  direction: rtl;
}
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.input::placeholder { color: var(--muted-foreground); opacity: 0.6; }
.input:disabled { opacity: 0.5; cursor: not-allowed; background: var(--muted); }
.input-error { border-color: var(--destructive); }
.input-error:focus { box-shadow: 0 0 0 3px var(--destructive-light); }

/* ===== Textarea ===== */
.textarea {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: white;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  transition: all var(--transition-normal);
  outline: none;
  direction: rtl;
  min-height: 5rem;
  resize: vertical;
}
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.textarea::placeholder { color: var(--muted-foreground); opacity: 0.6; }

/* ===== Select ===== */
.select,
.select-native {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: white;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  transition: all var(--transition-normal);
  outline: none;
  cursor: pointer;
  direction: rtl;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236b4a4a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.875rem center;
  padding-left: 2rem;
}
.select:focus,
.select-native:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Custom Select Dropdown */
.select-container { position: relative; width: 100%; }
.select-trigger {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: white;
  padding: 0.625rem 2rem 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  transition: all var(--transition-normal);
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl;
  appearance: none;
  -webkit-appearance: none;
}
.select-trigger:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.select-trigger::after {
  content: '';
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted-foreground);
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.select-content {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 50;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  max-height: 15rem;
  overflow-y: auto;
  padding: 0.25rem;
  animation: scaleIn 0.15s ease-out;
}
.select-item {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--foreground);
  direction: rtl;
}
.select-item:hover,
.select-item.highlighted {
  background: var(--primary-light);
  color: var(--primary);
}
.select-item.selected {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* ===== Modal / Dialog ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease-out;
}
.modal-content {
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  width: 100%;
  max-width: 28rem;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  direction: rtl;
}
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header.with-gradient {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
  border-bottom: 1px solid var(--border-light);
}
.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--foreground);
}
.modal-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}
.modal-close {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  transition: all var(--transition-fast);
  font-size: 1.25rem;
}
.modal-close:hover { background: var(--muted); color: var(--foreground); }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: var(--radius-full);
  padding: 0.25rem 0.625rem;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: all var(--transition-fast);
  border: none;
  letter-spacing: 0.02em;
}
.badge-paid { background: #D1FAE5; color: #059669; }
.badge-unpaid { background: #FEE2E2; color: #DC2626; }
.badge-partial { background: #FEF3C7; color: #D97706; }
.badge-late { background: #FEF3C7; color: #D97706; }
.badge-active { background: #D1FAE5; color: #059669; }
.badge-inactive { background: #F3F4F6; color: #6B7280; }
.badge-present { background: #D1FAE5; color: #059669; }
.badge-absent { background: #FEE2E2; color: #DC2626; }
.badge-unregistered { background: #F3F4F6; color: #6B7280; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-accent { background: var(--accent-light); color: var(--accent); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--foreground); }
.badge-classroom { background: linear-gradient(135deg, #FCE7F3, #F3E8FF); color: #7C3AED; }
.badge-male { background: #DBEAFE; color: #3B82F6; }
.badge-female { background: #FCE7F3; color: #EC4899; }
.badge-overdue { background: #FEE2E2; color: #DC2626; }

/* Category & Type Badges */
.category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}
.category-badge.supplies { background: rgba(124, 58, 237, 0.1); color: #7C3AED; }
.category-badge.food { background: rgba(16, 185, 129, 0.1); color: #059669; }
.category-badge.maintenance { background: rgba(217, 119, 6, 0.1); color: #D97706; }
.category-badge.salaries { background: rgba(190, 24, 93, 0.1); color: #BE185D; }
.category-badge.rent { background: rgba(220, 38, 38, 0.1); color: #DC2626; }
.category-badge.services { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }
.category-badge.other { background: rgba(107, 114, 128, 0.1); color: #6B7280; }

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}
.type-badge.general { background: rgba(107, 114, 128, 0.1); color: #6B7280; }
.type-badge.urgent { background: rgba(220, 38, 38, 0.1); color: #DC2626; }
.type-badge.event { background: rgba(190, 24, 93, 0.1); color: #BE185D; }
.type-badge.reminder { background: rgba(217, 119, 6, 0.1); color: #D97706; }
.type-badge.holiday { background: rgba(16, 185, 129, 0.1); color: #059669; }
.type-badge.meeting { background: rgba(124, 58, 237, 0.1); color: #7C3AED; }
.type-badge.celebration { background: rgba(244, 63, 94, 0.1); color: #F43F5E; }

/* ===== Progress Bar ===== */
.progress-bar {
  width: 100%;
  height: 0.5rem;
  background: var(--muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #7C3AED, #BE185D);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}
.progress-fill.emerald { background: linear-gradient(135deg, #059669, #10B981); }
.progress-fill.amber { background: linear-gradient(135deg, #D97706, #F59E0B); }
.progress-fill.red { background: linear-gradient(135deg, #DC2626, #EF4444); }

/* ===== Table ===== */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}
.data-table thead {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
}
.data-table thead th {
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: var(--foreground);
  text-align: right;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  font-size: 0.8rem;
}
.data-table thead th:first-child { border-top-right-radius: var(--radius-md); }
.data-table thead th:last-child { border-top-left-radius: var(--radius-md); }
.data-table tbody tr {
  transition: background var(--transition-fast);
}
.data-table tbody tr:hover { background: var(--primary-light); }
.data-table tbody tr:nth-child(even) { background: rgba(255, 241, 230, 0.2); }
.data-table tbody tr:nth-child(even):hover { background: var(--primary-light); }
.data-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--foreground);
  text-align: right;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .row-present { background: var(--success-light) !important; }
.data-table .row-absent { background: var(--destructive-light) !important; }

/* ===== Form ===== */
.form-group { margin-bottom: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-error { font-size: 0.75rem; color: var(--destructive); margin-top: 0.25rem; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.form-divider { border: none; border-top: 1px solid var(--border-light); margin: 0.75rem 0; }
.form-section-title {
  font-weight: 700;
  font-size: 0.875rem;
  text-align: right;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.label,
.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.375rem;
  display: block;
}
.label-required::after { content: ' *'; color: var(--destructive); }

.input-icon-wrapper { position: relative; }
.input-icon-wrapper .input { padding-right: 2.5rem; }
.input-icon-wrapper .input-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.125rem;
  height: 1.125rem;
  color: var(--accent);
  pointer-events: none;
}

/* ===== Checkbox ===== */
.checkbox {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 0.25rem;
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
}
.checkbox:checked {
  background: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M10 3L4.5 8.5L2 6' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.checkbox:focus { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ===== Radio ===== */
.radio {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
}
.radio:checked { border-color: var(--primary); background: white; box-shadow: inset 0 0 0 4px var(--primary); }
.radio:focus { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ===== Switch ===== */
.switch {
  width: 2.75rem;
  height: 1.5rem;
  border-radius: var(--radius-full);
  background: var(--border);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  padding: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-full);
  background: white;
  transition: all var(--transition-normal);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.switch:checked { background: var(--primary); }
.switch:checked::after { right: calc(100% - 2px); transform: translateX(100%); }

/* ===== Tabs ===== */
.tabs { width: 100%; }
.tabs-list {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--muted);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  margin-bottom: 1rem;
}
.tabs-trigger {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-family: inherit;
}
.tabs-trigger:hover { color: var(--foreground); }
.tabs-trigger.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}
.tabs-content { animation: fadeIn 0.3s ease-out; }

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease-out;
  min-width: 16rem;
  text-align: center;
  pointer-events: auto;
}
.toast.success { background: linear-gradient(135deg, #059669, #10B981); }
.toast.error { background: linear-gradient(135deg, #DC2626, #EF4444); }
.toast.info { background: linear-gradient(135deg, #7C3AED, #8B5CF6); }
.toast.warning { background: linear-gradient(135deg, #D97706, #F59E0B); }

/* ===== Avatar ===== */
.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-sm { width: 2rem; height: 2rem; font-size: 0.75rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.25rem; }
.avatar-rose { background: linear-gradient(135deg, #BE185D, #E11D48); color: white; }
.avatar-emerald { background: linear-gradient(135deg, #059669, #10B981); color: white; }
.avatar-amber { background: linear-gradient(135deg, #D97706, #F59E0B); color: white; }
.avatar-purple { background: linear-gradient(135deg, #7C3AED, #8B5CF6); color: white; }

/* ===== Spinner ===== */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(190, 24, 93, 0.2);
  border-top-color: var(--primary);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}
.spinner-lg { width: 2rem; height: 2rem; border-width: 3px; }
.spinner-white { border-color: rgba(255, 255, 255, 0.3); border-top-color: white; }

/* ===== Skeleton ===== */
.skeleton {
  background: linear-gradient(90deg, var(--muted) 25%, #fff5eb 50%, var(--muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text { height: 1rem; width: 100%; margin-bottom: 0.5rem; }
.skeleton-heading { height: 1.5rem; width: 60%; margin-bottom: 0.75rem; }
.skeleton-avatar { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-full); }
.skeleton-card { height: 8rem; border-radius: var(--radius-lg); }

/* ===== Mood Emoji ===== */
.mood-emoji {
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform var(--transition-fast);
  opacity: 0.5;
}
.mood-emoji:hover { transform: scale(1.2); }
.mood-emoji.active { opacity: 1; transform: scale(1.1); }

/* ===== Alert ===== */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 0.875rem;
}
.alert-info { background: var(--primary-light); border-color: rgba(190, 24, 93, 0.15); color: var(--primary); }
.alert-success { background: var(--success-light); border-color: rgba(5, 150, 105, 0.15); color: #059669; }
.alert-warning { background: var(--warning-light); border-color: rgba(217, 119, 6, 0.15); color: #D97706; }
.alert-error { background: var(--destructive-light); border-color: rgba(220, 38, 38, 0.15); color: var(--destructive); }

/* ========================================================================
   LAYOUT - LOGIN PAGE
   ======================================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #581C87 0%, #7C3AED 30%, #BE185D 70%, #E11D48 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  padding: 1rem;
  direction: rtl;
  position: relative;
  overflow: hidden;
}

/* Decorative floating circles on login */
.login-page::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -10%;
  width: 50%;
  height: 50%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.login-lang-toggle {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 10;
}

.login-container {
  width: 100%;
  max-width: 26rem;
  position: relative;
  z-index: 1;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

/* Decorative top accent line */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7C3AED, #BE185D, #F59E0B);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo-circle {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow-primary);
  position: relative;
}
.login-logo-emoji { font-size: 2.5rem; }
.login-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #6B21A8;
  letter-spacing: -0.02em;
}
.login-subtitle {
  font-size: 0.875rem;
  color: #9333EA;
  margin-top: 0.375rem;
  font-weight: 500;
}

.login-form { display: flex; flex-direction: column; gap: 1rem; }
.login-form .form-group { margin-bottom: 0; }
.login-error {
  font-size: 0.8125rem;
  color: #DC2626;
  text-align: center;
  padding: 0.5rem 0.75rem;
  background: var(--destructive-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(239, 68, 68, 0.15);
  animation: fadeIn 0.3s ease-out;
}
.login-hint {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: #9333EA;
  padding: 0.75rem;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  border: 1px dashed rgba(124, 58, 237, 0.2);
}

/* ========================================================================
   LAYOUT - SIDEBAR (Desktop)
   ======================================================================== */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 280px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #6D28D9 0%, #8B1A4A 50%, #BE185D 100%);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
  transition: transform var(--transition-slow);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-desktop { display: none; }
.sidebar-mobile { z-index: 50; width: 280px; }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  animation: fadeIn 0.2s ease-out;
}

.sidebar-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--sidebar-border);
  position: relative;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
}
.sidebar-logo-emoji { font-size: 1.5rem; }
.sidebar-logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}
.sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin: 0;
}
.sidebar-subtitle {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}
.sidebar-logo-text h1 {
  font-size: 1.125rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}
.sidebar-logo-text p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}
.sidebar-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: right;
  direction: rtl;
  position: relative;
  overflow: hidden;
}
.sidebar-nav-item::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: white;
  border-radius: 0 3px 3px 0;
  transform: scaleY(0);
  transition: transform var(--transition-normal);
}
.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.sidebar-nav-item.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.sidebar-nav-item.active::before { transform: scaleY(1); }

.sidebar-nav-emoji { font-size: 1.125rem; }
.sidebar-nav-label { flex: 1; text-align: right; }
.nav-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-badge {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-full);
  min-width: 1.25rem;
  text-align: center;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}
.sidebar-user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.sidebar-user-info { text-align: right; }
.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: white;
  margin: 0;
}
.sidebar-user-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.sidebar-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-normal);
}
.sidebar-logout-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-lang-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-top: 0.5rem;
}
.sidebar-lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.mobile-sidebar-close {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-normal);
}
.mobile-sidebar-close:hover { background: rgba(255, 255, 255, 0.2); }

/* Language Toggle Section */
.sidebar-lang-section {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.5rem;
}
.sidebar-lang-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sidebar-lang-options { display: flex; gap: 0.5rem; }
.sidebar-lang-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: inherit;
}
.sidebar-lang-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}
.sidebar-lang-option.active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* ========================================================================
   LAYOUT - MAIN CONTENT
   ======================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  direction: rtl;
}

.main-content {
  flex: 1;
  padding: 1.5rem;
  padding-bottom: 5rem;
  max-width: 60rem;
  margin: 0 auto;
  width: 100%;
}

.section-content { animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1); }

/* Section Header */
.section-header {
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}
.section-header::before {
  content: '';
  position: absolute;
  top: -2rem;
  left: -2rem;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.section-header::after {
  content: '';
  position: absolute;
  bottom: -3rem;
  right: -3rem;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.section-header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}
.section-header-emoji { font-size: 1.75rem; }
.section-header-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: white;
}
.section-header-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0.25rem 0 0;
}

/* Page Header */
.page-header {
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.5s ease-out;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}
.page-subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* ========================================================================
   DASHBOARD
   ======================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  text-align: right;
  direction: rtl;
  width: 100%;
}
.quick-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.quick-action-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Classrooms Grid */
.classrooms-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.75rem;
}
.classroom-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #FFF1F2, #FDF2F8);
  padding: 1rem;
  border: 1px solid #FCE7F3;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.classroom-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.classroom-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.classroom-card-name { font-weight: 700; color: #7C3AED; font-size: 0.9375rem; }
.classroom-card-count { font-size: 0.875rem; color: var(--muted-foreground); }
.classroom-progress {
  width: 100%;
  height: 0.5rem;
  background: #F3E8FF;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}
.classroom-progress-bar {
  height: 100%;
  background: linear-gradient(135deg, #7C3AED, #BE185D);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}
.classroom-teacher { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.5rem; text-align: right; }

/* Dashboard Two Column */
.dashboard-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.dashboard-list {
  max-height: 15rem;
  overflow-y: auto;
}
.dashboard-list-item {
  border-radius: var(--radius-md);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border: 1px solid;
}
.dashboard-list-item.pink { background: #FFF1F2; border-color: #FCE7F3; }
.dashboard-list-item.amber { background: #FFFBEB; border-color: #FDE68A; }
.dashboard-list-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}
.dashboard-list-item-title { font-weight: 700; font-size: 0.875rem; color: var(--foreground); }
.dashboard-list-item-content {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-align: right;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.dashboard-list-item-date { font-size: 0.75rem; color: var(--muted-foreground); }

/* ========================================================================
   STUDENTS
   ======================================================================== */
.students-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.students-filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 12rem;
}
.search-box .search-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  width: 1.125rem;
  height: 1.125rem;
  pointer-events: none;
}
.search-box .input { padding-right: 2.25rem; }

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 12rem;
}
.search-wrapper .search-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: var(--muted-foreground);
  pointer-events: none;
}
.search-wrapper .input { padding-right: 2.25rem; }

/* Student Card */
.student-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: all var(--transition-normal);
}
.student-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.student-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.student-card-info { flex: 1; min-width: 0; }
.student-card-name { font-weight: 600; font-size: 0.9375rem; color: var(--foreground); }
.student-card-class { font-size: 0.8125rem; color: var(--muted-foreground); }
.student-card-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}
.students-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ========================================================================
   TABLE (Desktop)
   ======================================================================== */
.table-responsive { overflow-x: auto; }
.table { width: 100%; text-align: right; border-collapse: collapse; }
.table-header-row {
  background: linear-gradient(135deg, #F3E8FF, #FCE7F3);
  border-bottom: 1px solid #FCE7F3;
}
.table-header-cell {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #7C3AED;
}
.table-body-row {
  border-bottom: 1px solid #FFF1F2;
  transition: background var(--transition-fast);
}
.table-body-row:hover { background: rgba(254, 242, 248, 0.5); }
.table-body-row.present { background: var(--success-light); }
.table-body-row.absent { background: var(--destructive-light); }
.table-body-cell { padding: 0.75rem 1rem; font-size: 0.875rem; }
.table-actions { display: flex; align-items: center; gap: 0.375rem; justify-content: center; }
.table-action-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  font-size: 0.875rem;
}
.table-action-btn:active { transform: scale(0.95); }
.table-action-btn.attendance { background: #D1D5DB; color: #6B7280; }
.table-action-btn.attendance:hover { background: #F9A8D4; color: white; }
.table-action-btn.attendance.present { background: #10B981; color: white; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); }
.table-action-btn.attendance.absent { background: #EF4444; color: white; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); }
.table-action-btn.whatsapp { background: #22C55E; color: white; box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3); }
.table-action-btn.whatsapp:hover { background: #16A34A; }
.table-action-btn.whatsapp.no-phone { background: #E5E7EB; color: #9CA3AF; box-shadow: none; }
.table-action-btn.edit { background: #F3E8FF; color: #7C3AED; }
.table-action-btn.edit:hover { background: #E9D5FF; }
.table-action-btn.delete { background: #FEE2E2; color: #EF4444; }
.table-action-btn.delete:hover { background: #FECACA; }

/* ========================================================================
   ATTENDANCE
   ======================================================================== */
.attendance-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.attendance-stat-card {
  border-radius: var(--radius-md);
  padding: 0.75rem;
  color: white;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.attendance-stat-value { font-size: 1.5rem; font-weight: 700; display: block; }
.attendance-stat-label { font-size: 0.75rem; margin-top: 0.25rem; }

.attendance-list { max-height: calc(100vh - 22rem); overflow-y: auto; }
.attendance-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid #E5E7EB;
  background: white;
  margin-bottom: 0.5rem;
  transition: all var(--transition-normal);
}
.attendance-item.present { background: #ECFDF5; border-color: #A7F3D0; }
.attendance-item.absent { background: #FEF2F2; border-color: #FECACA; }
.attendance-item-info { text-align: right; min-width: 0; }
.attendance-item-name { font-weight: 700; color: var(--foreground); font-size: 0.9375rem; }
.attendance-item-class { font-size: 0.75rem; color: var(--muted-foreground); }
.attendance-item-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.attendance-toggle-btn {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-xs);
}
.attendance-toggle-btn:active { transform: scale(0.95); }
.attendance-toggle-btn.present { background: linear-gradient(135deg, #10B981, #059669); color: white; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); }
.attendance-toggle-btn.absent { background: linear-gradient(135deg, #EF4444, #DC2626); color: white; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); }
.attendance-toggle-btn.not-recorded { background: linear-gradient(135deg, #9CA3AF, #6B7280); color: white; }
.attendance-toggle-btn.not-recorded:hover { background: linear-gradient(135deg, #F9A8D4, #EC4899); }

.attendance-whatsapp-btn {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: white;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
  text-decoration: none;
}
.attendance-whatsapp-btn:hover { transform: scale(1.05); }
.attendance-whatsapp-btn.no-phone { background: #E5E7EB; color: #9CA3AF; box-shadow: none; }

.attendance-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.attendance-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  font-family: inherit;
  background: var(--muted);
  color: var(--muted-foreground);
}
.attendance-btn.present { background: rgba(16, 185, 129, 0.1); color: #059669; border-color: rgba(16, 185, 129, 0.2); }
.attendance-btn.present.active { background: linear-gradient(135deg, #10B981, #059669); color: white; border-color: transparent; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); }
.attendance-btn.absent { background: rgba(239, 68, 68, 0.1); color: #DC2626; border-color: rgba(239, 68, 68, 0.2); }
.attendance-btn.absent.active { background: linear-gradient(135deg, #EF4444, #DC2626); color: white; border-color: transparent; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); }

/* ========================================================================
   PAYMENTS
   ======================================================================== */
.payments-banner {
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #F97316, #F59E0B);
  box-shadow: var(--shadow-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  color: white;
  position: relative;
  overflow: hidden;
}
.payments-banner::after {
  content: '';
  position: absolute;
  bottom: -2rem;
  right: -2rem;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.payments-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}
.payments-banner-info { display: flex; align-items: center; gap: 0.5rem; }
.payments-banner-emoji { font-size: 1.5rem; }
.payments-banner-title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.payments-banner-sub { font-size: 0.875rem; color: rgba(255, 255, 255, 0.8); margin: 0; }
.payments-banner-amount { text-align: left; }
.payments-banner-amount-label { font-size: 0.75rem; color: rgba(255, 255, 255, 0.8); margin: 0; }
.payments-banner-amount-value { font-size: 1.5rem; font-weight: 700; margin: 0; }

.payment-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.payment-stat-card {
  border-radius: var(--radius-lg);
  padding: 1rem;
  color: white;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.payment-stat-value { font-size: 1.75rem; font-weight: 700; display: block; }
.payment-stat-label { font-size: 0.875rem; margin-top: 0.25rem; }

.payments-list { max-height: calc(100vh - 26rem); overflow-y: auto; }
.payment-item {
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-normal);
}
.payment-item:hover { box-shadow: var(--shadow-md); }
.payment-item.paid { background: linear-gradient(135deg, #ECFDF5, #D1FAE5); border-color: #A7F3D0; }
.payment-item.unpaid { background: linear-gradient(135deg, #FEF2F2, #FEE2E2); border-color: #FECACA; }
.payment-item.partial { background: linear-gradient(135deg, #FFFBEB, #FEF3C7); border-color: #FDE68A; }
.payment-item-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
.payment-item-info { text-align: right; min-width: 0; flex: 1; }
.payment-item-name { font-weight: 700; font-size: 1rem; color: var(--foreground); }
.payment-item-badges { display: flex; align-items: center; gap: 0.375rem; justify-content: flex-end; margin-top: 0.25rem; flex-wrap: wrap; }
.payment-item-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

/* Payment Card */
.payment-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: all var(--transition-normal);
}
.payment-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.payment-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.payment-card-student { font-weight: 600; font-size: 0.9375rem; }
.payment-card-amount { font-weight: 700; font-size: 1.125rem; color: var(--primary); }
.payment-card-details { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.8125rem; color: var(--muted-foreground); }

/* Payment Modal */
.payment-amount-info {
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #FFFBEB, #FFF7ED);
  padding: 0.75rem;
  border: 1px solid #FDE68A;
  margin-bottom: 1rem;
  color: #B45309;
  font-weight: 700;
}
.payment-amount-month { font-size: 0.75rem; color: #D97706; margin-right: 0.5rem; }

/* ========================================================================
   TEACHERS
   ======================================================================== */
.teachers-list { max-height: calc(100vh - 17rem); overflow-y: auto; }
.teacher-card {
  border-radius: var(--radius-xl);
  background: white;
  border: 1px solid var(--border-light);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.teacher-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.teacher-card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.teacher-card-info { text-align: right; min-width: 0; }
.teacher-card-name { font-weight: 700; font-size: 1.125rem; color: var(--foreground); }
.teacher-card-details { display: flex; align-items: center; gap: 0.5rem; justify-content: flex-end; margin-top: 0.25rem; }
.teacher-card-phone { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.25rem; }
.teacher-card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  background: #F3E8FF;
  border-radius: var(--radius-md);
  padding: 0.75rem;
}
.teacher-card-footer-text { font-size: 0.875rem; color: var(--muted-foreground); }
.teacher-card-footer-level { font-size: 0.875rem; color: #7C3AED; font-weight: 700; margin-right: auto; }

/* ========================================================================
   DAILY REPORTS
   ======================================================================== */
.daily-reports-list { max-height: calc(100vh - 17rem); overflow-y: auto; }
.daily-report-card {
  border-radius: var(--radius-xl);
  background: white;
  border: 1px solid var(--border-light);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.daily-report-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.daily-report-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.daily-report-mood { font-size: 1.5rem; }
.daily-report-info { text-align: right; }
.daily-report-name { font-weight: 700; color: var(--foreground); }
.daily-report-meta { font-size: 0.75rem; color: var(--muted-foreground); }
.daily-report-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; font-size: 0.875rem; }
.daily-report-detail { border-radius: var(--radius-sm); padding: 0.5rem; text-align: right; }
.daily-report-detail.food { background: #FFF7ED; }
.daily-report-detail.activities { background: #EFF6FF; }
.daily-report-detail.nap { background: #F3E8FF; }
.daily-report-detail.behavior { background: #FDF2F8; }
.daily-report-detail-label { font-size: 0.75rem; font-weight: 700; }
.daily-report-detail-label.food { color: #C2410C; }
.daily-report-detail-label.activities { color: #2563EB; }
.daily-report-detail-label.nap { color: #7C3AED; }
.daily-report-detail-label.behavior { color: #BE185D; }
.daily-report-detail-text { font-size: 0.75rem; color: var(--muted-foreground); }
.daily-report-notes {
  margin-top: 0.5rem;
  border-radius: var(--radius-sm);
  background: #FFFBEB;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: #B45309;
  text-align: right;
}

/* ========================================================================
   ANNOUNCEMENTS
   ======================================================================== */
.announcements-list { max-height: calc(100vh - 17rem); overflow-y: auto; }
.announcement-card {
  border-radius: var(--radius-xl);
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid;
  box-shadow: var(--shadow-xs);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.announcement-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.announcement-card.urgent { background: #FEF2F2; border-color: #FECACA; }
.announcement-card.event { background: #FFFBEB; border-color: #FDE68A; }
.announcement-card.general { background: white; border-color: #DBEAFE; }
.announcement-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.announcement-card-title { font-weight: 700; font-size: 0.9375rem; color: var(--foreground); text-align: right; }
.announcement-card-actions { display: flex; align-items: center; gap: 0.375rem; flex-shrink: 0; }
.announcement-card-content { font-size: 0.875rem; color: var(--muted-foreground); text-align: right; }
.announcement-card-date { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.5rem; text-align: right; }

/* ========================================================================
   EVENTS
   ======================================================================== */
.events-list { max-height: calc(100vh - 17rem); overflow-y: auto; }
.event-card {
  border-radius: var(--radius-xl);
  background: white;
  border: 1px solid #FFEDD5;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.event-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.event-card-title { font-weight: 700; font-size: 0.9375rem; color: var(--foreground); text-align: right; }
.event-card-actions { display: flex; align-items: center; gap: 0.375rem; flex-shrink: 0; }
.event-card-description { font-size: 0.875rem; color: var(--muted-foreground); text-align: right; }
.event-card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; font-size: 0.75rem; color: var(--muted-foreground); }

/* ========================================================================
   EXPENSES
   ======================================================================== */
.expenses-list { max-height: calc(100vh - 17rem); overflow-y: auto; }
.expense-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-radius: var(--radius-md);
  background: white;
  border: 1px solid var(--border-light);
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}
.expense-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.expense-item-info { text-align: right; min-width: 0; }
.expense-item-name { font-weight: 700; font-size: 0.875rem; color: var(--foreground); }
.expense-item-meta { display: flex; align-items: center; gap: 0.25rem; justify-content: flex-end; font-size: 0.75rem; color: var(--muted-foreground); }
.expense-item-actions { display: flex; align-items: center; gap: 0.375rem; flex-shrink: 0; }
.expenses-total-badge {
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #F3E8FF, #FCE7F3);
  padding: 0.5rem 1rem;
  border: 1px solid #E9D5FF;
}
.expenses-total-badge span { font-weight: 700; color: #7C3AED; }

/* ========================================================================
   REPORTS
   ======================================================================== */
.report-stat-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-xs);
}
.report-stat-value { font-size: 2rem; font-weight: 800; line-height: 1; margin-bottom: 0.375rem; }
.report-stat-value.rose { color: var(--primary); }
.report-stat-value.emerald { color: #059669; }
.report-stat-value.amber { color: #D97706; }
.report-stat-label { font-size: 0.8125rem; color: var(--muted-foreground); }

.report-occupancy-list { display: flex; flex-direction: column; gap: 0.75rem; }
.report-occupancy-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.report-occupancy-bar-wrapper {
  flex: 1;
  background: linear-gradient(135deg, #F3E8FF, #FCE7F3);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}
.report-occupancy-bar {
  background: linear-gradient(135deg, #7C3AED, #BE185D);
  border-radius: var(--radius-sm);
  height: 0.75rem;
  transition: width 0.5s ease;
}
.report-occupancy-info { text-align: right; min-width: 0; }
.report-occupancy-name { font-weight: 700; color: #7C3AED; }
.report-occupancy-count { font-size: 0.75rem; color: var(--muted-foreground); margin-right: 0.5rem; }

.report-expenses-category-list { display: flex; flex-direction: column; gap: 0.5rem; }
.report-expenses-category-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.report-expenses-category-bar-wrapper {
  flex: 1;
  background: linear-gradient(135deg, #F3E8FF, #FCE7F3);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}
.report-expenses-category-bar {
  background: linear-gradient(135deg, #7C3AED, #BE185D);
  border-radius: var(--radius-sm);
  height: 0.75rem;
  transition: width 0.5s ease;
}
.report-expenses-category-info { text-align: right; }
.report-expenses-category-name { font-weight: 700; color: var(--foreground); }
.report-expenses-category-amount { font-size: 0.875rem; color: #7C3AED; margin-right: 0.5rem; }

/* ========================================================================
   REMINDERS MODAL
   ======================================================================== */
.reminders-warning {
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
  padding: 0.75rem;
  border: 1px solid #FECACA;
  margin-bottom: 0.75rem;
}
.reminders-warning-title { font-size: 0.875rem; font-weight: 700; color: #DC2626; text-align: right; }
.reminders-warning-sub { font-size: 0.75rem; color: #EF4444; text-align: right; margin-top: 0.25rem; }
.reminders-list { max-height: 20rem; overflow-y: auto; }
.reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #FEF2F2, #FEE2E2);
  border: 1px solid #FECACA;
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-xs);
}
.reminder-item-info { text-align: right; }
.reminder-item-name { font-weight: 700; font-size: 1rem; color: var(--foreground); }
.reminder-item-badges { display: flex; align-items: center; gap: 0.375rem; justify-content: flex-end; margin-top: 0.25rem; }
.reminder-item-actions { flex-shrink: 0; }
.reminder-all-paid { text-align: center; padding: 1.5rem; }
.reminder-all-paid-emoji { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.reminder-all-paid-text { font-weight: 700; color: var(--foreground); }
.reminder-all-paid-sub { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.25rem; }

/* ========================================================================
   EMPTY STATE
   ======================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}
.empty-state-icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--foreground); margin-bottom: 0.375rem; }
.empty-state-description { font-size: 0.875rem; color: var(--muted-foreground); max-width: 20rem; }
.empty-state-emoji { font-size: 3rem; display: block; margin-bottom: 1rem; }
.empty-state p { color: var(--muted-foreground); }
.empty-state-sub { font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.25rem; }

/* ========================================================================
   PAGINATION
   ======================================================================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
}
.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
}
.pagination-btn:hover { background: var(--primary-light); border-color: var(--primary); }
.pagination-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pagination-info { font-size: 0.875rem; font-weight: 700; color: var(--muted-foreground); padding: 0 0.5rem; }

/* ========================================================================
   MOBILE TOP BAR
   ======================================================================== */
.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(135deg, #7C3AED, #BE185D, #E11D48);
  box-shadow: var(--shadow-md);
}
.mobile-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 3.5rem;
}
.mobile-hamburger {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-normal);
}
.mobile-hamburger:hover { background: rgba(255, 255, 255, 0.2); }
.mobile-topbar-title { display: flex; align-items: center; gap: 0.25rem; justify-content: flex-end; }
.mobile-topbar-title h1 { font-size: 1.125rem; font-weight: 700; color: white; margin: 0; }

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 50;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: white;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--primary);
  transition: all var(--transition-normal);
}
.mobile-menu-btn:hover { background: var(--muted); }

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 35;
  animation: fadeIn 0.2s ease-out;
}

/* ========================================================================
   MOBILE BOTTOM NAVIGATION
   ======================================================================== */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
  border-top: 1px solid var(--border-light);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.375rem 0.5rem;
}
.mobile-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-normal);
}
.mobile-bottom-nav-item:hover { color: var(--primary); }
.mobile-bottom-nav-item.active {
  background: linear-gradient(135deg, #BE185D, #7C3AED);
  color: white;
  box-shadow: 0 2px 8px rgba(190, 24, 93, 0.3);
  transform: scale(1.05);
}
.mobile-bottom-nav-emoji { font-size: 1.125rem; }
.mobile-bottom-nav-label { font-size: 0.625rem; font-weight: 500; }

/* ========================================================================
   LOADING
   ======================================================================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid #F3E8FF;
  border-top: 3px solid #BE185D;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ========================================================================
   DELETE BUTTON
   ======================================================================== */
.delete-btn {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #F87171;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}
.delete-btn:hover { background: #FEE2E2; color: #DC2626; }

/* ========================================================================
   LANGUAGE SWITCHER
   ======================================================================== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem;
  background: var(--muted);
  border-radius: var(--radius-sm);
}
.lang-btn {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-family: inherit;
}
.lang-btn.active {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* WhatsApp Link */
.whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #25D366;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}
.whatsapp-link:hover { color: #128C7E; text-decoration: underline; }

/* Date Picker */
.date-picker {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: white;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  transition: all var(--transition-normal);
  outline: none;
  direction: rtl;
}
.date-picker:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Toolbar */
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Separator */
.separator { height: 1px; width: 100%; background: var(--border-light); margin: 0.5rem 0; }

/* ========================================================================
   RESPONSIVE DESIGN
   ======================================================================== */
@media (min-width: 1024px) {
  .sidebar-desktop { display: flex; }
  .mobile-topbar { display: none; }
  .mobile-bottom-nav { display: none; }
  .main-content {
    margin-right: 280px;
    padding-bottom: 1.5rem;
    margin-left: 0;
  }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .classrooms-grid { grid-template-columns: repeat(3, 1fr); }
  .dashboard-two-col { grid-template-columns: repeat(2, 1fr); }
  .quick-actions-grid { grid-template-columns: repeat(4, 1fr); }
  .form-grid-2 { grid-template-columns: repeat(2, 1fr); }
  #students-table-wrapper { display: block !important; }
  .students-cards-list { display: none; }
}

@media (max-width: 1023px) {
  #students-table-wrapper { display: none !important; }
  .students-cards-list { display: flex; }
  .sidebar-desktop { display: none; }
  .payments-banner-inner { flex-direction: column; align-items: flex-start; }
  .payments-banner-amount { text-align: right; }
  .payment-item-header { flex-direction: column; align-items: flex-start; }
  .payment-item-actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15); }
  .main-content { margin-right: 0; padding: 1rem; padding-top: 4rem; }
  .mobile-menu-btn { display: flex; }
  .mobile-overlay.active { display: block; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .students-header { flex-direction: column; align-items: stretch; }
  .students-filters { flex-direction: column; }
  .search-box { min-width: unset; width: 100%; }
  .data-table { font-size: 0.8125rem; }
  .data-table thead th, .data-table tbody td { padding: 0.5rem 0.625rem; }
  .modal-content { max-width: 100%; margin: 0.5rem; max-height: 95vh; }
  .page-title { font-size: 1.25rem; }
  .quick-actions-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .attendance-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .payment-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .daily-report-details { grid-template-columns: 1fr; }
  .stat-card { padding: 1rem; }
  .stat-card-value { font-size: 1.5rem; }
  .stat-card-icon { width: 2.5rem; height: 2.5rem; }
  .login-card { border-radius: var(--radius-xl); padding: 1.5rem; }
  .card-header { padding: 1rem 1rem 0.5rem; }
  .card-content { padding: 0.75rem 1rem 1rem; }
  .btn { padding: 0.5rem 0.875rem; font-size: 0.8125rem; }
}

/* ========================================================================
   PRINT STYLES
   ======================================================================== */
@media print {
  .sidebar, .mobile-menu-btn, .btn, .no-print { display: none !important; }
  .main-content { margin-right: 0 !important; padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  body { background: white !important; }
}

/* ========================================================================
   UTILITY CLASSES
   ======================================================================== */
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-extrabold { font-weight: 800; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted-foreground); }
.text-destructive { color: var(--destructive); }
.text-white { color: white; }
.text-emerald { color: #059669; }
.text-amber { color: #D97706; }
.text-rose { color: var(--primary); }
.bg-primary { background: var(--primary); }
.bg-secondary { background: var(--secondary); }
.bg-muted { background: var(--muted); }
.bg-white { background: white; }
.bg-card { background: var(--card); }
.border { border: 1px solid var(--border); }
.rounded { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.m-0 { margin: 0; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-50 { z-index: 50; }
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }
.select-none { user-select: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.transition-all { transition: all var(--transition-normal); }
.transition-colors { transition: color var(--transition-fast), background-color var(--transition-fast); }
.line-through { text-decoration: line-through; }
.whitespace-nowrap { white-space: nowrap; }
.break-words { overflow-wrap: break-word; }
.max-h-96 { max-height: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-sm { max-width: 24rem; }
.min-w-0 { min-width: 0; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }
.self-center { align-self: center; }
.list-none { list-style: none; }
.border-t { border-top: 1px solid var(--border-light); }
.border-b { border-bottom: 1px solid var(--border-light); }
.border-r { border-right: 1px solid var(--border-light); }
.border-l { border-left: 1px solid var(--border-light); }
