/* Gestor Adv — componente de marca e tokens visuais */

.marca-gestor-adv {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.marca-gestor-adv--horizontal,
.marca-gestor-adv--logo {
  gap: 0;
}

.marca-gestor-adv__img {
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.marca-gestor-adv__img--mark {
  width: 40px;
  height: 40px;
}

.marca-gestor-adv__img--logo {
  width: auto;
  max-width: min(240px, 100%);
  height: 40px;
}

.marca-gestor-adv--logo .marca-gestor-adv__img--logo {
  height: 44px;
}

.marca-gestor-adv--vertical {
  flex-direction: column;
  align-items: center;
}

.marca-gestor-adv__img--vertical {
  width: auto;
  max-width: min(200px, 100%);
  height: auto;
  max-height: 160px;
}

/* Tema: logo clara no dark, logo escura no light */
.marca-gestor-adv__img--tema-light {
  display: none;
}

.marca-gestor-adv__img--tema-dark {
  display: block;
}

[data-theme="light"] .marca-gestor-adv__img--tema-light {
  display: block;
}

[data-theme="light"] .marca-gestor-adv__img--tema-dark {
  display: none;
}

/* Sidebar sempre navy — mantém logo clara no modo light */
.app-sidebar .marca-gestor-adv__img--tema-light {
  display: none;
}

.app-sidebar .marca-gestor-adv__img--tema-dark {
  display: block;
}

.marca-gestor-adv__tagline {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ds-accent);
  line-height: 1.2;
  margin-left: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Sidebar escura */
.marca-escritorio {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-sidebar-marca .marca-escritorio {
  width: 100%;
}

.marca-gestor-adv--compacta {
  gap: 8px;
  opacity: 0.88;
}

.marca-gestor-adv--compacta .marca-gestor-adv__img--mark {
  width: 22px;
  height: 22px;
}

.marca-gestor-adv--icon .marca-gestor-adv__img--mark {
  width: 44px;
  height: 44px;
}

.app-sidebar .sidebar-logo--gestor {
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.app-sidebar .sidebar-logo--gestor img {
  border-radius: 0;
}

/* Portal — marca do escritório no header */
.portal-header__marca .marca-escritorio {
  gap: 12px;
  max-width: min(420px, 70vw);
}

.portal-header__logo,
.portal-header__marca .sidebar-logo {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.portal-header__logo img,
.portal-header__marca .sidebar-logo img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.portal-header__marca .sidebar-marca-texto {
  min-width: 0;
}

.portal-header__marca .nome-sistema {
  color: #fff;
  font-family: var(--portal-display, var(--fonte-display));
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-header__marca .sidebar-marca-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.portal-header__marca .sidebar-logo__inicial {
  color: #fff;
  font-weight: 700;
}

.marca-auth .marca-gestor-adv__img--logo {
  height: 52px;
  max-width: min(280px, 100%);
}

.inst-marca .marca-gestor-adv__img--logo,
.landing-marca.marca-gestor-adv--logo .marca-gestor-adv__img--logo {
  height: 54px;
  max-width: min(300px, 100%);
}

.inst-marca--footer .marca-gestor-adv__img--logo {
  height: 36px;
}

/* Sidebar — marca do sistema (símbolo + nome) */
.app-sidebar-marca-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.app-sidebar-marca-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
}

.app-sidebar-marca-nome {
  font-family: var(--fonte-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #F8FAFC;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
