.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 5, 12, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.auth-overlay.open {
  opacity: 1;
  visibility: visible;
}

.auth-panel {
  position: relative;
  width: min(100%, 470px);
  max-height: min(760px, calc(100vh - 48px));
  overflow-y: auto;
  padding: 34px;
  color: #f7fbff;
  background:
    linear-gradient(145deg, rgba(15, 29, 49, 0.98), rgba(4, 8, 16, 0.99) 58%),
    #050a11;
  border: 1px solid rgba(0, 208, 255, 0.35);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62), 0 0 50px rgba(0, 183, 255, 0.08);
  clip-path: polygon(0 14px, 14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

.auth-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  background: linear-gradient(90deg, #00d6ff, rgba(0, 214, 255, 0));
}

.auth-close {
  position: absolute;
  top: 17px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.auth-close:hover,
.auth-close:focus-visible {
  border-color: #00d6ff;
  outline: none;
}

.auth-kicker {
  margin: 0 0 8px;
  color: #00d6ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-title {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.15rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.auth-subtitle {
  margin: 14px 0 24px;
  color: #a8b8ca;
  line-height: 1.55;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 24px;
}

.auth-tab {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.025);
  color: #8797a9;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-tab.active {
  border-color: #00d6ff;
  color: #fff;
  background: rgba(0, 214, 255, 0.08);
}

.auth-view[hidden] {
  display: none !important;
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field label {
  color: #b9c6d5;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-field input {
  width: 100%;
  min-height: 49px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
  outline: none;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.auth-field input:focus {
  border-color: #00d6ff;
  box-shadow: 0 0 0 2px rgba(0, 214, 255, 0.09);
}

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

.auth-submit,
.auth-secondary-action,
.auth-logout {
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-submit {
  margin-top: 4px;
  color: #001018;
  background: linear-gradient(90deg, #00d8ff, #0c8bff);
}

.auth-submit:disabled,
.auth-secondary-action:disabled,
.auth-logout:disabled {
  cursor: wait;
  opacity: 0.6;
}

.auth-secondary-action,
.auth-logout {
  color: #fff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.17);
}

.auth-logout:hover,
.auth-secondary-action:hover {
  border-color: #00d6ff;
}

.auth-status {
  min-height: 22px;
  margin: 15px 0 0;
  color: #91a4b7;
  font-size: 0.83rem;
  line-height: 1.45;
}

.auth-status.error {
  color: #ff7184;
}

.auth-status.success {
  color: #58e3ae;
}

.auth-account-card {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.auth-account-label {
  color: #7f92a8;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-account-name {
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-account-email {
  color: #7f91a5;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.auth-divider {
  height: 1px;
  margin: 24px 0;
  background: rgba(255, 255, 255, 0.09);
}

.auth-note {
  margin: 0;
  color: #708399;
  font-size: 0.78rem;
  line-height: 1.55;
}

.auth-number-status {
  margin: 0;
  color: #6f8196;
  font-size: 0.74rem;
  line-height: 1.45;
}

.auth-number-status.checking {
  color: #91a4b7;
}

.auth-number-status.available {
  color: #58e3ae;
  font-weight: 800;
}

.auth-number-status.taken {
  color: #ff8796;
}

.auth-player-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 7px;
}

.auth-player-identity > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1;
  order: 1;
}

.auth-player-number {
  order: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(0, 214, 255, 0.34);
  color: #00d6ff;
  background: rgba(0, 214, 255, 0.06);
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.02em;
}

.auth-number-lock,
.auth-support-tier {
  display: inline-flex;
  width: fit-content;
  margin-top: 3px;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #75899d;
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.auth-support-tier {
  color: #9faebd;
}

.auth-mission-welcome {
  position: relative;
  display: grid;
  gap: 11px;
  margin: 4px 0 18px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid rgba(0, 214, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(0, 214, 255, 0.09), rgba(6, 16, 29, 0.72) 58%),
    rgba(0, 0, 0, 0.2);
}

.auth-mission-welcome::after {
  content: '';
  position: absolute;
  right: -46px;
  bottom: -70px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(0, 214, 255, 0.12);
  border-radius: 50%;
}

.auth-mission-welcome h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-size: clamp(1.45rem, 6vw, 2rem);
  line-height: 1;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.auth-mission-welcome p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #9eb0c3;
  font-size: 0.82rem;
  line-height: 1.55;
}

.auth-mission-welcome p strong {
  color: #fff;
}

.auth-mission-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 5px;
}

.auth-mission-footer > span {
  color: #00d6ff;
  font-size: 0.65rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.auth-court-cta {
  min-height: 37px;
  padding: 0 14px;
  border: 0;
  color: #001018;
  background: linear-gradient(90deg, #00d8ff, #0c8bff);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.auth-record-card {
  display: grid;
  gap: 7px;
  margin: 16px 0;
  padding: 17px 18px;
  border-left: 2px solid #00d6ff;
  background: rgba(255, 255, 255, 0.025);
}

.auth-record-card > strong {
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.015em;
}

.auth-record-card p {
  margin: 0;
  color: #8194a8;
  font-size: 0.78rem;
  line-height: 1.5;
}

.auth-number-manager {
  margin: 18px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-number-manager summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  list-style: none;
  cursor: pointer;
}

.auth-number-manager summary::-webkit-details-marker {
  display: none;
}

.auth-number-manager summary > span {
  display: grid;
  gap: 3px;
}

.auth-number-manager summary small {
  color: #61758a;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.auth-number-manager summary strong {
  color: #d9e4ed;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.auth-number-manager summary b {
  color: #00d6ff;
  font-size: 0.67rem;
  letter-spacing: 0.1em;
}

.auth-number-manager.has-notice summary b::before {
  content: '• ';
  color: #ffca5c;
}

.auth-number-manager-body {
  padding: 2px 0 18px;
}

.auth-next-card {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  padding: 14px;
  border-left: 2px solid rgba(0, 214, 255, 0.45);
  background: rgba(255, 255, 255, 0.025);
}

.auth-next-card strong {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.auth-next-card p {
  margin: 0;
  color: #7f91a5;
  font-size: 0.75rem;
  line-height: 1.5;
}

.auth-number-request {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.auth-number-request-row {
  display: grid;
  grid-template-columns: minmax(88px, 0.45fr) 1fr;
  gap: 8px;
}

.auth-number-request-row .auth-secondary-action {
  min-height: 49px;
  padding-inline: 12px;
}

.auth-notifications-wrap[hidden] {
  display: none !important;
}

.auth-notifications {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.auth-notification {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.025);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.auth-notification.unread {
  border-color: rgba(0, 214, 255, 0.28);
  background: rgba(0, 214, 255, 0.045);
}

.auth-notification strong {
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.auth-notification span {
  color: #8fa1b5;
  font-size: 0.76rem;
  line-height: 1.45;
}

.auth-notification small {
  color: #56697d;
  font-size: 0.66rem;
}

.auth-account-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.auth-account-footer .auth-logout {
  min-height: 42px;
  padding-inline: 15px;
  color: #8495a7;
  font-size: 0.72rem;
}

.site-nav .auth-nav-link {
  cursor: pointer;
}

body.auth-open {
  overflow: hidden;
}

@media (max-width: 620px) {
  .auth-overlay {
    padding: 12px;
  }

  .auth-panel {
    max-height: calc(100vh - 24px);
    padding: 28px 20px 24px;
  }

  .auth-tabs {
    grid-template-columns: 1fr;
  }

  .auth-player-identity {
    gap: 9px;
  }

  .auth-player-number {
    min-width: 52px;
  }

  .auth-number-request-row {
    grid-template-columns: 92px 1fr;
  }

  .auth-mission-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}