.topnav {
  background-color: var(--bg);
  overflow: visible;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: 70px;
}

.devider {
  position: fixed;
  top: 70px;
  left: 0;
  width: 100%;
  border-top: 1px solid var(--divider);
  height: 0;
  z-index: 999;
}

.topnav div {
  float: left;
}

.topnav_text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.topnav_logo {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.topnav_logo img {
  height: 60px;
  width: auto;
  padding: 10px 16px;
  display: block;
}

.topnav_logo i {
  color: grey;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
}

.topnav_account {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.topnav_account .theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--nav-text);
  transition: color 0.3s ease;
}

.topnav_account .theme-toggle:hover {
  color: var(--nav-text-hover);
}

.topnav_account .account-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--nav-text);
  transition: color 0.3s ease;
}

.topnav_account .account-icon:hover {
  color: var(--nav-text-hover);
}


.topnav_account .account-icon svg {
  display: block;
}

/* Dark mode support - add this class to body or root element */
.dark-mode .topnav_account .theme-toggle {
  color: #b0b0b0;
}

.dark-mode .topnav_account .theme-toggle:hover {
  color: white;
}

.dark-mode .topnav_account .account-icon {
  color: #b0b0b0;
}

.dark-mode .topnav_account .account-icon:hover {
  color: white;
}

.topnav_text a {
  color: var(--nav-text);
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
  font-family: 'Stack Sans Text', system-ui, -apple-system, sans-serif;
}

.topnav_text a:hover {
  color: var(--nav-text-hover);
}

/* logo swap (light or dark) */
.topnav_logo .logo-dark {
  display: none;
}

.dark-mode .topnav_logo .logo-light {
  display: none;
}

.dark-mode .topnav_logo .logo-dark {
  display: flex;
}




/* Sidebar*/
.sidebar {
  background-color: #EEEEEE;
  display: none;

  position: fixed;
  left: 0px;
  top: 0px;
  height: 100vh;
  width: 220px;
  padding: 10px;
  z-index: 9;

  border-right: 1px solid var(--border);
  flex-direction: column;
}

.content_sidebar {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;

  position: relative;
  gap: 10px;

  color: black;
}

.sidebar_nav {
  position: absolute;
  left: 0px;
  right: 0px;
  height: 52px;

  background-color: #628141;
  border-radius: 15px;
  z-index: 0;
  
  transform: translateY(0);
  transition: transform 180ms ease, height 180ms ease;
}

.content_sidebar .link_content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  padding: 14px 14px;

  /* Reset button styles */
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;

  text-decoration: none;
  color: black;
  font-size: 20px;
}

.content_sidebar .theme_account .theme-toggle,
.content_sidebar .theme_account .account-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  padding: 14px 14px;

  background: none;
  border: none;
  outline: none;
  box-shadow: none;

  text-decoration: none;
  color: black;
  font-size: 20px;
  font-family: inherit;

  cursor: pointer;
}

.content_sidebar svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.hamburger_menu {
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  width: 40px;
  height: 40px;

  background-color: var(--bg);
  border-radius: 5px;
  box-shadow: 0px 0px 5px grey;
  border: none;
  cursor: pointer;

  transition: transform 0.3s ease;
}

