/* ========== Disable Most Animations and Transitions ========== */
/* NOTE: Transform is NOT disabled to allow sidebar mobile functionality */
*,
*::before,
*::after {
  animation-duration: 0s !important;
  animation-delay: 0s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0s !important;
  transition-delay: 0s !important;
  /* transform: none !important; - REMOVED to allow sidebar translateX */
}

/* Exception: Allow sidebar transitions for mobile functionality */
.sidebar,
.sidebar-overlay {
  transition-duration: 0.3s !important;
}

:root {
  /* Variables statiques (ne changent pas) */
  --navbar-height: 56px;
  --sidebar-width: 240px;
  --radius: .5rem;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  
  /* Les couleurs dynamiques sont définies dans theme-colors.css */
  /* Valeurs par défaut (seront remplacées par theme-colors.css) */
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #6366f1;
  --primary-10: rgba(79, 70, 229, 0.1);
  --primary-20: rgba(79, 70, 229, 0.2);
  --secondary-color: #64748b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --purple-color: #8b5cf6;
  --purple: #8b5cf6;
  --pink-color: #ec4899;
  --orange-color: #f97316;
  --teal-color: #14b8a6;
  --dark-color: #111827;
  --muted-color: #6b7280;
  --border-color: #e5e7eb;
  --bg-soft: #f8fafc;
  --bg-sidebar: #ffffff;
  --sidebar-hover: #f1f5f9;
  --navbar-bg: #ffffff;
  --navbar-text: #111827;
  --card-bg: #ffffff;
  --text-primary: #111827;
  --text-secondary: #64748b;
}

.animate-fade-in-up {
  /* Animation désactivée */
  /* animation: fadeInUp .4s ease both; */
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: none; }
}

.login-form-group.focused label {
  color: var(--primary-color);
}

.login-form-group .form-control.has-value {
  border-color: var(--primary-color);
}

html, body { max-width: 100%; overflow-x: hidden; }
body.school-portal { padding-top: var(--navbar-height); }

.sidebar { 
  position: fixed; 
  top: 0; 
  bottom: 0; 
  left: 0; 
  width: var(--sidebar-width); 
  border-right: 1px solid var(--border-color); 
  padding: 12px 8px; 
  overflow-y: auto; 
  overflow-x: hidden;
  z-index: 1030; 
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
.sidebar-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  margin-bottom: 12px; 
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-logo { 
  max-width: 140px; 
  height: auto; 
  display: block; 
  margin: 0 auto; 
}
.sidebar-nav { 
  padding: 0;
}
.sidebar-nav .nav { 
  list-style: none; 
  padding: 0; 
  margin: 0;
}
.sidebar-nav .nav-item { 
  margin-bottom: 2px;
}
.sidebar-nav .nav-link { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  color: var(--text-secondary); 
  padding: 8px 10px; 
  border-radius: 8px; 
  font-weight: 500;
  font-size: 0.875rem;
  /* transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); - DISABLED */
  text-decoration: none;
  position: relative;
  margin: 0 4px;
}
.sidebar-nav .nav-link i { 
  width: 18px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted-color);
  /* transition: all 0.2s ease; - DISABLED */
  flex-shrink: 0;
}
.sidebar-nav .nav-link:hover { 
  background: var(--sidebar-hover);
  color: var(--primary-color);
  /* transform: translateX(3px); - DISABLED */
}
.sidebar-nav .nav-link:hover i {
  color: var(--primary-color);
  /* transform: scale(1.1); - DISABLED */
}
.sidebar-nav .nav-link.active { 
  background: var(--primary-10);
  color: var(--primary-color);
  font-weight: 600;
  box-shadow: 0 2px 4px var(--primary-20);
}
.sidebar-nav .nav-link.active i {
  color: var(--primary-color);
}
.sidebar-nav .nav-link.active::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 70%;
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.3);
}
.sidebar-nav .nav-link .badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 2px 5px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-weight: 600;
}

/* Sidebar Overlay للشاشات الصغيرة */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

