:root {
  --color-primary: #009fa8;
  --color-primary-soft: #effafa;
  --color-text: #0f0f10;
  --color-text-muted: #8c8c8c;
  --color-border: #eeeeef;
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 75px;
  --radius-md: 8px;
  --shell-primary: #009fa8;
  --shell-primary-soft: #effafa;
  --shell-layout: #fbfcfd;
  --shell-surface: #ffffff;
  --shell-text: #0f0f10;
  --shell-muted: #8c8c8c;
  --shell-border: #eeeeef;
  --shell-sidebar-width: 280px;
  --shell-sidebar-collapsed-width: 75px;
  --shell-header-height: 61px;
  --shell-sidebar-header-height: 57px;
  --shell-radius: 8px;
  --shell-shadow: 0 2px 8px rgb(0 0 0 / 8%);
}

body {
  background: var(--shell-layout);
  color: var(--shell-text);
  font-family: "Estedad", sans-serif;
  font-size: 14px;
  font-weight: 400;
}

.sidebar,
.topbar,
.app-header,
.catalog-nav {
  line-height: 21px;
}

/* Shared application header */
.topbar,
.app-header {
  height: var(--shell-header-height);
  min-height: var(--shell-header-height);
  flex: 0 0 var(--shell-header-height);
  padding: 16px;
  background: var(--shell-surface);
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 #f0f0f0;
}

.topbar__cluster,
.app-header {
  gap: 12px;
}

.app-header.topbar {
  position: fixed;
  z-index: 50;
  inset: 0 var(--shell-sidebar-width) auto 0;
  display: flex;
  align-items: center;
  direction: ltr;
  justify-content: flex-start;
}

.catalog-layout > .sidebar {
  position: fixed;
  z-index: 60;
  inset: 0 0 0 auto;
}

.catalog-main {
  width: calc(100% - var(--shell-sidebar-width));
  min-height: calc(100vh - var(--shell-header-height));
  margin: var(--shell-header-height) var(--shell-sidebar-width) 0 0;
}

.page-content {
  padding-bottom: 0;
}

.topbar__cluster {
  direction: ltr;
}

.user-menu__trigger,
.header-user {
  min-height: 29px;
  gap: 12px;
  color: var(--shell-text);
  font-size: 14px;
}

.user-menu__identity {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 0;
  direction: rtl;
  text-align: right;
  white-space: nowrap;
}

.user-menu__identity .user-menu__name {
  line-height: 16px;
}

