/* AdminLTE-style Layout */
:root {
  --primary-color: #1e3a8a;
  --sidebar-width: 250px;
  --sidebar-bg: #1e40af;
  --sidebar-hover: #3b82f6;
  --content-bg: #eff6ff;
  --border-color: #bfdbfe;
}

body {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--content-bg);
  margin: 0;
  padding: 0;
}

/* Main Wrapper */
.wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.main-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--sidebar-bg);
  color: #c2c7d0;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

/* Force all children to respect container width */
.main-sidebar * {
  box-sizing: border-box;
  max-width: 100%;
}

/* Ensure all sidebar text is white */
.main-sidebar {
  color: #ffffff;
}

.main-sidebar a {
  color: #ffffff;
}

.main-sidebar a:hover {
  color: #ffffff;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  padding: 0.8125rem 1rem;
  font-size: 1.25rem;
  font-weight: 300;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #495057;
}

.sidebar-brand:hover {
  color: #fff;
  text-decoration: none;
}

.brand-text {
  margin-left: 0.5rem;
  font-weight: 600;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Navigation Menu */
.nav-sidebar {
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-sidebar * {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.nav-item {
  margin: 0;
}

.nav-link {
  display: flex;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  color: #ffffff;
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  min-height: auto;
}

/* Override site.css sidebar nav-link color with higher specificity */
.main-sidebar .nav-link {
  color: #ffffff !important;
}

.main-sidebar .sidebar .nav-link {
  color: #ffffff !important;
}

.nav-link:hover {
  background-color: var(--sidebar-hover);
  color: #fff;
  text-decoration: none;
}

/* Override hover states with higher specificity */
.main-sidebar .nav-link:hover {
  color: #ffffff !important;
  background-color: var(--sidebar-hover);
}

.main-sidebar .sidebar .nav-link:hover {
  color: #ffffff !important;
  background-color: var(--sidebar-hover);
}

.nav-link.active {
  background-color: var(--primary-color);
  color: #fff;
  border-left-color: #fff;
}

/* Override active state with higher specificity */
.main-sidebar .nav-link.active {
  color: #ffffff !important;
  background-color: var(--primary-color);
  border-left-color: #fff;
}

.main-sidebar .sidebar .nav-link.active {
  color: #ffffff !important;
  background-color: var(--primary-color);
  border-left-color: #fff;
}

.nav-icon {
  width: 1.5rem;
  margin-right: 0.5rem;
  text-align: center;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.nav-text {
  flex: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.2;
  min-width: 0;
}

/* Override Bootstrap text-muted in sidebar */
.main-sidebar .text-muted {
  color: #ffffff !important;
  opacity: 0.8;
}

.main-sidebar .nav-link.text-muted {
  color: #ffffff !important;
  font-weight: 600;
}

/* User Panel */
.user-panel {
  padding: 1rem;
  border-bottom: 1px solid #495057;
  margin-bottom: 1rem;
}

.user-image {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.info {
  color: #fff;
  font-weight: 600;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Content Wrapper */
.content-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background-color: var(--content-bg);
  transition: all 0.3s ease;
  flex: 1;
}

/* Main Header */
.main-header {
  background-color: #dbeafe;
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 999;
}

.navbar {
  padding: 0.5rem 1rem;
  background-color: #dbeafe !important;
  border: none;
}

.navbar-nav .nav-link {
  color: #495057;
  padding: 0.5rem 1rem;
  border-left: none;
}

.navbar-nav .nav-link:hover {
  background-color: #bfdbfe;
  color: var(--primary-color);
}

/* Content Header */
.content-header {
  padding: 1rem;
  background-color: #dbeafe;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.content-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 400;
  color: #495057;
}

/* Main Content */
.content {
  padding: 0 1rem 1rem 1rem;
}

/* Cards */
.card {
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
  border: none;
  border-radius: 0.25rem;
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid rgba(0,0,0,.125);
  padding: 0.75rem 1.25rem;
  position: relative;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 400;
  margin: 0;
}

/* Buttons */
.btn {
  border-radius: 0.25rem;
  font-weight: 400;
  transition: all 0.15s ease-in-out;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin: 0;
  font-size: 0.875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-sidebar {
    transform: translateX(-100%);
  }
  
  .main-sidebar.sidebar-open {
    transform: translateX(0);
  }
  
  .content-wrapper {
    margin-left: 0;
  }
  
  .sidebar-toggle {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .sidebar-toggle {
    display: block !important;
  }
  
  /* Simple sidebar hide */
  .main-sidebar.sidebar-hidden {
    margin-left: -250px;
  }
  
  .content-wrapper.sidebar-hidden {
    margin-left: 0;
  }
}

/* Sidebar Toggle Button */
.sidebar-toggle {
  background: none;
  border: none;
  color: #495057;
  font-size: 1.25rem;
  padding: 0.5rem;
  margin-right: 0.5rem;
}

.sidebar-toggle:hover {
  color: var(--primary-color);
}

/* sidebarToggle button styles (from site.css) */
#sidebarToggle {
  background-color: #0d6efd;
  border: 2px solid #0d6efd;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 38px;
}

#sidebarToggle:hover {
  background-color: #0b5ed7;
  border-color: #0b5ed7;
  color: white;
  transform: scale(1.05);
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

#sidebarToggle:focus,
#sidebarToggle:active {
  background-color: #0b5ed7;
  border-color: #0b5ed7;
  color: white;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Font Awesome icon styles */
#sidebarToggle i {
  font-size: 1.1rem;
  line-height: 1;
}

/* Custom Scrollbar for Sidebar */
.main-sidebar::-webkit-scrollbar {
  width: 6px;
}

.main-sidebar::-webkit-scrollbar-track {
  background: var(--sidebar-bg);
}

.main-sidebar::-webkit-scrollbar-thumb {
  background: #6c757d;
  border-radius: 3px;
}

.main-sidebar::-webkit-scrollbar-thumb:hover {
  background: #adb5bd;
}

/* Info Box Styles */
.info-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 0.25rem;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
  margin-bottom: 1rem;
  min-height: 80px;
  padding: 0.5rem;
}

.info-box-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 0.25rem;
  font-size: 1.875rem;
  text-align: center;
}

.info-box-content {
  flex: 1;
  padding: 0 0.75rem;
}

.info-box-text {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.875rem;
  color: #6c757d;
  margin: 0;
}

.info-box-number {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0;
}

/* Alert Styles */
.alert {
  border: none;
  border-radius: 0.25rem;
  padding: 0.75rem 1.25rem;
}

.alert-success {
  background-color: #d1ecf1;
  color: #0c5460;
}

.alert-info {
  background-color: #cce7ff;
  color: #004085;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

/* Progress Bar */
.progress {
  height: 1rem;
  border-radius: 0.25rem;
  background-color: #e9ecef;
}

.progress-bar {
  border-radius: 0.25rem;
  transition: width 0.6s ease;
}

/* Form Controls */
.form-control {
  border-radius: 0.25rem;
  border: 1px solid #ced4da;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Dropdown Menu */
.dropdown-menu {
  border: 1px solid rgba(0,0,0,.15);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
  border-radius: 0.375rem;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
}