.page-transition {
  transition: all 0.3s ease;
}
.hidden-page {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  position: absolute;
  width: 100%;
}
.active-page {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.card-hover {
  transition: all 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.spinner {
  animation: spin 1s linear infinite;
}

/* Button loading spinner */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  border: 3px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btn-loading-spinner 1s linear infinite;
}

@keyframes btn-loading-spinner {
  from {
    transform: rotate(0turn);
  }
  to {
    transform: rotate(1turn);
  }
}


/* Toast Notification */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 350px;
}

.toast {
  position: relative;
  padding: 15px 20px;
  margin-bottom: 10px;
  border-radius: 8px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.success {
  background-color: #10b981;
}

.toast.error {
  background-color: #ef4444;
}

.toast.warning {
  background-color: #f59e0b;
}

.toast.info {
  background-color: #3b82f6;
}

.toast-icon {
  margin-right: 12px;
  font-size: 20px;
}

.toast-close {
  margin-left: 12px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.toast-close:hover {
  opacity: 1;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background-color: white;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 1;
  border-radius: 0.5rem;
  overflow: hidden;
}
.dropdown-menu.show {
  display: block;
}

/* Sidebar transitions */
.sidebar {
  transition: width 0.3s ease;
}

/* Tooltip for collapsed menu items */
.sidebar a[title] {
  position: relative;
}

.sidebar a[title]:hover::after {
  content: attr(title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
  padding: 5px 10px;
  background: #fff;
  color: #333;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar:not(.w-64) {
    width: 4rem;
  }
  
  .sidebar.w-64 {
    width: 16rem;
  }
}