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 {
  background: #f5f7fb;
  color: #1f2937;
  font-family: "Inter", "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.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;
}

/* Sidebar Layout Structure */
.site-wrapper {
  display: flex;
  flex: 1;
  gap: 0;
}

.site-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 250px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 20px rgba(15, 23, 42, 0.12);
}

.site-sidebar::-webkit-scrollbar {
  width: 6px;
}

.site-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.site-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.site-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Sidebar Header */
.site-sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 800;
  color: #fff !important;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.site-brand:hover {
  opacity: 0.85;
}

.site-brand-badge {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 0.8rem;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.35);
  flex-shrink: 0;
}

.btn-close-sidebar {
  display: none;
  background: rgba(255, 255, 255, 0.15) !important;
  border: none;
}

.btn-close-sidebar:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

/* Sidebar Navigation */
.site-sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.site-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-nav-item {
  list-style: none;
}

.site-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem !important;
  border-radius: 0.8rem;
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s ease;
  font-size: 0.95rem;
}

.site-nav-link:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
  padding-left: 1.2rem !important;
}

.site-nav-link.active {
  color: #fff !important;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
  padding-left: 1.2rem !important;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  font-size: 1.1rem;
}

.nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Footer */
.site-sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
}

.site-user-section {
  padding: 0 0.25rem;
}

.site-user-pill {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-logout-btn {
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border-radius: 0.7rem;
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.site-logout-btn:hover {
  background: #ef4444 !important;
  color: #fff !important;
  border-color: #ef4444 !important;
}

.site-footer-credit {
  padding: 0.75rem 0.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content Area */
.site-main {
  margin-left: 250px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-mobile-header {
  display: none;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #e5e7eb;
  gap: 0.75rem;
}

.site-content {
  flex: 1;
  padding: 2rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Footer */
footer.footer {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #e5e7eb;
  padding: 0.5rem 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
}

.site-footer-content {
  max-width: 1400px;
  margin: 0 auto;
}

/* Components */
.container {
  max-width: 100%;
  padding: 0;
}

.table,
.card,
.alert {
  border-radius: 1rem;
}

.card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.table {
  background: rgba(255, 255, 255, 0.98);
}

.table th {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 2px solid #e2e8f0;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .site-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .site-sidebar.show {
    transform: translateX(0);
  }

  .site-main {
    margin-left: 0;
  }

  .site-mobile-header {
    display: flex;
  }

  .site-content {
    padding: 1.5rem 1rem;
  }

  .btn-close-sidebar {
    display: block !important;
  }
}

@media (max-width: 575.98px) {
  .site-sidebar {
    width: 280px;
  }

  .site-content {
    padding: 1rem;
  }

  .site-brand-badge {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.7rem;
  }

  .site-nav-link {
    padding: 0.75rem 0.85rem !important;
    font-size: 0.9rem;
  }

  .nav-icon {
    font-size: 1rem;
  }
}
