/* Basic sidebar toggle functionality */
body.navbar-collapsed .navbar-vertical {
  width: 4rem !important;
  min-width: 4rem !important;
}

body.navbar-collapsed .navbar-vertical .navbar-brand {
  justify-content: center !important;
}

body.navbar-collapsed .navbar-vertical .navbar-brand-image {
  width: 1.5rem !important;
  height: auto !important;
}

body.navbar-collapsed .navbar-vertical .navbar-brand-text {
  display: none !important;
}

body.navbar-collapsed .navbar-vertical .nav-link-label,
body.navbar-collapsed .navbar-vertical .nav-link-title,
body.navbar-collapsed .navbar-vertical .dropdown-menu-arrow {
  display: none !important;
}

body.navbar-collapsed .navbar-vertical .nav-link-icon {
  margin-right: 0 !important;
}

body.navbar-collapsed .navbar-vertical .nav-link {
  justify-content: center !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

body.navbar-collapsed .navbar-vertical .navbar-nav .nav-item .dropdown-menu {
  display: none !important;
}

body.navbar-collapsed .navbar-vertical .navbar-nav .nav-item:hover .dropdown-menu {
  display: block !important;
  position: absolute !important;
  left: 4rem !important;
  top: 0 !important;
  padding: 0.5rem !important;
  min-width: 12rem !important;
}

body.navbar-collapsed .navbar-vertical .navbar-nav .nav-item {
  position: relative !important;
}

body.navbar-collapsed .page-wrapper {
  margin-left: 4rem !important;
}

body.navbar-collapsed .navbar-vertical .mt-auto {
  display: none !important;
}

/* ==========================================================================
   MODERN SIDEBAR NAVIGATION
   A sleek, contemporary sidebar design
   ========================================================================== */

/* Navbar vertical base styles - Modern dark theme */
.navbar-vertical {
  width: 17rem !important;
  min-width: 17rem !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: none !important;
}

/* Override Tabler's sidebar border - match sidebar background */
.page aside.navbar.navbar-vertical.navbar-expand-lg {
  border-right: 1px solid #0f172a !important;
}

aside.navbar.navbar-vertical {
  border-right: 1px solid #0f172a !important;
}

/* Subtle pattern overlay for depth - positioned to avoid edge artifacts */
.navbar-vertical::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 1px;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  border-right: none !important;
}

.navbar-vertical > * {
  position: relative;
  z-index: 1;
}

.page-wrapper {
  margin-left: 17rem !important;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border-left: none !important;
}

/* Sidebar navigation links - Modern styling */
.navbar-vertical .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.7) !important;
  padding: 0.625rem 1rem !important;
  margin: 0.125rem 0.75rem !important;
  border-radius: 0.5rem !important;
  font-weight: 450 !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.01em !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}

/* Hover glow effect */
.navbar-vertical .navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 0.5rem;
  z-index: -1;
}

.navbar-vertical .navbar-nav .nav-link:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  transform: translateX(4px);
}

.navbar-vertical .navbar-nav .nav-link:hover::before {
  opacity: 1;
}

/* Active state - prominent indicator */
.navbar-vertical .navbar-nav .nav-link.active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%) !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Active indicator bar */
.navbar-vertical .navbar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60%;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

/* Sidebar dropdown menus */
.navbar-vertical .dropdown-menu {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0.75rem !important;
  min-width: 16rem !important;
  max-width: 16rem !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 1px rgba(255, 255, 255, 0.1) !important;
  padding: 0.5rem !important;
  backdrop-filter: blur(10px);
}

.navbar-vertical .dropdown-menu .dropdown-item {
  color: rgba(255, 255, 255, 0.75) !important;
  padding: 0.5rem 0.875rem !important;
  border-radius: 0.375rem !important;
  font-size: 0.8125rem !important;
  font-weight: 450 !important;
  transition: all 0.15s ease !important;
}

.navbar-vertical .dropdown-menu .dropdown-item:hover {
  color: #fff !important;
  background: rgba(59, 130, 246, 0.15) !important;
  transform: translateX(4px);
}

.navbar-vertical .dropdown-menu .dropdown-item.active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%) !important;
}

.navbar-vertical .dropdown-menu .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.08) !important;
  margin: 0.5rem 0 !important;
}

/* Sidebar icons - Modern styling */
.navbar-vertical .nav-link-icon {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 1.125rem !important;
  width: 1.5rem !important;
  margin-right: 0.75rem !important;
  transition: all 0.2s ease !important;
}

.navbar-vertical .dropdown-item-icon {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 1rem !important;
  width: 1.25rem !important;
  margin-right: 0.625rem !important;
  transition: all 0.2s ease !important;
}

.navbar-vertical .nav-link:hover .nav-link-icon,
.navbar-vertical .dropdown-item:hover .dropdown-item-icon {
  color: rgba(255, 255, 255, 0.95) !important;
  transform: scale(1.1);
}

.navbar-vertical .nav-link.active .nav-link-icon {
  color: #60a5fa !important;
  filter: drop-shadow(0 0 4px rgba(96, 165, 250, 0.5));
}

/* Nav items container */
.navbar-vertical .nav-item {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 !important;
}

/* Section dividers in sidebar */
.navbar-vertical .navbar-nav .nav-link-title {
  font-weight: 500 !important;
}

/* Collapsed sidebar styles */
body.navbar-collapsed .navbar-vertical {
  width: 4.5rem !important;
  min-width: 4.5rem !important;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%) !important;
}

body.navbar-collapsed .page-wrapper {
  margin-left: 4.5rem !important;
}

body.navbar-collapsed .navbar-vertical .nav-link {
  padding: 0.75rem !important;
  margin: 0.25rem 0.5rem !important;
  justify-content: center !important;
}

body.navbar-collapsed .navbar-vertical .nav-link-icon {
  margin-right: 0 !important;
  font-size: 1.25rem !important;
}

/* Tooltip for collapsed sidebar */
body.navbar-collapsed .navbar-vertical .nav-item:hover::after {
  content: attr(data-title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: #1e293b;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  margin-left: 0.5rem;
  z-index: 1000;
}

/* Override theme-specific styles for consistency */
html:not(.theme-dark) .navbar-vertical .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.7) !important;
}

html:not(.theme-dark) .navbar-vertical .navbar-nav .nav-link:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}

