/* css/style.css */
:root {
  --primary-color: #1a365d; /* Elegant dark blue */
  --secondary-color: #38b2ac; /* Modern teal */
  --success-color: #38a169; /* Professional green */
  --success-light-color: #68d391; /* Light green */
  --warning-color: #f6ad55; /* Warm orange */
  --danger-color: #e53e3e; /* Professional red */
  --info-color: #4299e1; /* Modern blue */
  --dark-color: #1a202c; /* Deep dark */
  --light-color: #f7fafc; /* Soft light */
  --sidebar-bg: linear-gradient(180deg, #1a365d, #1a202c); /* Gradient sidebar */
  --header-bg: linear-gradient(90deg, #1a365d, #2c5282); /* Header gradient */
  --card-bg: #ffffff;
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --border-color: #e2e8f0;
  --hover-color: #ebf8ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 270px;
  background: linear-gradient(180deg, #1a365d, #2c5282); /* Match header background */
  color: white;
  transition: all 0.3s ease;
  z-index: 1000; /* Mengurangi z-index agar tidak menutupi konten */
  box-shadow: 3px 0 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  padding-top: 0;
}

.sidebar-header {
  flex-shrink: 0;
  background: inherit; /* Use same background as parent sidebar */
  padding: 18px 25px; /* Match main header padding */
  min-height: 66px; /* Same height as main header */
  border-bottom: 2px solid rgba(255, 255, 255, 0.2); /* Light border for separation */
  color: white; /* White text for contrast */
}

.sidebar-brand {
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  padding: 18px 25px; /* Match main header padding */
  min-height: 66px; /* Same height as main header */
  border-bottom: 2px solid rgba(255, 255, 255, 0.2); /* Light border for separation */
  background: inherit; /* Use same background as parent sidebar */
  color: white; /* White text for contrast */
}

.sidebar-brand i {
  margin-right: 12px;
  font-size: 1.5rem;
  color: white; /* White color for contrast on dark background */
}

/* Ensure text/logo colors are appropriate for new background */
.sidebar-header h5,
.sidebar-brand h5 {
  color: white;
}

.sidebar-header .fas,
.sidebar-header i {
  color: white;
}

/* Ensure logo image is visible and styled properly */
.sidebar-brand img,
.sidebar-header img {
  height: 30px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
}

/* Ensure text/logo contrast in sidebar-header */
.sidebar-header img,
.sidebar-header .fas,
.sidebar-header i {
  color: white !important; /* White color for contrast on dark background */
}

/* Ensure text contrast in sidebar-brand with new background */
.sidebar-brand,
.sidebar-brand h5,
.sidebar-brand .fas,
.sidebar-brand i {
  color: white !important; /* White color for contrast on dark background */
}

/* Ensure logo brightness on dark background */
.sidebar-brand img {
  filter: brightness(1.5); /* Increase brightness for visibility on dark background */
}

.sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Menyembunyikan overflow di kontainer utama */
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
  max-height: calc(100vh - 150px); /* Mengakomodasi tinggi brand dan user info */
}

/* Hide scrollbar while keeping functionality */
.sidebar-menu::-webkit-scrollbar {
  width: 0px; /* Lebar scrollbar di Chrome/Safari/Edge */
}

.sidebar-menu::-webkit-scrollbar-track {
  background: transparent; /* Warna track scrollbar */
}

.sidebar-menu::-webkit-scrollbar-thumb {
  background: transparent; /* Warna thumb scrollbar */
}

/* Untuk Firefox */
.sidebar-menu {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.sidebar-brand {
  position: sticky;
  top: 0;
  z-index: 999;
  background: linear-gradient(180deg, #1a365d, #2c5282); /* Warna latar yang sama dengan sidebar */
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

/* Desktop sidebar minimized behavior */
@media (min-width: 992px) {
  .sidebar.minimized {
    width: 80px;
  }

  .sidebar.minimized .nav-link span,
  .sidebar.minimized .sidebar-user .user-info {
    display: none;
  }
}

.sidebar .nav-link {
  color: rgba(255, 255, 255, 0.8);
  padding: 15px 15px;
  margin: 5px 1px;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateX(3px);
  border-left: 3px solid var(--secondary-color);
}

/* Responsive sidebar behavior */
/* Mobile sidebar behavior - EXTREME OVERRIDE */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(0) !important;
    visibility: visible !important;
    position: fixed !important;
    z-index: 99999 !important; /* EXTREME Z-INDEX */
    height: 100vh !important;
    top: 0 !important;
    left: 0 !important;
    box-shadow: 3px 0 20px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important; /* ENSURE CLICKABILITY */
  }

  .main-content {
    margin-left: 0 !important;
  }

  /* Show sidebar when show-mobile class is added */
  .sidebar.show-mobile {
    transform: translateX(0) !important;
    visibility: visible !important;
    display: block !important;
    z-index: 99999 !important; /* EXTREME Z-INDEX */
    pointer-events: auto !important; /* ENSURE CLICKABILITY */
  }

  .sidebar.show-mobile::after {
    content: none !important; /* REMOVE POTENTIAL OVERLAY */
  }
}

/* Mobile sidebar specific styles for all layouts - ACTIVATED */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 80%;
  max-width: 280px;
  height: 100vh;
  background: linear-gradient(180deg, #1a365d, #2c5282);
  color: white;
  z-index: -1000;
  overflow-y: auto;
  box-shadow: 3px 0 15px rgba(0,0,0,0.3);
  display: none;
  opacity: 0;
  transition: all 0.3s ease;
}

.mobile-sidebar.active {
  display: block;
  opacity: 1;
  z-index: 1050;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: -1000;
  display: none;
  opacity: 0;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
  z-index: 1049;
}

/* EXTREME OVERRIDE FOR SIDEBAR VISIBILITY */
.sidebar {
  z-index: 99999 !important; /* EXTREME Z-INDEX */
  pointer-events: auto !important; /* ENSURE CLICKABILITY */
}

.sidebar.show-mobile {
  z-index: 99999 !important; /* EXTREME Z-INDEX */
  transform: translateX(0) !important;
  left: 0 !important;
  pointer-events: auto !important; /* ENSURE CLICKABILITY */
}

/* ENSURE NO OTHER ELEMENTS BLOCK SIDEBAR */
.main-content {
  position: relative !important;
  z-index: 9000 !important; /* LOWER THAN SIDEBAR */
}

.header {
  position: relative !important;
  z-index: 9001 !important; /* LOWER THAN SIDEBAR */
}

/* REMOVE ANY POTENTIAL OVERLAYS */
.sidebar::after,
.sidebar::before {
  display: none !important;
}

.sidebar .nav-link i {
  margin-right: 12px;
  width: 24px;
  text-align: center;
  font-size: 1.1rem;
}

.sidebar-brand {
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  padding: 18px 25px; /* Match main header padding */
  min-height: 66px; /* Same height as main header */
  border-bottom: 2px solid rgba(255, 255, 255, 0.2); /* Light border for separation */
  background: inherit; /* Use same background as parent sidebar */
  color: white; /* White text for contrast */
}

.sidebar-brand i {
  margin-right: 12px;
  font-size: 1.5rem;
}

.sidebar-user {
  padding: 0; /* Karena pembungkus sudah memberikan padding */
  text-align: center;
  background: rgba(0, 0, 0, 0.1);
  text-align: left;
}

.navbar-toggle {
  background: rgba(255, 255, 255, 0.2) !important;
  border: none;
  color: white !important;
  font-size: 1.6rem;
  cursor: pointer;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.navbar-toggle:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.05);
}

/* Sidebar header text styling to match main header */
.sidebar-header h5,
.sidebar-header i,
.sidebar-header .navbar-toggle i {
  color: white !important;
}

/* Sidebar toggle button when background matches header */
.sidebar-header .navbar-toggle {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

.sidebar-header .navbar-toggle:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  color: white !important;
}

.sidebar-user {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.1);
}

.sidebar-user img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.sidebar-user img:hover {
  transform: scale(1.05);
}

.sidebar-user .user-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.sidebar-user small.text-muted {
  color: rgba(255, 255, 255, 0.9) !important; /* Meningkatkan kontras teks role */
}

.sidebar-user .user-role {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.main-content {
  margin-left: 270px;
  transition: margin-left 0.3s ease;
  padding: 25px;
  min-height: calc(100vh - 60px);
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
  position: relative;
  z-index: 1001; /* Menaikkan z-index agar lebih tinggi dari sidebar */
  overflow-x: hidden; /* Prevent any horizontal overflow issues */
}

/* Ensure main content header is not covered by sidebar */
.main-content .header {
  position: relative !important;
  z-index: 1002;
  margin-left: 0;
}

/* Add padding to ensure dashboard content appears below sidebar header */
.content {
  padding-top: 80px; /* Membuat ruang untuk header sidebar */
}

/* Fix modal backdrop issues */
.modal-backdrop {
  z-index: 1050 !important; /* Mengatur z-index backdrop modal */
}

.modal {
  z-index: 1051 !important; /* Memastikan modal berada di atas backdrop */
}

/* Ensure proper modal behavior */
.modal-open {
  padding-right: 0 !important; /* Mencegah shift halaman saat modal terbuka */
}

/* Fix modal z-index issues */
.modal {
  z-index: 1051 !important;
}

.modal-backdrop {
  z-index: 1050 !important;
  opacity: 0.5 !important;
}

/* Specific fix for modal backdrop - ensuring proper layering */
.modal-backdrop {
  z-index: 1040 !important; /* Lower than main content to prevent blocking */
}

.modal {
  z-index: 1050 !important; /* Higher than backdrop */
}

/* Specific rule to hide lingering backdrops in certain cases */
.modal-backdrop.fade:not(.show) {
  opacity: 0;
  display: none;
}

/* Make sure backdrop doesn't interfere with page when it should be gone */
.modal-backdrop {
  opacity: 0.5 !important;
}

/* Make sure content areas have higher z-index to prevent blocking */
.main-content {
  position: relative;
  z-index: 1055 !important;
}

.header {
  position: relative;
  z-index: 1056 !important;
}

/* Make sure sidebar has proper z-index */
.sidebar {
  z-index: 1000 !important;
}

/* Responsive main content - override on mobile */
@media (max-width: 991.98px) {
  .main-content {
    margin-left: 0 !important;
    padding: 20px 15px;
  }
}

.main-content.full-width {
  margin-left: 80px;
}

/* Responsive main content behavior */
@media (max-width: 991.98px) {
  .main-content {
    margin-left: 0 !important;
  }

  .main-content.full-width {
    margin-left: 0 !important;
  }
}

.header {
  background: var(--sidebar-bg);
  padding: 18px 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 0;
  border-radius: 0;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 66px; /* Same height as sidebar header */
  border-bottom: 2px solid var(--primary-color); /* Added bottom border to match sidebar */
  position: relative;
  z-index: 1049; /* Sedikit di bawah sidebar untuk mencegah tumpang tindih */
}

.header h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.header .page-title {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.header .dropdown-toggle {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header .dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  transform: translateY(-2px);
}

/* Add spacing between header and content */
.content {
  padding-top: 30px;
}

/* Ensure dropdown menu is aligned to the right */
.header .dropdown {
  margin-left: 15px;
}

/* Ensure user dropdown maintains right alignment in all viewports */
.header > div:last-child {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0; /* Prevent right div from shrinking */
}

/* Ensure left div stays on the left */
.header > div:first-child {
  display: flex;
  align-items: center;
  flex: 1; /* Allow to grow but stay in position */
}

/* Ensure right div stays on the right */
.header > div:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0; /* Don't shrink */
}

/* Ensure toggle button and page title are properly aligned */
.header > div:first-child .navbar-toggle {
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 45px; /* Match the height of page title */
  width: 45px; /* Make it square for consistent size */
}

/* Hide toggle button in non-responsive mode (large screens) */
@media (min-width: 992px) {
  .header .navbar-toggle.d-lg-none {
    display: none !important;
  }
}

.header > div:first-child .page-title {
  margin: 0;
  display: flex;
  align-items: center;
  line-height: 1.5;
  min-height: 45px; /* Match the height of toggle button */
  flex: 1; /* Allow it to grow and fill available space */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; /* Show ellipsis for long text */
}

/* Ensure both toggle and title align properly */
.header > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px; /* Consistent spacing between toggle and title */
  flex: 1; /* Allow it to fill available space */
}

/* Ensure page title takes remaining space */
.header > div:first-child > .page-title {
  flex: 1; /* Take up all available space */
  min-width: 0; /* Allow it to shrink if needed */
}

/* Special alignment for admin header with different structure */
.header > div:first-child h3,
.header > div:first-child h4 {
  margin: 0;
  display: flex;
  align-items: center;
  line-height: 1.5;
  min-height: 45px; /* Match toggle button height */
}

/* Ensure consistent height for header elements */
.header > div:first-child h3,
.header > div:first-child h4,
.header > div:first-child .page-title {
  min-height: 45px;
  display: flex;
  align-items: center;
}

/* Ensure consistent vertical alignment for all header elements */
.header .navbar-toggle,
.header .page-title,
.header .dropdown-toggle {
  display: flex;
  align-items: center;
  height: auto;
  min-height: 38px; /* Ensure consistent height for alignment */
}

/* Ensure dropdown container is properly aligned */
.header .dropdown {
  display: flex;
  align-items: center;
  height: 100%; /* Match the height of the header */
}

/* Ensure dropdown button has appropriate width in mobile */
.header .dropdown .btn {
  min-width: auto;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Force dropdown alignment to the right */
.header .dropdown {
  margin-left: auto !important;
}

/* Ensure dropdown stays in right container */
.header > div:last-child .dropdown {
  margin-left: auto;
}

/* Ensure user icon stays properly positioned */
.header .dropdown .dropdown-toggle i {
  margin-right: 0.25rem;
  display: flex;
  align-items: center;
}

/* Ensure the user icon is always visible */
.header .dropdown .dropdown-toggle {
  gap: 0.25rem;
  display: flex;
  align-items: center;
}

/* Specific styling for user icon */
.header .dropdown .dropdown-toggle > i {
  flex-shrink: 0;
}

/* Ensure dropdown menu is properly positioned */
.header .dropdown-menu {
  right: 0;
  left: auto;
}

/* Responsive spacing for mobile */
@media (max-width: 768px) {
  .content {
    padding-top: 20px;
  }

  .header {
    padding: 15px;
  }

  .header > div:first-child {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0; /* Allow shrinking */
    gap: 10px; /* Adjust gap for medium screens */
  }

  .header > div:first-child .navbar-toggle {
    height: 42px;
    width: 42px;
  }

  .header > div:first-child .page-title {
    min-height: 42px; /* Match toggle height */
    flex: 1; /* Allow title to take remaining space */
    min-width: 0; /* Allow it to shrink if needed */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header h3,
  .header .page-title {
    font-size: 1.1rem;
  }
}

/* Extra small mobile layout - maintain flex direction */
@media (max-width: 576px) {
  .header {
    padding: 12px 10px;
  }

  .header > div:first-child {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 8px; /* Smaller gap on small screens */
  }

  .header > div:first-child .navbar-toggle {
    height: 40px;
    width: 40px;
  }

  .header > div:first-child .page-title {
    min-height: 40px; /* Match toggle height */
    flex: 1; /* Allow title to take remaining space */
    min-width: 0; /* Allow it to shrink if needed */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header h3 {
    font-size: 1.1rem;
  }

  .header .page-title {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.navbar-toggle {
  background: rgba(255, 255, 255, 0.2) !important;
  border: none;
  color: white !important;
  font-size: 1.6rem;
  cursor: pointer;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.navbar-toggle:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.05);
}

/* Sidebar header text styling to match main header */
.sidebar-header h5,
.sidebar-header i,
.sidebar-header .navbar-toggle i {
  color: white !important;
}

/* Sidebar toggle button when background matches header */
.sidebar-header .navbar-toggle {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

.sidebar-header .navbar-toggle:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  color: white !important;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 600;
  color: white;
  margin: 0;
}

.card {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  margin-bottom: 25px;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--card-bg);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.card-header {
  background: linear-gradient(90deg, var(--primary-color), #2c5282);
  color: white;
  border: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 18px 25px;
  border-radius: 12px 12px 0 0 !important;
}

.btn {
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #2c5282);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2c5282, var(--primary-color));
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger-color), #c53030);
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #c53030, var(--danger-color));
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #2f855a);
  border: none;
}

.btn-success:hover {
  background: linear-gradient(135deg, #2f855a, var(--success-color));
}

.btn-warning {
  background: linear-gradient(135deg, var(--warning-color), #dd6b20);
  border: none;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #dd6b20, var(--warning-color));
}

.btn-info {
  background: linear-gradient(135deg, var(--info-color), #3182ce);
  border: none;
}

.btn-info:hover {
  background: linear-gradient(135deg, #3182ce, var(--info-color));
}

.alert {
  border-radius: 10px;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  padding: 15px 20px;
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.table th {
  background: linear-gradient(180deg, #f8fafc, #edf2f7);
  color: var(--text-primary);
  font-weight: 600;
  padding: 16px 20px;
  border: none;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.table td {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  vertical-align: middle;
}

.table tr:hover {
  background-color: var(--hover-color);
}

.modal-content {
  border-radius: 15px;
  border: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  background: var(--header-bg);
  color: white;
  border: none;
  padding: 20px 25px;
}

.modal-title {
  font-weight: 600;
  font-size: 1.3rem;
}

.modal-footer {
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  padding: 15px 25px;
}

.form-control, .form-select {
  border-radius: 8px;
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.25rem rgba(56, 178, 172, 0.2);
  outline: none;
}

.form-control:disabled, .form-select:disabled {
  background-color: #edf2f7;
  cursor: not-allowed;
}

.form-label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Password visibility toggle */
.password-container {
  position: relative;
}

.password-toggle {
  background: none;
  border: none;
  color: #718096;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  transition: all 0.15s ease-in-out;
  z-index: 5;
}

.password-toggle:hover {
  color: var(--primary-color);
  background-color: #e2e8f0;
}

/* Specific fix for password toggle alignment */
.input-group .password-toggle {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  border-start-end-radius: var(--bs-border-radius);
  border-end-end-radius: var(--bs-border-radius);
}

/* Utility Classes */
.text-success-light {
  color: var(--success-light-color);
}

.bg-success-light {
  background-color: rgba(104, 211, 145, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    width: 80px;
    z-index: 1050;
  }

  .main-content {
    margin-left: 80px;
    padding: 15px;
  }

  .header {
    padding: 15px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .page-title {
    font-size: 1.3rem;
  }

  .infographic-container,
  .dashboard-cards-container {
    grid-template-columns: 1fr !important;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Toggle Button Styles - No longer used, toggle button is now in sidebar */

/* Activity Toggle Cards */
.activity-card {
  border-radius: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  overflow: hidden;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  background: white;
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
}

.activity-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--danger-color);
  color: white;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* Dashboard Card Styles */
.dashboard-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin: 25px 0;
}

.dashboard-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 25px 20px;
  text-align: center;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border-left: 4px solid var(--primary-color);
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.dashboard-card-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  font-size: 1.5rem;
  background: rgba(26, 54, 93, 0.1);
  color: var(--primary-color);
}

.dashboard-card-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 5px 0;
  color: var(--primary-color);
  line-height: 1.2;
}

.dashboard-card-label {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 5px;
}

/* Card-specific color variants */
.dashboard-card-primary {
  border-left-color: var(--primary-color);
}

.dashboard-card-success {
  border-left-color: var(--success-color);
}

.dashboard-card-warning {
  border-left-color: var(--warning-color);
}

.dashboard-card-info {
  border-left-color: var(--info-color);
}

.dashboard-card-danger {
  border-left-color: var(--danger-color);
}

.dashboard-card-secondary {
  border-left-color: var(--secondary-color);
}

.dashboard-card-primary .dashboard-card-icon {
  background: rgba(26, 54, 93, 0.1) !important;
  color: var(--primary-color) !important;
}

.dashboard-card-success .dashboard-card-icon {
  background: rgba(56, 161, 105, 0.1) !important;
  color: var(--success-color) !important;
}

.dashboard-card-warning .dashboard-card-icon {
  background: rgba(246, 173, 85, 0.1) !important;
  color: var(--warning-color) !important;
}

.dashboard-card-info .dashboard-card-icon {
  background: rgba(66, 153, 225, 0.1) !important;
  color: var(--info-color) !important;
}

.dashboard-card-danger .dashboard-card-icon {
  background: rgba(229, 62, 62, 0.1) !important;
  color: var(--danger-color) !important;
}

.dashboard-card-secondary .dashboard-card-icon {
  background: rgba(56, 178, 172, 0.1) !important;
  color: var(--secondary-color) !important;
}

/* Info Cards Legacy Support */
.info-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.info-number {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 10px 0;
  color: var(--primary-color);
  line-height: 1.2;
}

.info-label {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Footer */
.footer {
  background: white;
  padding: 20px 25px;
  text-align: center;
  margin-top: 30px;
  border-top: 1px solid var(--border-color);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

/* Progress bars */
.progress {
  border-radius: 10px;
  height: 12px;
  overflow: visible;
  background: #edf2f7;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  position: relative;
  overflow: visible;
  border-radius: 10px;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: -2px;
  right: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

/* Badge styles */
.badge {
  border-radius: 20px;
  padding: 6px 12px;
  font-weight: 500;
  font-size: 0.85rem;
}

/* Button icon */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-icon:hover {
  transform: scale(1.1);
}

/* Dropdown */
.dropdown-menu {
  border-radius: 10px;
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
}

.dropdown-item {
  padding: 10px 20px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--hover-color);
  color: var(--primary-color);
}

/* Dashboard welcome message styling */
.alert.alert-info {
  margin-top: 20px;
  border-left: 4px solid var(--info-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.alert-heading {
  margin-bottom: 10px;
}

/* Sidebar close button with animation */
.sidebar-close-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  background: transparent !important;
  border: none;
  padding: 5px;
  transition: all 0.3s ease;
  animation: pulseAndColor 4s infinite;
}

.sidebar-close-btn:hover {
  transform: translateY(-50%) scale(1.2);
  color: white;
}

@keyframes pulse {
  0% {
    transform: translateY(-50%) scale(1);
  }
  50% {
    transform: translateY(-50%) scale(1.1);
  }
  100% {
    transform: translateY(-50%) scale(1);
  }
}

@keyframes pulseAndColor {
  0% {
    transform: translateY(-50%) scale(1);
    color: white;
  }
  25% {
    transform: translateY(-50%) scale(1.1);
    color: #cccccc; /* Light gray */
  }
  50% {
    transform: translateY(-50%) scale(1);
    color: #bbbbbb; /* Medium gray */
  }
  75% {
    transform: translateY(-50%) scale(1.1);
    color: #dddddd; /* Lighter gray */
  }
  100% {
    transform: translateY(-50%) scale(1);
    color: white;
  }
}