.user-menu__role {
  color: var(--shell-muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 13px;
}

.user-menu__avatar,
.avatar-button {
  width: 32px;
  height: 29px;
  padding: 4px;
  flex: 0 0 32px;
  color: #3d3e40;
  background: #f9f9f9;
  border-radius: 50%;
}

.user-menu__avatar i,
.avatar-button i {
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 16px;
}

.topbar-chip,
.header-chip {
  height: 29px;
  min-height: 29px;
  padding: 4px 12px;
  gap: 10px;
  color: var(--shell-text);
  background: #f5f5f5;
  border: 0;
  border-radius: var(--shell-radius);
  font-size: 14px;
}

.topbar-chip--date > i {
  width: 12px;
  height: 12px;
  font-size: 12px;
  line-height: 12px;
  transform: scale(1.5);
}

.topbar-chip--time > i {
  width: 14px;
  height: 14px;
  font-size: 14px;
  line-height: 14px;
}

.user-menu__dropdown,
.profile-menu {
  padding: 4px;
  background: var(--shell-surface);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgb(0 0 0 / 8%), 0 3px 6px -4px rgb(0 0 0 / 12%), 0 9px 28px 8px rgb(0 0 0 / 5%);
}

/* Shared sidebar surface and brand header */
.sidebar,
.catalog-nav {
  width: var(--shell-sidebar-width);
  background: var(--shell-surface);
  border: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
}

.sidebar__header,
.catalog-nav__header {
  height: var(--shell-sidebar-header-height);
  min-height: var(--shell-sidebar-header-height);
  flex: 0 0 var(--shell-sidebar-header-height);
  padding: 16px;
  gap: 4px;
  border-bottom: 1px solid rgb(217 217 218 / 60%);
}

.brand,
.catalog-nav__header {
  gap: 8px;
}

.brand__mark,
.brand__mark img,
.catalog-nav__header img {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.brand__mark {
  display: grid;
  place-items: center;
  background: #f3f3f3;
  border: 1px solid #ebebeb;
  border-radius: 6px;
}

.brand__mark img {
  display: block;
  width: 18px;
  height: 22px;
  flex: 0 0 auto;
}

.brand__name,
.catalog-nav__header span {
  color: var(--shell-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.sidebar__toggle {
  width: 24px;
  height: 24px;
  color: var(--shell-muted);
  border-radius: 0;
}

.sidebar__toggle:hover {
  color: var(--shell-primary);
  background: transparent;
}

.sidebar__toggle:focus-visible {
  outline: 0;
}

.search-box {
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: var(--shell-radius);
  box-shadow: none;
}

.sidebar__content {
  padding: 0 0 48px;
}

.search-box {
  width: calc(100% - 24px);
  margin: 16px 12px 17px;
}

.search-box > i,
.search-box__clear i {
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 18px;
}

.search-box:focus-within {
  border-color: var(--shell-primary);
  box-shadow: 0 0 0 2px rgb(0 159 168 / 10%);
}

.catalog-nav nav,
.menu {
  width: 100%;
  padding: 0 4px;
  gap: 0;
}

.catalog-nav a,
.menu-link {
  min-height: 40px;
  color: var(--shell-muted);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 400;
}

.catalog-nav a:hover,
.catalog-nav a.is-active,
.menu-link:hover:not(:disabled),
.menu-link.is-active,
.submenu__link:hover,
.submenu__link.is-active {
  color: var(--shell-primary);
  background: var(--shell-primary-soft);
}

.menu-link--section,
.menu-link--category,
.menu-link--root {
  min-height: 40px;
  font-size: 14px;
  font-weight: 400;
}

.menu > .menu-link,
.menu > .menu-group > .menu-link {
  width: 100%;
}

.menu > .menu-link {
  margin: 2px 0;
  padding: 0 16px;
  gap: 2px;
}

.menu > .menu-group > .menu-link {
  margin: 8px 0 0;
  padding: 0 16px;
  gap: 2px;
}

.menu-link--root {
  font-weight: 500;
}

.menu-link--root.menu-link--muted {
  color: var(--shell-muted);
  font-weight: 400;
}

.menu-group.is-open > .menu-link--section,
.menu-group.has-active-item > .menu-link--section,
.menu-group--nested.is-open > .menu-link--category,
.menu-group--nested.has-active-item > .menu-link--category {
  color: var(--shell-text);
  background: #f9f9f9;
}

.menu-link--section:hover:not(:disabled),
.menu-link--category:hover:not(:disabled) {
  color: var(--shell-text);
  background: #f9f9f9;
}

.submenu__link:hover:not(.is-active) {
  color: var(--shell-text);
  background: #f9f9f9;
}

.menu > .menu-link:hover:not(.is-active) {
  color: var(--shell-text);
  background: #f9f9f9;
}

.menu-group.is-open > .menu-link--section .menu-link__main > i,
.menu-group.has-active-item > .menu-link--section .menu-link__main > i,
.menu-group--nested.is-open > .menu-link--category .menu-link__main > i,
.menu-group--nested.has-active-item > .menu-link--category .menu-link__main > i {
  color: var(--shell-primary);
}

.menu-link--section:hover:not(:disabled) .menu-link__main > i,
.menu-link--category:hover:not(:disabled) .menu-link__main > i {
  color: var(--shell-primary);
}

.menu-group--nested > .menu-link--category {
  margin-top: 8px;
  padding-right: 24px;
  padding-left: 16px;
}

.submenu__link {
  min-height: 40px;
  margin-top: 8px;
  padding-right: 32px;
  padding-left: 16px;
}

.submenu__link--category {
  padding-right: 24px;
  padding-left: 16px;
}

.dot {
  width: 6px;
  height: 6px;
  flex-basis: 6px;
}

.submenu__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  font-size: 20px;
  line-height: 20px;
}

.menu-link__main > i {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  font-size: 20px;
  line-height: 20px;
}

.menu-link:focus-visible,
.submenu__link:focus-visible {
  outline: 0;
}

.menu .empty-state {
  display: none !important;
  margin: 24px 0;
  color: var(--shell-muted);
  text-align: center;
  font-size: 14px;
}

.menu.is-empty .empty-state {
  display: block !important;
}

.sidebar.is-collapsed {
  width: var(--shell-sidebar-collapsed-width);
}

body:has(.catalog-layout > .sidebar.is-collapsed) .app-header {
  right: var(--shell-sidebar-collapsed-width);
}

body:has(.catalog-layout > .sidebar.is-collapsed) .catalog-main {
  width: calc(100% - var(--shell-sidebar-collapsed-width));
  margin-right: var(--shell-sidebar-collapsed-width);
}

.sidebar.is-collapsed .sidebar__header {
  padding: 16px;
}

.sidebar.is-collapsed .sidebar__content {
  padding: 0 0 48px;
}

.sidebar.is-collapsed .menu {
  width: 75px;
  padding: 0 4px;
}

.sidebar.is-collapsed .menu > .menu-link {
  width: 66px;
  margin: 2px 0;
  padding: 0 16px;
}

.sidebar.is-collapsed .menu > .menu-group > .menu-link {
  width: 66px;
  margin: 8px 0 0;
  padding: 0;
  justify-content: center;
}

@media (max-width: 900px) {
  .catalog-nav {
    width: var(--shell-sidebar-collapsed-width);
  }

  .app-header {
    right: var(--shell-sidebar-collapsed-width);
  }

  .catalog-main {
    width: calc(100% - var(--shell-sidebar-collapsed-width));
    margin-right: var(--shell-sidebar-collapsed-width);
  }
}

@media (max-width: 640px) {
  .topbar,
  .app-header {
    padding: 16px;
  }
}
