/* Modern Dashboard Design System */
:root {
  /* Primary Brand Colors */
  --primary-blue: #1e40af;
  --primary-gold: #f59e0b;
  --primary-dark: #1e3a8a;

  /* Modern Color Palette */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* Shadows & Effects */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Typography */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: "Cairo", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--gray-50) 0%, #ffffff 100%);
  min-height: 100vh;
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 60px;
  direction: rtl;
  text-align: right;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: var(--radius);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* Navigation */
.modern-navbar {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--primary-dark) 100%
  );
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 1050;
}

.navbar-brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: var(--font-size-xl);
  color: white !important;
  text-decoration: none;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.02);
  color: white !important;
}

.navbar-logo {
  height: 45px;
  width: 45px;
  margin-left: 12px;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  object-fit: contain;
  background: white;
  padding: 2px;
}

/* Nav Links */
.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  font-size: var(--font-size-sm);
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-link:hover {
  color: white !important;
  background: rgba(255, 255, 255, 0.15);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: white !important;
  font-weight: 600;
}

/* Dropdown Menu Styling */
.modern-navbar .dropdown-menu {
  background: white;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
  min-width: 220px;
  margin-top: 0.5rem;
  animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modern-navbar .dropdown-item {
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.modern-navbar .dropdown-item i {
  font-size: 1rem;
  color: var(--gray-500);
  width: 20px;
  text-align: center;
}

.modern-navbar .dropdown-item:hover {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
  color: white;
  transform: translateX(-3px);
}

.modern-navbar .dropdown-item:hover i {
  color: white;
}

.modern-navbar .dropdown-divider {
  margin: 0.35rem 0;
  border-color: var(--gray-200);
}

/* User Dropdown */
.user-dropdown {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.75rem !important;
  margin-right: 0.5rem;
}

.user-dropdown:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.user-avatar {
  color: white;
}

.user-info {
  text-align: right;
  line-height: 1.2;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
}

.user-role {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Notification Dropdown */
.notification-dropdown {
  border-radius: var(--radius-lg) !important;
  border: none !important;
  overflow: hidden;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
}

.notification-dropdown .dropdown-header {
  background: var(--gray-50);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.notification-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-item:hover {
  background: var(--gray-50);
}

.notification-item.unread {
  background: rgba(59, 130, 246, 0.05);
  border-right: 3px solid var(--info);
}

.notification-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-800);
  margin-bottom: 0.25rem;
}

.notification-body {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-bottom: 0.35rem;
}

.notification-time {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.notification-badge {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
}

/* Bell Animation */
@keyframes bellShake {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(15deg); }
  40% { transform: rotate(-15deg); }
  60% { transform: rotate(10deg); }
  80% { transform: rotate(-10deg); }
}

.bell-shake {
  animation: bellShake 0.5s ease-in-out;
}

/* Navbar Toggler */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: none;
  background: rgba(255, 255, 255, 0.2);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive Navbar */
@media (max-width: 991.98px) {
  .modern-navbar .navbar-collapse {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    margin: 1rem -1rem -0.5rem -1rem;
    padding: 1rem;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.15rem 0;
  }

  .modern-navbar .dropdown-menu {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    border: none;
    margin: 0;
    padding: 0.5rem 0 0.5rem 1rem;
  }

  .modern-navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.6rem 1rem;
  }

  .modern-navbar .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: none;
  }

  .modern-navbar .dropdown-item i {
    color: rgba(255, 255, 255, 0.7);
  }
}

/* Content & Layout */
.main-content {
  padding: 2rem;
  background: transparent;
  min-height: calc(100vh - 100px);
}

.container-fluid {
  padding: 1rem;
}

/* Cards */
.modern-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.modern-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-gold));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.modern-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-blue);
}

.modern-card:hover::before {
  transform: scaleX(1);
}

/* Buttons */
.btn-modern {
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  font-size: var(--font-size-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-primary-modern {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--primary-dark) 100%
  );
  color: white;
}

.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

