@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --surface: rgba(255, 255, 255, 0.97);

  --text: #1E2A3A;
  --text-soft: #6B7C93;
  --title: #1E2A3A;

  --input-line: #2967EC2b;
  --input-line-focus: #2967EC;

  --input-text: #2967EC;
  --placeholder: #2967EC8a;

  --shadow: 0 24px 60px rgba(41, 103, 236, 0.16);

  --card-radius: 24px;
  --field-height: 48px;
  --left-panel-width: 39%;
  --content-width: 360px;

  --link: #2967EC;

  --status-bg: rgba(41, 103, 236, 0.12);
  --status-border: rgba(41, 103, 236, 0.2);

  --separator: rgba(41, 103, 236, 0.14);
}

::selection {
  background: rgba(126, 184, 255, 0.66);
}

::-moz-selection {
  background: rgba(204, 204, 204, 0.5);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--text);

  background:
    radial-gradient(circle at 14% 20%, rgba(120, 160, 255, 0.04) 0 2px, transparent 2px 100%),
    radial-gradient(circle at 72% 14%, rgba(120, 160, 255, 0.04) 0 2px, transparent 2px 100%),
    radial-gradient(circle at 32% 82%, rgba(120, 160, 255, 0.05) 0 2px, transparent 2px 100%),
    linear-gradient(180deg, #F5F8FD 0%, #F5F8FD 100%);

  background-size: 240px 240px, 280px 280px, 320px 320px, auto;
  overflow: hidden;
}

.global-petals {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.auth-page,
.auth-shell,
.auth-content {
  position: relative;
}

.auth-shell {
  z-index: 2;
}

html,
body,
input,
button,
textarea,
select,
a {
  font-family: "Montserrat", sans-serif;
}

.input-disabled {
    cursor: not-allowed;
    opacity: 0.6;
    user-select: none;
}

.input-disabled:hover {
    cursor: not-allowed;
}

.input-field,
.input-field::placeholder,
.btn-submit,
.auth-link,
.remember-me,
.register-link {
  font-family: "Montserrat", sans-serif;
}

.default-auth-body,
body[class$="-auth-body"] {
  background:
    radial-gradient(circle at 14% 20%, rgba(120, 160, 255, 0.04) 0 2px, transparent 2px 100%),
    radial-gradient(circle at 72% 14%, rgba(120, 160, 255, 0.04) 0 2px, transparent 2px 100%),
    radial-gradient(circle at 32% 82%, rgba(120, 160, 255, 0.05) 0 2px, transparent 2px 100%),
    linear-gradient(180deg, #F5F8FD 0%, #F5F8FD 100%);
}

.auth-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px 28px;
  isolation: isolate;
  overflow: hidden;
}

.embers-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ember {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgb(212, 0, 124);
  animation: dotFloat 18s linear infinite;
}

.ember:nth-child(1) { left: 6%; top: 8%; }
.ember:nth-child(2) { left: 13%; top: 61%; animation-duration: 22s; }
.ember:nth-child(3) { left: 23%; top: 15%; animation-duration: 15s; }
.ember:nth-child(4) { left: 31%; top: 74%; animation-duration: 20s; }
.ember:nth-child(5) { left: 42%; top: 12%; animation-duration: 19s; }
.ember:nth-child(6) { left: 51%; top: 82%; animation-duration: 14s; }
.ember:nth-child(7) { left: 63%; top: 11%; animation-duration: 17s; }
.ember:nth-child(8) { left: 71%; top: 56%; animation-duration: 21s; }
.ember:nth-child(9) { left: 80%; top: 18%; animation-duration: 15s; }
.ember:nth-child(10) { left: 90%; top: 72%; animation-duration: 23s; }
.ember:nth-child(11) { left: 8%; top: 90%; animation-duration: 18s; }
.ember:nth-child(12) { left: 17%; top: 38%; animation-duration: 14s; }
.ember:nth-child(13) { left: 36%; top: 33%; animation-duration: 19s; }
.ember:nth-child(14) { left: 47%; top: 53%; animation-duration: 24s; }
.ember:nth-child(15) { left: 58%; top: 34%; animation-duration: 15s; }
.ember:nth-child(16) { left: 68%; top: 88%; animation-duration: 22s; }
.ember:nth-child(17) { left: 77%; top: 43%; animation-duration: 20s; }
.ember:nth-child(18) { left: 86%; top: 8%; animation-duration: 16s; }
.ember:nth-child(19) { left: 93%; top: 49%; animation-duration: 21s; }
.ember:nth-child(20) { left: 97%; top: 23%; animation-duration: 18s; }

@keyframes dotFloat {
  0%, 100% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(-10px); opacity: 0.12; }
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  min-height: 560px;
  background: var(--surface);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: var(--left-panel-width) 1fr;
}

