html {
  font-size: 13px;
}
@media (min-width: 768px) {
  html {
    font-size: 14px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #ca9f4f;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #f0e7da;
  color: #000f2d;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* الهوية البصرية - الألوان */
:root {
  --primary-color: #ca9f4f;
  --dark-color: #000f2d;
  --light-gray: #c0c0c3;
  --beige: #d9bb8e;
  --medium-gray: #77787f;
  --dark-gray: #3b3d4c;
  --cream: #f0e7da;
}

/* Header و Navigation */
.navbar {
  background-color: #000f2d !important;
  border-bottom: 3px solid #ca9f4f;
}

.navbar-brand {
  color: #ca9f4f !important;
  font-weight: bold;
  font-size: 1.1rem;
}

.navbar-brand:hover {
  color: #d9bb8e !important;
}

.navbar-brand img {
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

@media (max-width: 576px) {
  .navbar-brand span {
    font-size: 0.9rem;
  }
  
  .navbar-brand img {
    height: 30px !important;
  }
}

.navbar-nav .nav-link {
  color: #c0c0c3 !important;
  transition: color 0.3s ease;
  font-size: 0.9rem;
  padding: 0.375rem 0.75rem;
}

.navbar-nav .nav-link:hover {
  color: #ca9f4f !important;
}

.navbar-nav .nav-link.active {
  color: #ca9f4f !important;
  font-weight: bold;
}

.navbar-nav .nav-item .navbar-text {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  line-height: 1.5;
}

/* Dropdown Menu */
.dropdown-menu {
  background-color: #3b3d4c;
  border: 1px solid #ca9f4f;
}

.dropdown-item {
  color: #c0c0c3;
}

.dropdown-item:hover {
  background-color: #000f2d;
  color: #ca9f4f;
}

/* الأزرار */
.btn-primary {
  background-color: #ca9f4f;
  border-color: #ca9f4f;
  color: #000f2d;
  font-weight: 500;
}

.btn-primary:hover {
  background-color: #d9bb8e;
  border-color: #d9bb8e;
  color: #000f2d;
}

.btn-secondary {
  background-color: #77787f;
  border-color: #77787f;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #3b3d4c;
  border-color: #3b3d4c;
  color: #ffffff;
}

.btn-success {
  background-color: #ca9f4f;
  border-color: #ca9f4f;
  color: #000f2d;
}

.btn-success:hover {
  background-color: #d9bb8e;
  border-color: #d9bb8e;
  color: #000f2d;
}

.btn-warning {
  background-color: #d9bb8e;
  border-color: #d9bb8e;
  color: #000f2d;
}

.btn-warning:hover {
  background-color: #ca9f4f;
  border-color: #ca9f4f;
  color: #000f2d;
}

.btn-danger {
  background-color: #3b3d4c;
  border-color: #3b3d4c;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #000f2d;
  border-color: #000f2d;
  color: #ffffff;
}

.btn-info {
  background-color: #77787f;
  border-color: #77787f;
  color: #ffffff;
}

.btn-info:hover {
  background-color: #3b3d4c;
  border-color: #3b3d4c;
  color: #ffffff;
}

/* الكروت (Cards) */
.card {
  border: 1px solid #c0c0c3;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 15, 45, 0.1);
  margin-bottom: 0.75rem;
}

.card-header {
  background-color: #000f2d;
  color: #ca9f4f;
  border-bottom: 2px solid #ca9f4f;
  font-weight: bold;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
}

.card-header h5 {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.card-body {
  background-color: #ffffff;
  color: #000f2d;
  padding: 0.75rem;
}

/* الجداول */
.table {
  background-color: #ffffff;
  font-size: 0.9rem;
}

.table thead {
  background-color: #3b3d4c;
  color: #ca9f4f;
  font-size: 0.85rem;
}

.table thead th {
  padding: 0.5rem 0.75rem;
  font-weight: 600;
}

.table tbody td {
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
}

.table tbody tr {
  border-bottom: 1px solid #c0c0c3;
}

.table tbody tr:hover {
  background-color: #f0e7da;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: #f0e7da;
}

.table-striped tbody tr:nth-of-type(odd):hover {
  background-color: #d9bb8e;
}

/* سكرول عرضي للجداول */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  min-width: 100%;
  white-space: nowrap;
}

/* تحسين مظهر السكرول */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f0e7da;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #ca9f4f;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #d9bb8e;
}

/* النماذج (Forms) */
.form-control:focus {
  border-color: #ca9f4f;
  box-shadow: 0 0 0 0.2rem rgba(202, 159, 79, 0.25);
}

.form-select:focus {
  border-color: #ca9f4f;
  box-shadow: 0 0 0 0.2rem rgba(202, 159, 79, 0.25);
}

.form-label {
  color: #000f2d;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.form-control, .form-select {
  font-size: 0.9rem;
  padding: 0.375rem 0.5rem;
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group.mb-3 {
  margin-bottom: 0.75rem !important;
}

.form-group.mb-4 {
  margin-bottom: 1rem !important;
}

/* Breadcrumb */
.breadcrumb {
  background-color: #f0e7da;
  border: 1px solid #c0c0c3;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  padding: 0 0.375rem;
  color: #6c757d;
  display: inline-block;
}

.breadcrumb-item + .breadcrumb-item::after {
  display: none !important;
}

.breadcrumb-item a {
  color: #ca9f4f;
}

.breadcrumb-item.active {
  color: #3b3d4c;
}

/* Dashboard Cards */
.card.text-white.bg-primary {
  background-color: #ca9f4f !important;
  border-color: #ca9f4f;
  color: #000f2d !important;
}

.card.text-white.bg-success {
  background-color: #d9bb8e !important;
  border-color: #d9bb8e;
  color: #000f2d !important;
}

.card.text-white.bg-info {
  background-color: #77787f !important;
  border-color: #77787f;
  color: #ffffff !important;
}

.card.text-white.bg-warning {
  background-color: #ca9f4f !important;
  border-color: #ca9f4f;
  color: #000f2d !important;
}

/* Calendar */
.calendar-table {
  background-color: #ffffff;
}

.calendar-table td {
  border: 1px solid #c0c0c3;
}

.today {
  background-color: #d9bb8e !important;
  border: 2px solid #ca9f4f !important;
}

.session-item {
  background-color: transparent;
  border-left: 3px solid transparent;
  color: var(--dark-color);
}

.empty-day {
  background-color: #f0e7da;
}

/* Footer */
.footer {
  background-color: #000f2d;
  color: #c0c0c3;
  border-top: 3px solid #ca9f4f;
}

.footer a {
  color: #ca9f4f;
}

.footer a:hover {
  color: #d9bb8e;
}

/* Links */
a {
  color: #ca9f4f;
}

a:hover {
  color: #d9bb8e;
}

/* Alerts */
.alert {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

.alert-primary {
  background-color: #f0e7da;
  border-color: #ca9f4f;
  color: #000f2d;
}

.alert-success {
  background-color: #d9bb8e;
  border-color: #ca9f4f;
  color: #000f2d;
}

.alert-danger {
  background-color: #f0e7da;
  border-color: #3b3d4c;
  color: #000f2d;
}

/* Validation Messages */
.text-danger {
  color: #3b3d4c !important;
}

.text-muted {
  color: #77787f !important;
}

/* Pagination */
.page-link {
  color: #ca9f4f;
  border-color: #c0c0c3;
}

.page-link:hover {
  color: inherit;
  background-color: inherit;
  border-color: inherit;
}

.page-item.active .page-link {
  background-color: #ca9f4f;
  border-color: #ca9f4f;
  color: #000f2d;
}

/* Badges */
.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  font-weight: 500;
}

.badge.bg-primary {
  background-color: #ca9f4f !important;
  color: #000f2d;
}

.badge.bg-secondary {
  background-color: #77787f !important;
  color: #ffffff;
}

/* Input Groups */
.input-group-text {
  background-color: #3b3d4c;
  color: #ca9f4f;
  border-color: #c0c0c3;
}

/* Modals */
.modal-header {
  background-color: #000f2d;
  color: #ca9f4f;
  border-bottom: 2px solid #ca9f4f;
  padding: 0.75rem 1rem;
}

.modal-header h5 {
  font-size: 1rem;
  margin-bottom: 0;
}

.modal-body {
  background-color: #ffffff;
  color: #000f2d;
  padding: 1rem;
  font-size: 0.9rem;
}

.modal-footer {
  background-color: #f0e7da;
  border-top: 1px solid #c0c0c3;
  padding: 0.75rem 1rem;
}

/* Scrollbar (Webkit browsers) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f0e7da;
}

::-webkit-scrollbar-thumb {
  background: #ca9f4f;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d9bb8e;
}

/* Calendar Styles */
.calendar-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
}

.calendar-table {
  width: 100%;
  min-width: 600px;
  table-layout: fixed;
  background-color: #ffffff;
}

.calendar-day-header {
  text-align: center;
  font-weight: bold;
  padding: 0.75rem 0.5rem;
  background-color: var(--dark-color);
  color: var(--primary-color);
  white-space: nowrap;
  border-color: var(--primary-color) !important;
}

.calendar-table td {
  height: 150px;
  vertical-align: top;
  padding: 8px;
  position: relative;
  word-wrap: break-word;
  background-color: var(--cream);
  border-color: var(--light-gray) !important;
}

.calendar-table .day-number {
  font-weight: bold;
  font-size: 1.1em;
  color: var(--dark-color);
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 10;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 2px 6px;
  border-radius: 3px;
  line-height: 1.2;
}

.calendar-table .today {
  background-color: var(--beige) !important;
  border: 2px solid var(--primary-color) !important;
}

.calendar-table .empty-day {
  background-color: #f5f5f5;
}

.calendar-items {
  margin-top: 5px;
}

.calendar-item {
  padding: 4px 6px;
  margin: 3px 0;
  border-radius: 3px;
  font-size: 0.75em;
  line-height: 1.3;
  border-right: 3px solid var(--dark-color);
  word-wrap: break-word;
}

.calendar-item small {
  display: block;
  color: var(--dark-color);
}

.calendar-item a {
  text-decoration: none;
  color: var(--dark-color);
  font-weight: 500;
}

.calendar-item a:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

.calendar-item strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.9em;
}

/* العناصر حسب النوع - بدون ألوان */
.client-item {
  background-color: transparent;
  border-right-color: var(--dark-color);
}

.client-item a {
  color: var(--dark-color);
}

.project-item {
  background-color: transparent;
  border-right-color: var(--dark-color);
}

.project-item a {
  color: var(--dark-color);
}

.goal-item {
  background-color: transparent;
  border-right-color: var(--dark-color);
}

.goal-item a {
  color: var(--dark-color);
}

.achievement-item {
  background-color: transparent;
  border-right-color: var(--dark-color);
}

.achievement-item a {
  color: var(--dark-color);
}

.session-item {
  background-color: transparent;
  border-right-color: var(--dark-color);
}

.session-item strong {
  color: var(--dark-color);
}

.session-item a {
  color: var(--dark-color);
}

/* مفتاح الألوان */
.calendar-legend {
  padding: 0.75rem;
  background-color: var(--cream);
  border: 1px solid var(--light-gray);
  border-radius: 5px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9em;
  color: var(--dark-color);
}


.calendar-navigation {
  margin-bottom: 1rem;
}

/* Responsive Calendar Styles */
@media (max-width: 768px) {
  .calendar-table {
    min-width: 500px;
  }

  .calendar-table td {
    height: 120px;
    padding: 5px;
  }

  .calendar-day-header {
    padding: 0.5rem 0.25rem;
    font-size: 0.85em;
  }

  .calendar-table .day-number {
    font-size: 1em;
    top: 3px;
    right: 4px;
    padding: 1px 4px;
  }

  .calendar-item {
    font-size: 0.7em;
    padding: 3px 4px;
    margin: 2px 0;
  }

  .calendar-navigation .btn {
    font-size: 0.85em;
    padding: 0.375rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .calendar-table {
    min-width: 450px;
  }

  .calendar-table td {
    height: 100px;
    padding: 4px;
  }

  .calendar-day-header {
    padding: 0.4rem 0.2rem;
    font-size: 0.75em;
  }

  .calendar-table .day-number {
    font-size: 0.9em;
    top: 2px;
    right: 3px;
    padding: 1px 3px;
  }

  .calendar-item {
    font-size: 0.65em;
    padding: 2px 3px;
    margin: 1px 0;
  }

  .calendar-item strong {
    font-size: 0.85em;
  }

  .calendar-navigation .btn {
    font-size: 0.75em;
    padding: 0.25rem 0.4rem;
  }

  h2 {
    font-size: 1.3rem;
  }
}

/* Mobile Responsive Styles - General */
@media (max-width: 768px) {
  /* Remove any default margins/padding that might cause left shift */
  html, body {
    margin-left: 0 !important;
    padding-left: 0 !important;
    overflow-x: hidden;
  }
  
  /* Container adjustments - remove all padding to prevent left shift */
  .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .container-fluid > main {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 3rem !important;
  }
  
  /* Remove negative margins from rows to prevent left shift */
  .container-fluid .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Cards */
  .card {
    margin-bottom: 1rem;
  }

  .card-header h5 {
    font-size: 1rem;
  }

  /* Forms */
  .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }

  .form-control,
  .form-select {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }

  /* Buttons */
  .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
  }

  .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  /* Tables */
  .table {
    font-size: 0.85rem;
  }

  .table th,
  .table td {
    padding: 0.5rem 0.4rem;
    font-size: 0.85rem;
  }

  /* Description lists */
  dl.row dt {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }

  dl.row dd {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  /* Navigation */
  .navbar-brand span {
    display: none;
  }

  .navbar-text {
    font-size: 0.85rem;
  }

  /* Breadcrumbs */
  .breadcrumb {
    font-size: 0.85rem;
    padding: 0.5rem 0;
  }

  /* Modals */
  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-header h5 {
    font-size: 1rem;
  }

  /* Pagination */
  .pagination {
    font-size: 0.85rem;
  }

  .page-link {
    padding: 0.375rem 0.5rem;
  }

  /* Footer - add margin top to separate from buttons above */
  .footer {
    margin-top: 3rem !important;
    padding-top: 1rem !important;
  }

  /* Stats in tables */
  .project-stats,
  .client-stats {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
  }

  .project-stats div,
  .client-stats div {
    margin-bottom: 0.25rem !important;
  }
}

@media (max-width: 576px) {
  /* Remove any default margins/padding that might cause left shift */
  html, body {
    margin-left: 0 !important;
    padding-left: 0 !important;
    overflow-x: hidden;
  }
  
  /* Extra small devices - remove all padding to prevent left shift */
  .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .container-fluid > main {
    padding-left: 10px;
    padding-right: 10px;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 3rem !important;
  }
  
  /* Remove negative margins from rows to prevent left shift */
  .container-fluid .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Headings */
  h2 {
    font-size: 1.2rem;
  }

  h5 {
    font-size: 0.95rem;
  }

  /* Cards */
  .card-body {
    padding: 0.75rem;
  }

  .card-header {
    padding: 0.5rem 0.75rem;
  }

  /* Forms - make filters stack */
  .row.g-3 > [class*="col-"] {
    margin-bottom: 0.5rem;
  }

  /* Buttons */
  .btn {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }

  /* Stack buttons vertically in action columns */
  .table td:last-child .btn {
    display: block;
    width: 100%;
    margin-bottom: 0.25rem;
  }

  .table td:last-child .btn:last-child {
    margin-bottom: 0;
  }

  .btn-group .btn {
    width: auto;
  }

  /* Tables */
  .table {
    font-size: 0.75rem;
  }

  .table th,
  .table td {
    padding: 0.4rem 0.3rem;
    font-size: 0.75rem;
  }

  /* Better table handling - keep all columns but make them scrollable */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  /* Description lists - stack vertically */
  dl.row dt {
    width: 100%;
    margin-bottom: 0.25rem;
    text-align: right;
  }

  dl.row dd {
    width: 100%;
    margin-bottom: 0.75rem;
    padding-right: 0;
    text-align: right;
  }

  /* Navigation */
  .navbar-brand {
    font-size: 1rem;
  }

  .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  /* Footer */
  .footer {
    font-size: 0.75rem;
    padding: 0.5rem 0;
    margin-top: 3rem !important;
    padding-top: 1rem !important;
  }

  /* Stats */
  .project-stats,
  .client-stats {
    font-size: 0.75rem !important;
  }

  /* Calendar legend */
  .calendar-legend {
    font-size: 0.8rem;
  }

  .legend-item {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

/* Select2 Mobile Responsive */
@media (max-width: 768px) {
  .select2-container--bootstrap-5 {
    width: 100% !important;
  }

  .select2-container--bootstrap-5 .select2-selection {
    min-height: 36px;
    font-size: 0.9rem;
  }

  .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    font-size: 0.9rem;
    padding: 0.375rem 0.5rem;
  }

  .select2-dropdown {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .select2-container--bootstrap-5 .select2-selection {
    min-height: 34px;
    font-size: 0.85rem;
  }

  .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    font-size: 0.85rem;
    padding: 0.3rem 0.4rem;
  }
}

/* Select2 Custom Styles for RTL */
.select2-container--bootstrap-5 .select2-selection {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  min-height: 38px;
}

.select2-container--bootstrap-5 .select2-selection--single {
  padding: 0.375rem 0.75rem;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
  padding-right: 0;
  padding-left: 0;
  text-align: right;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
  left: 8px;
  right: auto;
}

/* نقل زر CLEAR إلى يسار الحقل في RTL */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear {
  right: auto !important;
  left: 30px !important;
  float: left;
  margin-left: 0;
  margin-right: 0;
  position: absolute;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear {
  right: auto !important;
  left: 8px !important;
  float: left;
  margin-left: 0;
  margin-right: 0;
  position: absolute;
}

.select2-container--bootstrap-5.select2-container--open .select2-selection {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-color);
}

.select2-container--bootstrap-5 .select2-dropdown {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  direction: rtl;
  text-align: right;
}

.select2-container--bootstrap-5 .select2-results__option {
  padding: 0.5rem 0.75rem;
  text-align: right;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
  background-color: var(--primary-color);
  color: var(--dark-color);
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  text-align: right;
  direction: rtl;
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-color);
  outline: 0;
}

/* Select2 في حالة الخطأ */
.select2-container--bootstrap-5.is-invalid .select2-selection {
  border-color: #dc3545;
}

.select2-container--bootstrap-5.is-invalid.select2-container--open .select2-selection {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #dc3545;
}

/* Pagination Styles */
.pagination {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.pagination .page-link {
  color: var(--dark-color);
  background-color: var(--cream);
  border: 1px solid var(--light-gray);
  padding: 0.375rem 0.625rem;
  margin: 0 2px;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.pagination .page-link:hover {
  color: inherit;
  background-color: inherit;
  border-color: inherit;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--dark-color);
  font-weight: bold;
}

.pagination .page-item.disabled .page-link {
  color: var(--medium-gray);
  background-color: #f5f5f5;
  border-color: var(--light-gray);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Footer margin on mobile - ensure it's applied */
@media (max-width: 768px) {
  footer.footer,
  .footer,
  footer.border-top.footer {
    margin-top: 4rem !important;
  }
  
  /* Add space before footer */
  .container-fluid + footer,
  main + footer,
  .container-fluid > main + footer {
    margin-top: 4rem !important;
  }
}

/* جعل Checkboxes RTL */
.form-check {
  display: flex;
  align-items: center;
  direction: rtl;
  text-align: right;
  padding-right: 1.5em;
  padding-left: 0;
}

.form-check-input {
  float: right;
  margin-right: -1.5em;
  margin-left: 0;
  margin-top: 0.25em;
}

.form-check-label {
  margin-right: 2em;
  margin-left: 0;
  cursor: pointer;
}

/* تحسين Checkboxes في الجداول والعناصر المخصصة */
.form-check.mb-2,
.form-check.mb-3 {
  direction: rtl;
  text-align: right;
}

/* تقليل المسافات والعناوين بشكل عام */
h1 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.625rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

h5 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

h6 {
  font-size: 0.9rem;
  margin-bottom: 0.375rem;
}

/* تقليل المسافات في الأزرار */
.btn {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  line-height: 1.4;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  line-height: 1.3;
}

/* تقليل المسافات في الصفوف */
.row {
  margin-bottom: 0.5rem;
}

.row.mb-3 {
  margin-bottom: 0.75rem !important;
}

.row.mb-4 {
  margin-bottom: 1rem !important;
}

.row.mt-3 {
  margin-top: 0.75rem !important;
}

.row.mt-4 {
  margin-top: 1rem !important;
}

/* تقليل المسافات في dl (definition lists) */
dl.row dt {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

dl.row dd {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* تقليل المسافات في hr */
hr {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

/* تحسين صفحة تسجيل الدخول - الصورة على الجوال */
.login-image {
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.login-image-container {
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .login-image {
    max-height: 150px;
    max-width: 100%;
    width: auto;
    height: auto;
  }
  
  .login-image-container {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 576px) {
  .login-image {
    max-height: 100px;
    max-width: 85%;
    width: auto;
    height: auto;
  }
  
  .login-image-container {
    padding: 0.5rem 0.25rem;
    margin-bottom: 0.5rem !important;
  }
  
  /* تحسين المسافات في صفحة تسجيل الدخول على الجوال */
  .row.justify-content-center {
    margin: 0;
    padding: 0.5rem;
  }
  
  .row.justify-content-center .col-md-4 {
    padding: 0.5rem;
  }
}

@media (max-width: 576px) {
  footer.footer,
  .footer,
  footer.border-top.footer {
    margin-top: 4rem !important;
  }
  
  /* Add space before footer */
  .container-fluid + footer,
  main + footer,
  .container-fluid > main + footer {
    margin-top: 4rem !important;
  }
}
