﻿/* ===== Premium auth ===== */

.cab-hero__email {
  margin: 0.15rem 0 0.35rem;
  color: rgba(247, 241, 230, 0.65);
  font-size: 0.9rem;
}

.auth-page {
  position: relative;
  min-height: calc(100vh - 58px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  overflow: hidden;
  margin: -0.25rem;
}

.auth-page__media {
  position: relative;
  min-height: min(100vh - 58px, 920px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    linear-gradient(180deg, rgba(7, 7, 8, 0.15), rgba(7, 7, 8, 0.88)),
    var(--auth-bg, url("assets/bolt/tokyo-ghoul-dark-bg.min.jpg")) center/cover;
  isolation: isolate;
  overflow: hidden;
}

.auth-page__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 320px at 30% 20%, rgba(124, 58, 237, 0.22), transparent 60%),
    linear-gradient(90deg, rgba(7, 7, 8, 0.2), rgba(7, 7, 8, 0.65));
  z-index: 0;
}

.auth-page__media::after {
  content: "";
  position: absolute;
  inset: 1.1rem;
  border: 1px solid rgba(124, 58, 237, 0.28);
  pointer-events: none;
  z-index: 1;
}

.auth-page__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -80px;
  top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.28), transparent 68%);
  filter: blur(8px);
  animation: auth-pulse 5s ease-in-out infinite;
  z-index: 0;
}

.auth-page__copy {
  position: relative;
  z-index: 2;
  max-width: 28rem;
  animation: auth-rise 0.7s ease both;
}

.auth-page__eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(167, 139, 250, 0.85);
}

.auth-page__copy h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: 0.06em;
  line-height: 1.05;
  background: linear-gradient(90deg, #f8fafc, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-page__copy p {
  margin: 0.9rem 0 0;
  color: rgba(247, 241, 230, 0.72);
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 34ch;
}

.auth-page__panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background:
    radial-gradient(500px 280px at 80% 10%, rgba(124, 58, 237, 0.1), transparent 60%),
    linear-gradient(160deg, #0c0c10, #09090c);
}

.auth-page__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 1.85rem 1.55rem 1.5rem;
  border-radius: 20px;
  border: 1px solid rgba(124, 58, 237, 0.28);
  background:
    linear-gradient(165deg, rgba(22, 22, 28, 0.96), rgba(12, 12, 16, 0.98));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 30px 70px rgba(0, 0, 0, 0.55);
  animation: auth-rise 0.75s 0.08s ease both;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.75), transparent);
}

.auth-card__brand {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  letter-spacing: 0.16em;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: rgba(167, 139, 250, 0.9);
}

.auth-card__sub {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  color: #f8fafc;
}

.auth-form {
  display: grid;
  gap: 0.9rem;
}

/* иначе display:grid перекрывает атрибут hidden — форма 2FA светилась всегда */
.auth-form[hidden],
.auth-error[hidden],
.auth-ok[hidden],
[data-auth-dev][hidden] {
  display: none !important;
}

.auth-field {
  display: grid;
  gap: 0.38rem;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(247, 241, 230, 0.72);
}

.auth-field input {
  appearance: none;
  border-radius: 12px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: rgba(5, 5, 7, 0.72);
  color: var(--ink);
  padding: 0.85rem 0.95rem;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.65);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.auth-submit {
  width: 100%;
  margin-top: 0.35rem;
  min-height: 48px;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.2rem;
  margin-top: 1.15rem;
  font-size: 0.9rem;
}

.auth-links a {
  color: rgba(247, 241, 230, 0.78);
  border-bottom: 1px solid rgba(124, 58, 237, 0.35);
}

.auth-links a:hover {
  color: #fff;
}

.auth-error {
  margin: 0;
  color: #ff9b8c;
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.auth-ok {
  margin: 0;
  color: #b7e39a;
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.auth-dev-link {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  margin-top: 0.35rem;
}

.topbar__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.topbar__logout {
  appearance: none;
  border: 1px solid rgba(167, 139, 250, 0.3);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border-radius: 8px;
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}

@keyframes auth-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes auth-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.08); }
}

body.is-auth-only .sidebar,
body.is-auth-only .topbar__rc {
  display: none !important;
}

body.is-auth-only .app {
  grid-template-columns: 1fr !important;
}

body.is-auth-only .topbar {
  padding-left: 1rem !important;
  justify-content: flex-end;
  background: rgba(7, 7, 8, 0.55);
  border-bottom-color: rgba(124, 58, 237, 0.12);
}

body.is-auth-only .stage {
  padding: 0;
}

body.is-auth-only .window--bare {
  border: none;
  background: transparent;
  box-shadow: none;
  clip-path: none;
  border-radius: 0;
  min-height: calc(100vh - 58px);
}

@media (max-width: 920px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-page__media {
    min-height: 220px;
    padding: 1.25rem;
  }
  .auth-page__media::after {
    inset: 0.7rem;
  }
  .auth-page__copy h2 {
    font-size: 2rem;
  }
  .auth-page__copy p {
    display: none;
  }
}