.auth-panel {
  min-width: 0;
}

.auth-panel-left {
  position: relative;
  overflow: hidden;

  background: #ffcceb;
}

.auth-panel-left::before {
  content: "";
  position: absolute;
  inset: -20%;

  background:
    radial-gradient(circle at 20% 30%, #2967EC, transparent 55%),
    radial-gradient(circle at 80% 70%, #6F9BFF, transparent 60%),
    radial-gradient(circle at 60% 20%, #4F80F5, transparent 55%),
    radial-gradient(circle at 30% 80%, #3A73F0, transparent 60%);

  animation: blobMove 12s ease-in-out infinite;
  filter: blur(40px);
}

@keyframes blobMove {
  0% {
    transform: translate(0%, 0%) scale(1);
  }
  25% {
    transform: translate(-5%, 5%) scale(1.05);
  }
  50% {
    transform: translate(5%, -5%) scale(1.1);
  }
  75% {
    transform: translate(-3%, 3%) scale(1.05);
  }
  100% {
    transform: translate(0%, 0%) scale(1);
  }
}

.auth-panel-left {
  position: relative;
  overflow: hidden;
  background: #ffcceb;
}

.auth-panel-left-content {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 78px 56px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.left-bottom-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0.7;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #fff;
}

.left-bottom-textOpacity {
  opacity: 1;
  font-weight: 800;
  font-size: 1.2rem;
}

#left-bottom-textAnim .char {
  transition: background-color 0.22s ease, color 0.22s ease;
}

#left-bottom-textAnim .char.is-active {
background-color: rgba(204, 204, 204, 0.5);
color: #ffffff;
}

#left-bottom-wrapper.is-animating {
  user-select: none;
  pointer-events: none;
}

.auth-panel-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
}

.auth-content {
  width: 100%;
  max-width: var(--content-width);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.auth-logo {
  margin: 0 0 10px;
  font-size: 1.45rem;
  font-weight: 700;
  opacity: 0.7;
  line-height: 1;
  letter-spacing: -0.03em;
  text-align: right;
}

.auth-title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.05em;
  color: #2f2f2f;
  text-align: center;
}

.auth-form {
  width: 100%;
}

.auth-content .mb-4,
.auth-content .text-sm,
.register-link,
.form-row,
.remember-me,
.auth-link {
  color: var(--text-soft);
}

.input-group {
  margin-bottom: 12px;
  width: 100%;
}

.input-field {
  width: 100%;
  height: var(--field-height);
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid var(--input-line);
  background: transparent;
  color: var(--input-text);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  border-radius: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.input-field::placeholder {
  color: var(--placeholder);
  opacity: 1;
  font-weight: 500;
}

.input-field:focus {
  border-bottom-color: var(--input-line-focus);
  color: var(--input-text);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.remember-me {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  line-height: 1.35;
  cursor: pointer;
}

/* скрываем нативный */
.remember-me input {
  display: none;
}

/* коробка */
.checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(0,0,0,0.15);
  background: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.25s ease;
}

/* галочка */
.checkbox::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;

  background: #2967EC;
  transform: scale(0);

  transition: transform 0.2s ease;
}

/* checked */
.remember-me input:checked + .checkbox {
  border-color: #2967EC;
  background: rgba(41, 103, 236, 0.1);
}

.remember-me input:checked + .checkbox::after {
  transform: scale(1);
}

