﻿.auth-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #f8f3ef 0%, #f2ece6 100%);
  color: #101a2c;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.43fr 0.57fr;
}

.auth-form-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.75rem 2.1rem;
}

.auth-form-wrap {
  width: min(440px, 100%);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  margin-bottom: 2rem;
}

.auth-brand img {
  width: 46px;
  height: auto;
}

.auth-brand span {
  color: #2c3754;
  font-size: 0.78rem;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  font-weight: 600;
}

.auth-copy h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2.2rem, 3.7vw, 2.95rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #0f1f3b;
}

.auth-copy p {
  margin: 0 0 1.8rem;
  max-width: 40ch;
  color: #66718a;
  line-height: 1.65;
}

.auth-alert {
  border-radius: 14px;
  padding: 0.78rem 0.98rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.auth-alert-success {
  background: rgba(223, 245, 78, 0.3);
  color: #334216;
  border: 1px solid rgba(155, 179, 20, 0.35);
}

.auth-alert-error {
  background: rgba(183, 39, 54, 0.08);
  color: #7f1f2a;
  border: 1px solid rgba(183, 39, 54, 0.22);
}

.auth-form {
  display: grid;
  gap: 1.1rem;
}

.auth-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
}

.auth-field label {
  font-size: 0.78rem;
  color: #2f3a53;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.auth-field input {
  width: 100%;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(15, 27, 45, 0.1);
  background: #f4f6f8;
  color: #0f1d35;
  padding: 0.88rem 1.05rem;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.auth-field input::placeholder {
  color: #8e99af;
}

.auth-field input:focus {
  border-color: var(--unione-lime);
  box-shadow: 0 0 0 3px rgba(223, 245, 78, 0.15);
  background: #f8fafb;
}

.auth-field input[aria-invalid="true"] {
  border-color: rgba(183, 39, 54, 0.82);
  box-shadow: 0 0 0 3px rgba(183, 39, 54, 0.13);
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f1d35;
  -webkit-box-shadow: 0 0 0 1000px #f4f6f8 inset;
  transition: background-color 9999s ease-out 0s;
}

.auth-error {
  color: #862c36;
  font-size: 0.79rem;
  line-height: 1.35;
}

.auth-password-wrap {
  position: relative;
}

.auth-password-wrap input {
  padding-right: 3.65rem;
}

.password-toggle {
  position: absolute;
  right: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(13, 28, 49, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: #2a3a57;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.password-toggle .icon-eye {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye-open {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

.password-toggle:hover {
  opacity: 1;
  border-color: rgba(13, 28, 49, 0.3);
  background: #ffffff;
  color: #0f203d;
}

.password-toggle:focus-visible {
  outline: none;
  border-color: var(--unione-lime);
  box-shadow: 0 0 0 3px rgba(223, 245, 78, 0.2);
}

.auth-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  color: #44506a;
  font-size: 0.84rem;
  cursor: pointer;
}

.auth-check input {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid rgba(13, 28, 49, 0.28);
  background: #ffffff;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-check input::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #112345;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transform-origin: center;
  transition: transform 0.16s ease;
}

.auth-check input:checked {
  border-color: var(--unione-lime);
  background: var(--unione-lime);
}

.auth-check input:checked::after {
  transform: rotate(45deg) scale(1);
}

.auth-check input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(223, 245, 78, 0.2);
}

.auth-check-stack {
  display: grid;
  gap: 0.48rem;
}

.auth-text-link,
.auth-switch a {
  color: #001e67;
  text-decoration: none;
  font-weight: 600;
}

.auth-forgot-link {
  font-size: 0.77rem;
  font-weight: 500;
  color: #556281;
}

.auth-text-link:hover,
.auth-switch a:hover {
  text-decoration: underline;
}

.auth-submit {
  width: 100%;
  height: 56px;
  font-size: 0.86rem;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-submit:hover {
  transform: scale(1.02);
  box-shadow: 0 14px 24px rgba(8, 16, 30, 0.2);
}

.auth-submit:active {
  background: #cfe944;
  transform: scale(0.995);
}

.auth-submit.is-loading {
  opacity: 0.95;
  pointer-events: none;
}

.auth-submit.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 0.55rem;
  border-radius: 999px;
  border: 2px solid rgba(20, 26, 36, 0.3);
  border-top-color: #141a24;
  display: inline-block;
  vertical-align: -2px;
  animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth-switch {
  margin: 1.3rem 0 0;
  color: #43506b;
  font-size: 0.92rem;
}

.auth-social-placeholder {
  margin-top: 1.15rem;
  display: grid;
  gap: 0.58rem;
}

.auth-social-divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.76rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #7a8399;
}

.auth-social-divider::before,
.auth-social-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(16, 30, 55, 0.12);
}

.auth-social-placeholder button {
  height: 49px;
  border-radius: 14px;
  border: 1px solid rgba(8, 25, 48, 0.16);
  background: #f9fbfc;
  color: #34445f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.auth-social-placeholder button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.auth-social-placeholder button:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.auth-social-placeholder button:hover {
  background: #ffffff;
  border-color: rgba(8, 25, 48, 0.22);
}

.auth-visual-col {
  padding: 1.7rem 1.7rem 1.7rem 0;
  display: flex;
}

.auth-visual-panel {
  width: 100%;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(3, 13, 38, 0.25) 8%, rgba(2, 10, 30, 0.78) 78%),
    url("../img/bg-academy.jpg") center/cover no-repeat;
  color: #fff;
  padding: 2.7rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 24px 52px rgba(7, 17, 38, 0.24);
  position: relative;
  overflow: hidden;
}

.auth-visual-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(223, 245, 78, 0.18), transparent 44%),
    linear-gradient(180deg, rgba(0, 11, 43, 0) 25%, rgba(0, 9, 34, 0.46) 70%);
  pointer-events: none;
}

.auth-visual-panel > * {
  position: relative;
  z-index: 1;
  max-width: 40ch;
}

.auth-visual-label {
  text-transform: uppercase;
  letter-spacing: 1.9px;
  font-size: 0.72rem;
  margin-bottom: 0.95rem;
  color: rgba(223, 245, 78, 0.95);
}

.auth-visual-panel h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.08;
}

.auth-visual-panel p {
  margin: 0 0 0.85rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.65;
}

.auth-visual-panel small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

.auth-floating-card {
  margin-top: 1.7rem;
  width: min(340px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.2rem 1.15rem;
}

.auth-floating-card h3 {
  font-size: 1.02rem;
  margin: 0 0 0.62rem;
}

.auth-floating-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(255, 255, 255, 0.94);
}

.auth-floating-card li {
  margin-bottom: 0.24rem;
}

@media (max-width: 1199px) {
  .auth-shell {
    grid-template-columns: 1fr 1fr;
  }

  .auth-form-col {
    padding: 2rem 1.2rem;
  }

  .auth-visual-col {
    padding: 1.2rem 1.2rem 1.2rem 0;
  }
}

@media (max-width: 991px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-form-col {
    padding: 1.55rem 1.15rem;
    min-height: 100svh;
  }

  .auth-form-wrap {
    width: min(500px, 100%);
  }

  .auth-visual-col {
    padding: 0 1rem 1rem;
  }

  .auth-visual-panel {
    min-height: 320px;
    border-radius: 22px;
    padding: 1.7rem;
  }
}

@media (max-width: 575px) {
  .auth-grid-two {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .auth-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-visual-col {
    display: none;
  }

  .auth-form-col {
    padding: 1.2rem 1rem 1.5rem;
    min-height: auto;
  }

  .auth-form-wrap {
    width: 100%;
  }
}
