.animated-nav {
  align-items: stretch;
}

/* Evita que traduções automáticas do navegador troquem nomes das abas. */
.animated-nav,
.mobile-tabs,
.brand-portal {
  translate: no;
}

/* Identificação do portal com aparência própria, sem virar uma aba do menu. */
.brand-portal {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 177, 240, .72);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(0, 177, 240, .17), rgba(0, 177, 240, .035) 58%, rgba(255, 255, 255, .035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 177, 240, .1);
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 177, 240, .22);
}

/* Na página pública, os quatro lados do efeito têm a mesma espessura. */
.portal-login .brand-portal {
  min-width: 230px;
  border-color: #00b1f0;
}

.brand-portal::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -80%;
  bottom: -80%;
  left: -35%;
  width: 22%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
  transform: skewX(-18deg);
  animation: portalBrandShine 4.8s ease-in-out infinite;
}

.brand:hover .brand-portal {
  border-color: rgba(76, 210, 255, .8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 28px rgba(0, 177, 240, .2);
}

@keyframes portalBrandShine {
  0%, 58% { left: -35%; opacity: 0; }
  64% { opacity: 1; }
  82%, 100% { left: 120%; opacity: 0; }
}

.animated-nav > a,
.animated-nav > form > .link-button,
.nav-dropdown > summary {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  padding: 0 5px;
  cursor: pointer;
  transition: color .2s ease, transform .2s ease;
}

.animated-nav > a::after,
.nav-dropdown > summary::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 3px;
  left: 5px;
  height: 2px;
  border-radius: 2px;
  background: #00b1f0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .25s ease;
}

.animated-nav > a:hover,
.nav-dropdown > summary:hover,
.nav-dropdown[open] > summary {
  color: #00b1f0;
  transform: translateY(-1px);
}

.animated-nav > a:hover::after,
.nav-dropdown > summary:hover::after,
.nav-dropdown[open] > summary::after {
  transform: scaleX(1);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
}