.stripes {
  display: block;
  width: 25px;
  height: 4px;
  margin: 0;
  background-color: #628141;

  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger_menu.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger_menu.open span:nth-child(2) {
  opacity: 0;
}

.hamburger_menu.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.hamburger_menu.open {
  transform: translateX(225px);
  transition: transform 0.3s ease;
}

/* Sidebar logo */
.sidebar_logo {
  display: flex;
  justify-content: center;
  padding: 10px 0 20px;
}

.logo_home {
  width: 180px;
}

.logo_home img {
  width: 100%;
  height: auto;
  display: block;
}

.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.theme-toggle .sun-icon { 
  order: 0;
}

.theme-toggle .moon-icon { 
  order: 0; 
}

.theme-toggle span { 
  order: 1; 
}

/* Light and dark logo */
.logo_home .logo-dark {
  display: none;
}

.dark-mode .logo_home .logo-light,
html[data-theme="dark"] .logo_home .logo-light {
  display: none;
}

.dark-mode .logo_home .logo-dark,
html[data-theme="dark"] .logo_home .logo-dark {
  display: block;
}


/* Dark mode sidebar*/
.dark-mode .sidebar {
  background-color: #2f2f2f;
}

.dark-mode .content_sidebar{
  color: #EEEEEE;
}


.dark-mode .content_sidebar .link_content,
.dark-mode .content_sidebar .theme_account .theme-toggle,
.dark-mode .content_sidebar .theme_account .account-icon {
  color: #EEEEEE;
}

.dark-mode .content_sidebar .link_content img {
  filter: invert(1) brightness(1);
}

.dark-mode .logo-light {
  display: none;
}

.dark-mode .logo-dark {
  display: flex;
}


@media (max-width: 768px){
  .topnav {
    display: none !important;
  }
  
  .topnav_logo {
    display: none;
  }

  .hamburger_menu {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }

  .sidebar {
    display: flex;
    transform: translateX(-110%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }
  
}

/* Sidebar*/
.sidebar {
  background-color: #EEEEEE;
  display: none;

  position: fixed;
  left: 0px;
  top: 0px;
  height: 100vh;
  width: 220px;
  padding: 10px;
  z-index: 9;

  border-right: 1px solid var(--border);
  flex-direction: column;
}

.content_sidebar {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  flex: 1;

  position: relative;
  gap: 10px;

  color: black;
}

.sidebar_nav {
  position: absolute;
  left: 0px;
  right: 0px;
  height: 52px;

  background-color: #628141;
  border-radius: 15px;
  z-index: 0;
  
  transform: translateY(0);
  transition: transform 180ms ease, height 180ms ease;
}

.content_sidebar .link_content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  padding: 14px 14px;

  /* Reset button styles */
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;

  text-decoration: none;
  color: black;
  font-size: 20px;
}

.content_sidebar .theme_account .theme-toggle,
.content_sidebar .theme_account .account-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;

  width: 100%;
  padding: 14px 14px;

  background: none;
  border: none;
  outline: none;
  box-shadow: none;

  text-decoration: none;
  color: black;
  font-size: 20px;
  font-family: inherit;

  cursor: pointer;
}

.content_sidebar svg {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.hamburger_menu {
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 4px;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  width: 40px;
  height: 40px;

  background-color: var(--bg);
  border-radius: 5px;
  box-shadow: 0px 0px 5px grey;
  border: none;
  cursor: pointer;

  transition: transform 0.3s ease;
}

.stripes {
  display: block;
  width: 25px;
  height: 4px;
  margin: 0;
  background-color: #628141;

  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger_menu.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger_menu.open span:nth-child(2) {
  opacity: 0;
}

.hamburger_menu.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.hamburger_menu.open {
  transform: translateX(225px);
  transition: transform 0.3s ease;
}

.sidebar_logo {
  padding: 10px;
  width: 200px;
}


/* Dark mode sidebar*/
.dark-mode .sidebar {
  background-color: #2f2f2f;
}

.dark-mode .content_sidebar{
  color: #EEEEEE;
}


.dark-mode .content_sidebar .link_content,
.dark-mode .content_sidebar .theme_account .theme-toggle,
.dark-mode .content_sidebar .theme_account .account-icon {
  color: #EEEEEE;
}

.dark-mode .content_sidebar .link_content img {
  filter: invert(1) brightness(1);
}

.dark-mode .logo-light {
  display: none;
}

.dark-mode .logo-dark {
  display: flex;
}

@media (max-width: 768px){
  .topnav {
    display: none !important;
  }
  
  .topnav_logo {
    display: none;
  }

  .hamburger_menu {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }

  .sidebar {
    display: flex;
    transform: translateX(-110%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }
  
}

.logo-dark {
  display: none;
}

.logo-light {
  display: white;
}