@media (max-width: 991.98px) { 
  .sidebar { 
    transform: translateX(-100%) !important;
    transition: transform 0.3s ease;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
  } 
  .sidebar.show { 
    transform: translateX(0) !important;
    opacity: 1;
    pointer-events: auto;
  } 
  body.sidebar-toggled { 
    overflow: hidden;
  }
}

@media (min-width: 992px) { 
  .school-portal .container,
  .school-portal .container-fluid,
  .school-portal #page-content-wrapper,
  .school-portal .page-content,
  .school-portal .content-fixed { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); }
  .school-portal #page-content-wrapper { min-height: calc(100vh - var(--navbar-height)); }
}

/* Navbar improvements */
.navbar {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
}

/* Card improvements - Compact Design */
.card {
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  /* transition: all 0.3s ease; - DISABLED */
  border-radius: 0.375rem;
}

.card-body {
  padding: 0.75rem 1rem !important;
}

.card-header {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  padding: 0.75rem 1rem !important;
  font-size: 0.875rem;
}

.card:hover {
  box-shadow: var(--shadow-md);
  /* transform: translateY(-1px); - DISABLED */
}

/* Button improvements */
.btn {
  font-weight: 500;
  /* transition: all 0.2s ease; - DISABLED */
}

.btn:hover {
  /* transform: translateY(-1px); - DISABLED */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
}

/* Table improvements */
.table {
  border-collapse: collapse;
  border-spacing: 0;
}

.table thead th {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: #475569;
}

.table tbody tr {
  /* transition: all 0.2s ease; - DISABLED */
}

.table tbody tr:hover {
  background: var(--sidebar-hover);
  /* transform: none; - Already disabled */
}

/* Form improvements */
.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem var(--primary-10);
  /* transform: translateY(-1px); - DISABLED */
}

/* Badge improvements */
.badge {
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

/* Animation improvements */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.sidebar-nav .nav-item {
  /* animation: slideIn 0.3s ease backwards; - DISABLED */
}

/* All animation delays disabled */
.sidebar-nav .nav-item:nth-child(1),
.sidebar-nav .nav-item:nth-child(2),
.sidebar-nav .nav-item:nth-child(3),
.sidebar-nav .nav-item:nth-child(4),
.sidebar-nav .nav-item:nth-child(5),
.sidebar-nav .nav-item:nth-child(6),
.sidebar-nav .nav-item:nth-child(7),
.sidebar-nav .nav-item:nth-child(8),
.sidebar-nav .nav-item:nth-child(9),
.sidebar-nav .nav-item:nth-child(10) {
  /* animation-delay disabled */
}

/* Submenu Styles */
.sidebar-nav .nav-item.has-submenu .nav-link {
  position: relative;
}

.sidebar-nav .nav-item.has-submenu .submenu-icon {
  /* transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1); - DISABLED */
  font-size: 0.7rem;
  margin-left: auto;
  color: #94a3b8;
}

.sidebar-nav .nav-item.has-submenu .nav-link[aria-expanded="true"] .submenu-icon {
  /* transform: rotate(180deg); - DISABLED */
  color: var(--primary-color);
}

.sidebar-nav .submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 2px;
  margin-left: 14px;
  border-left: 2px solid rgba(226, 232, 240, 0.5);
  padding-left: 8px;
  max-height: 0;
  overflow: hidden;
  /* transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin 0.3s ease, padding 0.3s ease; - DISABLED */
}

.sidebar-nav .submenu.collapse.show {
  max-height: 500px;
  margin-top: 3px;
  padding-top: 3px;
  padding-bottom: 3px;
}

.sidebar-nav .submenu li {
  margin-bottom: 1px;
}

.sidebar-nav .submenu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  /* transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); - DISABLED */
  position: relative;
  margin-left: 4px;
}

.sidebar-nav .submenu-link i {
  width: 14px;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
  /* transition: all 0.2s ease; - DISABLED */
}

.sidebar-nav .submenu-link:hover {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(79, 70, 229, 0.12) 100%);
  color: var(--primary-color);
  /* transform: translateX(3px); - DISABLED */
  padding-left: 12px;
}

.sidebar-nav .submenu-link:hover i {
  color: var(--primary-color);
  /* transform: scale(1.1); - DISABLED */
}

