.auth-page {
  display: grid;
  place-items: start center;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.auth-card {
  width: min(100%, 420px);
  padding: 1.55rem 1.4rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(204, 28, 57, 0.14), transparent 55%),
    linear-gradient(165deg, rgba(44, 44, 48, 0.95), rgba(28, 28, 31, 0.98));
  animation: rise-in 0.35s ease both;
}

.auth-card__eyebrow {
  margin: 0 0 0.4rem;
  font-family: var(--font-eyebrow);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rose-strong);
  text-align: center;
}

.auth-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
}

.auth-card__lead {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
}

.auth-oauth-block {
  margin-top: 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-oauth {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  width: 100%;
  justify-items: center;
}

.auth-oauth__btn {
  min-height: 2.75rem;
  width: auto;
  min-width: min(100%, 16.5rem);
  max-width: 100%;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  text-decoration: none;
  justify-content: center;
  gap: 0.65rem;
  font-weight: 600;
}

.auth-oauth__btn.is-disabled {
  opacity: 0.72;
}

.auth-oauth__icon {
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  flex-shrink: 0;
  color: #fff;
}

.auth-oauth__icon svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.auth-oauth__btn--discord {
  border-color: rgba(88, 101, 242, 0.45);
  background: rgba(88, 101, 242, 0.18);
  color: #fff;
}

.auth-oauth__btn--discord:hover {
  border-color: rgba(88, 101, 242, 0.7);
  background: rgba(88, 101, 242, 0.32);
  color: #fff;
}

.auth-oauth__btn--discord .auth-oauth__icon {
  color: #c7d2fe;
}

.auth-oauth__btn--google .auth-oauth__icon {
  color: #fecaca;
}

.auth-or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin: 1.05rem 0 0.95rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-or::before,
.auth-or::after {
  content: '';
  height: 1px;
  background: var(--line);
}

.auth-mail-hint {
  margin: 0.95rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.auth-mail-hint p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.auth-mail-hint p + p {
  margin-top: 0.3rem;
}

.auth-card__lead--tight {
  margin: 0 0 0.35rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.auth-tabs__btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 2.2rem;
  border-radius: 8px;
  cursor: pointer;
}

.auth-tabs__btn.is-active {
  color: #fff;
  background: rgba(204, 28, 57, 0.22);
}

.auth-form {
  display: grid;
  gap: 0.85rem;
}

.auth-field {
  display: grid;
  gap: 0.35rem;
}

.auth-field > span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.auth-field input {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  outline: none;
}

.auth-field input:focus {
  border-color: var(--accent-ring);
  background: rgba(204, 28, 57, 0.06);
}

.auth-pass {
  position: relative;
  display: grid;
}

.auth-pass__input {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.65rem 2.85rem 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  outline: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.auth-pass__input:focus {
  border-color: var(--accent-ring);
  background: rgba(204, 28, 57, 0.06);
}

.auth-pass__toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 2.2rem;
  height: 2.2rem;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.25s ease;
}

.auth-pass__toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.auth-pass__toggle:active {
  transform: translateY(-50%) scale(0.92);
}

.auth-pass__icon {
  position: absolute;
  display: grid;
  place-items: center;
  transition:
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.auth-pass__icon--on {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.auth-pass__icon--off {
  opacity: 0;
  transform: scale(0.55) rotate(-18deg);
  pointer-events: none;
}

.auth-pass.is-visible .auth-pass__icon--on {
  opacity: 0;
  transform: scale(0.55) rotate(18deg);
  pointer-events: none;
}

.auth-pass.is-visible .auth-pass__icon--off {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.auth-pass.is-visible .auth-pass__toggle {
  color: var(--rose-strong);
}

.auth-submit {
  min-height: 2.7rem;
  width: 100%;
}

.auth-footer {
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.auth-footer a {
  color: var(--rose-strong);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  color: var(--rose);
  text-decoration: underline;
}

.auth-alert {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 0.86rem;
}

.auth-alert--error {
  border-color: rgba(252, 165, 165, 0.35);
  background: rgba(204, 28, 57, 0.12);
  color: var(--rose-strong);
}

.auth-alert--dev {
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  gap: 1.1rem;
  align-items: start;
}

.account-panel,
.account-side {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(44, 44, 48, 0.9), rgba(28, 28, 31, 0.96));
}

.account-hero {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.2rem;
}

.account-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.account-avatar--fallback {
  display: grid;
  place-items: center;
  background: rgba(204, 28, 57, 0.2);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.account-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.account-email {
  margin: 0.25rem 0 0.55rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.account-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.account-actions,
.account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.account-meta {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.account-meta__label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.account-meta strong {
  font-size: 0.92rem;
}

.auth-2fa-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0.35rem;
}

.auth-2fa-methods__btn {
  min-height: 2rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #e4e4e7;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.auth-2fa-methods__btn.is-on {
  border-color: rgba(204, 28, 57, 0.55);
  background: rgba(204, 28, 57, 0.18);
  color: #fff;
}

.auth-2fa-resend {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 1rem auto 0;
  padding: 0.35rem 0.75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.auth-2fa-resend:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.auth-2fa-resend:disabled {
  opacity: 0.5;
  cursor: default;
}

.auth-switch {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.86rem;
}

.auth-switch a {
  color: var(--muted);
  text-decoration: none;
}

.auth-switch a:hover {
  color: #fff;
}

@media (max-width: 760px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
}
