:root {
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 64px;
}

html, body {
  height: 100%;
}

body {
  overflow-x: hidden;
}


/* ---------- Global ------------*/

h1  {
    font-size:25px;
}

/* ---------- Sidebar ---------- */
#sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  position: sticky;
  top: 0;
  background-color: #212529;
  transition: width 0.2s ease, min-width 0.2s ease;
  overflow-x: hidden;
  overflow-y: auto;
}

#sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
  min-width: var(--sidebar-collapsed-width);
}

#sidebar .sidebar-brand {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}

#sidebar .nav-link {
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

button.nav-link {
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

#sidebar .nav-link i {
  font-size: 1.1rem;
  min-width: 1.25rem;
  text-align: center;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

#sidebar.collapsed .link-text {
  display: none;
}

/* ---------- Sidebar submenu ---------- */
#sidebar .nav-link .chevron {
  margin-left: auto;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

#sidebar .nav-link[aria-expanded="true"] .chevron {
  transform: rotate(90deg);
}

#sidebar .submenu {
  display: none;
}

#sidebar .submenu.show {
  display: block;
}

#sidebar .submenu .nav-link {
  padding-left: 2.75rem;
  font-size: 0.9rem;
}

#sidebar.collapsed .chevron,
#sidebar.collapsed .submenu {
  display: none;
}

/* ---------- Layout ---------- */
#wrapper {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

#content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- Topbar ---------- */
#topbar {
  height: 56px;
  flex-shrink: 0;
}

main {
  flex: 1;
  padding: 1.5rem;
  background-color: #f5f6f8;
}

[data-bs-theme="dark"] main {
  background-color: #1a1d20;
}

[data-bs-theme="dark"] #topbar {
  background-color: #212529 !important;
  border-color: #343a40 !important;
}

#sidebarToggle,
#themeToggle {
  border: none;
  background: transparent;
  font-size: 1.25rem;
}