/* hover */
.remember-me:hover .checkbox {
  border-color: #2967EC;
}

.auth-link {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 4px;

  transition: opacity 0.25s ease;
}

.auth-link:hover {
  opacity: 0.8;
}

.auth-link:active {
  opacity: 0.6;
}
.btn-submit {
  position: relative;
  overflow: hidden;

  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 0;
  border-radius: 15px;

  background: #2967EC;
  color: #ffffff;

  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: opacity 0.5s ease;;
}

.btn-submit:hover {
  opacity: 0.8;
}

.btn-submit:active {
  opacity: 0.6;
}

.btn-submit::before {
  content: "";
  position: absolute;
  inset: -30%;

  background:
    radial-gradient(circle at 20% 30%, #3a79ff, transparent 55%),
    radial-gradient(circle at 80% 70%, #6F9BFF, transparent 60%),
    radial-gradient(circle at 60% 20%, #4F80F5, transparent 55%),
    radial-gradient(circle at 30% 80%, #3A73F0, transparent 60%);

  animation: blobMove 10s ease-in-out infinite;
  filter: blur(15px);
  z-index: 0;
}

.btn-submit span {
  position: relative;
  z-index: 1;
}

.btn-submit:disabled,
button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-google {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 15px;

  background: linear-gradient(180deg, #2f2f2f 0%, #1f1f1f 100%);
  color: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;

  transition: all 0.5s ease;
}

.btn-google:hover {
  opacity: 0.8;
}

.btn-google:active {
  opacity: 0.6;
}

.btn-google:disabled,
button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}


.google-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.google-icon svg {
  width: 20px;
  height: 20px;
}
.google-group {
  margin-top: 12px;
}

.separator {
  width: 100%;
  margin: 20px 0 16px;
  border: 0;
  border-top: 1px solid var(--separator);
}

.register-link {
  width: 100%;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.55;
}

.input-error-message,
.text-danger,
.mt-2.text-danger,
.small {
  display: block;
  margin-top: 8px;
  color: #e10000 !important;
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 0;
  margin: 8px 0px 0px 0px;
  list-style: none;
}

.text-success,
.mt-2.text-success {
  color: #ff5bbd !important;
  font-size: 0.85rem;
  line-height: 1.5;
}

.text-sm {
  font-size: 0.9rem;
  line-height: 1.55;
}

.mb-4 {
  margin-bottom: 16px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-4 {
  margin-top: 16px;
}

.small {
  font-size: 0.85rem;
}

strong {
  color: var(--title);
  font-weight: 700;
}

.auth-top-pattern {
  position: absolute;
  inset: 0;
  height: 420px;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.auth-top-pattern-icon {
  position: absolute;
  display: block;

  width: 210%;
  height: 70px;

  background-image: url('/auth/images/tire.png');
  background-repeat: repeat-x;
  background-position: center;
  background-size: 220px auto;

  opacity: 0.16;
  filter: blur(0.3px);
  transform-origin: center;
}

/* основные следы */
.auth-top-pattern-icon:nth-child(1) {
  top: -40px;
  left: -80%;
  transform: rotate(16deg);
  opacity: 0.13;
}

.auth-top-pattern-icon:nth-child(2) {
  top: 0px;
  left: -20%;
  transform: rotate(-24deg);
  opacity: 0.18;
}

.auth-top-pattern-icon:nth-child(3) {
  top: 45px;
  left: -90%;
  transform: rotate(10deg);
  opacity: 0.14;
}

.auth-top-pattern-icon:nth-child(4) {
  top: 85px;
  left: -30%;
  transform: rotate(-32deg);
  opacity: 0.20;
}

.auth-top-pattern-icon:nth-child(5) {
  top: 130px;
  left: -70%;
  transform: rotate(20deg);
  opacity: 0.12;
}

.auth-top-pattern-icon:nth-child(6) {
  top: 175px;
  left: -15%;
  transform: rotate(-12deg);
  opacity: 0.15;
}

.auth-top-pattern-icon:nth-child(7) {
  top: 215px;
  left: -85%;
  transform: rotate(28deg);
  opacity: 0.11;
}

.auth-top-pattern-icon:nth-child(8) {
  top: 255px;
  left: -10%;
  transform: rotate(-18deg);
  opacity: 0.17;
}

/* дополнительные "дрифты" */
.auth-top-pattern-icon:nth-child(9) {
  top: 20px;
  left: -60%;
  transform: rotate(5deg);
  opacity: 0.08;
  background-size: 200px auto;
}

.auth-top-pattern-icon:nth-child(10) {
  top: 110px;
  left: -40%;
  transform: rotate(-6deg);
  opacity: 0.09;
  background-size: 210px auto;
}

.auth-top-pattern-icon:nth-child(11) {
  top: 200px;
  left: -55%;
  transform: rotate(12deg);
  opacity: 0.07;
  background-size: 230px auto;
}

.auth-top-pattern-icon:nth-child(12) {
  top: 300px;
  left: -35%;
  transform: rotate(-8deg);
  opacity: 0.10;
  background-size: 240px auto;
}

.auth-top-pattern-icon:nth-child(13) {
  top: 60px;
  left: -25%;
  transform: rotate(30deg);
  opacity: 0.06;
  background-size: 260px auto;
}

.auth-top-pattern-icon:nth-child(14) {
  top: 160px;
  left: -75%;
  transform: rotate(-27deg);
  opacity: 0.09;
  background-size: 215px auto;
}

/* лишние скрываем */
.auth-top-pattern-icon:nth-child(n + 15) {
  display: none;
}

.x-auth-session-status,
.auth-content .status-message {
  width: 100%;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--status-bg);
  border: 1px solid var(--status-border);
  color: var(--text);
  line-height: 1.55;
}

.auth-icon {
  display: none;
}

@media (max-width: 1180px) {
  .auth-panel-right {
    padding: 40px 42px;
  }

  .auth-title {
    font-size: 2.45rem;
  }
}

@media (max-width: 920px) {
  .auth-page {
    padding: 22px 16px;
  }

  .auth-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .auth-panel-left {
    min-height: 180px;
    box-shadow: inset 0 -18px 0 rgba(255, 255, 255, 0.08);
  }

  .auth-panel-right {
    padding: 28px 20px 24px;
    justify-content: center;
  }

  .auth-content {
    max-width: 100%;
  }

  .auth-title {
    margin-bottom: 14px;
    font-size: 2rem;
  }
}

@media (max-width: 560px) {
  html,
  body {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
  }

  body {
    overflow: hidden;
  }

  .auth-page {
    padding: 0;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    display: block;
  }

  .auth-shell {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    overflow: hidden;
    display: block;
    background: var(--surface);
  }

  .auth-panel-left {
    display: none !important;
  }


  .auth-icon {
    display: block;
    width: 75px;
    height: 75px;
    margin: 0 auto 15px auto;
    border-radius: 25px;
    object-fit: contain;
  }

  .auth-top-pattern,
  .auth-panel-left::before,
  .auth-panel-left-content,
  .left-bottom-text,
  .left-bottom-textOpacity,
  #left-bottom-wrapper,
  #left-bottom-textAnim {
    display: none !important;
  }

  .auth-panel-right {
    width: 100%;
    height: 100vh;
    min-height: 100vh;

    padding: 0px 15px;

    display: flex;
    align-items: flex-start;
    margin-top: 90px;
    justify-content: center;

    background: var(--surface);
  }

  .auth-content {
    width: 100%;
    max-width: 360px;

    margin: 0 auto;
    padding: 0 20px; /* небольшой внутренний отступ */

    display: flex;
    flex-direction: column;
    justify-content: center; /* центрируем содержимое */
  }

  .auth-title {
    margin-top: 0; /* убираем возможный верхний отступ */
  }

  .auth-content {
    width: 100%;
    max-width: 100%;
  }

  .auth-title {
    font-size: 1.8rem;
    margin-bottom: 14px;
  }

  .form-row {
    gap: 10px;
  }

  .remember-me,
  .auth-link,
  .register-link {
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


