/**
 * SS — Login V1 FINAL (congelado)
 * Estilos exclusivos: app/static/ses/ss-login.css
 */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600&display=swap");

.ss-login-shell {
  margin: 0;
  color: #0d0d0f;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* —— Canvas — fundo premium (somente; card/marca intactos) —— */
.ss-login-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 5vw, 3rem);
  background-color: #262a31;
  background-image:
    radial-gradient(ellipse 130% 105% at 50% 44%, #6d7682 0%, #5f6772 20%, #4b525d 42%, #353b45 64%, #262a31 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Profundidade + luz central (movimento imperceptível) */
.ss-login-page::before {
  content: "";
  position: absolute;
  inset: -8%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 48% 36% at 50% 48%, rgba(109, 118, 130, 0.22) 0%, transparent 70%),
    radial-gradient(ellipse 72% 52% at 50% 50%, rgba(95, 103, 114, 0.1) 0%, transparent 68%);
  animation: ss-login-bg-drift 26s ease-in-out infinite;
}

/* Vinheta + noise ~1.5% */
.ss-login-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(ellipse 115% 95% at 50% 50%, transparent 38%, rgba(20, 22, 26, 0.42) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  background-size: cover, 180px 180px;
  background-repeat: no-repeat, repeat;
  opacity: 0.55;
  mix-blend-mode: overlay;
}

@keyframes ss-login-bg-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(3px, -2px, 0) scale(1.006);
  }
}

.ss-login-page > .ss-login-card {
  position: relative;
  z-index: 1;
}

/* —— Card —— */
.ss-login-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(15, 15, 20, 0.06);
  box-shadow:
    0 2px 6px rgba(15, 15, 20, 0.03),
    0 20px 48px rgba(0, 0, 0, 0.07),
    0 48px 96px rgba(0, 0, 0, 0.09),
    0 72px 160px rgba(0, 0, 0, 0.06);
}

.ss-login-head,
.ss-login-body {
  position: relative;
  z-index: 1;
}

/* —— Marca —— */
.ss-login-head {
  padding: 52px 52px 0;
  text-align: center;
  background: #ffffff;
}

.ss-login-brand-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ss-login-bird {
  display: block;
  margin: 0 auto 18px;
  width: 129px;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
}

.ss-login-ss {
  margin: 0;
  padding-left: 6px;
  font-family: "Plus Jakarta Sans", var(--ss-font);
  font-size: calc(1.65rem + 17px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 6px;
  color: #0d0d0f;
}

.ss-login-signature {
  margin: 6px 0 0;
  padding-left: 6px;
  font-family: "Plus Jakarta Sans", var(--ss-font);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #2b2b2f;
}

.ss-login-body {
  margin-top: 40px;
  padding: 0 52px 52px;
  background: #ffffff;
}

/* —— Animação: apenas logo (mais lenta) —— */
.ss-login-intro .ss-login-seq-bird {
  opacity: 0;
  transform: scale(0.92);
  animation: ss-login-v3-bird 920ms cubic-bezier(0.22, 1, 0.36, 1) 180ms forwards;
}

.ss-login-intro .ss-login-seq-sig {
  opacity: 0;
  animation: ss-login-v3-fade 380ms ease-out 560ms forwards;
}

.ss-login-intro-done .ss-login-seq-bird,
.ss-login-intro-done .ss-login-seq-sig {
  animation: none;
  opacity: 1;
  transform: none;
}

@keyframes ss-login-v3-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes ss-login-v3-bird {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* —— Formulário —— */
.ss-login-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.ss-login-error {
  margin: 0 0 0.125rem;
  padding: 0.5625rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #a31822;
  background: rgba(196, 30, 42, 0.06);
  border: 1px solid rgba(196, 30, 42, 0.1);
  border-radius: 8px;
}

.ss-login-form .ss-field {
  margin: 0;
}

.ss-login-form .ss-field span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #52525b;
  margin-bottom: 0.4375rem;
  letter-spacing: 0.015em;
}

.ss-login-form .ss-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 0.6875rem 0.875rem;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: #0d0d0f;
  background: #ffffff;
  border: 1px solid #c4c4cc;
  border-radius: 10px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.ss-login-form .ss-input::placeholder {
  color: #71717a;
  opacity: 1;
}

.ss-login-form .ss-input:hover {
  border-color: #a1a1aa;
}

.ss-login-form .ss-input:focus {
  outline: none;
  border-color: #c41e2a;
  box-shadow: 0 0 0 3px rgba(196, 30, 42, 0.12);
}

.ss-login-form .ss-input:focus-visible {
  border-color: #c41e2a;
  box-shadow: 0 0 0 3px rgba(196, 30, 42, 0.16);
}

.ss-login-submit {
  width: 100%;
  margin-top: 0.375rem;
  min-height: 44px;
  padding: 0.6875rem 1rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  box-shadow: 0 1px 2px rgba(15, 15, 20, 0.05);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.ss-login-submit:hover {
  transform: translateY(-1px);
  box-shadow:
    0 4px 12px rgba(196, 30, 42, 0.18),
    0 2px 6px rgba(15, 15, 20, 0.08);
}

.ss-login-submit:active {
  transform: translateY(0) scale(0.992);
}

.ss-login-submit:focus-visible {
  outline: 2px solid rgba(196, 30, 42, 0.45);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ss-login-page::before {
    animation: none;
  }

  .ss-login-intro .ss-login-seq-bird,
  .ss-login-intro .ss-login-seq-sig {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .ss-login-submit:active {
    transform: none;
  }
}

@media (max-width: 480px) {
  .ss-login-head {
    padding: 40px 28px 0;
  }

  .ss-login-body {
    padding: 0 28px 40px;
  }
}
