html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Fixed navbar styles */
.navbar.fixed-top {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

.main-header.navbar.fixed-top {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

/* Ensure content doesn't hide behind fixed navbar */
.content-wrapper {
  margin-top: 0;
}

/* Additional spacing for AdminLTE layouts */
body.hold-transition .content-wrapper {
  margin-top: 0;
}

/* Ensure dropdowns appear above other content */
.navbar .dropdown-menu {
  z-index: 1050;
}

/* Sidebar logout button positioning */
.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh; /* Full viewport height */
}

.sidebar .nav-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.sidebar .nav-sidebar > ul {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
}

.sidebar .nav-item[style*="margin-top: auto"] {
  background-color: rgba(0,0,0,0.1);
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: auto !important;
  margin-bottom: 0 !important;
}

.sidebar .nav-item[style*="margin-top: auto"] button:hover {
  background-color: rgba(0,0,0,0.2) !important;
}

/* Ensure the sidebar takes full height */
.main-sidebar {
  height: 100vh !important;
}

/* Profile dropdown styling */
.dropdown-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.dropdown-item.text-danger:hover {
  background-color: #f8d7da;
  color: #721c24 !important;
}

/* Logout loading styles */
.logout-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.logout-loading .logout-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: logout-spin 1s ease-in-out infinite;
  margin-right: 8px;
}

.logout-loading .logout-text {
  display: inline-block;
}

@keyframes logout-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Loading overlay for logout */
.logout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.logout-overlay.show {
  opacity: 1;
  visibility: visible;
}

.logout-overlay-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logout-overlay-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: logout-spin 1s linear infinite;
  margin: 0 auto 15px;
}

.logout-overlay-text {
  color: #333;
  font-size: 16px;
  font-weight: 500;
}