/* STEP Dashboard v38.64 - menu lateral recolhível do Portal do Cliente. */
body.client-sidebar-enabled {
  --client-sidebar-expanded: 236px;
  --client-sidebar-collapsed-width: 78px;
  --client-sidebar-width: var(--client-sidebar-expanded);
}

body.client-sidebar-enabled.client-sidebar-collapsed {
  --client-sidebar-width: var(--client-sidebar-collapsed-width);
}

.client-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 520;
  width: var(--client-sidebar-width, 236px);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  border: 0;
  border-right: 1px solid #dce6ed;
  background: rgba(255,255,255,.98);
  box-shadow: 10px 0 30px rgba(42,79,137,.07);
  color: #17233a;
  transition: width .22s ease, transform .22s ease;
  overflow: visible;
}

.client-sidebar[hidden] {
  display: none !important;
}

.client-sidebar-brand {
  position: relative;
  min-height: 78px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #e7eef3;
}

.client-sidebar-logo-link {
  display: grid;
  place-items: center;
  width: 132px;
  min-width: 0;
  overflow: hidden;
  transition: width .22s ease, opacity .18s ease;
}

.client-sidebar-logo {
  display: block;
  width: 100%;
  max-width: 132px;
  height: 42px;
  object-fit: contain;
  object-position: center;
}

.client-sidebar-toggle {
  position: absolute;
  top: 25px;
  right: -15px;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #cfe0ea;
  border-radius: 9px;
  background: #fff;
  color: #2a4f89;
  box-shadow: 0 6px 18px rgba(42,79,137,.14);
  cursor: pointer;
  transition: transform .22s ease, background .16s ease, color .16s ease;
}

.client-sidebar-toggle:hover {
  background: #eef7fc;
  color: #0288d1;
}

.client-sidebar-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .22s ease;
}

.client-sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  overflow-x: hidden;
}

.client-sidebar-link {
  position: relative;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #43546a;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
  overflow: hidden;
}

.client-sidebar-link:hover {
  background: #eef7fc;
  color: #185b8a;
  transform: translateX(1px);
}

.client-sidebar-link.is-active,
.client-sidebar-link--under-dev:hover {
  background: linear-gradient(135deg, #1678e6 0%, #049ce6 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(4,156,230,.24);
}

.client-sidebar-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.client-sidebar-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-sidebar-label {
  min-width: 0;
  white-space: normal;
  transition: opacity .12s ease, width .22s ease;
}

.client-sidebar-footer {
  padding: 12px;
  border-top: 1px solid #e7eef3;
}

.client-sidebar-logout {
  color: #53667b;
}

.client-sidebar-copy {
  display: block;
  margin: 12px 10px 2px;
  color: #8ca0b2;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
}

body.client-sidebar-collapsed .client-sidebar-brand {
  padding-inline: 10px;
}

body.client-sidebar-collapsed .client-sidebar-logo-link {
  width: 42px;
}

body.client-sidebar-collapsed .client-sidebar-logo {
  height: 34px;
  object-position: left center;
}

body.client-sidebar-collapsed .client-sidebar-toggle svg {
  transform: rotate(180deg);
}

body.client-sidebar-collapsed .client-sidebar-nav,
body.client-sidebar-collapsed .client-sidebar-footer {
  padding-inline: 9px;
}

body.client-sidebar-collapsed .client-sidebar-link {
  justify-content: center;
  padding-inline: 0;
  gap: 0;
}

body.client-sidebar-collapsed .client-sidebar-label,
body.client-sidebar-collapsed .client-sidebar-copy {
  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Portal do Cliente: ocultar BSPs e Unidades em todas as telas do portal, inclusive Projetos em desenvolvimento.
   O modo de desenvolvimento não mantém sempre a classe client-mode, então usamos client-sidebar-enabled. */
body.client-sidebar-enabled #client-nav-bsps,
body.client-sidebar-enabled #client-nav-units,
body.client-sidebar-enabled #client-sidebar-units-submenu,
body.client-sidebar-enabled .client-sidebar-units-submenu,
body.client-sidebar-enabled .client-sidebar-nav > *:nth-child(2),
body.client-sidebar-enabled .client-sidebar-nav > *:nth-child(4),
body.client-sidebar-enabled .client-sidebar-nav > .client-sidebar-link:nth-of-type(2),
body.client-sidebar-enabled .client-sidebar-nav > .client-sidebar-link:nth-of-type(4) {
  display: none !important;
}

/* O deslocamento deve existir em qualquer tela que usa a client-sidebar.
   Antes estava preso ao client-mode e, na tela Projetos em desenvolvimento, o menu ficava por cima do conteúdo. */
body.client-sidebar-enabled {
  padding-left: var(--client-sidebar-width) !important;
  box-sizing: border-box !important;
  transition: padding-left .22s ease !important;
}

body.client-sidebar-enabled .page-shell {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

body.client-sidebar-enabled .topbar {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  grid-template-columns: minmax(320px,1fr) auto !important;
  grid-template-areas: "title session" !important;
  transition: width .22s ease, margin-left .22s ease !important;
}

body.client-sidebar-enabled .topbar .brand-card,
body.client-sidebar-enabled .topbar .topbar-actions {
  display: none !important;
}

body.client-sidebar-enabled .client-dashboard,
body.client-sidebar-enabled .client-under-dev-page,
body.client-sidebar-enabled .client-under-dev-shell,
body.client-sidebar-enabled [data-client-under-dev-page] {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-left: clamp(14px, 1.6vw, 26px) !important;
  padding-right: clamp(14px, 1.6vw, 26px) !important;
  box-sizing: border-box !important;
  transition: width .22s ease, margin-left .22s ease !important;
}

body.client-sidebar-enabled .footer-bar {
  width: 100% !important;
}