.sidebar-nav .submenu-link.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.15) 0%, rgba(79, 70, 229, 0.22) 100%);
  color: var(--primary-color);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.15);
}

.sidebar-nav .submenu-link.active i {
  color: var(--primary-color);
}

.sidebar-nav .submenu-link.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 60%;
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border-radius: 0 2px 2px 0;
}

/* Badge colors */
.badge.bg-pink {
  background-color: #ec4899 !important;
  color: white;
}

.text-purple {
  color: var(--purple-color) !important;
}

.bg-purple {
  background-color: var(--purple-color) !important;
}

/* Sidebar Group Separators */
.sidebar-nav .nav-item:not(:first-child):not(.has-submenu)::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(226, 232, 240, 0.5) 50%, transparent 100%);
  pointer-events: none;
}

.navbar { position: fixed; top: 0; left: 0; right: 0; height: var(--navbar-height); z-index: 1040; }
@media (min-width: 992px) {
  .navbar { left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
}
body.school-portal { padding-top: 56px; }

/* إزالة المسافات من navbar container-fluid */
.navbar .container-fluid {
    padding-left: 0 !important;
    padding-right: 0.5rem !important;
}

/* جعل العنوان يبدأ من اليسار تماماً */
.navbar .navbar-brand {
    padding-left: 0.75rem !important;
    margin-left: 0 !important;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary) !important;
    line-height: var(--navbar-height);
}

/* على الشاشات الكبيرة، إضافة مسافة صغيرة من السايدبار */
@media (min-width: 992px) {
    .navbar .navbar-brand {
        padding-left: 0.75rem !important;
    }
}

/* على الشاشات الصغيرة، إضافة مسافة من زر القائمة */
@media (max-width: 991.98px) {
    .navbar .navbar-brand {
        padding-left: 0.5rem !important;
    }
}

/* إزالة المسافات الزائدة في صفحات الإعدادات */
#page-content-wrapper {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

@media (min-width: 992px) {
    .school-portal #page-content-wrapper {
        margin-left: var(--sidebar-width) !important;
        width: calc(100% - var(--sidebar-width)) !important;
    }
}

#page-content-wrapper .container-fluid {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
}

/* Compact Design - Global Styles */
.container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.row {
    margin-left: -0.25rem !important;
    margin-right: -0.25rem !important;
}

