/* General Body & Typography */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Tajawal', sans-serif;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  color: #333;
  margin-bottom: 60px;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}

/* Enhanced Focus States */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(26, 26, 26, 0.15);
}

/* Header & Navbar */
.navbar-brand {
  letter-spacing: 1px;
  font-weight: 700;
}

.navbar .nav-link {
  font-weight: 500;
  color: #333;
  transition: all 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #1a1a1a;
  transform: translateY(-1px);
}

.dropdown-menu {
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
}

/* Enhanced Card Styling */
.card {
  border-radius: 15px;
  border: none;
  background-color: #ffffff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 700;
  padding: 1.25rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Enhanced Button Styling */
.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #1a1a1a 0%, #495057 100%);
  border-color: #1a1a1a;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(26, 26, 26, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #495057 0%, #1a1a1a 100%);
  border-color: #495057;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 26, 26, 0.3);
  color: #ffffff;
}

.btn-secondary {
  background: #ffffff;
  border-color: #1a1a1a;
  color: #1a1a1a;
  box-shadow: 0 2px 10px rgba(26, 26, 26, 0.1);
}

.btn-secondary:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 26, 26, 0.2);
}

/* Enhanced Table Styling */
.table {
  border-radius: 12px;
  overflow: hidden;
}

.table thead th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: none;
  font-weight: 700;
  color: #1a1a1a;
  padding: 1rem;
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background: rgba(26, 26, 26, 0.02);
  transform: scale(1.01);
}

.table tbody td {
  padding: 1rem;
  border-color: rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

/* Enhanced List Group Styling */
.list-group-item {
  border: none;
  border-radius: 8px !important;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
  padding: 1rem 1.25rem;
}

.list-group-item:hover {
  background: rgba(26, 26, 26, 0.02);
  transform: translateX(-5px);
}

.list-group-item-action:hover {
  background: rgba(26, 26, 26, 0.05);
}

/* Enhanced Badge Styling */
.badge {
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

/* Enhanced Alert Styling */
.alert {
  border-radius: 12px;
  border: none;
  padding: 1rem 1.5rem;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.alert-success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
}

.alert-info {
  background: linear-gradient(135deg, #d1ecf1, #bee5eb);
  color: #0c5460;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #856404;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
}

/* Enhanced Footer Styling */
footer.bg-light {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #1a1a1a;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-social .list-inline-item a {
  background: #ffffff;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #1a1a1a !important;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.footer-social .list-inline-item a:hover {
  background: #1a1a1a;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(26, 26, 26, 0.2);
}

footer .fw-bold,
footer h5 {
  font-family: 'Tajawal', sans-serif;
  color: #1a1a1a;
}

footer a {
  color: #1a1a1a !important;
  opacity: 0.8;
  transition: all 0.3s ease;
  text-decoration: none;
}

footer a:hover {
  color: #495057 !important;
  opacity: 1;
  transform: translateX(-3px);
}

/* Enhanced Hover Effects */
.hover-shadow {
  transition: all 0.3s ease;
}

.hover-shadow:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
  transform: translateY(-5px);
}

/* Enhanced Form Controls */
.form-control {
  border-radius: 12px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  background: #ffffff;
}

.form-control:focus {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 0.2rem rgba(26, 26, 26, 0.15);
  background: #ffffff;
}

.form-select {
  border-radius: 12px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  background: #ffffff;
}

.form-select:focus {
  border-color: #1a1a1a;
  box-shadow: 0 0 0 0.2rem rgba(26, 26, 26, 0.15);
  background: #ffffff;
}

/* Enhanced Navigation Tabs */
.nav-tabs .nav-link {
  border: none;
  border-radius: 12px 12px 0 0;
  color: #6c757d;
  font-weight: 600;
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
}

.nav-tabs .nav-link:hover {
  color: #1a1a1a;
  background: rgba(26, 26, 26, 0.05);
  border: none;
}

.nav-tabs .nav-link.active {
  color: #1a1a1a;
  background: #ffffff;
  border: none;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
  .card {
    border-radius: 12px;
  }

  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }

  .table-responsive {
    border-radius: 12px;
    overflow: hidden;
  }

  .list-group-item {
    padding: 0.75rem 1rem;
  }
}

/* Enhanced Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #1a1a1a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #1a1a1a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #495057;
}