@import url("https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600;700;800;900&display=swap");

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: "Fira Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #071412;
  color: #0f172a;
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

.auth-canvas-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #071412;
}

.auth-canvas-bg::before {
  content: "";
  position: absolute;
  inset: -1.5%;
  z-index: 1;
  opacity: 1;
  background-image: url("../brand/tavrus-login-bg.jpg");
  background-size: cover;
  background-position: center center;
  filter: saturate(0.92) contrast(0.98) brightness(0.84);
  transform: scale(1.015);
  transition: opacity 1.2s cubic-bezier(.2,.8,.2,1), filter 1.2s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}

.auth-bg-video {
  position: absolute;
  inset: -1.5%;
  z-index: 2;
  width: 103%;
  height: 103%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  filter: saturate(0.92) contrast(0.98) brightness(0.78);
  transform: scale(1.015);
  transition: opacity 1.4s cubic-bezier(.2,.8,.2,1), filter 1.4s cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}

.auth-canvas-bg.is-video-ready .auth-bg-video {
  opacity: 0.72;
  filter: saturate(0.94) contrast(1) brightness(0.80);
}

.auth-canvas-bg.is-video-ready::before {
  opacity: 0;
  filter: saturate(0.92) contrast(0.98) brightness(0.72);
}

.auth-canvas-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at 49% 38%, rgba(0, 133, 253, 0.16), transparent 31%),
    radial-gradient(circle at 48% 46%, rgba(0, 0, 0, 0.08), transparent 22%),
    linear-gradient(90deg, rgba(3, 13, 14, 0.50) 0%, rgba(3, 13, 14, 0.26) 35%, rgba(255, 255, 255, 0.46) 70%, rgba(255, 255, 255, 0.62) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(3, 13, 14, 0.18) 100%);
  box-shadow: inset 0 0 160px rgba(2, 6, 23, 0.32);
}

#auth-bg-canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  opacity: 0.54;
  mix-blend-mode: screen;
}

.auth-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center end;
  padding: 150px clamp(24px, 8vw, 132px) 24px 24px;
}

.auth-card {
  position: relative;
  width: min(388px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 32px 86px rgba(2, 6, 23, 0.26), 0 0 0 1px rgba(15, 23, 42, 0.04);
  overflow: visible;
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
}

.auth-head {
  position: relative;
  padding: 140px 24px 18px;
  text-align: center;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.44) 54%, transparent 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(248, 250, 252, 0.66) 100%);
  border-radius: 26px 26px 0 0;
}

.auth-preloader-mark {
  position: absolute;
  left: 50%;
  top: -128px;
  transform: translateX(-50%);
  width: 256px;
  height: 256px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 48px;
  background: transparent;
  box-shadow: none;
  border: 0;
  z-index: 2;
}

.auth-preloader-mark::before {
  content: "";
  position: absolute;
  inset: 38px;
  z-index: -1;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 149, 0, 0.24) 0%, rgba(255, 149, 0, 0.12) 34%, rgba(0, 133, 253, 0.07) 58%, transparent 72%);
  filter: blur(18px);
  opacity: 0.42;
  animation: authBullGlow 4.8s cubic-bezier(.2,.8,.2,1) infinite;
}

@keyframes authBullGlow {
  0%, 100% {
    opacity: 0.28;
    transform: scale(0.94);
  }
  46% {
    opacity: 0.58;
    transform: scale(1.08);
  }
}

.auth-preloader-mark img {
  width: 256px;
  height: 256px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 24px 38px rgba(2, 6, 23, 0.24));
}

.auth-title {
  margin: 0;
  font-size: 25px;
  line-height: 1.10;
  letter-spacing: 0;
  font-weight: 500;
  color: #0f172a;
  text-transform: uppercase;
}

.auth-subtitle {
  margin: 10px auto 0;
  max-width: 300px;
  color: #475569;
  font-size: 12.8px;
  line-height: 1.45;
  text-transform: uppercase;
}

.auth-form {
  display: grid;
  gap: 14px;
  padding: 20px 24px 24px;
}

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

.auth-field span {
  font-size: 12px;
  font-weight: 850;
  color: #334155;
  text-transform: uppercase;
}

.auth-field input {
  width: 100%;
  height: 43px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  padding: 0 14px;
  font: inherit;
  font-weight: 750;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-field input:hover {
  border-color: rgba(15, 23, 42, 0.28);
  background: #fff;
}

.auth-field input:focus {
  border-color: #0f172a;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.10);
}

.auth-error {
  padding: 11px 13px;
  border-radius: 16px;
  background: #fef2f2;
  border: 1px solid rgba(220, 38, 38, 0.18);
  color: #b91c1c;
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.auth-submit {
  height: 45px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0085FD, #1A3787);
  color: #fff;
  font: inherit;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 16px 38px rgba(0, 133, 253, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-submit:hover {
  background: linear-gradient(135deg, #1390ff, #2447a4);
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(0, 133, 253, 0.30);
}

.auth-submit:active {
  transform: translateY(0);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.auth-version {
  justify-self: center;
  margin-top: 2px;
  max-width: 100%;
  color: rgba(51, 65, 85, 0.68);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.auth-public-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.auth-about-link {
  justify-self: center;
  margin-top: -2px;
  color: rgba(15, 23, 42, 0.44);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.18s ease, transform 0.18s ease;
}

.auth-about-link:hover {
  color: rgba(0, 133, 253, 0.92);
  transform: translateY(-1px);
}

.auth-about-link:active {
  transform: translateY(0);
  color: rgba(26, 55, 135, 0.96);
}

@media (max-width: 860px) {
  .auth-canvas-bg::after {
    background:
      radial-gradient(circle at 50% 38%, rgba(0, 133, 253, 0.13), transparent 30%),
      linear-gradient(180deg, rgba(3, 13, 14, 0.30) 0%, rgba(255, 255, 255, 0.58) 58%, rgba(255, 255, 255, 0.68) 100%);
  }

  .auth-page {
    place-items: center;
    padding-right: 24px;
  }
}

@media (max-width: 520px) {
  .auth-canvas-bg::before {
    background-position: center top;
  }

  .auth-bg-video {
    object-position: center top;
  }

  .auth-page {
    padding: 120px 14px 14px;
  }

  .auth-card {
    border-radius: 24px;
  }

  .auth-head {
    padding: 118px 20px 18px;
    border-radius: 24px 24px 0 0;
  }

  .auth-form {
    padding-left: 20px;
    padding-right: 20px;
  }

  .auth-preloader-mark {
    top: -104px;
    width: 208px;
    height: 208px;
  }

  .auth-preloader-mark::before {
    inset: 32px;
  }

  .auth-preloader-mark img {
    width: 208px;
    height: 208px;
  }

  .auth-title {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-preloader-mark::before {
    animation: none;
  }
}
