.fw-500 {
    font-weight: 500;
}
:root {
    --primary-color: #4a67b0;
    --primary-hover: #5679d2;
    --secondary-color: #e2e8f0;
    --secondary-hover: #cbd5e1;
    --success-color: #10b981;
    --info-color: #0ea5e9;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-color: #f8fafc;
    --dark-color: #334155;
    --gray-color: #94a3b8;
    --border-radius: 0.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), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
  }
  
  /* General Styles */
  body {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    background-color: #f1f5f9;
  }
  
  .page-container {
    padding: 2rem 1.5rem;
  }
  
  .page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
  }
  
  .page-title i {
    margin-left: 0.75rem;
    color: var(--primary-color);
    font-size: 16px;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(85 143 219 / 14%);
    border-radius: 25%;
  }
  
  .page-subtitle {
    color: var(--gray-color);
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  /* Card Styles */
  .custom-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: none;
    transition: var(--transition);
  }
  
  .custom-card:hover {
    box-shadow: var(--shadow-lg);
  }
  
  .custom-card-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }
  
  .custom-card-header::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: 0;
    height: 1px;
    width: 100px;
    background-color: var(--primary-color);
  }
  
  .custom-card-body {
    padding: 1.5rem;
    background-color: #fff;
  }
  
  /* Button Styles */
  .custom-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
  }
  
  .custom-btn i {
    margin-left: 0.5rem;
  }
  
  .custom-btn-primary {
    text-decoration: none;
    background-color: var(--primary-color);
    color: white;
  }
  
  .custom-btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4);
  }
  
  .custom-btn-success {
    background-color: var(--success-color);
    color: white;
  }
  
  .custom-btn-success:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.4);
  }
  
  .custom-btn-danger {
    background-color: var(--danger-color);
    color: white;
  }
  
  .custom-btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.4);
  }
  
  .custom-btn-info {
    background-color: var(--info-color);
    color: white;
  }
  
  .custom-btn-info:hover {
    background-color: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.4);
  }
  
  .custom-btn-warning {
    background-color: var(--warning-color);
    color: white;
  }
  
  .custom-btn-warning:hover {
    background-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.4);
  }
  
  .custom-btn-light {
    background-color: var(--secondary-color);
    color: var(--dark-color);
  }
  
  .custom-btn-light:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(203, 213, 225, 0.4);
  }
  
  .custom-btn-sm {
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }
  
  /* Filter and Search Section */
  .filters-section {
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--secondary-color);
  }
  
  .search-input {
    border-radius: var(--border-radius);
    border: 1px solid var(--secondary-color);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: 100%;
    transition: var(--transition);
  }
  
  .search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    outline: none;
  }
  
  .custom-select {
    border-radius: var(--border-radius);
    border: 1px solid var(--secondary-color);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: 100%;
    transition: var(--transition);
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-position: left 0.75rem center;
    background-size: 1.25rem;
    background-repeat: no-repeat;
    padding-left: 2.5rem;
  }
  
  .custom-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    outline: none;
  }
  
  /* Table Styles */
  .custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1rem;
  }
  
  .custom-table thead th {
    background-color: #f1f5f9;
    color: var(--dark-color);
    font-weight: 600;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    text-align: right;
    border-bottom: 2px solid var(--secondary-color);
  }
  
  .custom-table thead th:first-child {
    border-top-right-radius: var(--border-radius);
  }
  
  .custom-table thead th:last-child {
    border-top-left-radius: var(--border-radius);
  }
  
  .custom-table tbody tr:last-child td:first-child {
    border-bottom-right-radius: var(--border-radius);
  }
  
  .custom-table tbody tr:last-child td:last-child {
    border-bottom-left-radius: var(--border-radius);
  }
  
  .custom-table tbody tr {
    transition: var(--transition);
  }
  
  .custom-table tbody tr:hover {
    background-color: #f8fafc;
  }
  
  .custom-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--secondary-color);
    font-size: 0.875rem;
    color: var(--dark-color);
  }
  
  /* Person Tag Styles */
  .tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
  }
  
  .tag-male {
    background-color: rgba(14, 165, 233, 0.15);
    color: #0284c7;
  }
  
  .tag-female {
    background-color: rgba(236, 72, 153, 0.15);
    color: #db2777;
  }
  
  .tag-lineage-sayyid {
    background-color: rgba(245, 158, 11, 0.15);
    color: #d97706;
  }
  
  .tag-lineage-normal {
    background-color: rgba(148, 163, 184, 0.15);
    color: #64748b;
  }
  
  /* Actions Styles */
  .actions-group {
    display: flex;
    gap: 0.5rem;
  }
  
  /* Filters Applied Tags */
  .filters-applied {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .filter-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background-color: var(--light-color);
    border: 1px solid var(--secondary-color);
    border-radius: 9999px;
    font-size: 0.75rem;
    color: var(--dark-color);
  }
  
  .filter-tag i {
    margin-right: 0.375rem;
  }
  
  /* Person Card for Card View */
  .person-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--secondary-color);
    position: relative;
  }
  
  .person-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
  }
  
  .person-card-male .person-card-header {
    background-color: rgba(14, 165, 233, 0.1);
    border-bottom: 2px solid #0284c7;
  }
  
  .person-card-female .person-card-header {
    background-color: rgba(236, 72, 153, 0.1);
    border-bottom: 2px solid #db2777;
  }
  
  .person-card-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .person-card-body {
    padding: 1rem;
  }
  
  .person-card-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
  }
  
  .person-card-info {
    margin-bottom: 0.25rem;
    color: var(--dark-color);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
  }
  
  .person-card-info i {
    width: 1rem;
    text-align: center;
    margin-left: 0.5rem;
    color: var(--gray-color);
  }
  
  .person-card-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--secondary-color);
    display: flex;
    justify-content: space-between;
  }
  
  /* Stats Cards */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
  }
  
  .stat-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
  }
  
  .stat-primary {
    border-right: 4px solid var(--primary-color);
  }
  
  .stat-success {
    border-right: 4px solid var(--success-color);
  }
  
  .stat-info {
    border-right: 4px solid var(--info-color);
  }
  
  .stat-warning {
    border-right: 4px solid var(--warning-color);
  }
  
  .stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    clip-path: polygon(100% 0, 100% 100%, 0 100%, 40% 0);
  }
  
  .stat-primary::before {
    background: linear-gradient(90deg, transparent, rgb(68 106 179 / 10%));
  }
  
  .stat-success::before {
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1));
  }
  
  .stat-info::before {
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.1));
  }
  
  .stat-warning::before {
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.1));
  }
  
  .stat-title {
    font-size: 0.875rem;
    color: var(--gray-color);
    margin-bottom: 0.25rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
  }
  
  .stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
  }
  
  .stat-icon-primary {
    background-color: var(--primary-color);
  }
  
  .stat-icon-success {
    background-color: var(--success-color);
  }
  
  .stat-icon-info {
    background-color: var(--info-color);
  }
  
  .stat-icon-warning {
    background-color: var(--warning-color);
  }
  
  /* Modal Styles */
  .custom-modal-header {
    background: linear-gradient(135deg, var(--danger-color), #b91c1c);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
  }
  
  .custom-modal-body {
    padding: 2rem;
    text-align: center;
  }
  
  .custom-modal-warning-icon {
    font-size: 3rem;
    color: var(--warning-color);
    margin-bottom: 1rem;
    display: inline-block;
  }
  
  .custom-modal-footer {
    background-color: #f1f5f9;
    padding: 1rem 1.5rem;
    border-top: none;
  }
  
  /* Responsive */
  @media (max-width: 992px) {
    .stats-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 768px) {
    .page-container {
      padding: 1rem;
    }
    
    .custom-card-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
    }
    
    .filters-section {
      padding: 1rem;
    }
    
    .actions-group {
      flex-wrap: wrap;
    }
    
    .filters-section .row > div {
      margin-bottom: 0.5rem;
    }
  }
  
  @media (max-width: 576px) {
    .stats-grid {
      grid-template-columns: 1fr;
    }
    
    .page-title {
      font-size: 1.5rem;
    }
    
    .custom-table {
      display: block;
      overflow-x: auto;
    }
    
    .actions-group {
      justify-content: flex-start;
      margin-top: 0.5rem;
    }
  }
  
  /* View mode toggle */
  .view-toggle {
    display: flex;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--secondary-color);
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  
  .view-toggle-btn {
    padding: 0.5rem 1.25rem;
    background-color: #fff;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    color: var(--gray-color);
    display: flex;
    align-items: center;
  }
  
  .view-toggle-btn i {
    margin-left: 0.5rem;
  }
  
  .view-toggle-btn.active {
    background-color: var(--primary-color);
    color: #fff;
  }
  
  .view-toggle-btn:first-child {
    border-left: 1px solid var(--secondary-color);
  }
  
  .view-toggle-btn.active {
    border-color: var(--primary-color);
  }

  /* Form Styles - Added from blade files */
  .form-section {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 1.5rem;
  }
  
  .section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    color: #334155;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .section-title i {
    margin-left: 0.75rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
  }
  
  .custom-radio-group {
    display: flex;
    gap: 0.75rem;
    width: 100%;
  }
  
  .custom-radio-option {
    flex: 1;
    margin: 0;
    cursor: pointer;
    position: relative;
  }
  
  .custom-radio-option input {
    display: none;
  }
  
  .custom-radio-btn {
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 0.6rem 1rem;
    text-align: center;
    transition: all 0.2s ease;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    height: 100%;
    min-height: 42px;
  }
  
  .custom-radio-option input:checked + .custom-radio-btn {
    background-color: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    font-weight: 500;
    color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  }
  
  .custom-radio-btn:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
  }
  
  .custom-radio-btn i {
    margin-left: 0.5rem;
  }
  
  .custom-input {
    border-radius: var(--border-radius);
    border: 1px solid #e5e7eb;
    padding: 0.6rem 1rem;
    transition: var(--transition);
    background-color: #f9fafb;
    min-height: 42px;
  }
  
  .custom-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background-color: #fff;
  }
  
  .form-label {
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
  }
  
  .form-group {
    margin-bottom: 1.25rem;
  }

  .page-container {
    background-color: #f1f5f9;
    padding: 1.5rem;
    border-radius: 8px;
  }

  .custom-card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
  }
  
  .custom-card-header {
    background-color: #fff;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
  }

  .custom-card-body {
    background-color: #f8fafc;
    padding: 1.5rem;
  }

  .action-btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
  }

  .form-select {
    background-position: left .75rem center !important;
  }

  .person-card {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    background-color: #fff;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #e2e8f0;
  }

  .person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  }

  .person-image-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-left: 1rem;
    border: 3px solid #f1f5f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
  }

  .person-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .person-details {
    flex: 1;
  }

  .person-card-info {
    margin-bottom: 0.5rem;
    color: #475569;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }

  .person-card-info:last-child {
    margin-bottom: 0;
  }

  .person-card-info .fw-500 {
    margin-left: 0.5rem;
  }

  .tag-sm {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }

  /* Responsive styles for person cards */
  @media (max-width: 767px) {
    .person-image-container {
      width: 80px;
      height: 80px;
    }
    
    .person-card-info {
      font-size: 0.8rem;
    }
  }
  
  @media (max-width: 576px) {
    .person-image-container {
      width: 70px;
      height: 70px;
      margin-left: 0.75rem;
    }
    
    .actions-group {
      flex-wrap: wrap;
    }
    
    .custom-btn-sm {
      margin-bottom: 0.25rem;
    }
  }

  /* Image Upload Section Styles */
  .image-upload-section {
    background-color: #f8fafc;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px dashed #cbd5e1;
    margin-bottom: 1rem;
  }
  
  .circular-image-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background-color: #f1f5f9;
    position: relative;
    flex-shrink: 0;
  }
  
  .preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  
  .missing-image {
    opacity: 0.6;
  }
  
  .upload-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  .custom-file-upload {
    position: relative;
    overflow: hidden;
  }
  
  .custom-file-upload input[type="file"] {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    cursor: pointer;
  }
  
  .upload-notes {
    font-size: 0.8rem;
    line-height: 1.5;
  }
  
  @media (max-width: 576px) {
    .image-upload-section > div {
      flex-direction: column;
      align-items: center;
    }
    
    .circular-image-preview {
      margin-bottom: 1rem;
      margin-right: 0 !important;
    }
    
    .upload-controls {
      width: 100%;
    }
  }

  .rectangular-image-preview img {
    height: 150px;
    border: 2px solid #acb3bb;
    border-radius: 8px;
  }