/* Forms */
.form-modern {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}

.form-label-modern {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
  font-size: var(--font-size-sm);
}

.form-control-modern {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  transition: all 0.3s ease;
  background: white;
}

.form-control-modern:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Tables */
.modern-table-container {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--gray-200);
  max-width: 100%;
  margin-bottom: 1.5rem;
}

.modern-table {
  width: 100%;
  min-width: 800px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.modern-table thead {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.modern-table th {
  padding: 1.25rem 1rem;
  font-weight: 600;
  color: var(--gray-700);
  text-align: right;
  border-bottom: 2px solid var(--gray-200);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modern-table td {
  padding: 1rem;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.modern-table tbody tr {
  transition: all 0.2s ease;
}

.modern-table tbody tr:hover {
  background: var(--gray-50);
}

/* Page Headers */
.page-header {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--primary-gold) 100%
  );
  color: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.page-header h1 {
  margin: 0;
  font-weight: 700;
  font-size: 2rem;
}

.page-header p {
  margin: 0.5rem 0 0 0;
  opacity: 0.9;
}

/* Action Bar */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 1rem;
}

.search-box {
  max-width: 300px;
  position: relative;
  width: 100%;
}

.search-box input {
  padding-right: 2.5rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
}

.search-box i {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
}

/* Status Badges */
.status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
}

.status-active {
  background: #d1fae5;
  color: #065f46;
}
.status-inactive {
  background: #fee2e2;
  color: #991b1b;
}
.status-pending {
  background: #fef3c7;
  color: #92400e;
}

/* Role Badges */
.role-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.role-admin {
  background: linear-gradient(135deg, var(--primary-gold), #f59e0b);
  color: white;
}
.role-user {
  background: var(--gray-100);
  color: var(--gray-700);
}

/* Action Buttons Grid */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-action {
  padding: 0.5rem;
  border: none;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

.btn-edit {
  background: #dbeafe;
  color: #1e40af;
}
.btn-edit:hover {
  background: #bfdbfe;
  color: #1e3a8a;
  transform: translateY(-1px);
}

.btn-view {
  background: #e0e7ff;
  color: #3730a3;
}
.btn-view:hover {
  background: #c7d2fe;
  color: #312e81;
  transform: translateY(-1px);
}

.btn-delete {
  background: #fee2e2;
  color: #dc2626;
}
.btn-delete:hover {
  background: #fecaca;
  color: #b91c1c;
  transform: translateY(-1px);
}

.btn-password {
  background: #fef3c7;
  color: #d97706;
}
.btn-password:hover {
  background: #fed7aa;
  color: #c2410c;
  transform: translateY(-1px);
}

.btn-confirm {
  background: #dcfce7;
  color: #16a34a;
}
.btn-confirm:hover {
  background: #bbf7d0;
  color: #15803d;
  transform: translateY(-1px);
}

/* Dashboard Specifics */
.modern-dashboard {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 1400px) {
  .modern-dashboard {
    padding: 0 2rem;
  }
}

@media (min-width: 1920px) {
  .modern-dashboard {
    max-width: 1800px;
  }
}

.dashboard-header {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.dashboard-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  background: white;
  padding: 8px;
  object-fit: contain;
}

@media (min-width: 992px) {
  .dashboard-logo {
    width: 100px;
    height: 100px;
  }
}

.dashboard-title {
  font-size: 1.75rem;
  font-weight: 700;
}

@media (min-width: 992px) {
  .dashboard-title {
    font-size: 2.25rem;
  }
}

.dashboard-subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  opacity: 0.9;
}

@media (min-width: 992px) {
  .dashboard-subtitle {
    font-size: 1.5rem;
  }
}

.dashboard-description {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 0;
}

.dashboard-date {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  backdrop-filter: blur(10px);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-200);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-gold));
}

.quick-actions {
  margin-bottom: 2rem;
}

.quick-actions .row {
  justify-content: center;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  height: 100%;
  min-height: 180px;
}

