.auth-page {
  min-height: calc(100svh - 112px);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(5, 18, 35, 0.86), rgba(26, 58, 92, 0.62) 54%, rgba(201, 168, 76, 0.22)),
    url("https://images.unsplash.com/photo-1504052434569-70ad5836ab65?w=1800&q=85") center / cover no-repeat;
}

body:has(.auth-page) footer {
  display: none;
}

.auth-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 52% 35%, rgba(255, 255, 255, 0.18), transparent 28%);
}

.auth-panel {
  width: min(100%, 360px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(4, 14, 28, 0.36);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  color: #ffffff;
  padding: 1.15rem;
}

.auth-panel--wide {
  width: min(100%, 560px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.auth-brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(253, 243, 215, 0.18);
  color: #e8c96a;
  border: 1px solid rgba(232, 201, 106, 0.36);
  font-size: 1.25rem;
}

.auth-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.64);
}

.auth-title {
  margin: 0;
  color: #ffffff;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.15;
}

.auth-copy {
  margin: 0 0 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.45;
}

.auth-panel label {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.72rem;
  font-weight: 700;
}

.auth-panel .form-control,
.auth-panel input[type="text"],
.auth-panel input[type="email"],
.auth-panel input[type="password"],
.auth-panel input[type="tel"],
.auth-panel textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.58rem 0.95rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: #1a3a5c;
  font-size: 0.84rem;
  font-weight: 600;
}

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

.auth-register-grid .auth-field--full {
  grid-column: 1 / -1;
}

.auth-panel .errorlist {
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  color: #ffd1d1;
  font-size: 0.72rem;
}

.auth-combobox {
  position: relative;
}

.auth-country-list {
  position: absolute;
  right: 0;
  left: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  max-height: 176px;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 12px;
  background: rgba(13, 30, 52, 0.96);
  box-shadow: 0 18px 42px rgba(4, 14, 28, 0.34);
}

.auth-country-list[hidden] {
  display: none;
}

.auth-country-list button {
  width: 100%;
  padding: 0.5rem 0.62rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 650;
  text-align: left;
}

.auth-country-list button:hover,
.auth-country-list button:focus {
  background: rgba(232, 201, 106, 0.16);
  color: #f9d97b;
  outline: none;
}

.auth-phone-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 0.5rem;
}

.auth-code-picker {
  position: relative;
}

.auth-code-button {
  width: 100%;
  min-height: 42px;
  padding: 0.58rem 0.7rem 0.58rem 0.78rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.9);
  color: #1a3a5c;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.auth-code-button:hover,
.auth-code-button:focus {
  border-color: #e8c96a;
  box-shadow: 0 0 0 0.2rem rgba(232, 201, 106, 0.22);
  outline: none;
}

.auth-code-button::after {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  border-right: 2px solid #1a3a5c;
  border-bottom: 2px solid #1a3a5c;
  transform: rotate(45deg) translateY(-2px);
}

.auth-code-list {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 21;
  width: 124px;
  max-height: 176px;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 12px;
  background: rgba(13, 30, 52, 0.96);
  box-shadow: 0 18px 42px rgba(4, 14, 28, 0.34);
}

.auth-code-list[hidden] {
  display: none;
}

.auth-code-list button {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 750;
  text-align: left;
}

.auth-code-list button:hover,
.auth-code-list button:focus {
  background: rgba(232, 201, 106, 0.16);
  color: #f9d97b;
  outline: none;
}

#phoneLocal {
  padding-left: 1.05rem;
  padding-right: 1.05rem;
}

.auth-panel .form-control::placeholder,
.auth-panel input::placeholder {
  color: rgba(15, 32, 68, 0.45);
  font-size: 0.8rem;
  font-weight: 500;
}

.auth-panel .form-control:focus,
.auth-panel input:focus {
  border-color: #e8c96a;
  box-shadow: 0 0 0 0.2rem rgba(232, 201, 106, 0.22);
}

.auth-panel .form-text,
.auth-panel .text-muted {
  color: rgba(255, 255, 255, 0.68) !important;
  font-size: 0.78rem;
}

.auth-action,
.auth-panel .btn-navy {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #f9d97b, #c9a84c);
  color: #10243b;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(201, 168, 76, 0.28);
}

.auth-secondary {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.8rem;
}

.auth-secondary a,
.auth-link {
  color: #f9d97b;
  font-weight: 700;
  text-decoration: none;
}

.auth-step {
  transition: opacity 0.22s ease, transform 0.22s ease, max-height 0.22s ease;
}

.auth-step[hidden] {
  display: block !important;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(8px);
  pointer-events: none;
}

.auth-status {
  min-height: 1.3rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.74rem;
}

.auth-status.is-error {
  color: #ffd1d1;
}

.auth-status.is-ok {
  color: #f9d97b;
}

.auth-panel .alert {
  border-radius: 12px;
  font-size: 0.82rem;
}

@media (max-height: 680px) {
  .auth-page {
    place-items: start center;
    padding-top: 1rem;
  }

  .auth-panel {
    padding: 1rem;
  }

  .auth-copy {
    margin-bottom: 0.7rem;
  }
}

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