/* Ocean blue glass authentication card. */
#modal-auth-overlay {
  background: #031b39 url('auth-background.svg?v=20261007-blue-1') center / cover;
  padding: 32px 24px;
  overflow-y: auto;
  color: #effaff;
  color-scheme: dark;
  isolation: isolate;
}

#modal-auth-overlay::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, #0891b215, #00112b70);
  z-index: -1;
  pointer-events: none;
}

html:has(#modal-auth-overlay.show), body:has(#modal-auth-overlay.show) { overflow: hidden; }

#modal-auth {
  --auth-ease: cubic-bezier(.65, 0, .2, 1);
  --auth-muted: #b5d5ec;
  --auth-accent: #a5ecff;
  position: relative;
  display: block;
  flex: none;
  width: min(880px, 100%);
  max-width: 880px;
  height: 550px;
  max-height: none;
  overflow: hidden;
  border: 1px solid #7dd3fc60;
  border-radius: 22px;
  background: linear-gradient(135deg, #0d497391, #062957b3), #04244780;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 28px 80px #00102b99, 0 0 60px #0ea5e925, inset 0 1px 0 #c6f1ff40;
  animation: auth-card-in .55s ease both;
}

@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #bae6fd40;
  background: #e0f2fe0d;
  color: #dcf4ff;
  font-size: 24px;
  line-height: 1;
}

#auth-close:hover { background: #ffffff20; color: #fff; }

.auth-form {
  position: absolute;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 50%;
  padding: 44px 58px;
  transition: opacity .3s ease .22s, transform .65s var(--auth-ease), visibility .3s;
}

.auth-heading { margin-bottom: 26px; }
.auth-kicker { color: var(--auth-accent); font-size: 10px; font-weight: 600; letter-spacing: .2em; }
.auth-heading h2 { margin-top: 8px; color: #fff; font-size: 26px; font-weight: 700; letter-spacing: -.04em; line-height: 1.25; }
.auth-heading p { margin-top: 10px; color: var(--auth-muted); font-size: 12px; line-height: 1.6; }

.auth-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 16px;
  border-bottom: 1px solid #7dd3fc60;
  transition: border-color .2s, background .2s;
}