html:not(.theme-dark) .navbar-vertical .navbar-nav .nav-link.active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%) !important;
}

html:not(.theme-dark) .navbar-vertical .dropdown-menu {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html:not(.theme-dark) .navbar-vertical .dropdown-menu .dropdown-item {
  color: rgba(255, 255, 255, 0.75) !important;
}

html:not(.theme-dark) .navbar-vertical .dropdown-menu .dropdown-item:hover {
  color: #fff !important;
  background: rgba(59, 130, 246, 0.15) !important;
}

html:not(.theme-dark) .navbar-vertical .dropdown-menu .dropdown-item.active {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%) !important;
}

html:not(.theme-dark) .navbar-vertical .dropdown-menu .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html:not(.theme-dark) .navbar-vertical .dropdown-menu .dropdown-item-icon {
  color: rgba(255, 255, 255, 0.5) !important;
}

html:not(.theme-dark) .navbar-vertical .dropdown-menu .status-dot {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html:not(.theme-dark) .navbar-vertical .dropdown-menu .badge {
  color: inherit !important;
}

/* DARK THEME STYLES */
html.theme-dark .navbar-vertical {
  background: linear-gradient(180deg, #030712 0%, #111827 100%) !important;
  border-right: none !important;
}

html.theme-dark .navbar-vertical .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.7) !important;
}

html.theme-dark .navbar-vertical .navbar-nav .nav-link:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

html.theme-dark .navbar-vertical .navbar-nav .nav-link.active {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
}

