:root {
  --login-bg: #fbf7f2;
  --login-bg-soft: #f5eee8;
  --login-wine: #321044;
  --login-copper: #bf7564;
  --login-copper-dark: #a15b4c;
  --login-ink: #30262a;
  --login-muted: #6f6565;
  --login-border: rgba(50, 16, 68, 0.12);
  --login-border-warm: rgba(191, 117, 100, 0.24);
  --login-shadow: 0 30px 70px rgba(53, 29, 26, 0.1);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--login-ink);
  background:
    radial-gradient(circle at 18% 22%, rgba(191, 117, 100, 0.09), transparent 32%),
    radial-gradient(circle at 88% 78%, rgba(191, 117, 100, 0.11), transparent 29%),
    var(--login-bg);
  overflow-x: hidden;
}

.login-page {
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  flex-direction: column;
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login-brand {
  display: inline-flex;
  color: var(--login-wine);
}

.login-brand:hover,
.back-link:hover {
  opacity: 1;
}

.login-brand span {
  position: relative;
  display: inline-flex;
  font-family: var(--fonte-titulo);
  font-size: clamp(2rem, 3vw, 2.44rem);
  line-height: 1;
  letter-spacing: -0.085em;
  font-weight: 400;
}

.login-brand strong {
  color: var(--login-copper);
  font-weight: inherit;
}

.login-brand i {
  position: absolute;
  top: 3px;
  right: -13px;
  width: 8px;
  height: 8px;
  background: var(--login-copper);
  transform: rotate(45deg);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--login-copper-dark);
  font-size: 0.92rem;
  font-weight: 500;
}

.back-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(430px, 526px);
  gap: clamp(58px, 8vw, 116px);
  align-items: center;
  padding: 44px 0;
}

.login-intro {
  align-self: center;
  max-width: 470px;
}

