
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --sidebar-bg-color: #1C2255;
  --sidebar-text-color: #f8f9fa;
  --sidebar-hover-bg: #5f96cc;
  --sidebar-border-color: #212529;
  --transition-speed: 0.3s;
}
body, html {
  height: 100%;
  margin: 0;
  font-family: 'Poppins', sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: #f8f9fa;
}
#app-container {
  display: flex;
  flex-direction: row;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
#sidebar {
  background-color: var(--sidebar-bg-color);
  color: var(--sidebar-text-color);
  display: flex;
  flex-direction: column;
  transition: width var(--transition-speed) ease;
  overflow-x: hidden;
  border-right: 1px solid var(--sidebar-border-color);
  flex-shrink: 0;  
}
#sidebar.expanded {
  width: 260px;
}
#sidebar.collapsed {
  width: 68px;
}
#main-content {
  flex-grow: 1;        
  padding: 2rem;
  background-color: #fff;
  overflow-y: auto;    

}
#sidebar-header {
  position: relative;
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
  border-bottom: 1px solid var(--sidebar-border-color);
  user-select: none;
}
.sidebar-logo {
  width: 45px;
  height: 45px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}
#sidebar-header .sidebar-title {
  font-weight: 700;
  font-size: 1.25rem;
  white-space: nowrap;
  flex-grow: 1;
  color: var(--sidebar-text-color);
}
#sidebar-header .toggle-btn {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background-color: var(--sidebar-hover-bg);
  border: none;
  color: var(--sidebar-text-color);
  border-radius: 0 8px 8px 0;
  width: 32px;
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
  z-index: 10;
  font-size: 20px;
}
#sidebar-header:hover .toggle-btn,
#sidebar:hover #sidebar-header .toggle-btn {
  opacity: 1;
}
#sidebar-header .toggle-btn:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 2px;
}
#sidebar.expanded #sidebar-header .color-picker-container {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
#sidebar.collapsed #sidebar-header .color-picker-container {
  display: none;
}
#sidebar-header label[for="sidebar-color-picker"] {
  font-size: 0.9rem;
  color: #ced4da;
}
#sidebar-color-picker {
  width: 32px;
  height: 32px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 0;
  background: transparent;
}
#sidebar-nav {
  flex-grow: 1;
  overflow-y: auto;
}
#sidebar-nav ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}
#sidebar-nav li {
  display: flex;
  align-items: center;
  cursor: pointer;
}
#sidebar-nav li a {
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--sidebar-text-color);
  text-decoration: none;
  padding: 0.75rem 1rem;
  transition: background-color 0.2s ease;
}
#sidebar-nav li a:hover,
#sidebar-nav li a:focus {
  background-color: var(--sidebar-hover-bg);
  text-decoration: none;
  outline: none;
}
#sidebar-nav li a .item-image {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}
#sidebar.expanded #sidebar-nav li a .item-label {
  display: inline;
  white-space: nowrap;
  font-weight: 500;
  font-size: 1rem;
}
#sidebar.collapsed #sidebar-nav li a .item-label {
  display: none;
}
#sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--sidebar-border-color);
  background-color: var(--sidebar-bg-color);
  color: var(--sidebar-text-color);
  text-align: center;
}
#sidebar-footer button {
  width: 100%;
  background-color: transparent;
  border: none;
  color: var(--sidebar-text-color);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  transition: background-color var(--transition-speed) ease;
}
#sidebar-footer button:hover,
#sidebar-footer button:focus {
  background-color: var(--sidebar-hover-bg);
  outline: none;
}
#sidebar-footer button .exit-image {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

#sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

#sidebar-nav::-webkit-scrollbar-thumb {
  background-color: #6c757d;
  border-radius: 3px;
}
@media (max-width: 767.98px) {
  #app-container {
    flex-direction: column;
  }
  #sidebar {
    position: fixed;
    z-index: 1045;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    transform: translateX(-260px);
    transition: transform var(--transition-speed) ease;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
  }
  #sidebar.show {
    transform: translateX(0);
  }
  #sidebar.expanded, #sidebar.collapsed {
    width: 260px !important;
  }
  #sidebar.collapsed #sidebar-nav li a .item-label {
    display: inline;
  }
  #sidebar-header .toggle-btn {
    opacity: 1 !important;
    position: fixed;
    left: 16px;
    top: 12px;
    border-radius: 8px;
    background-color: var(--sidebar-bg-color);
    z-index: 1050;
  }
  #main-content {
    margin-left: 0 !important;
    padding-top: 56px;
  }
}