.quick-action-card h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--gray-800);
}

.quick-action-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 0;
}

.quick-action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-blue);
  color: inherit;
}

.quick-action-card:hover h5 {
  color: var(--primary-blue);
}

.action-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  color: white;
}

@media (min-width: 1200px) {
  .action-icon {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }

  .quick-action-card {
    padding: 2rem;
    min-height: 200px;
  }

  .quick-action-card h5 {
    font-size: 1.1rem;
  }
}
.action-icon.bg-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
}
.action-icon.bg-success {
  background: linear-gradient(135deg, var(--success), #059669);
}
.action-icon.bg-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
}
.action-icon.bg-info {
  background: linear-gradient(135deg, var(--info), #1d4ed8);
}

/* Stat Cards */
.stat-card {
  padding: 1.5rem;
  height: 100%;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.stat-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--gray-800);
}
.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}
.stat-icon.primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
}
.stat-icon.success {
  background: linear-gradient(135deg, var(--success), #059669);
}
.stat-icon.warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
}
.stat-icon.info {
  background: linear-gradient(135deg, var(--info), #1d4ed8);
}
.stat-icon.danger {
  background: linear-gradient(135deg, var(--error), #dc2626);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 0;
}

.stat-footer {
  border-top: 1px solid var(--gray-100);
  padding-top: 0.75rem;
}

/* Financial Cards */
.financial-card {
  padding: 1.5rem;
  height: 100%;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.financial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.financial-card.success {
  border-right: 4px solid var(--success);
}

.financial-card.danger {
  border-right: 4px solid var(--error);
}

.financial-card.primary {
  border-right: 4px solid var(--primary-blue);
}

.financial-card.warning {
  border-right: 4px solid var(--warning);
}

.financial-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.financial-header h5 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0;
}

.financial-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.financial-card.success .financial-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.financial-card.danger .financial-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.financial-card.primary .financial-icon {
  background: rgba(30, 64, 175, 0.1);
  color: var(--primary-blue);
}

.financial-card.warning .financial-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.financial-amount {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.financial-amount .currency {
  font-size: 1rem;
  color: var(--gray-500);
  margin-left: 0.25rem;
}

.financial-footer {
  border-top: 1px solid var(--gray-100);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 1200px) {
  .financial-amount {
    font-size: 2rem;
  }

  .financial-card {
    padding: 2rem;
  }
}

/* Footer */
.modern-footer {
  background: linear-gradient(
    135deg,
    var(--primary-blue) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
}

/* Pagination */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0 1rem;
}
.pagination {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}
.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: var(--radius);
  background: white;
  color: var(--gray-700);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--gray-200);
}
.page-link:hover {
  background: var(--gray-50);
  color: var(--primary-blue);
  transform: translateY(-1px);
}
.page-item.active .page-link {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}
.page-item.disabled .page-link {
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: not-allowed;
  transform: none;
}

/* ============================
   Dashboard Notifications
   ============================ */
.notifications-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.notifications-list {
  max-height: 500px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  transition: all 0.2s ease;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: var(--gray-50);
}

.notification-item.unread {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
  border-right: 3px solid var(--info);
}

.notification-icon {
  width: 45px;
  height: 45px;
  min-width: 45px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

.notification-icon.bg-success { background: linear-gradient(135deg, #10b981, #34d399); }
.notification-icon.bg-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.notification-icon.bg-info { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.notification-icon.bg-primary { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.notification-icon.bg-secondary { background: linear-gradient(135deg, #6b7280, #9ca3af); }
.notification-icon.bg-danger { background: linear-gradient(135deg, #ef4444, #f87171); }

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.notification-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.notification-time {
  font-size: 0.75rem;
  color: var(--gray-500);
  white-space: nowrap;
}

.notification-message {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin: 0 0 0.5rem 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-action {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--info);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.notification-action:hover {
  color: var(--primary-blue);
  text-decoration: underline;
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.notification-user {
  display: flex;
  align-items: center;
}

.notification-type {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
}

.empty-notifications {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--gray-500);
}

.empty-notifications i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-notifications p {
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .notification-item {
    padding: 0.875rem 1rem;
  }

  .notification-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    font-size: 1rem;
  }

  .notification-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .notification-time {
    order: -1;
  }

  .notification-meta {
    flex-wrap: wrap;
  }
}

/* ============================
   Sidebar Styles
   ============================ */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
  z-index: 1100;
  transition: transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

/* Hide sidebar by default on mobile */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(100%);
    visibility: hidden;
    opacity: 0;
  }

  .sidebar.active {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
  }
}

/* Desktop - show sidebar */
@media (min-width: 992px) {
  .sidebar {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
  }
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.75rem;
}

.sidebar-logo {
  width: 45px;
  height: 45px;
  border-radius: var(--radius);
  background: white;
  padding: 4px;
  object-fit: contain;
}

.sidebar-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.sidebar-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-nav {
  padding: 1rem 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-item {
  margin: 0.25rem 0.75rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.85rem 1rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  gap: 0.75rem;
  font-weight: 500;
  font-size: 0.95rem;
}

.sidebar-link i:first-child {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateX(-3px);
}

.sidebar-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sidebar-link .submenu-arrow {
  margin-right: auto;
  transition: transform 0.3s ease;
  font-size: 0.8rem;
}

.sidebar-link[aria-expanded="true"] .submenu-arrow {
  transform: rotate(180deg);
}

.sidebar-submenu {
  list-style: none;
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 0;
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  padding: 0.65rem 1rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.sidebar-sublink i {
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
}

.sidebar-sublink:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.sidebar-sublink.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 500;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1rem 1.5rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1090;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Main Wrapper with Sidebar */
.main-wrapper {
  margin-right: 280px;
  min-height: 100vh;
  transition: margin 0.3s ease;
}

/* Authenticated User Navbar */
.authenticated-nav {
  gap: 0.5rem;
}

.authenticated-nav .nav-link {
  padding: 0.5rem 0.75rem !important;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.3rem;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Responsive Sidebar - Tablet and below */
@media (max-width: 991.98px) {
  .main-wrapper {
    margin-right: 0 !important;
  }

  .sidebar-close {
    display: flex !important;
  }

  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Make navbar brand smaller on mobile */
  .main-wrapper .navbar-brand {
    font-size: 0.85rem;
  }

  .main-wrapper .navbar-logo {
    height: 32px;
    width: 32px;
    margin-left: 8px;
  }

  /* Authenticated nav adjustments for mobile */
  .authenticated-nav {
    gap: 0.25rem;
  }

  .authenticated-nav .nav-link {
    padding: 0.4rem 0.5rem !important;
  }

  .authenticated-nav .bi-bell,
  .authenticated-nav .bi-person-circle {
    font-size: 1.2rem !important;
  }

  /* Notification dropdown mobile */
  .notification-dropdown {
    width: 280px !important;
    max-width: calc(100vw - 20px);
  }
}

/* Extra small devices (phones) */
@media (max-width: 575.98px) {
  .sidebar {
    width: 100%;
    max-width: 300px;
  }

  .sidebar-header {
    padding: 1rem;
  }

  .sidebar-logo {
    width: 40px;
    height: 40px;
  }

  .sidebar-title {
    font-size: 1.25rem;
  }

  .sidebar-link {
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
  }

  .sidebar-sublink {
    padding: 0.6rem 0.875rem;
    font-size: 0.85rem;
  }
}

/* ============================
   Settings Page Styles
   ============================ */
.settings-container {
  max-width: 1200px;
  margin: 0 auto;
}

.settings-header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.settings-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.settings-header p {
  margin: 0.5rem 0 0;
  opacity: 0.9;
}

.settings-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--gray-200);
}

.settings-card-header {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.settings-card-header i {
  font-size: 1.5rem;
  color: var(--primary-blue);
}

.settings-card-header h5 {
  margin: 0;
  font-weight: 600;
  color: var(--gray-800);
}

.settings-card-body {
  padding: 1.5rem;
}

.setting-group {
  margin-bottom: 1.5rem;
}

.setting-group:last-child {
  margin-bottom: 0;
}

.setting-label {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.setting-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: white;
}

.setting-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.setting-input:disabled {
  background: var(--gray-100);
  cursor: not-allowed;
}

.setting-hint {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.setting-hint i {
  font-size: 0.9rem;
}

.settings-actions {
  display: flex;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 1.5rem;
}

.btn-save-settings {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
  color: white;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-save-settings:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-cancel-settings {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-cancel-settings:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

/* Settings Info Card */
.settings-info-card {
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
}

.settings-info-card h6 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 0.75rem;
}

.settings-info-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--gray-300);
  font-size: 0.9rem;
}

.settings-info-item:last-child {
  border-bottom: none;
}

.settings-info-item span:first-child {
  color: var(--gray-600);
}

.settings-info-item span:last-child {
  font-weight: 600;
  color: var(--gray-800);
}

/* ============================
   Mobile Responsive Improvements
   ============================ */
@media (max-width: 767.98px) {
  /* Main content padding */
  .main-content {
    padding: 1rem;
  }

  .container-fluid {
    padding: 0.75rem;
  }

  /* Dashboard header mobile */
  .dashboard-header {
    padding: 1.25rem;
    text-align: center;
  }

  .dashboard-header .row {
    flex-direction: column;
  }

  .dashboard-header .d-flex {
    flex-direction: column;
    text-align: center;
  }

  .dashboard-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
  }

  .dashboard-title {
    font-size: 1.5rem;
  }

  .dashboard-subtitle {
    font-size: 1.1rem;
  }

  .dashboard-description {
    font-size: 0.9rem;
    margin-top: 0.5rem;
  }

  .dashboard-date {
    margin-top: 1rem;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  /* Quick actions mobile - 2 columns */
  .quick-actions .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .quick-action-card {
    padding: 1rem;
    min-height: 150px;
  }

  .quick-action-card h5 {
    font-size: 0.85rem;
  }

  .quick-action-card p {
    font-size: 0.75rem;
    display: none;
  }

  .action-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  /* Stats cards mobile */
  .stat-card {
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-icon {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  /* Section titles mobile */
  .section-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  /* Financial cards mobile */
  .financial-card {
    padding: 1rem;
  }

  .financial-amount {
    font-size: 1.5rem;
  }

  .financial-header h5 {
    font-size: 0.85rem;
  }

  .financial-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  /* Navbar mobile adjustments */
  .modern-navbar .navbar-brand span {
    font-size: 0.9rem;
  }

  .navbar-logo {
    height: 35px;
    width: 35px;
    margin-left: 8px;
  }

  /* User dropdown mobile */
  .user-info {
    display: none !important;
  }

  .user-dropdown {
    padding: 0.3rem 0.5rem !important;
  }

  /* Fix dropdown menus on mobile */
  .modern-navbar .dropdown-menu {
    min-width: 220px !important;
    max-width: calc(100vw - 30px) !important;
    border-radius: var(--radius-lg) !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25) !important;
    background: white !important;
    border: 1px solid var(--gray-200) !important;
  }

  /* RTL fix - dropdown should appear on the left in RTL */
  .modern-navbar .dropdown-menu-end {
    --bs-position: end;
    right: auto !important;
    left: 0 !important;
  }

  .modern-navbar .dropdown-item {
    color: var(--gray-700) !important;
    padding: 0.875rem 1.25rem !important;
    font-size: 0.95rem !important;
    border-bottom: 1px solid var(--gray-100);
  }

  .modern-navbar .dropdown-item:last-child {
    border-bottom: none;
  }

  .modern-navbar .dropdown-item:hover,
  .modern-navbar .dropdown-item:active {
    background: var(--gray-50) !important;
    color: var(--primary-blue) !important;
  }

  .modern-navbar .dropdown-item i {
    color: var(--gray-500) !important;
  }

  .modern-navbar .dropdown-header {
    padding: 0.875rem 1.25rem !important;
    background: var(--gray-50) !important;
    border-bottom: 1px solid var(--gray-200) !important;
    font-size: 0.85rem;
  }

  /* Notification dropdown mobile specific */
  .notification-dropdown {
    width: 300px !important;
    max-width: calc(100vw - 30px) !important;
    max-height: 60vh !important;
  }

  .notification-item {
    padding: 0.875rem 1rem !important;
  }

  /* Footer mobile */
  .modern-footer {
    padding: 1.5rem 0;
    font-size: 0.85rem;
  }

  .modern-footer .row {
    text-align: center;
  }

  .modern-footer .col-md-6 {
    margin-bottom: 0.5rem;
  }

  .footer-links a {
    display: block;
    margin: 0.25rem 0;
  }
}

/* Extra small devices */
@media (max-width: 575.98px) {
  /* Even smaller adjustments */
  .dashboard-header {
    padding: 1rem;
  }

  .dashboard-logo {
    width: 60px;
    height: 60px;
  }

  .dashboard-title {
    font-size: 1.25rem;
  }

  .dashboard-subtitle {
    font-size: 1rem;
  }

  /* Single column for quick actions on very small screens */
  .quick-actions .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0.25rem;
  }

  .quick-action-card {
    padding: 0.75rem;
    min-height: 130px;
  }

  .quick-action-card h5 {
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .action-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  /* Stats mobile */
  .stat-number {
    font-size: 1.5rem;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  /* Financial cards */
  .financial-amount {
    font-size: 1.25rem;
  }
}

/* Prevent body scroll when sidebar is open */
body.sidebar-open {
  overflow: hidden;
}

/* Z-index fix for overlay */
.sidebar-overlay {
  z-index: 1095;
}

.sidebar {
  z-index: 1100;
}

/* Mobile dropdown backdrop */
.dropdown-backdrop-mobile {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.dropdown-backdrop-mobile.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.dropdown-open {
  overflow: hidden;
}

/* Ensure dropdowns appear above the backdrop */
body.dropdown-open .modern-navbar .dropdown-menu.show {
  z-index: 1070 !important;
}

/* Ensure dropdown is above backdrop */
.modern-navbar .dropdown-menu {
  z-index: 1060 !important;
  pointer-events: auto !important;
}

.modern-navbar .dropdown-menu * {
  pointer-events: auto !important;
}

.modern-navbar .dropdown-menu .dropdown-item {
  position: relative;
  z-index: 1061 !important;
  cursor: pointer !important;
}

/* Authenticated nav dropdown positioning - RTL aware */
.authenticated-nav {
  position: relative;
}

.authenticated-nav .dropdown {
  position: static;
}

.authenticated-nav .dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  margin-top: 0.5rem !important;
}

/* In RTL, dropdown-menu-end means left aligned */
[dir="rtl"] .authenticated-nav .dropdown-menu-end,
html[dir="rtl"] .authenticated-nav .dropdown-menu-end {
  right: auto !important;
  left: 0 !important;
}

@media (max-width: 767.98px) {
  .authenticated-nav .dropdown-menu {
    min-width: 200px !important;
    pointer-events: auto !important;
  }

  .authenticated-nav .dropdown-menu .dropdown-item {
    padding: 12px 16px !important;
    touch-action: manipulation !important;
  }

  .authenticated-nav .dropdown-menu .dropdown-item:active {
    background-color: var(--primary-light) !important;
  }

  /* Ensure all interactive elements in dropdown work on mobile */
  .authenticated-nav .dropdown-menu a,
  .authenticated-nav .dropdown-menu button,
  .authenticated-nav .dropdown-menu .btn {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
  }

  /* Notification dropdown specific */
  .notification-dropdown {
    pointer-events: auto !important;
  }

  .notification-dropdown .dropdown-footer a,
  .notification-dropdown .dropdown-header button {
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }
}
