:root {
  --primary-color: #191919;
  --primary: #408CF9;
  --white: #FFFFFF;
  --sidebar-hover: #F5F5F5;
  --sidebar-bg: #FFFFFF;
  --bg: #EFEFEF;
  --text-link: #141B34;
  --expand-button: #408CF9;
  --logout: #FA7575;
  --headline-text: #546471;
  --text: #141B34;
  --divider-bg: var(--bg);
  --shadow-color: #E9E6E4;
  --shadow: 0px 0px 0px 1.4px var(--shadow-color),
    0px 0px 2.8px 0px var(--shadow-color);
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  padding: 1rem;
  height: 100%;
  background: var(--bg);
}

html {
  height: 100%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.sidebar {
  position: relative;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 1rem;
  user-select: none;
  max-width: 18rem;
  min-width: 4rem;
  display: flex;
  color: var(--white);
  flex-direction: column;
  background-color: var(--sidebar-bg);
  box-shadow: var(--shadow);
  transition: max-width 0.2s ease-in-out;
}

.sidebar h2 {
  color: var(--headline-text);
  font-size: 1rem;
  margin-top: 1rem;
  line-height: 1.5rem;
}

body.collapsed .sidebar h2 {
  display: none;
}

body.collapsed .sidebar {
  max-width: 5rem;
  display: flex;
}

body.collapsed .hide {
  position: absolute;
  visibility: hidden;
}

/*? sidebar top */
.sidebar-top-wrapper {
  position: relative;
  display: flex;
  background: var(--primary-color-light);
}

.sidebar-top {
  display: flex;
  align-items: start;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  height: 4rem;
  padding: 1rem;
  padding-top: 2rem;
}

.logo__wrapper {
  display: flex;
  align-items: center;
  color: var(--text-link);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.35rem;
  gap: 0.75rem;
}

.logo-small {
  height: 3rem;
  width: 3rem;
  border-radius: 0.4rem;
  padding: 0.25rem;
  overflow: hidden;
  object-fit: cover;
}

.company-name {
  white-space: nowrap;
}

/*? menu links */

.sidebar-links-wrapper {
  /* overflow-y: auto; */
  overflow: hidden;
  padding: 1rem;
  position: relative;
}

body.collapsed .sidebar-links-wrapper {
  overflow: hidden;
}

.sidebar-links ul {
  list-style-type: none;
  display: flex;
  row-gap: 0.5rem;
  flex-direction: column;
}

.sidebar-links li {
  color: var(--text-link);
  min-width: 3rem;
}

.sidebar-links li svg {
  stroke: var(--text-link);
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
}

.sidebar-links li a:hover {
  background: var(--sidebar-hover);
}

.sidebar-links li a {
  color: var(--text-link);
  width: 100%;
  padding: 0 0.6rem;
  font-size: 1.25rem;
  display: flex;
  gap: 0.75rem;
  border-radius: 0.75rem;
  justify-content: start;
  align-items: center;
  min-height: 3.25rem;
  text-decoration: none;
  transition: background 0.2s ease-in-out;
}

.sidebar-links li .tag {
  margin-left: auto;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  background: var(--sidebar-hover);
  color: var(--text-link);
  border: 1px solid var(--shadow-color);
}

.sidebar-links li a .link {
  overflow: hidden;
  white-space: nowrap;
  animation: fadeIn 0.2s ease-in-out;
}

.sidebar-links .active:hover {
  background: var(--sidebar-hover);
}

.sidebar-links .active {
  text-decoration: none;
  background: var(--sidebar-hover);
  color: var(--text-link);
}

.sidebar-links .active svg {
  stroke: var(--text-link);
}

.divider {
  display: none;
}

body.collapsed .divider {
  width: 100%;
  display: block;
  background: var(--divider-bg);
  height: 2px;
  margin: 0.5rem 0;
}

/*? profile part */
.sidebar__profile {
  display: flex;
  padding: 1rem;
  align-items: center;
  gap: 0.75rem;
  flex-direction: row;
  color: var(--text-link);
  overflow: hidden;
  min-height: 4rem;
  margin-top: auto;
}

.avatar__wrapper {
  position: relative;
  display: flex;
}

.avatar {
  display: block;
  min-height: 3rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease-in-out;
}

.avatar__name {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  white-space: nowrap;
}

.user-name {
  font-weight: 600;
  text-align: left;
  color: var(--text-link);
}

.email {
  color: var(--text-link);
  font-size: 0.8rem;
}

.sidebar__profile .menu {
  margin-left: auto;
  padding: 0.5rem;
  height: 2.5rem;
  width: 2.5rem;
  cursor: pointer;
}

.sidebar__profile .menu:hover {
  padding: 0.5rem;
  border-radius: 50%;
  background: var(--sidebar-hover);
}

/*? Expand button */
.expand-btn {
  position: absolute;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: var(--sidebar-bg);
  z-index: 2;
  box-shadow: var(--shadow);
  right: -1.2rem;
  top: 1.40rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
}

.expand-btn svg {
  transform: rotate(-180deg);
  stroke: var(--text-link);
  width: 1.25rem;
  height: 1.25rem;
}

body.collapsed .expand-btn svg {
  transform: rotate(-360deg);
}

@keyframes fadeIn {
  from {
    width: 4rem;
    opacity: 0;
  }

  to {
    opacity: 1;
    width: 100%;
  }
}