/*
 * Tela de login (core/templates/login/index.html).
 *
 * Arquivo próprio porque o login.css antigo também serve registration/create_user.html.
 * Esta página não carrega o bundle do Vue, então os tokens do DESIGN_SYSTEM.md
 * (static/src/css/base/variables.css) estão repetidos aqui, com o mesmo nome.
 */

:root {
  --white: 255, 255, 255;
  --neutral-30: 229, 230, 235;
  --neutral-40: 222, 226, 230;
  --neutral-60: 102, 102, 112;
  --neutral-70: 54, 75, 90;
  --neutral-100: 9, 10, 26;
  --primary-pure: 0, 54, 98;
  --primary-dark: 16, 17, 53;
  --alert-error: 233, 44, 44;
  --fundo-login: 243, 247, 250;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.acesso {
  margin: 0;
  min-height: 100vh;
  font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: rgb(var(--fundo-login));
  color: rgb(var(--neutral-100));
}

.acesso-tela {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 72px;
  overflow: hidden;
}

/* O "C" do logo, inteiro na vertical: cortado embaixo ele parece deitado. */
.acesso-marca {
  position: absolute;
  right: -250px;
  top: 50%;
  width: 760px;
  height: 781px;
  margin-top: -390px;
  color: rgb(var(--primary-pure));
  opacity: 0.05;
  pointer-events: none;
}

.acesso-cartao {
  position: relative;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 48px 40px 40px;
  background: rgb(var(--white));
  border: 1px solid rgb(var(--neutral-30));
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(var(--neutral-100), 0.06);
  animation: acesso-entrar 0.4s ease-out both;
}

.acesso-logo {
  display: block;
  width: 150px;
  height: 33px;
}

.acesso-titulo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acesso-titulo h1 {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  color: rgb(var(--neutral-100));
}

.acesso-titulo p {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: rgb(var(--neutral-60));
}

.acesso-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.acesso-campos {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.acesso-campo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acesso-campo label {
  font-size: 13px;
  font-weight: 500;
  color: rgb(var(--neutral-70));
}

.acesso-input {
  position: relative;
  display: flex;
  align-items: center;
}

.acesso-input input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  color: rgb(var(--neutral-100));
  background: rgb(var(--white));
  border: 1px solid rgb(var(--neutral-40));
  border-radius: 6px;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.acesso-input input::placeholder {
  color: rgba(var(--neutral-60), 0.7);
}

.acesso-input input:focus-visible {
  border-color: rgb(var(--primary-pure));
  box-shadow: 0 0 0 3px rgba(var(--primary-pure), 0.12);
}

.acesso-input--senha input {
  padding-right: 48px;
}

.acesso-olho {
  position: absolute;
  right: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  color: rgb(var(--neutral-60));
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.acesso-olho:hover {
  color: rgb(var(--primary-pure));
  background: rgba(var(--primary-pure), 0.06);
}

.acesso-olho:focus-visible {
  outline: 2px solid rgb(var(--primary-pure));
  outline-offset: 1px;
}

.acesso-olho svg {
  width: 20px;
  height: 20px;
}

.acesso-olho .olho-fechado,
.acesso-olho[aria-pressed='true'] .olho-aberto {
  display: none;
}

.acesso-olho[aria-pressed='true'] .olho-fechado {
  display: block;
}

.acesso-esqueceu {
  align-self: flex-end;
  font-size: 13px;
  font-weight: 500;
  color: rgb(var(--primary-pure));
  text-decoration: none;
}

.acesso-esqueceu:hover {
  text-decoration: underline;
}

.acesso-esqueceu:focus-visible {
  outline: 2px solid rgb(var(--primary-pure));
  outline-offset: 2px;
  border-radius: 2px;
}

.acesso-botao {
  height: 44px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: rgb(var(--white));
  background: rgb(var(--primary-pure));
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.acesso-botao:hover {
  background: rgb(var(--primary-dark));
}

.acesso-botao:focus-visible {
  outline: 2px solid rgb(var(--primary-pure));
  outline-offset: 2px;
}

.acesso-erro {
  margin: 0;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  color: rgb(var(--alert-error));
  background: rgba(var(--alert-error), 0.06);
  border: 1px solid rgba(var(--alert-error), 0.2);
  border-radius: 6px;
}

.acesso-rodape {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 32px;
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: rgb(var(--neutral-60));
}

@keyframes acesso-entrar {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .acesso-cartao {
    animation: none;
  }
}

@media (max-width: 639px) {
  .acesso-cartao {
    padding: 32px 24px 28px;
    gap: 28px;
  }

  .acesso-marca {
    display: none;
  }
}
