/* Professional Sidebar - Enhanced Design */
:root {
  --sidebar-width: 260px;
  --sidebar-bg: #ffffff;
  --sidebar-border: #e9ecef;
  --sidebar-text: #495057;
  --sidebar-text-active: #2193b0;
  --sidebar-hover: #f8f9fa;
}

/* Main Sidebar Container - Professional */
.modern-sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(to bottom, #f8fbff 0%, #f0f5f9 100%);
  border-right: 1px solid var(--sidebar-border);
  position: sticky;
  top: var(--header-height, 60px);
  height: calc(100vh - var(--header-height, 60px));
  overflow-y: auto;
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

/* Sidebar Content */
.sidebar-content {
  padding: 1.28rem 0.96rem;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--sidebar-text-active) transparent;
}

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

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

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--sidebar-text-active);
  border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: #1a7a8f;
}

/* Sidebar Header - Professional */
.sidebar-header {
  padding: 0.96rem 0.64rem;
  margin-bottom: 1.28rem;
  border-bottom: 2px solid var(--sidebar-border);
  background: var(--background-white);
  border-radius: 7.68px;
  padding: 1.12rem 0.96rem;
}

.sidebar-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dentist-blue);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.64rem;
  line-height: 1.3;
}

.sidebar-header h3 i {
  font-size: 1.12rem;
  color: var(--dentist-blue);
  width: 24px;
  text-align: center;
}

.sidebar-header h3 span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.sidebar-nav li {
  margin-bottom: 0.32rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.96rem;
  padding: 0.8rem 0.96rem;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 7.68px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  position: relative;
  background: var(--background-white);
  border: 1px solid var(--border-light);
}

.sidebar-nav a:hover {
  background: rgba(33, 147, 176, 0.08);
  color: var(--sidebar-text-active);
  border-color: var(--dentist-blue);
  transform: translateX(4px);
}

.sidebar-nav a.active {
  background: rgba(33, 147, 176, 0.12);
  color: var(--sidebar-text-active);
  font-weight: 600;
  border-left: 3px solid var(--dentist-blue);
  border-color: var(--dentist-blue);
}

.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gradient-blue);
  border-radius: 7.68px 0 0 7.68px;
}

.sidebar-nav a i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
  color: var(--sidebar-text);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-nav a:hover i,
.sidebar-nav a.active i {
  color: var(--sidebar-text-active);
  transform: scale(1.1);
}

.sidebar-nav a span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Progress Container - Professional */
.progress-container {
  margin-top: 1.28rem;
  padding-top: 1.28rem;
  border-top: 2px solid var(--sidebar-border);
  background: var(--background-white);
  border-radius: 7.68px;
  padding: 1.12rem 0.96rem;
}

.progress-container h4 {
  font-size: 0.75rem;
  color: var(--sidebar-text);
  margin-bottom: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-bar {
  height: 6px;
  background: var(--sidebar-hover);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Progress Fill - Orange (matching page icons) */
.progress-fill,
#sidebar-progress,
.modern-sidebar .progress-fill,
.progress-container .progress-fill,
.modern-sidebar .progress-container .progress-bar .progress-fill,
.modern-sidebar #sidebar-progress {
  height: 100% !important;
  background: var(--dentist-orange) !important;
  background-color: var(--dentist-orange) !important;
  background-image: none !important;
  width: 0;
  transition: width 0.5s ease;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(255, 126, 95, 0.3) !important;
}

/* Override any gradient backgrounds */
.modern-sidebar .progress-fill[style*="background"],
.modern-sidebar #sidebar-progress[style*="background"] {
  background: var(--dentist-orange) !important;
  background-color: var(--dentist-orange) !important;
  background-image: none !important;
}

/* Mobile Toggle Button */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  width: 44px;
  height: 44px;
  background: var(--sidebar-text-active);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 0.875rem;
  cursor: pointer;
  z-index: 1001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive - Tablet */
@media (max-width: 991px) {
  :root {
    --sidebar-width: 240px;
  }
  
  .sidebar-content {
    padding: 1.12rem 0.8rem;
  }
  
  .sidebar-header {
    padding: 0.96rem 0.8rem;
  }
  
  .sidebar-header h3 {
    font-size: 0.95rem;
  }
  
  .sidebar-header h3 i {
    font-size: 1rem;
  }
  
  .sidebar-nav a {
    font-size: 0.85rem;
    padding: 0.72rem 0.8rem;
    gap: 0.8rem;
  }
  
  .sidebar-nav a i {
    font-size: 0.95rem;
    width: 18px;
  }
}

/* Responsive - Mobile */
@media (max-width: 767px) {
  .modern-sidebar {
    position: fixed;
    transform: translateX(-100%);
    width: 280px;
    left: 0;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--sidebar-border);
    z-index: 1000;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
  }

  .modern-sidebar.active {
    transform: translateX(0);
  }

  .sidebar-content {
    padding: 1.12rem 0.96rem;
  }

  .sidebar-toggle {
    display: flex;
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }
  
  .sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* Mobile Small */
@media (max-width: 575px) {
  .modern-sidebar {
    width: 260px;
  }
  
  .sidebar-content {
    padding: 0.96rem 0.8rem;
  }
  
  .sidebar-header {
    padding: 0.96rem 0.8rem;
  }
  
  .sidebar-header h3 {
    font-size: 0.9rem;
  }
  
  .sidebar-header h3 i {
    font-size: 1rem;
  }
  
  .sidebar-nav a {
    font-size: 0.85rem;
    padding: 0.72rem 0.8rem;
    gap: 0.8rem;
  }
  
  .sidebar-nav a i {
    font-size: 0.95rem;
    width: 18px;
  }
  
  .sidebar-toggle {
    width: 44px;
    height: 44px;
    font-size: 0.95rem;
  }
}
