/* Branding, autenticazione e profilo Syncora. */
.auth-page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(20px, 4vw, 64px);
  display: grid;
  place-items: center end;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(6,7,10,.18), rgba(6,7,10,.08) 46%, rgba(6,7,10,.20)),
    url("../branding/login-background.jpg") center center / cover no-repeat;
  color: #f4f5f7;
}
.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5,6,9,.05), rgba(5,6,9,.20)),
    radial-gradient(circle at 78% 52%, rgba(255,91,36,.12), transparent 34%);
}
.auth-shell {
  width: min(520px, 100%);
  border: 1px solid rgba(255,122,68,.34);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(12,13,18,.74);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  backdrop-filter: blur(18px) saturate(1.08);
  box-shadow: 0 30px 90px rgba(0,0,0,.46);
}
.auth-panel {
  display: block;
  padding: clamp(30px, 4vw, 52px);
}
.auth-panel-inner {
  width: 100%;
  max-width: 410px;
  margin: 0 auto;
}
.auth-wordmark {
  display: flex;
  justify-content: center;
  align-items: baseline;
  margin: 0 0 28px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1;
}
.auth-wordmark span { color: #f5f6f8; }
.auth-wordmark strong {
  color: #ff6a2d;
  font: inherit;
}
.auth-heading { margin-bottom: 28px; }
.auth-eyebrow {
  display: inline-block;
  color: #ff7a44;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .16em;
}
.auth-heading h2 {
  margin: 9px 0 8px;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.02;
  letter-spacing: -.05em;
}
.auth-heading p {
  margin: 0;
  color: #a7acb7;
  font-size: 1rem;
}
.auth-form { display: grid; gap: 15px; }
.auth-field label { color: #c3c7d0; }
.auth-field .input {
  min-height: 54px;
  background: rgba(35,42,58,.88);
  border-color: rgba(255,255,255,.12);
  color: #f7f8fa;
}
.auth-field .input:focus {
  border-color: rgba(255,91,36,.86);
  box-shadow: 0 0 0 3px rgba(255,91,36,.11);
}
.auth-field .field-hint { color: #8a909e; }
.auth-submit {
  width: 100%;
  min-height: 54px;
  margin-top: 6px;
  border-radius: 14px;
  font-weight: 800;
}
.auth-error {
  padding: 11px 12px;
  border: 1px solid rgba(255,77,109,.28);
  border-radius: 12px;
  background: rgba(255,77,109,.10);
  color: #ff9aac;
  font-size: .82rem;
}
.auth-switch-copy {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
  color: #a5aab5;
  font-size: .86rem;
}
.auth-text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #ff7a44;
  font-weight: 800;
}
.auth-text-button:hover { text-decoration: underline; }

.brand-logo { overflow: hidden; padding: 0; background: #111218; }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }

.profile-identity { display: flex; align-items: center; gap: 16px; }
.profile-identity .profile-avatar { margin-bottom: 0; flex: 0 0 auto; }
.profile-card-head { margin-bottom: 18px; }
.profile-theme { margin-top: 18px; }
.profile-security {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  grid-column: 1 / -1;
}
.profile-security .card-subtitle { max-width: 560px; }

@media (max-width: 980px) {
  .auth-page {
    place-items: center;
    padding: 28px;
    background-position: center center;
  }
  .auth-shell { width: min(500px, 100%); }
}

@media (max-width: 620px) {
  .auth-page {
    align-items: center;
    padding: 18px;
    background-position: 52% center;
  }
  .auth-page::before { background: rgba(5,6,9,.25); }
  .auth-shell {
    width: 100%;
    border-radius: 24px;
    background: rgba(12,13,18,.82);
  }
  .auth-panel { padding: 28px 22px; }
  .auth-wordmark { margin-bottom: 24px; font-size: 2.25rem; }
  .auth-heading h2 { font-size: 2rem; }
  .profile-security { align-items: stretch; flex-direction: column; }
  .profile-security .btn { width: 100%; }
}

@media (max-width: 420px) {
  .auth-page { padding: 12px; align-items: start; }
  .auth-shell { margin-top: 10px; border-radius: 20px; }
  .auth-panel { padding: 24px 18px; }
  .auth-wordmark { font-size: 2rem; }
  .auth-heading { margin-bottom: 22px; }
  .auth-heading h2 { font-size: 1.8rem; }
  .auth-switch-copy { flex-wrap: wrap; }
}

@media (max-height: 700px) and (min-width: 621px) {
  .auth-page { align-items: start; padding-top: 24px; padding-bottom: 24px; }
  .auth-panel { padding-top: 30px; padding-bottom: 30px; }
  .auth-wordmark { margin-bottom: 20px; }
  .auth-heading { margin-bottom: 20px; }
}


/* SYNCORA_COMPACT_MOBILE_LOGIN */
@media (max-width: 620px) {
  .auth-page {
    min-height: 100dvh;
    padding: 20px;
    place-items: center;
    overflow-y: auto;
  }

  .auth-shell {
    width: min(380px, calc(100vw - 40px));
    max-width: 380px;
    margin: 0;
    border-radius: 20px;
    background: rgba(12,13,18,.76);
    box-shadow: 0 20px 60px rgba(0,0,0,.42);
  }

  .auth-panel {
    padding: 22px 20px;
  }

  .auth-panel-inner {
    max-width: 340px;
  }

  .auth-wordmark {
    margin-bottom: 16px;
    font-size: 1.8rem;
  }

  .auth-heading {
    margin-bottom: 18px;
  }

  .auth-eyebrow {
    font-size: .62rem;
    letter-spacing: .14em;
  }

  .auth-heading h2 {
    margin: 6px 0 5px;
    font-size: 1.6rem;
    line-height: 1.05;
  }

  .auth-heading p {
    font-size: .88rem;
  }

  .auth-form {
    gap: 11px;
  }

  .auth-field label {
    font-size: .78rem;
  }

  .auth-field .input {
    min-height: 46px;
    height: 46px;
    padding-block: 0;
  }

  .auth-field .field-hint {
    font-size: .7rem;
    line-height: 1.3;
  }

  .auth-submit {
    min-height: 46px;
    margin-top: 2px;
    border-radius: 12px;
  }

  .auth-switch-copy {
    margin-top: 15px;
    font-size: .78rem;
  }
}

@media (max-width: 420px) {
  .auth-page {
    padding: 14px;
    align-items: center;
  }

  .auth-shell {
    width: min(350px, calc(100vw - 28px));
    max-width: 350px;
    margin: 0;
    border-radius: 18px;
  }

  .auth-panel {
    padding: 19px 16px;
  }

  .auth-wordmark {
    margin-bottom: 13px;
    font-size: 1.65rem;
  }

  .auth-heading {
    margin-bottom: 15px;
  }

  .auth-heading h2 {
    font-size: 1.45rem;
  }

  .auth-heading p {
    font-size: .82rem;
  }

  .auth-form {
    gap: 9px;
  }

  .auth-field .input {
    min-height: 44px;
    height: 44px;
  }

  .auth-submit {
    min-height: 44px;
  }

  .auth-switch-copy {
    margin-top: 13px;
  }
}

@media (max-width: 380px) {
  .auth-page {
    padding: 10px;
  }

  .auth-shell {
    width: min(330px, calc(100vw - 20px));
    max-width: 330px;
  }

  .auth-panel {
    padding: 17px 14px;
  }

  .auth-wordmark {
    font-size: 1.55rem;
  }

  .auth-heading h2 {
    font-size: 1.35rem;
  }
}

@media (max-height: 680px) and (max-width: 620px) {
  .auth-page {
    align-items: start;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .auth-shell {
    margin: 0 auto;
  }

  .auth-panel {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .auth-wordmark {
    margin-bottom: 10px;
  }

  .auth-heading {
    margin-bottom: 12px;
  }

  .auth-switch-copy {
    margin-top: 10px;
  }
}


/* SYNCORA_LOGIN_BACKGROUND_QUALITY */
.auth-page {
  background: #08090d;
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: -28px;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5,6,9,.18), rgba(5,6,9,.05) 52%, rgba(5,6,9,.30)),
    url("../branding/login-background.jpg") center center / cover no-repeat;
  filter: blur(18px) saturate(.92);
  transform: scale(1.035);
  opacity: .78;
}

.auth-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5,6,9,.12), rgba(5,6,9,.02) 55%, rgba(5,6,9,.26)),
    url("../branding/login-background.jpg") 36% center / auto 138vh no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 82%, transparent 100%);
}