.login-intro h1 {
  margin-bottom: 29px;
  color: var(--login-wine);
  font-family: var(--fonte-titulo);
  font-size: clamp(3.2rem, 5vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 1.08;
}

.login-intro h1::after {
  content: '';
  display: block;
  width: 45px;
  height: 1px;
  margin-top: 30px;
  background: var(--login-copper);
}

.login-intro p {
  max-width: 430px;
  margin-bottom: 39px;
  color: var(--login-muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.intro-points {
  display: grid;
  gap: 19px;
  list-style: none;
}

.intro-points li {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--login-muted);
  font-size: 0.96rem;
  font-weight: 500;
}

.intro-points svg {
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  color: var(--login-copper);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-card {
  width: 100%;
  padding: clamp(38px, 4.5vw, 48px) clamp(34px, 4.5vw, 48px) 31px;
  border: 1px solid rgba(50, 16, 68, 0.06);
  border-radius: 30px;
  background: rgba(255, 254, 253, 0.96);
  box-shadow: var(--login-shadow);
}

.login-card-header {
  margin-bottom: 33px;
}

.login-card-header h2 {
  margin-bottom: 12px;
  color: var(--login-wine);
  font-family: var(--fonte-titulo);
  font-size: clamp(2.15rem, 3vw, 2.52rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.login-card-header p {
  max-width: 375px;
  color: var(--login-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.campo-grupo {
  gap: 9px;
  margin-bottom: 19px;
}

.campo-grupo label,
.perfis-label {
  color: var(--login-ink);
  font-size: 0.85rem;
  font-weight: 600;
}

.campo-com-icone {
  position: relative;
}

.campo-com-icone svg {
  position: absolute;
  top: 50%;
  left: 17px;
  z-index: 1;
  width: 19px;
  height: 19px;
  color: #a2928e;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
}

.campo-com-icone .campo {
  height: 55px;
  padding: 0 16px 0 49px;
  border-color: var(--login-border);
  border-radius: 12px;
  color: var(--login-ink);
  background: #fffefd;
}

.campo-com-icone .campo::placeholder {
  color: #a59c9a;
}

.campo-com-icone .campo:focus {
  border-color: var(--login-copper);
  box-shadow: 0 0 0 3px rgba(191, 117, 100, 0.14);
}

.ajuda-acesso {
  color: var(--login-muted);
  font-size: 0.73rem;
}

.empresa-identidade {
  margin: 4px 0 20px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 12px;
  color: var(--login-muted);
  background: var(--login-bg-soft);
  font-size: 0.77rem;
}

.empresa-identidade[hidden] {
  display: none;
}

.empresa-identidade img {
  display: none;
  max-width: 92px;
  max-height: 35px;
  object-fit: contain;
}

.empresa-identidade strong {
  color: var(--login-wine);
  font-size: 0.82rem;
}

.perfis-label {
  display: block;
  margin: 25px 0 10px;
}

.login-modos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 26px;
  overflow: hidden;
  border: 1px solid var(--login-border);
  border-radius: 12px;
  background: #faf8f6;
}

.btn-modo {
  height: 52px;
  padding: 0 9px;
  border: 0;
  border-left: 1px solid var(--login-border);
  color: #817878;
  background: transparent;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-modo:first-child {
  border-left: 0;
}

.btn-modo:hover:not(.ativo) {
  color: var(--login-wine);
  background: rgba(191, 117, 100, 0.06);
}

.btn-modo.ativo {
  color: var(--login-copper-dark);
  background: #fffefd;
  box-shadow: inset 0 0 0 1px var(--login-copper);
  font-weight: 600;
}

.painel-login {
  display: none;
}

.painel-login.visivel {
  display: block;
}

.login-formulario .campo-grupo {
  margin-bottom: 18px;
}

.btn-entrar {
  width: 100%;
  min-height: 56px;
  margin-top: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(110deg, var(--cor-primaria), var(--login-copper));
  box-shadow: 0 13px 27px rgba(191, 117, 100, 0.22);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-entrar svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-entrar:hover:not(:disabled) {
  background: linear-gradient(110deg, var(--login-copper-dark), var(--login-copper));
  box-shadow: 0 17px 32px rgba(191, 117, 100, 0.3);
  transform: translateY(-1px);
}

.btn-entrar:disabled {
  opacity: 0.68;
  cursor: wait;
}

.recuperar-link {
  margin: 17px auto 0;
  display: block;
  border: 0;
  color: var(--login-copper-dark);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.login-erro {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid rgba(200, 53, 50, 0.18);
  border-radius: 10px;
  color: #ae312f;
  background: #fff4f3;
  font-size: 0.78rem;
  text-align: left;
}

.login-rodape {
  margin-top: 29px;
  padding-top: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid var(--login-border);
  color: #887d7d;
}

.login-rodape svg {
  width: 18px;
  height: 18px;
  color: var(--login-copper);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-rodape p {
  color: inherit;
  font-size: 0.77rem;
}

.login-area-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  color: var(--cor-cinza-texto);
  font-size: 0.8rem;
  text-decoration: none;
}

.login-area-link:hover {
  color: var(--cor-primaria);
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-width: 921px) and (max-height: 820px) {
  .login-page {
    padding: 21px 0;
  }

  .login-layout {
    padding: 22px 0 0;
  }

  .login-intro h1 {
    margin-bottom: 20px;
    font-size: clamp(2.85rem, 4.5vw, 3.65rem);
  }

  .login-intro h1::after {
    margin-top: 21px;
  }

  .login-intro p {
    margin-bottom: 26px;
    font-size: 0.94rem;
  }

  .intro-points {
    gap: 13px;
  }

  .login-card {
    padding: 27px 38px 20px;
    border-radius: 26px;
  }

  .login-card-header {
    margin-bottom: 20px;
  }

  .login-card-header h2 {
    margin-bottom: 6px;
    font-size: 2.12rem;
  }

  .login-card-header p {
    line-height: 1.45;
  }

  .campo-grupo {
    gap: 6px;
    margin-bottom: 12px;
  }

  .campo-com-icone .campo {
    height: 47px;
  }

  .ajuda-acesso {
    display: none;
  }

  .perfis-label {
    margin: 16px 0 7px;
  }

  .login-modos {
    margin-bottom: 16px;
  }

  .btn-modo {
    height: 46px;
  }

  .login-formulario .campo-grupo {
    margin-bottom: 12px;
  }

  .btn-entrar {
    min-height: 49px;
    margin-top: 5px;
  }

  .login-rodape {
    margin-top: 17px;
    padding-top: 14px;
  }
}

@media (max-width: 920px) {
  .login-page {
    width: min(520px, calc(100% - 32px));
    padding: 22px 0 18px;
  }

  .login-layout {
    display: block;
    padding: 26px 0 0;
  }

  .login-intro {
    display: none;
  }
}

@media (max-width: 560px) {
  .login-page {
    width: calc(100% - 28px);
  }

  .login-brand span {
    font-size: 1.9rem;
  }

  .back-link {
    font-size: 0.83rem;
  }

  .back-link svg {
    display: none;
  }

  .login-layout {
    padding-top: 24px;
  }

  .login-card {
    padding: 29px 20px 22px;
    border-radius: 23px;
  }

  .login-card-header {
    margin-bottom: 24px;
  }

  .login-card-header h2 {
    font-size: clamp(1.85rem, 9.2vw, 2.1rem);
  }

  .login-card-header p {
    font-size: 0.84rem;
  }

  .campo-com-icone .campo {
    height: 52px;
  }

  .login-modos {
    margin-bottom: 22px;
  }

  .btn-modo {
    height: 50px;
    font-size: 0.77rem;
  }

  .btn-entrar {
    min-height: 53px;
  }

  .login-rodape {
    margin-top: 24px;
    padding-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

html[data-app-mode="1"] .back-link,
html[data-app-mode="1"] .login-area-link {
  display: none !important;
}

html[data-app-mode="1"] .login-header {
  justify-content: center;
}

html[data-app-mode="1"] .login-brand {
  margin-inline: auto;
}
