
.sidebar-link-grid {
    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: center;
    gap: 8px;
}
.sidebar-link-grid i {
    font-size: 1.3em;
    text-align: center;
    width: 32px;
}
.sidebar-settings-dropdown .dropdown-menu {
    left: 20px !important;
    min-width: 170px;
    font-size: 0.92em;
    padding: 0.25rem 0.5rem;
}
.sidebar-settings-dropdown .dropdown-item {
    font-size: 0.95em;
    padding: 0.25rem 0.75rem;
    }


/* Sidebar and settings sidebar styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  min-width: 60px;
  max-width: 250px;
  height: 100vh;
  background: #23272b;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  transition: width .4s !important;
  box-shadow: 2px 0 8px rgba(0,0,0,0.04);
  z-index: 1001;
}
.sidebar.collapsed {
  width: 60px;
  min-width: 60px;
  max-width: 60px;
}
.sidebar-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5em;
  padding: 12px 12px 12px 12px;
  cursor: pointer;
  outline: none;
  align-self: flex-start;
  transition: color 0.2s;
}
.sidebar-toggle:focus {
  color: #0dcaf0;
}
.sidebar-nav {
  flex: 1 1 auto;
  margin-top: 16px;
}
.sidebar-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-nav-list li {
  margin-bottom: 6px;
}
.sidebar-nav-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px; 
  color: #fff;
  text-decoration: none;
  font-size: 1.08em;
  padding: 10px 18px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  min-width: 0;
}
.sidebar-nav-list a:hover, .sidebar-nav-list a:focus {
  background: #0dcaf0;
  color: #23272b;
}
.sidebar-nav-list i {
  font-size: 1.25em;
  min-width: 28px;
  text-align: center;
}
.sidebar-link-text {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
transition: opacity 0.3s, transform 0.3s;
opacity: 1;
transform: translateX(0);
  
}
.sidebar.collapsed .sidebar-link-text {
  display: none;
}
.sidebar.collapsed .sidebar-nav-list a {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

/* Settings sidebar styles */

.settings-sidebar {
  position: fixed;
  top: 0; /* JS will set top to match the Settings link */
  left: 200px;
  width: 180px;
  min-height: 80px;
  height: 20vh;
  background: #23272b;
  border-radius: 0 10px 10px 0;
  color: #fff;
  z-index: 900; /* lower than .sidebar (1001) so it slides from behind */
  display: none;
  box-shadow: 2px 0 8px rgba(0,0,0,0.08);
  /* Slide horizontally; avoid animating top to prevent vertical slide */
  transform: translateX(-110%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease, left 0.3s, width 0.3s;
  will-change: transform, left, width;
}

.settings-sidebar.is-open {
  transform: translateX(0);
  opacity: 1;
}
.settings-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 6px 16px;
  border-bottom: 1px solid #444;
}
.settings-sidebar-title {
  font-weight: 600;
  font-size: 1.1em;
}
.settings-sidebar-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1em;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: background 0.2s;
}
.settings-sidebar-close:hover {
  background: #0dcaf0;
  color: #23272b;
}
.settings-sidebar-list {
  list-style: none;
  padding: 12px 0 0 0;
  margin: 0;
}
.settings-sidebar-list li {
  margin-bottom: 8px;
}
.settings-sidebar-list a {
  color: #fff;
  text-decoration: none;
  font-size: 1em;
  padding: 8px 18px;
  display: block;
  border-radius: 5px;
  transition: background 0.2s, color 0.2s;
}
.settings-sidebar-list a:hover, .settings-sidebar-list a:focus {
  background: #0dcaf0;
  color: #23272b;
}
@media (max-width: 991.98px) {
  .sidebar {
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    height: 60px;
    align-items: center;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1001;
  }
  .sidebar.collapsed {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    height: 60px;
  }
  .settings-sidebar {
    left: 60px;
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
  height: 100vh;
  }
}