.row > * {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Compact Form Controls */
.form-control, .form-select {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
}

.form-label {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

/* Compact Icons */
.fa-2x { font-size: 1.25rem !important; }
.fa-3x { font-size: 1.5rem !important; }

/* تقليل المسافات في rows داخل صفحات الإعدادات */
#page-content-wrapper .container-fluid > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#page-content-wrapper .container-fluid > .row > [class*="col-"] {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

/* إزالة المسافات الإضافية من rows الداخلية */
#page-content-wrapper .container-fluid .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#page-content-wrapper .container-fluid .row [class*="col-"] {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

body { color: var(--text-primary); font-size: 0.875rem; }
h1 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
h2 { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
h3 { font-size: 1.125rem; font-weight: 600; color: var(--text-primary); }
h4 { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
h5 { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
h6 { font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); }
.page-title { font-weight: 700; font-size: 1.25rem; }

.card { border-radius: var(--radius); border: 1px solid var(--border-color); background-color: var(--card-bg); }
.card .card-header { border-bottom: 1px solid var(--border-color); }
.card.shadow { box-shadow: 0 8px 16px rgba(15, 23, 42, .06); }
.card:hover { box-shadow: 0 10px 18px rgba(15, 23, 42, .08); /* transition: box-shadow .2s ease; - DISABLED */ }

.btn { border-radius: 0.375rem; /* transition: all .15s ease; - DISABLED */ padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.btn-lg { padding: 0.5rem 1rem; font-size: 0.875rem; }
.btn-primary { background: var(--primary-color); border-color: var(--primary-color); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline-primary { color: var(--primary-color); border-color: var(--primary-color); }
.btn-outline-primary:hover { background: var(--primary-color); color: #fff; }
.btn-secondary { background: var(--secondary-color); border-color: var(--secondary-color); }
.btn-success { background: var(--success-color); border-color: var(--success-color); }
.btn-danger { background: var(--danger-color); border-color: var(--danger-color); }
.btn-warning { background: var(--warning-color); border-color: var(--warning-color); color: #1f2937; }
.btn-info { background: var(--info-color); border-color: var(--info-color); }

.badge { border-radius: 0.375rem; font-weight: 600; padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.badge.bg-primary { background: var(--primary-color) !important; }
.badge.bg-success { background: var(--success-color) !important; }
.badge.bg-danger { background: var(--danger-color) !important; }
.badge.bg-warning { background: var(--warning-color) !important; color: #111827; }
.badge.bg-info { background: var(--info-color) !important; }

.table { border-color: var(--border-color); table-layout: auto; font-size: 0.75rem; }
.table th { background: #f3f4f6; font-weight: 600; color: #111827; padding: 0.375rem 0.5rem; font-size: 0.75rem; }
.table td, .table th { vertical-align: middle; word-wrap: break-word; overflow-wrap: anywhere; padding: 0.375rem 0.5rem; line-height: 1.25; }
.table-hover tbody tr:hover { background-color: #f9fafb; }
.table-striped > tbody > tr:nth-of-type(odd) { --bs-table-accent-bg: #fafafa; }
.table-sm td, .table-sm th { padding: 0.375rem 0.5rem; font-size: 0.75rem; }
.table thead { border-bottom: 1px solid var(--border-color); }

.form-control, .form-select { border-radius: .4rem; border-color: var(--border-color); }
.form-control:focus, .form-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 .2rem var(--primary-10); }
.form-label { color: #334155; font-weight: 500; }
.input-group-text { background: #f3f4f6; border-color: var(--border-color); }
.form-check-input:checked { background-color: var(--primary-color); border-color: var(--primary-color); }

.alert { border-radius: .5rem; }
.alert-primary { background: var(--primary-10); border-color: var(--primary-color); color: #1f2937; }
.alert-success { background: rgba(34, 197, 94, .12); border-color: var(--success-color); color: #14532d; }
.alert-danger { background: rgba(239, 68, 68, .12); border-color: var(--danger-color); color: #7f1d1d; }
.alert-warning { background: rgba(245, 158, 11, .14); border-color: var(--warning-color); color: #78350f; }
.alert-info { background: rgba(14, 165, 233, .14); border-color: var(--info-color); color: #0c4a6e; }

.dropdown-menu { border-radius: .5rem; border-color: var(--border-color); box-shadow: 0 12px 24px rgba(2, 8, 23, .12); }
.dropdown-item { border-radius: .35rem; }
.dropdown-item:hover { background: #f1f5f9; }
.notification-dropdown h6 { font-weight: 700; }
.notification-item { padding: .5rem .75rem; }
.notification-item .small { font-size: .75rem; }

.nav-tabs .nav-link { border-radius: .35rem .35rem 0 0; }
.nav-tabs .nav-link.active { color: var(--primary-color); }
.nav-pills .nav-link { border-radius: .5rem; }
.nav-pills .nav-link.active { background: var(--primary-color); }

.breadcrumb { background: transparent; }
.breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }

.pagination .page-link { border-radius: .4rem; }
.pagination .page-item.active .page-link { background: var(--primary-color); border-color: var(--primary-color); }

.table-actions { display: flex; gap: .5rem; align-items: center; }
.table-status { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .5rem; border-radius: .5rem; font-weight: 600; }
.table-status.ok { background: rgba(34, 197, 94, .12); color: #14532d; }
.table-status.warn { background: rgba(245, 158, 11, .14); color: #78350f; }
.table-status.err { background: rgba(239, 68, 68, .12); color: #7f1d1d; }

.module-card { border-radius: var(--radius); }
.module-card .list-group-item { border-color: var(--border-color); }
.module-card .list-group-item.active { background: var(--primary-10); color: var(--primary-color); }

.module-nav-wrapper { position: sticky; top: calc(var(--navbar-height) + 12px); }
.module-nav-menu .nav-link { display: flex; align-items: center; gap: .5rem; color: #374151; padding: .5rem .75rem; border-radius: .375rem; }
.module-nav-menu .nav-link:hover { background: #f3f4f6; color: #111827; }
.module-nav-menu .nav-link.active { background: var(--primary-10); color: var(--primary-color); font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .5rem; background: #eef2ff; border: 1px solid #e0e7ff; border-radius: 999px; font-size: .85rem; color: var(--primary-color); }
.chip i { font-size: .9rem; }

.toolbar { display: flex; gap: .5rem; align-items: center; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }

.stat-card { text-align: center; }
.stat-card .text-muted { color: var(--muted-color) !important; }
.stat-card .h4 { font-weight: 700; }

.print-actions { display: flex; gap: .5rem; }

.row > * { min-width: 0; }
.dropdown-menu { max-width: 100vw; }

/* Mobile Optimizations - Small Screens */
@media (max-width: 767.98px) {
  /* تصغير الأزرار */
  .btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
  }
  
  .btn-sm {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.65rem !important;
  }
  
  .btn-lg {
    padding: 0.3rem 0.6rem !important;
    font-size: 0.75rem !important;
  }
  
  /* تصغير أيقونات الأزرار */
  .btn i {
    font-size: 0.7rem !important;
  }
  
  /* تصغير toolbar و print-actions */
  .toolbar,
  .print-actions,
  .table-actions {
    gap: 0.25rem !important;
  }
  
  /* تصغير النصوص في الأزرار */
  .toolbar .btn,
  .print-actions .btn,
  .table-actions .btn {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.65rem !important;
  }
  
  /* تصغير badges */
  .badge {
    padding: 0.15rem 0.35rem !important;
    font-size: 0.65rem !important;
  }
  
  /* تصغير dropdowns */
  .dropdown-toggle {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
  }
  
  /* تصغير العناوين */
  h1 { font-size: 1.1rem !important; }
  h2 { font-size: 1rem !important; }
  h3 { font-size: 0.95rem !important; }
  h4 { font-size: 0.85rem !important; }
  h5 { font-size: 0.75rem !important; }
  h6 { font-size: 0.7rem !important; }
  
  .page-title {
    font-size: 1rem !important;
  }
  
  /* تصغير form controls */
  .form-control,
  .form-select {
    padding: 0.3rem 0.4rem !important;
    font-size: 0.75rem !important;
  }
  
  .form-label {
    font-size: 0.75rem !important;
  }
  
  /* تصغير inputs في toolbar */
  .toolbar .form-control,
  .toolbar .form-select,
  .filters .form-control,
  .filters .form-select {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.7rem !important;
  }
  
  /* تصغير cards */
  .card-body {
    padding: 0.5rem !important;
  }
  
  .card-header {
    padding: 0.5rem !important;
    font-size: 0.75rem !important;
  }
  
  /* تصغير tables */
  .table {
    font-size: 0.65rem !important;
  }
  
  .table th,
  .table td {
    padding: 0.3rem 0.35rem !important;
    font-size: 0.65rem !important;
  }
  
  /* تصغير pagination */
  .pagination .page-link {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
  }
  
  /* تصغير alerts */
  .alert {
    padding: 0.5rem !important;
    font-size: 0.7rem !important;
  }
  
  /* تصغير chips */
  .chip {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.7rem !important;
  }
  
  /* تصغير stat cards */
  .stat-card .h4 {
    font-size: 1rem !important;
  }
  
  .stat-card .text-muted {
    font-size: 0.7rem !important;
  }
  
  /* تصغير أزرار الطباعة والتصدير */
  .btn-print,
  .btn-export,
  .btn-download {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.65rem !important;
  }
  
  /* إخفاء بعض النصوص وإبقاء الأيقونات فقط */
  .btn .btn-text-mobile-hide {
    display: none;
  }
}

@media print {
  nav.navbar, aside.sidebar, .print-actions, .btn, .alert { display: none !important; }
  #verifyReceiptA5, #verifyStudentA5 { margin: 0; padding: 0; }
}
*, *::before, *::after { box-sizing: border-box; }
img, svg { max-width: 100%; height: auto; }