:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  --danger-gradient: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%);
  --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.05), 0 6px 6px rgba(0, 0, 0, 0.05);
  --input-focus-shadow: 0 0 0 3px rgba(118, 75, 162, 0.2);
}

body {
  background-color: #f8f9fa;
  font-family: "Inter", sans-serif;
}

.card-modern {
  border: none;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  background: #fff;
  margin-bottom: 2rem;
  transition: transform 0.3s ease;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f2f5;
  color: #2d3748;
  font-weight: 800;
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-control,
.form-select {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  transition: all 0.2s;
  background-color: #fdfdfd;
}

.form-control:focus {
  border-color: #764ba2;
  box-shadow: var(--input-focus-shadow);
}

/* --- Enhanced Select2 UI --- */
.select2-container--default .select2-selection--single {
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  background-color: #fdfdfd !important;
}

.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: #4a5568 !important;
  font-size: 0.9rem !important;
}

.select2-container--default .select2-dropdown {
  border: none !important;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
  border-radius: 12px !important;
  padding: 5px !important;
}

.select2-results__option--highlighted[aria-selected] {
  background: var(--primary-gradient) !important;
  border-radius: 8px !important;
  color: white !important;
}

.btn-primary-common {
  background: var(--primary-gradient);
  border: none;
  color: white;
  transition: all 0.3s ease;
}

.btn-primary-common:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
  color: white;
}

.required-asterisk {
  color: #e53e3e;
  margin-left: 3px;
}

/* --- Sticky Sidebar Nav --- */
.sticky-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 100px;
  z-index: 1020;
}

.nav-pills-custom .nav-link {
  color: #4a5568;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.nav-pills-custom .nav-link i {
  margin-right: 12px;
  font-size: 1.1rem;
  color: #a0aec0;
  transition: all 0.3s ease;
}

.nav-pills-custom .nav-link:hover {
  background: #f7fafc;
  color: #2d3748;
  transform: translateX(5px);
}

.nav-pills-custom .nav-link.active {
  background: #fff;
  color: #667eea;
  border-color: #e2e8f0;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #667eea;
}

.nav-pills-custom .nav-link.active i {
  color: #667eea;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Profile Widget Styles */
.profile-widget-container {
  position: relative;
  padding: 10px;
}

.profile-avatar-wrapper {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto;
  cursor: pointer;
  position: relative;
  border: 4px solid #fff;
  box-shadow:
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.profile-avatar-wrapper:hover {
  transform: scale(1.02);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.profile-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.profile-avatar-wrapper:hover img {
  transform: scale(1.1);
}

.profile-avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-avatar-wrapper:hover .profile-avatar-overlay {
  opacity: 1;
}

.edit-profile-btn {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 3px solid #fff;
}

.edit-profile-btn:hover {
  transform: scale(1.1);
  background-color: #0d6efd !important;
}

/* Modal Icons */
.bg-blue-light {
  background-color: rgba(13, 110, 253, 0.1);
}

.bg-purple-light {
  background-color: rgba(111, 66, 193, 0.1);
}

.text-purple {
  color: #6f42c1;
}
