/* Страница входа: тёмный «aurora»-фон, hero-панель и стеклянная карточка.
   Подключается после style.css и перекрывает его правила для .login-*. */

.login-body {
  --ink: #eaf0ff;
  --dim: #9aa6c4;
  --dim-2: #6b7799;
  --card: rgba(255, 255, 255, .055);
  --card-line: rgba(255, 255, 255, .12);
  --brand: #4d7cff;
  --brand-2: #8a6cff;

  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #070a15;
  display: block;
  overflow-x: hidden;
}

/* ---------------------------------------------------- фон */
.login-body::before,
.login-body::after {
  content: "";
  position: fixed;
  inset: -18% -12%;
  z-index: 0;
  pointer-events: none;
}
.login-body::before {
  background:
    radial-gradient(40% 52% at 16% 24%, rgba(58, 109, 255, .50), transparent 62%),
    radial-gradient(38% 48% at 84% 16%, rgba(138, 108, 255, .42), transparent 62%),
    radial-gradient(46% 54% at 74% 86%, rgba(24, 180, 180, .26), transparent 60%);
  filter: blur(28px) saturate(125%);
  animation: aurora 24s ease-in-out infinite alternate;
}
.login-body::after {
  background: radial-gradient(120% 90% at 50% -10%, transparent 38%, rgba(4, 6, 14, .88) 100%);
}
@keyframes aurora {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.09); }
}

.login-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}

/* ---------------------------------------------------- hero */
.login-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: clamp(32px, 6vw, 88px);
  overflow: hidden;
}
.login-hero > * { position: relative; z-index: 1; }
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(72% 62% at 38% 46%, #000 28%, transparent 78%);
  mask-image: radial-gradient(72% 62% at 38% 46%, #000 28%, transparent 78%);
}
.hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #dbe6ff;
}
.hero-word {
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-art {
  width: min(340px, 60%);
  height: auto;
  color: #8fb0ff;
  margin-top: 8px;
}

/* ---------------------------------------------------- карточка */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 56px);
}
.login-card {
  width: min(400px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px;
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: 20px;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 24px 70px rgba(3, 6, 16, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
  animation: rise .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.login-card.has-error { animation: shake .45s .08s both; }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.login-head { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.login-head-text b { font-size: 15px; letter-spacing: .14em; text-transform: uppercase; }

.logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 26px rgba(77, 124, 255, .42);
}
.logo-lg { width: 42px; height: 42px; border-radius: 12px; }

/* ---------------------------------------------------- поля */
.field { display: flex; flex-direction: column; gap: 7px; }
.flabel { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--dim); }

.fbox { position: relative; display: flex; align-items: center; }
.fbox .ficon { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--dim-2); pointer-events: none; }
.login-card .fbox input {
  width: 100%;
  padding: 12px 42px 12px 40px;
  font-size: 14px;
  color: var(--ink);
  background: rgba(8, 12, 24, .55);
  border: 1px solid var(--card-line);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-card .fbox input::placeholder { color: var(--dim-2); }
.login-card .fbox input:-webkit-autofill,
.login-card .fbox input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px rgba(10, 16, 32, .96) inset;
  transition: background-color 9999s ease-out;
}
.login-card .fbox input:focus {
  border-color: rgba(120, 160, 255, .75);
  box-shadow: 0 0 0 4px rgba(77, 124, 255, .18);
  background: rgba(10, 16, 32, .78);
}
.eye {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--dim-2);
}
.eye:hover { color: var(--ink); background: rgba(255, 255, 255, .07); }
.eye.on { color: #b9c9ff; }

/* ---------------------------------------------------- OTP */
.otp { display: flex; gap: 9px; }
.login-card .otp input {
  width: 100%;
  height: 56px;
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(8, 12, 24, .55);
  border: 1px solid var(--card-line);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s, transform .1s;
}
.login-card .otp input:focus {
  border-color: rgba(120, 160, 255, .8);
  box-shadow: 0 0 0 4px rgba(77, 124, 255, .18);
  transform: translateY(-1px);
}
.login-card .otp input:not(:placeholder-shown) {
  border-color: rgba(140, 170, 255, .55);
  background: rgba(20, 30, 60, .72);
}

/* ---------------------------------------------------- действия */
.login-card button.login-submit {
  width: 100%;
  margin-top: 4px;
  padding: 13px 16px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 30px rgba(77, 124, 255, .35);
  transition: filter .15s, box-shadow .15s, transform .12s;
}
.login-card button.login-submit:hover { filter: brightness(1.07); box-shadow: 0 16px 38px rgba(77, 124, 255, .46); }
.login-card button.login-submit:active { transform: translateY(1px); }
.login-card button.login-submit:disabled { filter: grayscale(.35); opacity: .75; cursor: default; }

.login-alt { text-align: center; font-size: 12.5px; color: #b9c9ff; }
.login-alt:hover { color: #dbe6ff; text-decoration: underline; }

/* ---------------------------------------------------- сообщения */
.login-card .login-note { text-align: center; font-size: 13px; color: var(--dim); }
.login-card .login-note b { color: var(--ink); }
.login-card .login-error {
  padding: 11px 13px;
  font-size: 13px;
  color: #ffd9d9;
  background: rgba(214, 69, 69, .16);
  border: 1px solid rgba(255, 120, 120, .35);
  border-radius: 11px;
}

/* ---------------------------------------------------- адаптив */
@media (max-width: 900px) {
  .login-stage { grid-template-columns: 1fr; }
  .login-hero { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .login-body::before,
  .login-card,
  .login-card.has-error { animation: none; }
}