/* ==============================================
   Quick Links Styles for Settings Page
   ============================================== */
.quick-links-section {
    margin-bottom: 2rem;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.quick-link-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.quick-link-card:hover::before {
    opacity: 1;
}

.quick-link-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.quick-link-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.quick-link-icon.icon-users {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.quick-link-icon.icon-people {
    background: linear-gradient(135deg, #10b981, #047857);
    color: white;
}

.quick-link-icon.icon-performance {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.quick-link-icon.icon-backup {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.quick-link-icon.icon-api {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.quick-link-card:hover .quick-link-icon {
    transform: scale(1.1) rotate(5deg);
}

.quick-link-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.quick-link-description {
    font-size: 0.875rem;
    color: var(--gray-color);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.quick-link-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quick-link-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: rgba(248, 250, 252, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-link-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: right 0.5s ease;
}

.quick-link-item:hover {
    background-color: #f1f5f9;
    border-color: var(--primary-color);
    transform: translateX(5px);
    text-decoration: none;
    color: var(--primary-color);
}

.quick-link-item:hover::before {
    right: 100%;
}

.quick-link-item i {
    margin-left: 0.75rem;
    font-size: 1rem;
    width: 20px;
    text-align: center;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.quick-link-item:hover i {
    opacity: 1;
    transform: scale(1.1);
}

.quick-link-item span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* ==============================================
   Enhanced Pagination Styles
   ============================================== */
.enhanced-pagination-wrapper {
  background-color: #fff;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--secondary-color);
}

.pagination-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.results-info {
  font-size: 0.875rem;
  color: var(--gray-color);
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.per-page-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--dark-color);
}

.per-page-selector label {
  font-weight: 500;
  margin-bottom: 0;
  white-space: nowrap;
}

.per-page-selector select {
  border: 1px solid var(--secondary-color);
  border-radius: var(--border-radius);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  background-color: #fff;
  transition: var(--transition);
  min-width: 70px;
}

.per-page-selector select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

.page-jump {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--dark-color);
}

.page-jump label {
  font-weight: 500;
  margin-bottom: 0;
  white-space: nowrap;
}

.page-jump input {
  border: 1px solid var(--secondary-color);
  border-radius: var(--border-radius);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  text-align: center;
  transition: var(--transition);
}

.page-jump input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

/* Bootstrap Pagination Override */
.pagination-links .pagination {
  margin-bottom: 0;
  justify-content: center;
}

.pagination .page-item {
  margin: 0 0.125rem;
}

.pagination .page-link {
  border: 1px solid var(--secondary-color);
  border-radius: var(--border-radius);
  color: var(--dark-color);
  background-color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  min-width: 44px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.pagination .page-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
  transition: left 0.5s ease;
}

.pagination .page-link:hover {
  border-color: var(--primary-color);
  background-color: rgba(99, 102, 241, 0.05);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
  text-decoration: none;
}

.pagination .page-link:hover::before {
  left: 100%;
}

.pagination .page-item.active .page-link {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  border-color: var(--primary-color);
  color: #fff;
  font-weight: 600;
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.pagination .page-item.active .page-link:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.pagination .page-item.disabled .page-link:hover {
  transform: none;
  box-shadow: none;
  background-color: #f8fafc;
  border-color: var(--secondary-color);
}

/* Special styling for first, previous, next, last buttons */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
  font-weight: 600;
  padding: 0.75rem 1.25rem;
}

.pagination .page-item:first-child .page-link {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-color: var(--secondary-color);
}

.pagination .page-item:last-child .page-link {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border-color: var(--secondary-color);
}

.pagination .page-item:first-child .page-link:hover,
.pagination .page-item:last-child .page-link:hover {
  background: linear-gradient(135deg, var(--success-color), #059669);
  color: #fff;
  border-color: var(--success-color);
}

/* Pagination Summary */
.pagination-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--secondary-color);
  font-size: 0.875rem;
  color: var(--gray-color);
}

.pagination-stats {
  display: flex;
  gap: 1rem;
}

.pagination-stat {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.pagination-stat i {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .pagination-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .pagination-controls {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .pagination .page-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    min-width: 36px;
  }
  
  .pagination .page-item:first-child .page-link,
  .pagination .page-item:last-child .page-link {
    padding: 0.5rem 1rem;
  }
  
  .enhanced-pagination-wrapper {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .pagination-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  
  .per-page-selector,
  .page-jump {
    justify-content: space-between;
  }
  
  .pagination .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
  }
  
  .pagination .page-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    min-width: 32px;
  }
  
  /* Hide some pagination items on very small screens */
  .pagination .page-item:not(.active):not(:first-child):not(:last-child):not(.page-item:nth-child(2)):not(.page-item:nth-last-child(2)) {
    display: none;
  }
}

/* Animation for pagination links */
@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pagination .page-item {
  animation: pageSlideIn 0.3s ease forwards;
}

.pagination .page-item:nth-child(1) { animation-delay: 0.1s; }
.pagination .page-item:nth-child(2) { animation-delay: 0.15s; }
.pagination .page-item:nth-child(3) { animation-delay: 0.2s; }
.pagination .page-item:nth-child(4) { animation-delay: 0.25s; }
.pagination .page-item:nth-child(5) { animation-delay: 0.3s; }

/* Loading state for pagination */
.pagination-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.pagination-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

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

/* Enhanced pagination info with icons */
.results-info::before {
  content: '\f1ea';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-left: 0.5rem;
  color: var(--primary-color);
  opacity: 0.7;
}

/* Date Input Styles */
.date-input {
    position: relative;
    font-family: 'Tajawal', monospace;
    letter-spacing: 0.5px;
}

.date-input::placeholder {
    color: #94a3b8;
    font-style: italic;
    direction: rtl;
}

.date-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 103, 176, 0.1);
}

/* تحسين مظهر النص في حقول التاريخ */
.date-input {
    text-align: center;
    direction: ltr;
    font-weight: 500;
}

/* تحسين التفاعل مع حقول التاريخ */
.date-input:hover {
    border-color: var(--primary-hover);
    background-color: #fafbfc;
}

.date-input:invalid {
    border-color: var(--danger-color);
}

