/* ══════════════════════════════════════════════════════════
   Экран входа — современный дизайн в светлых тёплых тонах
   с тёмной бренд-панелью и плавными анимациями.
   ══════════════════════════════════════════════════════════ */

.login-page {
  --ink: #0e1526;
  --ink-2: #101a30;
  --ivory: #f2ebdd;
  --ivory-2: #eae4dd;
  --sand: #d97706;
  --sand-soft: rgba(217, 119, 6, .12);
  --card: #fffdf9;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

/* ── Левая бренд-панель (тёмная, с анимированными бликами) ── */
.login-hero {
  position: relative;
  background: linear-gradient(158deg, #0d1424 0%, #12203c 52%, #0e1a30 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 72px;
  overflow: hidden;
}

/* точечная сетка */
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(160deg, #000 30%, transparent 90%);
  -webkit-mask-image: linear-gradient(160deg, #000 30%, transparent 90%);
  animation: heroGrid 24s linear infinite;
}

/* дрейфующие цветные пятна */
.login-hero .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  pointer-events: none;
  animation: blobDrift 16s ease-in-out infinite alternate;
}
.login-hero .blob.b1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(217, 119, 6, .5), transparent 70%);
  top: -120px; left: -80px;
}
.login-hero .blob.b2 {
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(59, 130, 246, .42), transparent 70%);
  bottom: -160px; right: -100px;
  animation-delay: -6s;
  animation-duration: 20s;
}
.login-hero .blob.b3 {
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(20, 184, 166, .32), transparent 70%);
  top: 40%; left: 55%;
  animation-delay: -11s;
  animation-duration: 24s;
}

.login-hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  animation: heroIn 1s cubic-bezier(.22, .9, .3, 1) both;
}

.login-hero .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}
.login-hero .brand-mark {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 12px 30px -8px rgba(217, 119, 6, .65);
  animation: floatY 5s ease-in-out infinite;
}
.login-hero .brand-name {
  font-size: 17px; font-weight: 800; letter-spacing: -.01em;
  color: #fff; /* перебиваем глобальный .brand-name { color: var(--ink) } — он не виден на тёмном фоне */
}
.login-hero .brand-sub {
  font-size: 12.5px; color: rgba(255, 255, 255, .55); margin-top: 2px;
}

.login-hero h1 {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.12;
  margin: 0 0 14px;
}
.login-hero h1 .accent {
  background: linear-gradient(100deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-hero .lead {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .62);
  margin: 0 0 34px;
  max-width: 430px;
}

.login-hero .quote {
  margin: 0 0 34px;
  max-width: 460px;
  padding: 18px 20px 16px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-left: 3px solid #fbbf24;
  border-radius: 16px;
  backdrop-filter: blur(4px);
  opacity: 0;
  animation: fadeUp .7s cubic-bezier(.22, .9, .3, 1) .35s forwards;
}
.login-hero .quote-text {
  font-size: 16.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .93);
  font-weight: 500;
  letter-spacing: .01em;
}
.login-hero .quote-author {
  margin-top: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
}
@keyframes quoteIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-hero .quote.swap {
  animation: quoteIn .8s ease both;
}

.login-hero .hero-foot {
  margin-top: 44px;
  font-size: 12px;
  color: rgba(255, 255, 255, .38);
  letter-spacing: .02em;
}

/* ── Правая часть: тёплый фон + карточка входа ── */
.login-main {
  position: relative;
  background:
    radial-gradient(700px 480px at 85% -10%, rgba(217, 119, 6, .08), transparent 60%),
    radial-gradient(600px 420px at 0% 110%, rgba(59, 130, 246, .07), transparent 55%),
    linear-gradient(180deg, var(--ivory), var(--ivory-2));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
}
.login-main .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: blobDrift 18s ease-in-out infinite alternate;
}
.login-main .blob.b1 {
  width: 340px; height: 340px;
  background: rgba(217, 119, 6, .16);
  top: -90px; right: -70px;
}
.login-main .blob.b2 {
  width: 380px; height: 380px;
  background: rgba(59, 130, 246, .12);
  bottom: -120px; left: -80px;
  animation-delay: -8s;
}

.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid rgba(16, 24, 40, .06);
  border-radius: 24px;
  padding: 40px 38px 36px;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, .05),
    0 24px 60px -24px rgba(16, 24, 40, .22);
  animation: cardIn .8s cubic-bezier(.22, .9, .3, 1) both;
}

.login-card .card-head {
  text-align: center;
  margin-bottom: 26px;
}
.login-card .mini-mark {
  width: 50px; height: 50px;
  margin: 0 auto 14px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 10px 24px -8px rgba(217, 119, 6, .5);
  animation: floatY 5s ease-in-out infinite;
}
.login-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}
.login-card .sub {
  margin: 0;
  font-size: 13.5px;
  color: #8a8374;
}

/* поля с иконкой и плавающим фокусом */
.login-card .field {
  position: relative;
  margin-bottom: 14px;
  display: block;
}
.login-card .field .fi {
  position: absolute;
  left: 15px; top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: #b3ab99;
  transition: color .2s ease;
  pointer-events: none;
}
.login-card .field input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border: 1.5px solid #e8e0cf;
  border-radius: 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink);
  background: #fbf8f1;
  transition: border-color .22s ease, background .22s ease, box-shadow .22s ease, transform .22s ease;
}
.login-card .field input::placeholder { color: #b3ab99; }
.login-card .field input:focus {
  outline: none;
  border-color: var(--sand);
  background: #fff;
  box-shadow: 0 0 0 4px var(--sand-soft);
}
.login-card .field:focus-within .fi { color: var(--sand); }
.login-card .field input:focus + .bar { transform: scaleX(1); }

.login-card .btn-login {
  position: relative;
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .01em;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 10px 24px -8px rgba(217, 119, 6, .55);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.login-card .btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -10px rgba(217, 119, 6, .6);
}
.login-card .btn-login:active { transform: translateY(0) scale(.985); }
.login-card .btn-login::after {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
}
.login-card .btn-login:hover::after { left: 130%; }

.login-card .alert {
  margin-bottom: 16px;
  animation: shake .5s cubic-bezier(.36, .07, .19, .97);
}

.login-card .foot-note {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: #a89f8b;
}

/* ── Анимации ── */
@keyframes blobDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(28px, -22px) scale(1.08); }
  100% { transform: translate(-18px, 24px) scale(.96); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(26px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes heroIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes heroGrid {
  from { background-position: 0 0; }
  to   { background-position: 260px 260px; }
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* ── Адаптив ── */
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero {
    padding: 30px 26px 26px;
    justify-content: flex-start;
  }
  .login-hero h1 { font-size: 26px; }
  .login-hero .lead, .login-hero .hero-foot { display: none; }
  .login-hero .quote { margin-bottom: 12px; padding: 14px 16px 12px; }
  .login-hero .quote-text { font-size: 14.5px; }
  .login-hero .brand { margin-bottom: 8px; }
  .login-main { padding: 22px; }
}