.auth-field:focus-within { border-color: #67e8f9; background: #38bdf80c; }
.auth-field > i { flex: none; width: 14px; color: var(--auth-accent); font-size: 13px; text-align: center; }
.auth-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 11px 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  border-radius: 0;
}
.auth-field input::placeholder { color: var(--auth-muted); opacity: 1; }
.auth-field input:autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 100px #0c3e68 inset; }
.auth-password-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--auth-accent);
  cursor: pointer;
}
.auth-password-toggle:hover { color: #fff; background: #ffffff0d; }

.auth-submit, .auth-switch-button {
  min-height: 42px;
  border: 1px solid #bae6fd70;
  border-radius: 999px;
  background: linear-gradient(135deg, #e0f2fe20, #38bdf81a);
  box-shadow: inset 0 1px 1px #e0f2fe30, 0 3px 12px #001b3a33;
  color: #effaff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, box-shadow .2s, transform .2s;
}
.auth-submit {
  width: 100%;
  margin-top: 10px;
  border-color: #7dd3fc;
  background: linear-gradient(110deg, #7dd3fc, #38bdf8 55%, #22d3ee);
  box-shadow: inset 0 1px 0 #ffffff70, 0 6px 24px #0ea5e940;
  color: #052c50;
  font-weight: 700;
}
.auth-submit:hover, .auth-switch-button:hover { box-shadow: inset 0 1px 1px #ffffff50, 0 8px 28px #0ea5e94d; transform: translateY(-2px); }
.auth-submit:hover { background: linear-gradient(110deg, #bae6fd, #7dd3fc 55%, #67e8f9); }
.auth-switch-button:hover { background: #e0f2fe30; border-color: #e0f2feaa; }
.auth-submit:active, .auth-switch-button:active { transform: translateY(0); }
.auth-submit:disabled { opacity: .6; cursor: wait; transform: none; }
.auth-submit[aria-busy="true"]::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 9px;
  vertical-align: -2px;
  border: 2px solid #052c5035;
  border-top-color: #052c50;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-footer { margin-top: 20px; color: var(--auth-muted); text-align: center; font-size: 11px; }
.auth-footer a { color: #a5ecff; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.auth-footer a:hover { color: #fff; }
.auth-note { margin-top: 10px; color: var(--auth-muted); text-align: center; font-size: 10px; line-height: 1.6; }

#form-register-section { left: 50%; opacity: 0; visibility: hidden; transform: translateX(24px); pointer-events: none; }
#form-register-section .auth-heading { margin-bottom: 16px; }
#form-register-section .auth-field { min-height: 38px; margin-bottom: 8px; }
#form-register-section .auth-field input { padding: 9px 0; }
#form-register-section .auth-footer { margin-top: 14px; }
.auth-register #form-register-section { opacity: 1; visibility: visible; transform: translateX(0); pointer-events: auto; }
.auth-register #form-login-section { opacity: 0; visibility: hidden; transform: translateX(-24px); pointer-events: none; transition-delay: 0s; }

.auth-welcome {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 56%;
  z-index: 2;
  overflow: hidden;
  border-left: 1px solid #a5ecff70;
  background: radial-gradient(ellipse at 90% 15%, #22d3ee40, transparent 60%), linear-gradient(145deg, #0284c7bb, #0759abcc 60%, #0369a1bb);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: -10px 0 35px #001f4d40, inset 1px 0 1px #c6f1ff50;
  transform: skewX(6deg);
  transition: left .85s var(--auth-ease), transform .85s var(--auth-ease);
}
.auth-register .auth-welcome { left: -6%; }
.auth-welcome-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 64px 82px;
  transform: skewX(-6deg);
  transition: opacity .25s ease .28s, translate .65s var(--auth-ease), visibility .25s .28s;
}
.auth-welcome h2 { color: #fff; font-size: 36px; line-height: 1.05; font-weight: 800; letter-spacing: -.045em; text-shadow: 0 2px 18px #001f4d40; }
.auth-welcome p { max-width: 230px; margin: 22px 0; color: #dcf3ff; font-size: 13px; line-height: 1.7; }
.auth-switch-button { padding: 0 24px; }
.auth-switch-button span { display: inline-block; margin-left: 8px; transition: transform .2s; }
.auth-switch-button:hover span { transform: translateX(3px); }
.auth-welcome-login { opacity: 0; visibility: hidden; translate: -20px 0; }
.auth-register .auth-welcome-login { opacity: 1; visibility: visible; translate: 0 0; }
.auth-register .auth-welcome-register { opacity: 0; visibility: hidden; translate: 20px 0; transition-delay: 0s; }

.auth-account-section { display: none; padding: 70px 48px; text-align: center; }
.auth-account-section > i { margin-bottom: 20px; font-size: 42px; color: var(--auth-accent); }
.auth-account-section h2 { font-size: 24px; color: #fff; }
#auth-subtitle { margin: 16px 0 28px; color: var(--auth-muted); font-size: 13px; }
#modal-auth.auth-account { width: min(440px, 100%); height: auto; }
.auth-account .auth-form, .auth-account .auth-welcome { display: none; }
.auth-account .auth-account-section { display: block; }
.auth-account .auth-submit { max-width: 240px; }
.auth-account .auth-submit:hover { border-color: #fca5a580; background: #ef444425; color: #fff; }

#modal-auth :is(button, a):focus-visible { outline: 2px solid #a5ecff; outline-offset: 5px; }
.auth-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 700px) {
  #modal-auth-overlay { padding: 20px 16px; }
  #modal-auth { width: min(420px, 100%); height: 690px; border-radius: 18px; }
  .auth-form { inset: 0 0 auto; width: 100%; height: 462px; padding: 40px 34px; }
  #form-login-section { padding-top: 62px; }
  #form-register-section { left: 0; transform: translateX(20px); }
  .auth-heading h2 { font-size: 27px; }
  .auth-field input { font-size: 16px; }
  .auth-footer { font-size: 12px; }
  .auth-welcome, .auth-register .auth-welcome {
    inset: auto 0 0;
    width: 100%;
    height: 228px;
    transform: none;
    border-left: 0;
    border-top: 1px solid #a5ecff70;
    transition: background .65s;
  }
  .auth-welcome-content { padding: 26px 34px; transform: none; }
  .auth-welcome h2 { font-size: 25px; }
  .auth-welcome h2 br { display: none; }
  .auth-welcome p { max-width: 100%; margin: 12px 0 16px; font-size: 12px; }
  .auth-switch-button { min-height: 38px; }
  .auth-account-section { padding: 64px 28px 40px; }
}

@media (max-height: 760px) and (max-width: 700px) {
  #modal-auth-overlay { align-items: flex-start; }
}

@media (max-height: 620px) {
  #modal-auth-overlay { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  #modal-auth, #modal-auth *, #modal-auth *::after { animation: none; transition: none; }
}