html.theme-dark .navbar-vertical .dropdown-menu {
  background-color: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

html.theme-dark .navbar-vertical .dropdown-menu .dropdown-item {
  color: rgba(255, 255, 255, 0.7) !important;
}

html.theme-dark .navbar-vertical .dropdown-menu .dropdown-item:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

html.theme-dark .navbar-vertical .dropdown-menu .dropdown-item.active {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
}

html.theme-dark .navbar-vertical .dropdown-menu .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.theme-dark .navbar-vertical .dropdown-menu .dropdown-item-icon {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Mobile responsiveness */
@media (max-width: 991.98px) {
  .navbar-vertical {
      left: -18rem !important;
      position: fixed !important;
      z-index: 1030 !important;
      top: 0 !important;
      bottom: 0 !important;
  }
  
  .navbar-vertical.show {
      left: 0 !important;
  }
  
  .page-wrapper {
      margin-left: 0 !important;
  }
  
  body.navbar-collapsed .page-wrapper {
      margin-left: 0 !important;
  }
}

/* Header navbar styling */
.navbar-expand-md .navbar-nav {
  margin-left: auto;
}

/* Progress bar width classes */
.progress-width-0 { width: 0%; }
.progress-width-5 { width: 5%; }
.progress-width-10 { width: 10%; }
.progress-width-15 { width: 15%; }
.progress-width-20 { width: 20%; }
.progress-width-25 { width: 25%; }
.progress-width-30 { width: 30%; }
.progress-width-35 { width: 35%; }
.progress-width-40 { width: 40%; }
.progress-width-45 { width: 45%; }
.progress-width-50 { width: 50%; }
.progress-width-55 { width: 55%; }
.progress-width-60 { width: 60%; }
.progress-width-65 { width: 65%; }
.progress-width-70 { width: 70%; }
.progress-width-75 { width: 75%; }
.progress-width-80 { width: 80%; }
.progress-width-85 { width: 85%; }
.progress-width-90 { width: 90%; }
.progress-width-95 { width: 95%; }
.progress-width-100 { width: 100%; }

/* Child status colors - used in tables */
.child-normal { background-color: transparent; }
.child-approaching-max { background-color: transparent; }
.child-over-soft-max { background-color: transparent; }
.child-over-hard-max { background-color: transparent; }
.child-under-min-age { background-color: transparent; }

/* Child status text colors */
.child-over-hard-max .status-text,
.child-over-soft-max .status-text {
  color: var(--tblr-danger) !important; /* Both use danger (red) */
}
.child-approaching-max .status-text {
  color: var(--tblr-warning) !important;
}
.child-under-min-age .status-text {
  color: var(--tblr-info) !important;
}

/* Child status avatar colors */
.child-over-hard-max .status-avatar,
.child-over-soft-max .status-avatar {
  background-color: var(--tblr-danger-lt) !important; /* Both use danger (red) */
  color: var(--tblr-danger) !important;
}
.child-approaching-max .status-avatar {
  background-color: var(--tblr-warning-lt) !important;
  color: var(--tblr-warning) !important;
}
.child-under-min-age .status-avatar {
  background-color: var(--tblr-info-lt) !important;
  color: var(--tblr-info) !important;
}

/* Add subtle left border for visual indication without filling row */
.child-over-hard-max,
.child-over-soft-max {
  border-left: 3px solid var(--tblr-danger); /* Both use danger (red) */
}
.child-approaching-max {
  border-left: 3px solid var(--tblr-warning);
}
.child-under-min-age {
  border-left: 3px solid var(--tblr-info);
}

/* Improved card styling */
.card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Animated progress bars */
@keyframes progress-bar-stripes {
  from { background-position: 1rem 0; }
  to { background-position: 0 0; }
}

.progress-bar-animated {
  animation: progress-bar-stripes 1s linear infinite;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-size: 1rem 1rem;
}

/* Classroom status indicators */
.table-danger {
  background-color: var(--tblr-danger-lt);
}

/* Classroom status indicators (continued) */
.table-warning {
  background-color: var(--tblr-warning-lt);
}

/* Dashboard card enhancements */
.dashboard-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.dashboard-card .card-body {
  flex: 1;
}

/* Waitlist priority indicators */
.priority-high {
  border-left: 4px solid var(--tblr-danger);
}

.priority-medium {
  border-left: 4px solid var(--tblr-warning);
}

.priority-low {
  border-left: 4px solid var(--tblr-info);
}

/* Status indicators */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.pulse {
  box-shadow: 0 0 0 rgba(52, 211, 153, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* Status indicator animation */
.status-dot-animated {
  animation: status-pulsate 2s infinite ease-in-out;
}

@keyframes status-pulsate {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Progress bar colors */
.progress-bar.bg-azure {
  background-color: var(--tblr-azure) !important;
}

.progress-bar.bg-success {
  background-color: var(--tblr-success) !important;
}

.progress-bar.bg-danger {
  background-color: var(--tblr-danger) !important;
}

/* Logo handling with balanced padding top and bottom */
.navbar-brand {
  position: relative;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 1rem 1rem !important; /* Equal padding top and bottom */
}

.navbar-brand-image {
  display: none; /* Hide all logos by default */
  max-width: 100%;
  height: auto;
}

/* Show only the appropriate logo based on current state */
/* Light theme, expanded sidebar */
html:not(.theme-dark) body:not(.navbar-collapsed) .expanded-logo.light-logo {
  display: block;
  height: 36px; /* Slightly smaller to accommodate equal padding */
  width: auto;
  margin: 8px 0; /* Equal margin top and bottom */
}

/* Dark theme, expanded sidebar */
html.theme-dark body:not(.navbar-collapsed) .expanded-logo.dark-logo {
  display: block;
  height: 36px; /* Slightly smaller to accommodate equal padding */
  width: auto;
  margin: 8px 0; /* Equal margin top and bottom */
}

/* Light theme, collapsed sidebar */
html:not(.theme-dark) body.navbar-collapsed .collapsed-logo.light-logo {
  display: block;
  height: 26px;
  width: auto;
  margin: 8px 0; /* Equal margin top and bottom */
}

/* Dark theme, collapsed sidebar */
html.theme-dark body.navbar-collapsed .collapsed-logo.dark-logo {
  display: block;
  height: 26px;
  width: auto;
  margin: 8px 0; /* Equal margin top and bottom */
}

/* Adjust navbar brand in collapsed state */
body.navbar-collapsed .navbar-vertical .navbar-brand {
  justify-content: center !important;
  padding: 1rem 0.5rem !important; /* Equal padding top and bottom */
  height: 40px;
}

/* Override the existing rule for collapsed navbar brand image */
body.navbar-collapsed .navbar-vertical .navbar-brand-image {
  width: auto !important;
  height: 26px !important;
  max-width: 26px;
}

/* Toggle icon visibility based on sidebar state */
.toggle-icon-collapsed {
  display: none;
}

body.navbar-collapsed .toggle-icon-expanded {
  display: none;
}

body.navbar-collapsed .toggle-icon-collapsed {
  display: inline-block;
}

/* Make sidebar toggle button more visible */
#navbar-toggle {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

#navbar-toggle:hover {
  background-color: rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
}

/* Make the icons more visible */
#navbar-toggle .ti-chevrons-left,
#navbar-toggle .ti-chevrons-right {
  font-size: 1.1rem;
}

/* Page Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  transition: opacity 0.3s, visibility 0.3s;
  opacity: 1;
  visibility: visible;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.8);
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: transparent;
  color: var(--tblr-secondary);
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
}

.loader-icon {
  margin-bottom: 1rem;
}

.spinner-image {
  width: 64px;
  height: 64px;
}

.loader-text {
  font-weight: 500;
  letter-spacing: 0.5px;
  font-size: 1.2rem;
  color: var(--tblr-primary);
}

@keyframes ellipsis {
  0% { content: "."; }
  33% { content: ".."; }
  66% { content: "..."; }
}

.loader-text::after {
  content: "...";
  display: inline-block;
  width: 1.5em;
  animation: ellipsis 1.5s infinite;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Dark theme adjustments */
.theme-dark .page-loader {
  background-color: rgba(0, 0, 0, 0.7);
}

.theme-dark .loader-text {
  color: white;
}

    #quick-actions-container {
        height: 60px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .quick-actions-fab {
        position: relative;
        z-index: 1000;
        transition: all 0.3s ease;
    }
    
    .quick-actions-fab .btn {
        width: 42px;
        height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .quick-actions-fab .btn i {
        font-size: 1.25rem;
    }
    
    /* Hover effect */
    #quick-actions-container:hover .quick-actions-fab {
        transform: scale(1.1);
    }

    /* Organization and Location Context Switcher Styles */
.context-switcher {
  padding: 0 0.5rem;
}

.context-item {
  transition: all 0.2s ease;
}

.context-item:hover {
  transform: translateY(-2px);
}

.context-item .bg-dark {
  background-color: rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s ease;
}

.context-item:hover .bg-dark {
  background-color: rgba(0, 0, 0, 0.3) !important;
}

.context-info {
  line-height: 1.2;
}

.context-info .small {
  font-size: 0.7rem;
  opacity: 0.7;
}

.context-info .fw-bold {
  font-size: 0.9rem;
}

/* For collapsed sidebar */
.navbar-collapsed .context-info {
  display: none;
}

.navbar-collapsed .context-switcher {
  display: flex;
  justify-content: center;
}

.navbar-collapsed .context-item {
  margin-right: 0.25rem;
  margin-left: 0.25rem;
}

.navbar-collapsed .context-item .bg-dark {
  padding: 0.5rem !important;
}

.navbar-collapsed .dropdown {
  display: none;
}

/* Fix for dropdown menus in sidebar to extend beyond sidebar boundaries */
.sidebar-dropdown-menu {
  position: fixed !important;
  transform: translateX(0) !important;
  left: auto !important;
  right: auto !important;
  margin-left: 15px !important;
  max-width: 280px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Adjust dropdown position when sidebar is collapsed */
.navbar-collapsed .sidebar-dropdown-menu {
  margin-left: 70px !important;
}

/* Ensure dropdown is above other elements */
.dropdown-menu.show {
  z-index: 1050;
}

/* Context menu styling for sidebar */
.sidebar-context-menu {
  position: absolute !important;
  inset: 0px auto auto 0px !important;
  margin: 0px !important;
  transform: translate(var(--sidebar-width, 280px), 0px) !important;
  min-width: 240px;
  max-width: 280px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  z-index: 1050;
}

/* Adjust for collapsed sidebar */
.navbar-collapsed .sidebar-context-menu {
  transform: translate(var(--sidebar-collapsed-width, 70px), 0px) !important;
}

/* Make sure dropdown items don't get cut off */
.sidebar-context-menu .dropdown-item {
  white-space: normal;
  word-wrap: break-word;
}

/* Add a subtle animation */
.sidebar-context-menu.show {
  animation: fadeInRight 0.2s ease-out;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate(calc(var(--sidebar-width, 280px) - 20px), 0px);
  }
  to {
    opacity: 1;
    transform: translate(var(--sidebar-width, 280px), 0px);
  }
}

.navbar-collapsed .sidebar-context-menu.show {
  animation: fadeInRightCollapsed 0.2s ease-out;
}

@keyframes fadeInRightCollapsed {
  from {
    opacity: 0;
    transform: translate(calc(var(--sidebar-collapsed-width, 70px) - 20px), 0px);
  }
  to {
    opacity: 1;
    transform: translate(var(--sidebar-collapsed-width, 70px), 0px);
  }
}

/* Header organization and location switchers */
.navbar .nav-link .small {
  font-size: 0.7rem;
  opacity: 0.7;
  line-height: 1;
}

.navbar .nav-link .fw-bold {
  line-height: 1.2;
}

/* Make the dropdown items wrap properly */
.dropdown-menu .dropdown-item {
  white-space: normal;
  word-wrap: break-word;
}

/* Add a subtle hover effect to the context switchers */
.navbar .nav-item.dropdown > a.nav-link {
  transition: all 0.2s ease;
  border-radius: 4px;
}

.navbar .nav-item.dropdown > a.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Ensure dropdown menus have proper z-index */
.dropdown-menu.show {
  z-index: 1050;
}

/* Timeline styles */
.timeline-point {
    z-index: 10;
    transform: translateX(-50%);
}

.timeline-point .avatar {
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-point:hover .avatar {
    transform: scale(1.2);
}

.timeline-track {
    min-height: 40px;
}

.timeline-months {
    height: 30px;
}

/* Make popovers larger and more readable */
.popover {
    max-width: 300px;
}

.popover-body {
    padding: 12px;
}

/* Timeline position classes */
.timeline-position-0 { left: 0%; }
.timeline-position-5 { left: 5%; }
.timeline-position-10 { left: 10%; }
.timeline-position-15 { left: 15%; }
.timeline-position-20 { left: 20%; }
.timeline-position-25 { left: 25%; }
.timeline-position-30 { left: 30%; }
.timeline-position-35 { left: 35%; }
.timeline-position-40 { left: 40%; }
.timeline-position-45 { left: 45%; }
.timeline-position-50 { left: 50%; }
.timeline-position-55 { left: 55%; }
.timeline-position-60 { left: 60%; }
.timeline-position-65 { left: 65%; }
.timeline-position-70 { left: 70%; }
.timeline-position-75 { left: 75%; }
.timeline-position-80 { left: 80%; }
.timeline-position-85 { left: 85%; }
.timeline-position-90 { left: 90%; }
.timeline-position-95 { left: 95%; }
.timeline-position-100 { left: 100%; }

/* Timeline styles */
.timeline-point {
    position: absolute;
    z-index: 10;
    transform: translateX(-50%);
    top: 5px;
}

.timeline-point .avatar {
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-point:hover .avatar {
    transform: scale(1.2);
}

.timeline-track {
    min-height: 40px;
    position: relative;
}

.timeline-months {
    height: 30px;
    position: relative;
}

.timeline-month-marker {
    position: absolute;
    transform: translateX(-50%);
}

/* Make popovers larger and more readable */
.popover {
    max-width: 300px;
}

.popover-body {
    padding: 12px;
}

.badge-notification {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
}

.table-responsive .avatar[data-color],
.card-body .avatar[data-color] {
    color: white !important;
    font-weight: 500 !important;
}

/* Settings form improvements */
.settings-form .card-body {
  padding: 1.5rem !important;
}

/* Info button styling */
.btn-ghost-secondary, .info-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #6c757d;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
  flex-shrink: 0;
}

.btn-ghost-secondary:hover, .info-btn:hover {
  background-color: #f8f9fa;
  border-color: #dee2e6;
  color: #495057;
}

.btn-ghost-secondary:focus, .info-btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.25);
}

/* Form alignment fixes */
.settings-form .form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.settings-form .form-control {
  margin-bottom: 0.25rem;
}

/* Checkbox alignment - match the form-label positioning */
.settings-form .form-check.form-switch {
  padding-left: 0;
  margin-left: 0;
  display: flex;
  align-items: center;
}

.settings-form .form-check.form-switch .form-check-input {
  margin-left: 0;
  margin-right: 0.75rem;
  margin-top: 0;
  flex-shrink: 0;
}

.settings-form .form-check.form-switch .form-check-label {
  margin-bottom: 0;
  line-height: 1.5;
  color: #6c757d;
  font-size: 0.875rem;
}

/* Ensure all form elements start at the same left position */
.settings-form .mb-3 > .form-label,
.settings-form .mb-3 > .form-check {
  margin-left: 0;
  padding-left: 0;
}

/* Make sure input fields align properly */
.settings-form .form-control {
  width: 100%;
}

/* Popover styling */
.popover {
  max-width: 350px;
  font-size: 0.875rem;
}

.popover-header {
  font-weight: 600;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.popover-body {
  padding: 0.75rem;
  line-height: 1.5;
}

/* Fieldset styling */
.settings-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.settings-form fieldset legend {
  font-size: 1.125rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  padding: 0;
  border: none;
  width: auto;
}

/* Switch styling improvements */
.form-check-input:checked {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

/* Ensure proper spacing between form sections */
.settings-form .row > .col-md-6:first-child {
  padding-right: 1.5rem;
}

.settings-form .row > .col-md-6:last-child {
  padding-left: 1.5rem;
}

@media (max-width: 768px) {
  .settings-form .row > .col-md-6:first-child,
  .settings-form .row > .col-md-6:last-child {
      padding-left: 15px;
      padding-right: 15px;
  }
}

/* Card header stacked layout */
.card-header {
  display: block !important; /* Force block layout */
  padding: 1rem 1.25rem;
  background-color: #f8f9fa;
  border-bottom: 1px solid rgba(0,0,0,.125);
}

.card-header .card-title {
  display: block !important; /* Force block layout */
  margin-bottom: 0.25rem; /* Small gap between title and subtitle */
  line-height: 1.4;
  font-size: 1.25rem;
  font-weight: 500;
}

.card-header .card-subtitle {
  display: block !important; /* Force block layout */
  margin-top: 0;
  margin-bottom: 0;
  font-size: 0.875rem;
  line-height: 1.3;
  color: #6c757d !important;
}

/* Override any Bootstrap flex classes that might interfere */
.card-header:not(.d-flex):not(.d-inline-flex) {
  display: block !important;
}

/* Icon alignment in card titles */
.card-title .icon {
  vertical-align: text-top;
}

/* ==========================================================================
   MODERN UI REFINEMENTS
   Added for a cleaner, more contemporary look
   ========================================================================== */

/* Softer page background - easier on the eyes than stark white */
body {
  background-color: #f8f9fb;
}

/* Refined card styling */
.card {
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 0.625rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Cleaner card headers - remove gray background */
.card-header {
  background-color: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.25rem 1.5rem 1rem;
}

.card-body {
  padding: 1.25rem 1.5rem;
}

.card-footer {
  background-color: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1rem 1.5rem;
}

/* Refined card titles */
.card-header .card-title {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.card-header .card-subtitle {
  color: #64748b !important;
  font-size: 0.8125rem;
  font-weight: 400;
}

/* Cleaner tables */
.table {
  --tblr-table-bg: transparent;
}

.table > :not(caption) > * > * {
  padding: 0.875rem 1rem;
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

.table > thead {
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.table > thead > * > * {
  background-color: transparent;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.table > tbody > tr {
  transition: background-color 0.15s ease;
}

.table > tbody > tr:hover {
  background-color: rgba(0, 0, 0, 0.015);
}

/* Remove zebra striping for cleaner look */
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: transparent;
}

/* Better badges */
.badge {
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.35em 0.65em;
  border-radius: 0.375rem;
}

/* Softer light badges */
.bg-primary-lt, .bg-secondary-lt, .bg-success-lt, .bg-info-lt,
.bg-warning-lt, .bg-danger-lt, .bg-blue-lt, .bg-azure-lt,
.bg-indigo-lt, .bg-purple-lt, .bg-pink-lt, .bg-red-lt,
.bg-orange-lt, .bg-yellow-lt, .bg-lime-lt, .bg-green-lt,
.bg-teal-lt, .bg-cyan-lt, .bg-gray-lt {
  border-radius: 0.375rem;
}

/* Refined buttons */
.btn {
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 0.5rem;
  transition: all 0.15s ease;
}

.btn-primary {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  transform: translateY(-1px);
}

/* Cleaner form inputs */
.form-control, .form-select {
  border-radius: 0.5rem;
  border-color: #e2e8f0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--tblr-primary);
  box-shadow: 0 0 0 3px rgba(32, 107, 196, 0.1);
}

/* Better page headers */
.page-header {
  margin-bottom: 1.5rem;
}

.page-title {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1e293b;
}

/* Refined avatars */
.avatar {
  font-weight: 600;
  box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Cleaner dropdown menus */
.dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-weight: 450;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.dropdown-item.active, .dropdown-item:active {
  background-color: var(--tblr-primary);
}

/* Better progress bars */
.progress {
  border-radius: 0.5rem;
  background-color: #e9ecef;
  height: 0.5rem;
}

.progress-bar {
  border-radius: 0.5rem;
}

/* Refined alerts */
.alert {
  border-radius: 0.5rem;
  border: none;
}

/* Modal refinements */
.modal-content {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.25rem 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1rem 1.5rem;
}

/* Subtle text improvements */
.text-muted {
  color: #64748b !important;
}

/* Empty state styling */
.empty {
  padding: 3rem 1rem;
}

.empty-title {
  font-weight: 600;
  color: #1e293b;
}

.empty-subtitle {
  color: #64748b;
}

/* Better list groups */
.list-group-item {
  border-color: rgba(0, 0, 0, 0.06);
  padding: 0.875rem 1.25rem;
}

.list-group-item:first-child {
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.list-group-item:last-child {
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

/* Nav tabs refinement */
.nav-tabs {
  border-bottom: 2px solid rgba(0, 0, 0, 0.06);
}

.nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-weight: 500;
  color: #64748b;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-tabs .nav-link:hover {
  border-color: transparent;
  color: #1e293b;
}

.nav-tabs .nav-link.active {
  border-bottom-color: var(--tblr-primary);
  color: var(--tblr-primary);
  background-color: transparent;
}

/* Stat cards / KPI cards */
.card .h1, .card .h2, .card .h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Small touches for polish */
::selection {
  background-color: rgba(32, 107, 196, 0.2);
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
*:focus-visible {
  outline: 2px solid var(--tblr-primary);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   HOME PAGE STYLES
   Consolidated from home.html inline styles with modern refinements
   ========================================================================== */

/* ==========================================================================
   MODERN HOME PAGE HERO
   Premium, polished hero section design
   ========================================================================== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0fdf4 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 2rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

/* Animated gradient orbs for visual interest */
.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -20px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-5deg); }
}

/* Welcome Card - Elevated glass-morphism style */
.welcome-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 1rem;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.02),
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 16px 32px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-card:hover {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.02),
        0 8px 16px rgba(0, 0, 0, 0.06),
        0 24px 48px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.welcome-card .card-body {
    padding: 1.75rem;
}

.welcome-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.375rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #1e293b 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 0;
    font-weight: 450;
}

.organization-info {
    display: inline-flex;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    transition: all 0.2s ease;
}

.organization-info:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.1) 100%);
    transform: translateY(-1px);
}

.organization-info i {
    color: #3b82f6;
    margin-right: 0.5rem;
}

.current-time {
    font-size: 0.9375rem;
    color: #64748b;
    font-weight: 450;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   MODERN STATS BAR
   Clean, minimal stat display
   ========================================================================== */

.stats-bar {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.02),
        0 4px 12px rgba(0, 0, 0, 0.04);
}

.stat-item {
    text-align: center;
    padding: 0.75rem;
    position: relative;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 0.375rem;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.6875rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-divider {
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, #e2e8f0 20%, #e2e8f0 80%, transparent 100%);
    margin: 0 1.5rem;
}

/* Compact Weather Widget */
.weather-widget-compact {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 0.875rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.weather-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.weather-icon-compact {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.weather-temp-compact {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.weather-desc-compact {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.weather-metrics-compact {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    font-size: 0.875rem;
}

.weather-metric-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
}

.weather-metric-compact i {
    font-size: 1rem;
    color: #94a3b8;
}

.weather-recommendation-compact {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    gap: 0.75rem;
}

.weather-recommendation-compact i {
    font-size: 1.25rem;
}

.weather-recommendation-compact.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.weather-recommendation-compact.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.weather-recommendation-compact.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.weather-recommendation-compact.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* Compact Hourly Forecast */
.hourly-forecast-compact {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.hourly-item-mini {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 0.5rem;
    padding: 0.5rem 0.25rem;
    text-align: center;
    flex: 1;
    margin: 0 0.25rem;
    transition: all 0.2s ease;
}

.hourly-item-mini:first-child {
    margin-left: 0;
}

.hourly-item-mini:last-child {
    margin-right: 0;
}

.hourly-item-mini:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hourly-item-mini .hour-time {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.hourly-item-mini .hour-icon {
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 24px;
}

.hourly-item-mini .hour-icon img {
    width: 20px;
    height: 20px;
}

.hourly-item-mini .hour-temp {
    font-size: 0.75rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.125rem;
}

.hourly-item-mini .hour-rain {
    font-size: 0.65rem;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
}

.hourly-item-mini .hour-rain i {
    font-size: 0.6rem;
}

.hourly-scroll {
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.hourly-scroll::-webkit-scrollbar {
    height: 4px;
}

.hourly-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

.hourly-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

/* Birthday Display */
.birthday-widget {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.birthday-child {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 0.625rem;
    border-left: 4px solid #f59e0b;
}

.birthday-child:last-child {
    margin-bottom: 0;
}

.birthday-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.birthday-info {
    flex: 1;
}

.birthday-name {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.125rem;
}

.birthday-age {
    font-size: 0.75rem;
    color: #b45309;
}

.birthday-icon {
    font-size: 1.25rem;
    color: #f59e0b;
    margin-left: 0.5rem;
}

.birthday-classroom {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.125rem;
}

/* Stats Cards */
.stats-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
}

.stats-card.primary::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stats-card.success::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stats-card.warning::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stats-card.danger::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.stats-card.info::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.stats-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

.stats-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 160px;
    padding: 2rem 1.5rem;
    text-align: center;
}

.stats-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.stats-icon {
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem auto;
    background: #f1f5f9;
    color: #64748b;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stats-label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-sublabel {
    font-size: 0.75rem;
    color: #3b82f6;
    margin-top: 0.25rem;
    font-weight: 500;
}

.stats-row {
    display: flex;
    align-items: stretch;
}

.stats-row .col-lg-3 {
    display: flex;
}

.stats-text-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 60px;
}

/* Enhanced Weather Widget */
.weather-widget {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 0.875rem;
    padding: 0;
    height: fit-content;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.weather-widget .border-top {
    border-color: rgba(0, 0, 0, 0.04) !important;
}

/* Compact Weather Recommendation Banner */
.weather-recommendation {
    border-radius: 0.875rem;
    padding: 0;
    color: white;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    border: none;
    animation: subtle-pulse 3s ease-in-out infinite;
}

.weather-recommendation::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.weather-recommendation .weather-rec-icon {
    font-size: 2.5rem;
}

.weather-recommendation.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.weather-recommendation.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.weather-recommendation.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.weather-recommendation.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Weather Metrics */
.weather-metric-card {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 0.625rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease;
    height: 100%;
}

.weather-metric-card:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.metric-icon {
    color: #64748b;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.metric-value {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Current weather card styling */
.current-weather-card {
    background: #f8fafc;
    border-radius: 0.875rem;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.weather-icon-large {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-icon-img {
    width: 64px;
    height: 64px;
}

.current-temp {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.current-desc {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.current-location {
    font-size: 0.875rem;
    color: #64748b;
}

/* Temperature range card */
.temp-range-card {
    background: white;
    border-radius: 0.625rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-top: 1rem;
}

.temp-range-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.temp-high, .temp-low {
    font-size: 1.25rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.temp-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Sun times styling */
.sun-time-card {
    background: #f8fafc;
    border-radius: 0.625rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.sun-time-card:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
}

.sun-time-card i {
    font-size: 1.5rem;
    color: #f59e0b;
}

.sun-time-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.sun-time-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

/* Horizontal Hourly Forecast for Home Page */
.hourly-forecast-horizontal {
    background: #f8fafc;
    border-radius: 0 0 0.875rem 0.875rem;
}

.hourly-item-compact {
    background: white;
    border-radius: 0.5rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.hourly-item-compact:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.hourly-item-compact .hour-time {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hourly-item-compact .hour-icon {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 32px;
}

.hourly-item-compact .hour-icon img {
    width: 28px;
    height: 28px;
    transition: transform 0.2s ease;
}

.hourly-item-compact:hover .hour-icon img {
    transform: scale(1.1);
}

.hourly-item-compact .hour-temp {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.hourly-item-compact .hour-rain {
    font-size: 0.7rem;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.hourly-item-compact .hour-rain i {
    font-size: 0.65rem;
}

/* Legacy Hourly Forecast (for compatibility) */
.hourly-forecast-scroll {
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.hourly-forecast-scroll::-webkit-scrollbar {
    height: 6px;
}

.hourly-forecast-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}
.hourly-forecast-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.hourly-forecast-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.hourly-item {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 0.5rem;
    padding: 0.75rem 0.5rem;
    text-align: center;
    min-width: 80px;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.hourly-item:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hour-time {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hour-icon img {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
    transition: transform 0.2s ease;
}

.hour-temp {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.hour-rain {
    font-size: 0.75rem;
    color: #3b82f6;
}

/* Weather Radar Placeholder */
.weather-radar-placeholder {
    background: #f8fafc;
    border: 2px dashed rgba(0, 0, 0, 0.08);
    border-radius: 0.625rem;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.weather-radar-placeholder:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.weather-radar-placeholder::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
}

.weather-radar-placeholder::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    border: 2px solid #10b981;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
}

/* Safety Alerts */
.safety-alert {
    padding: 1rem;
    border-radius: 0.625rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.safety-alert.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.safety-alert.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    border-left: 4px solid #d97706;
}

.safety-alert i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

/* Weather Refresh Indicator */
.weather-refresh-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weather-refresh-indicator i {
    animation: spin 1s linear infinite;
}

/* UV Index and Air Quality Color Coding */
.uv-low { color: #22c55e !important; }
.uv-moderate { color: #eab308 !important; }
.uv-high { color: #f97316 !important; }
.uv-very-high { color: #ef4444 !important; }
.aqi-good { color: #22c55e !important; }
.aqi-moderate { color: #eab308 !important; }
.aqi-unhealthy-sensitive { color: #f97316 !important; }
.aqi-unhealthy { color: #ef4444 !important; }

/* Priority Cards */
.priority-card {
    border-left: 4px solid;
    transition: all 0.2s ease;
    border-radius: 0.625rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.priority-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Action Button Styling */
.action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
    font-size: 1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Clickable card hover effects */
a:hover .action-card {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #3b82f6;
}

a:hover .action-btn {
    background: #3b82f6;
    color: white;
    transform: scale(1.05);
}

/* ==========================================================================
   MODERN ACTION CARDS & NAVIGATION
   Interactive, engaging card components
   ========================================================================== */

/* Action Cards */
.action-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 1rem;
    overflow: hidden;
    background: white;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.02),
        0 4px 8px rgba(0, 0, 0, 0.03);
    position: relative;
}

/* Subtle gradient overlay on hover */
.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(139, 92, 246, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.action-card:hover::before {
    opacity: 1;
}

.action-card .card-body {
    padding: 1rem 1.25rem;
    position: relative;
    z-index: 1;
}

/* Section Titles - Modern with gradient accent */
.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #0f172a;
    position: relative;
    padding-left: 1rem;
    letter-spacing: -0.02em;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

/* Quick Action Grid */
.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Floating Icon - Modern pill style */
.floating-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Icon glow effect */
.floating-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

a:hover .floating-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
}

a:hover .floating-icon::after {
    transform: translate(-50%, -50%) scale(2);
}

/* Priority Items Container */
.priority-items-container {
    min-height: 100px;
}

/* Home Page Animations */
@keyframes subtle-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.005);
        opacity: 0.95;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes home-pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.pulse-animation {
    animation: home-pulse 2s infinite;
}

/* Weather Loading and Error States */
.weather-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #64748b;
}

.weather-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.625rem;
    border-left: 4px solid #dc2626;
}

.weather-fallback {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 0.625rem;
    padding: 2rem;
    text-align: center;
}

/* Enhanced Hover Effects */
.weather-widget img {
    transition: transform 0.3s ease;
}

.weather-widget img:hover {
    transform: scale(1.1);
}

/* Intersection Observer Animation Class */
.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Weather metric cards animation */
.weather-metric-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.weather-metric-card:nth-child(1) { animation-delay: 0.1s; }
.weather-metric-card:nth-child(2) { animation-delay: 0.2s; }
.weather-metric-card:nth-child(3) { animation-delay: 0.3s; }
.weather-metric-card:nth-child(4) { animation-delay: 0.4s; }
.weather-metric-card:nth-child(5) { animation-delay: 0.5s; }
.weather-metric-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Color utilities for weather conditions */
.text-orange {
    color: #f97316 !important;
}

/* Weather dashboard spacing */
.weather-dashboard {
    background: white;
}

.weather-metrics-grid {
    height: 100%;
}

/* Forecast header styling */
.forecast-header {
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.forecast-header h5 {
    color: #1e293b;
}

/* Home Page Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-section {
        padding: 1rem 0;
        margin-bottom: 1rem;
    }

    .welcome-card .card-body {
        padding: 1rem;
    }

    .welcome-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .stat-item {
        padding: 0.25rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    .stat-divider {
        display: none !important;
    }

    .weather-summary {
        gap: 1rem;
    }

    .weather-icon-compact {
        width: 40px;
        height: 40px;
    }

    .weather-temp-compact {
        font-size: 1.5rem;
    }

    .weather-metrics-compact {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .weather-recommendation-compact {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .quick-action-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .weather-widget-compact {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .hourly-item-mini {
        min-width: 50px;
        padding: 0.375rem 0.25rem;
    }

    .hourly-item-mini .hour-time {
        font-size: 0.65rem;
    }

    .hourly-item-mini .hour-temp {
        font-size: 0.7rem;
    }

    .hourly-item-mini .hour-rain {
        font-size: 0.6rem;
    }

    .hourly-item-mini .hour-icon {
        height: 20px;
    }

    .hourly-item-mini .hour-icon img {
        width: 16px;
        height: 16px;
    }

    .birthday-widget {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .birthday-child {
        padding: 0.375rem;
    }

    .birthday-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        margin-right: 0.5rem;
    }

    .birthday-name {
        font-size: 0.875rem;
    }

    .birthday-age {
        font-size: 0.7rem;
    }

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

    .birthday-classroom {
        font-size: 0.65rem;
    }
}

@media (max-width: 576px) {
    .welcome-card .card-body {
        padding: 0.75rem;
    }

    .welcome-title {
        font-size: 1.25rem;
    }

    .organization-info {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .weather-temp-compact {
        font-size: 1.25rem;
    }

    .weather-metrics-compact {
        font-size: 0.75rem;
    }
}

/* Compact Layout Responsive */
@media (max-width: 991.98px) {
    .weather-widget-compact {
        margin-bottom: 1rem;
    }
}

/* Home Page Alert Enhancements */
.home-alert {
    border-radius: 0.625rem;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.home-alert:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.home-alert.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border-left: 4px solid #dc2626;
}

.home-alert.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    border-left: 4px solid #d97706;
}

/* Weather Widget Loading State */
.weather-widget.loading {
    opacity: 0.7;
    pointer-events: none;
}

.weather-widget.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Professional spacing and typography */
.hero-content {
    max-width: none;
}

/* Focus states for accessibility */
.hourly-forecast-scroll:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.weather-metric-card:focus-within {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .weather-recommendation {
        border: 2px solid currentColor;
    }

    .weather-metric-card {
        border: 2px solid #1e293b;
    }

    .hourly-item {
        border: 2px solid #1e293b;
    }

    .hourly-item-compact {
        border: 2px solid #1e293b;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .weather-recommendation {
        animation: none;
    }

    .pulse-animation {
        animation: none;
    }

    .weather-refresh-indicator i {
        animation: none;
    }

    .weather-metric-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   GLOBAL POLISH & MICRO-INTERACTIONS
   Refined interactions for a premium feel
   ========================================================================== */

/* Enhanced Button Styles */
.btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

/* Primary button enhancement */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

/* Success button enhancement */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

/* Danger button enhancement */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

/* Warning button enhancement */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

/* Outline button polish */
.btn-outline-primary {
    border-width: 1.5px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Ghost button style */
.btn-ghost {
    background: transparent;
    border: none;
    color: #64748b;
}

.btn-ghost:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
}

/* ==========================================================================
   ENHANCED FORM CONTROLS
   Polished input and form interactions
   ========================================================================== */

.form-control, .form-select {
    transition: all 0.2s ease;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
}

.form-control:hover, .form-select:hover {
    border-color: #cbd5e1;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Enhanced checkbox and radio */
.form-check-input {
    transition: all 0.15s ease;
    border-width: 1.5px;
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Switch toggle enhancement */
.form-switch .form-check-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff' stroke='%23e2e8f0' stroke-width='1'/%3e%3c/svg%3e");
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-switch .form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* Form floating labels */
.form-floating label {
    transition: all 0.2s ease;
}

/* ==========================================================================
   ENHANCED LIST GROUP ITEMS
   Modern list styling with micro-interactions
   ========================================================================== */

.list-group-item {
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.list-group-item-action:hover {
    background-color: #f8fafc;
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateX(4px);
}

.list-group-item-action:hover .ti-chevron-right {
    transform: translateX(4px);
    color: #3b82f6;
}

.list-group-item .ti-chevron-right {
    transition: all 0.2s ease;
}

/* Flush list group - cleaner look */
.list-group-flush .list-group-item {
    border-left: none;
    border-right: none;
    border-radius: 0;
}

.list-group-flush .list-group-item:first-child {
    border-top: none;
}

.list-group-flush .list-group-item:last-child {
    border-bottom: none;
}

/* ==========================================================================
   ENHANCED BADGES
   Polished badge styling
   ========================================================================== */

.badge {
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.15s ease;
}

.badge:hover {
    transform: scale(1.05);
}

/* Badge with pulse for notifications */
.badge-pulse {
    position: relative;
}

.badge-pulse::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: inherit;
    animation: badge-pulse 2s infinite;
    z-index: -1;
}

@keyframes badge-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Modern soft badges */
.bg-primary-lt {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #2563eb !important;
}

.bg-success-lt {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #059669 !important;
}

.bg-warning-lt {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #d97706 !important;
}

.bg-danger-lt {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

/* ==========================================================================
   ENHANCED TABLES
   Modern table styling
   ========================================================================== */

.table {
    --bs-table-hover-bg: rgba(59, 130, 246, 0.04);
}

.table > thead {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.table > thead > tr > th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
    padding: 0.875rem 1rem;
}

.table > tbody > tr {
    transition: all 0.15s ease;
}

.table > tbody > tr:hover {
    background-color: rgba(59, 130, 246, 0.04);
}

.table > tbody > tr > td {
    padding: 1rem;
    vertical-align: middle;
    border-color: rgba(0, 0, 0, 0.05);
}

/* Striped table enhancement */
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.015);
}

/* ==========================================================================
   ENHANCED MODALS
   Premium modal styling
   ========================================================================== */

.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
    color: #0f172a;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    background: #f8fafc;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1rem 1.5rem;
}

/* Modal animation enhancement */
.modal.fade .modal-dialog {
    transform: scale(0.95) translateY(-20px);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* ==========================================================================
   ENHANCED ALERTS
   Modern alert styling
   ========================================================================== */

.alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Dismissible alert animation */
.alert-dismissible .btn-close {
    transition: all 0.15s ease;
}

.alert-dismissible .btn-close:hover {
    transform: scale(1.1);
}

/* ==========================================================================
   ENHANCED AVATARS
   Polished avatar styling
   ========================================================================== */

.avatar {
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Avatar status indicator */
.avatar-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 25%;
    height: 25%;
    min-width: 8px;
    min-height: 8px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Avatar group overlap enhancement */
.avatar-list .avatar {
    border: 2px solid #fff;
    margin-left: -0.75rem;
}

.avatar-list .avatar:first-child {
    margin-left: 0;
}

/* ==========================================================================
   ENHANCED DROPDOWNS
   Premium dropdown styling
   ========================================================================== */

.dropdown-menu {
    border: none;
    border-radius: 0.75rem;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    animation: dropdown-fade-in 0.15s ease;
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.625rem 0.875rem;
    transition: all 0.15s ease;
    font-weight: 450;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
    color: #3b82f6;
    transform: translateX(4px);
}

.dropdown-item:active {
    background: rgba(59, 130, 246, 0.15);
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   ENHANCED TOOLTIPS
   Modern tooltip styling
   ========================================================================== */

.tooltip {
    font-size: 0.8125rem;
}

.tooltip-inner {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before {
    border-top-color: #1e293b;
}

.bs-tooltip-bottom .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^=bottom] .tooltip-arrow::before {
    border-bottom-color: #1e293b;
}

/* ==========================================================================
   SMOOTH SCROLLBAR STYLING
   Custom scrollbar for modern feel
   ========================================================================== */

/* Webkit browsers */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* ==========================================================================
   LOADING & SKELETON STATES
   Smooth loading experiences
   ========================================================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        #f1f5f9 25%,
        #e2e8f0 50%,
        #f1f5f9 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 0.375rem;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Spinner enhancement */
.spinner-border {
    animation: spinner-border 0.6s linear infinite;
}

/* ==========================================================================
   FOCUS VISIBLE STATES
   Accessibility-friendly focus indicators
   ========================================================================== */

:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   SMOOTH PAGE TRANSITIONS
   Fade-in effect for page content
   ========================================================================== */

.page-body {
    animation: page-fade-in 0.3s ease;
}

@keyframes page-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   SUBTLE HOVER LIFT EFFECT
   Universal card hover enhancement
   ========================================================================== */

.hover-lift {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   RIPPLE EFFECT FOR BUTTONS
   Material-like click feedback
   ========================================================================== */

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn-ripple:active::after {
    width: 200%;
    height: 200%;
}

/* ==========================================================================
   EMPTY STATE STYLING
   For when there's no data
   ========================================================================== */

.empty {
    padding: 3rem 2rem;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #94a3b8;
}

.empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.empty-subtitle {
    color: #64748b;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   PRINT STYLES ENHANCEMENT
   Clean print output
   ========================================================================== */

@media print {
    .navbar-vertical,
    .page-loader,
    .btn,
    .dropdown-menu {
        display: none !important;
    }

    .page-wrapper {
        margin-left: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }

    body {
        background: white !important;
    }
}