:root {
  --auth-navy: #0b2f5b;
  --auth-blue: #1f5da8;
  --auth-soft: #eaf2fb;
  --auth-text: #16324f;
}

.auth-wrapper {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(48, 115, 198, 0.2), transparent 36%),
    radial-gradient(circle at 88% 78%, rgba(11, 47, 91, 0.17), transparent 34%),
    linear-gradient(140deg, #f8fbff 0%, #e8f0f8 52%, #f5f9ff 100%);
}

.auth-wrapper::before,
.auth-wrapper::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.auth-wrapper::before {
  width: 26rem;
  height: 26rem;
  top: -11rem;
  right: -8rem;
  background: linear-gradient(160deg, rgba(35, 102, 177, 0.24), rgba(21, 61, 114, 0.08));
}

.auth-wrapper::after {
  width: 22rem;
  height: 22rem;
  bottom: -10rem;
  left: -7rem;
  background: linear-gradient(160deg, rgba(24, 72, 130, 0.22), rgba(24, 72, 130, 0.05));
}

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

.auth-brand {
  max-width: 46rem;
  animation: authFade 0.45s ease;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(13, 58, 108, 0.2);
  color: var(--auth-navy);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.auth-title {
  margin-top: 0.9rem;
  color: var(--auth-navy);
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  font-weight: 800;
  line-height: 1.12;
}

.auth-subtitle {
  margin-top: 0.5rem;
  color: #36516f;
  font-size: 0.98rem;
  max-width: 42rem;
}

.auth-card {
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(13, 58, 108, 0.1);
  border-radius: 1.6rem;
  box-shadow: 0 30px 52px -40px rgba(11, 47, 91, 0.58);
  backdrop-filter: blur(3px);
  padding: 1.45rem;
  animation: authLift 0.5s ease;
}

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

.field-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--auth-text);
  font-size: 0.87rem;
  font-weight: 700;
}

.auth-wrapper input,
.auth-wrapper select {
  width: 100%;
  border: 1px solid #c9d7e6;
  border-radius: 0.85rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.94rem;
  color: #102842;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.auth-wrapper input:focus,
.auth-wrapper select:focus {
  outline: none;
  border-color: #2a68b0;
  box-shadow: 0 0 0 4px rgba(42, 104, 176, 0.14);
  transform: translateY(-1px);
}

.form-alert {
  border-radius: 0.85rem;
  padding: 0.62rem 0.78rem;
  font-size: 0.85rem;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #be123c;
}

.field-error {
  margin-top: 0.25rem;
  color: #be123c;
  font-size: 0.74rem;
  font-weight: 600;
}

.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border-radius: 0.85rem;
  background: var(--auth-soft);
  border: 1px solid #cfe0f3;
  color: #274767;
  font-size: 0.86rem;
  padding: 0.72rem 0.8rem;
}

.auth-note i {
  margin-top: 0.15rem;
  color: #215eaa;
}

.action-row {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.7rem;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.82rem;
  padding: 0.7rem 1.05rem;
  font-size: 0.92rem;
  font-weight: 700;
  transition: all 0.22s ease;
}

.btn-primary {
  border: 1px solid #0d3a6c;
  color: #ffffff;
  background: linear-gradient(102deg, #0c3562 0%, #1f5da8 100%);
  box-shadow: 0 11px 20px -16px rgba(13, 58, 108, 0.85);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px -18px rgba(13, 58, 108, 0.9);
}

.btn-secondary {
  border: 1px solid #c7d4e2;
  color: #234263;
  background: #ffffff;
}

.btn-secondary:hover {
  border-color: #9eb7d2;
  background: #f7faff;
}

.auth-wrapper ul.errorlist {
  margin-top: 0.25rem;
  color: #be123c;
  font-size: 0.75rem;
}

@media (min-width: 768px) {
  .auth-card {
    padding: 1.85rem;
  }

  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-row {
    flex-direction: row;
    justify-content: flex-end;
  }
}

@media (max-width: 767px) {
  .auth-wrapper {
    padding-top: 6.5rem;
  }

  .auth-title {
    font-size: 1.6rem;
  }

  .auth-card {
    padding: 1.2rem;
    border-radius: 1.2rem;
  }
}

@keyframes authFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes authLift {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