.auth-shell {
  position: relative;
  z-index: 2;
}

.brand-logo {
  background: #111218;
}

.brand-logo img {
  object-fit: contain;
}

@media (max-width: 980px) {
  .auth-page::after {
    background-position: 34% center;
    background-size: auto 126vh;
  }
}

@media (max-width: 620px) {
  .auth-page::before {
    inset: -18px;
    filter: blur(12px) saturate(.95);
    opacity: .58;
  }

  .auth-page::after {
    background:
      linear-gradient(180deg, rgba(5,6,9,.10), rgba(5,6,9,.20)),
      url("../branding/login-background.jpg") center center / cover no-repeat;
    -webkit-mask-image: none;
    mask-image: none;
  }
}


/* SYNCORA_LOGIN_16X9_FINAL */
.auth-page {
  background:
    linear-gradient(90deg, rgba(5,6,9,.10) 0%, rgba(5,6,9,.04) 48%, rgba(5,6,9,.24) 100%),
    url("../branding/login-background-desktop.png") center center / cover no-repeat;
}

.auth-page::before,
.auth-page::after {
  content: none !important;
  display: none !important;
}

.auth-shell {
  position: relative;
  z-index: 1;
}

/* Su mobile resta la sorgente verticale, più adatta al rapporto dello schermo. */
@media (max-width: 620px) {
  .auth-page {
    background:
      linear-gradient(180deg, rgba(5,6,9,.12), rgba(5,6,9,.24)),
      url("../branding/login-background.jpg") 52% center / cover no-repeat;
  }
}