.animated-nav > .nav-dropdown > summary {
  min-height: 38px;
  margin: 3px 0;
  padding: 0 14px;
  border: 1px solid #343d42;
  border-radius: 11px;
  background: linear-gradient(145deg, #111719, #080a0b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.animated-nav > .nav-dropdown > summary::after {
  right: 13px;
  bottom: 5px;
  left: 13px;
}

.animated-nav > .nav-dropdown > summary:hover,
.animated-nav > .nav-dropdown[open] > summary {
  border-color: #00b1f0;
  background: linear-gradient(145deg, #102b35, #09151a);
  box-shadow: 0 8px 24px rgba(0, 177, 240, .18), inset 0 1px 0 rgba(255, 255, 255, .08);
  transform: translateY(-2px);
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::before {
  content: "";
  order: 2;
  width: 6px;
  height: 6px;
  margin: -4px 0 0 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform .2s ease;
}

.nav-dropdown[open] > summary::before {
  margin-top: 4px;
  transform: rotate(225deg);
}

.nav-dropdown > div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 220px;
  padding: 8px;
  border: 1px solid #30363a;
  border-radius: 12px;
  background: #0b0d0e;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .38);
  animation: navMenuIn .2s ease both;
}

.nav-dropdown > div a {
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  white-space: nowrap;
}

.nav-dropdown > div a:hover {
  background: #172127;
  color: #00b1f0;
  transform: translateX(3px);
}

.animated-nav > a[href="/solicitacoes"],
.animated-nav > a[href="/admin/denuncias"],
.animated-nav > a[href="/denuncias"] {
  min-height: 38px;
  margin: 3px 0;
  padding: 0 14px;
  border: 1px solid #343d42;
  border-radius: 11px;
  background: linear-gradient(145deg, #111719, #080a0b);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.animated-nav > a[href="/solicitacoes"]::after,
.animated-nav > a[href="/admin/denuncias"]::after,
.animated-nav > a[href="/denuncias"]::after {
  right: 13px;
  bottom: 5px;
  left: 13px;
}

.animated-nav > a[href="/solicitacoes"]:hover,
.animated-nav > a[href="/admin/denuncias"]:hover,
.animated-nav > a[href="/denuncias"]:hover {
  border-color: #00b1f0;
  background: linear-gradient(145deg, #102b35, #09151a);
  box-shadow: 0 8px 24px rgba(0, 177, 240, .18), inset 0 1px 0 rgba(255, 255, 255, .08);
  transform: translateY(-2px);
}

@keyframes navMenuIn {
  from { opacity: 0; transform: translateY(-7px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .animated-nav *,
  .nav-dropdown > div {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1000px) {
  .brand-portal {
    min-height: 36px;
    padding: 0 12px 0 15px;
    font-size: 11px;
  }
}

@media (max-width: 620px) {
  .brand-portal {
    display: none;
  }

  .portal-login .brand-portal {
    display: inline-flex;
    min-width: clamp(168px, 50vw, 230px);
    min-height: 36px;
    padding-inline: 10px;
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .portal-login .brand {
    gap: 8px;
  }
}

/* Padronização das cinco abas principais do perfil do colaborador. */
.animated-nav > a[href="/ponto"],
.animated-nav > a[href="/painel"],
.animated-nav > a[href="/admin/documentos/novo"],
.animated-nav > a[href="/admin/denuncias"],
.animated-nav > .nav-dropdown > summary,
.animated-nav > a[href="/solicitacoes"],
.animated-nav > a[href="/denuncias"],
.animated-nav > form > .link-button {
  min-height: 40px;
  margin: 2px 0;
  padding: 0 15px;
  border: 1px solid #169fd0;
  border-radius: 8px;
  background: linear-gradient(145deg, #087eaa, #05688e);
  color: #fff;
  box-shadow: 0 5px 16px rgba(0, 177, 240, .16), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.animated-nav > a[href="/ponto"]:hover,
.animated-nav > a[href="/painel"]:hover,
.animated-nav > a[href="/admin/documentos/novo"]:hover,
.animated-nav > a[href="/admin/denuncias"]:hover,
.animated-nav > .nav-dropdown > summary:hover,
.animated-nav > .nav-dropdown[open] > summary,
.animated-nav > a[href="/solicitacoes"]:hover,
.animated-nav > a[href="/denuncias"]:hover,
.animated-nav > form > .link-button:hover {
  border-color: #4cd2ff;
  background: linear-gradient(145deg, #0a9bd0, #0679a5);
  color: #fff;
  box-shadow: 0 9px 25px rgba(0, 177, 240, .3), inset 0 1px 0 rgba(255, 255, 255, .25);
  transform: translateY(-2px);
}

.animated-nav > form {
  display: flex;
  margin: 0;
}

@media (max-width: 1000px) {
  .mobile-tabs > nav {
    top: 58px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    width: min(430px, calc(100vw - 24px));
    padding: 12px;
    border: 1px solid #263b44;
    border-radius: 14px;
    background: #080b0d;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .4);
  }

  .mobile-tabs nav > a,
  .mobile-tabs nav > form > .link-button,
  .mobile-collaborator > summary {
    display: flex !important;
    min-height: 48px;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border: 1px solid #169fd0;
    border-radius: 8px;
    background: linear-gradient(145deg, #087eaa, #05688e);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 5px 16px rgba(0, 177, 240, .16), inset 0 1px 0 rgba(255, 255, 255, .18);
  }

  .mobile-tabs nav > a:hover,
  .mobile-tabs nav > form > .link-button:hover,
  .mobile-collaborator > summary:hover,
  .mobile-collaborator[open] > summary {
    border-color: #4cd2ff;
    background: linear-gradient(145deg, #0a9bd0, #0679a5);
    color: #fff;
  }

  .mobile-tabs nav > form {
    margin: 0;
  }

  .mobile-collaborator {
    position: relative;
  }

  .mobile-collaborator > summary {
    cursor: pointer;
    list-style: none;
  }

  .mobile-collaborator > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-collaborator > summary::after {
    content: "⌄";
    margin-left: 7px;
  }

  .mobile-collaborator > div {
    position: absolute;
    z-index: 2;
    top: calc(100% + 7px);
    right: 0;
    display: grid;
    width: min(245px, calc(100vw - 48px));
    padding: 7px;
    border: 1px solid #264753;
    border-radius: 10px;
    background: #0a1114;
    box-shadow: 0 16px 35px rgba(0, 0, 0, .38);
  }

  .mobile-collaborator > div a {
    padding: 12px;
    border-radius: 7px;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
  }

  .mobile-collaborator > div a:hover {
    background: #12303b;
    color: #4cd2ff;
  }
}
