/* TALER / MONOLITH — AUTH V1 */

.login-page,
.register-page {
  --auth-orange: #ff641f;
  --auth-black: #090909;
  --auth-white: #fff;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100dvh !important;
  background: #090909 !important;
  color: #fff !important;
  overflow: hidden;
  font-family: "Arial Narrow", Arial, sans-serif !important;
}

.login-page *,
.register-page * {
  box-sizing: border-box;
}

.login-shell,
.register-shell {
  position: relative !important;
  isolation: isolate;
  display: grid !important;
  grid-template-columns: 51.5% 48.5% !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #090909 !important;
  box-shadow: none !important;
}

/* Убираем старые иллюстрации и маркетинговые блоки */
.login-intro,
.register-intro {
  display: none !important;
}

/* Левая часть */
.auth-monolith-art {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 100dvh;
  overflow: hidden;
  background: #090909;
}

.auth-monolith-wordmark {
  position: absolute;
  z-index: 1;
  right: -0.14em;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  color: #fff;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(110px, 17vh, 225px);
  font-weight: 900;
  line-height: .8;
  letter-spacing: -.045em;
  user-select: none;
}

.auth-monolith-cross {
  position: absolute;
  left: 45%;
  top: 50%;
  transform: translate(-50%, -50%);
  font: 300 55px/1 monospace;
  color: #999;
}

.auth-monolith-marquee {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 12px;
  width: 36px;
  overflow: hidden;
  color: #fff;
}

.auth-monolith-marquee-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: max-content;
  animation: auth-marquee-up 22s linear infinite;
}

.auth-monolith-marquee-track span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font: 700 19px/1.2 "Arial Narrow", Arial, sans-serif;
  letter-spacing: .03em;
}

@keyframes auth-marquee-up {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* Правая оранжевая панель */
.login-card,
.register-card {
  position: relative !important;
  z-index: 3;
  grid-column: 2;
  grid-row: 1;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: clamp(30px, 6vw, 105px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #ff641f !important;
  background-image: none !important;
  color: #090909 !important;
  box-shadow: none !important;
}

.login-card-head,
.register-card-head {
  margin: 0 0 34px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.login-card-label,
.register-card-label {
  display: inline-block !important;
  width: fit-content;
  margin: 0 0 12px !important;
  padding: 5px 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #090909 !important;
  color: #fff !important;
  font: 800 15px/1.2 "Arial Narrow", Arial, sans-serif !important;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.login-card-head h2,
.register-card-head h2 {
  margin: 0 !important;
  color: #090909 !important;
  font-family: Impact, "Arial Narrow", sans-serif !important;
  font-size: clamp(38px, 4.5vw, 76px) !important;
  line-height: 1 !important;
  text-transform: uppercase;
  letter-spacing: -.025em;
}

.login-card-sub,
.register-card-sub {
  margin: 12px 0 0 !important;
  color: #171717 !important;
  font-size: 13px !important;
  line-height: 1.5;
}

.login-form,
.register-form {
  display: flex !important;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  gap: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.login-field,
.register-form .field {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}

.login-form label,
.register-form label {
  display: inline-block !important;
  width: fit-content;
  margin: 0 0 6px !important;
  padding: 4px 9px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #090909 !important;
  color: #fff !important;
  font: 700 12px/1.3 "Arial Narrow", Arial, sans-serif !important;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.register-form label span {
  color: #ddd !important;
}

.login-form input:not([type="hidden"]),
.register-form input:not([type="hidden"]) {
  display: block !important;
  width: 100% !important;
  min-width: 0;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 12px 15px !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  border-radius: 0 !important;
  outline: none;
  background: #d94d15 !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
  font: 500 15px/1.3 monospace !important;
}

.login-form input::placeholder,
.register-form input::placeholder {
  color: rgba(255,255,255,.68) !important;
  -webkit-text-fill-color: rgba(255,255,255,.68) !important;
}

.login-form input:focus,
.register-form input:focus {
  border-color: #090909 !important;
  outline: 1px solid #090909 !important;
}

.login-form .login-submit,
.register-form button[type="submit"] {
  display: block !important;
  width: 100% !important;
  min-height: 50px !important;
  margin: 10px 0 0 !important;
  padding: 12px 18px !important;
  border: 1px solid #090909 !important;
  border-radius: 0 !important;
  background: #090909 !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
  font: 800 15px/1.2 "Arial Narrow", Arial, sans-serif !important;
  text-transform: uppercase;
  cursor: pointer;
}

.login-form .login-submit:hover,
.register-form button[type="submit"]:hover {
  background: #fff !important;
  color: #090909 !important;
  -webkit-text-fill-color: #090909 !important;
}

/* Ссылки, ошибки и дополнительные элементы */
.login-card a,
.register-card a {
  color: #090909 !important;
  -webkit-text-fill-color: #090909 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-register,
.register-card p,
.login-divider {
  color: #090909 !important;
}

.login-platform,
.login-divider {
  display: none !important;
}

.login-error,
.register-error {
  border: 1px solid #090909 !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: #090909 !important;
  padding: 12px !important;
}

.register-form .form-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px !important;
}

/* Регистрация длиннее: прокрутка внутри панели */
.register-card {
  justify-content: flex-start !important;
  padding-top: clamp(45px, 7vh, 90px) !important;
  padding-bottom: 55px !important;
}

/* Мобильная версия */
@media (max-width: 760px) {
  .login-shell,
  .register-shell {
    grid-template-columns: 1fr !important;
    grid-template-rows: 185px auto !important;
  }

  .auth-monolith-art {
    grid-column: 1;
    grid-row: 1;
    min-height: 185px;
    height: 185px;
  }

  .auth-monolith-wordmark {
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: horizontal-tb;
    font-size: clamp(72px, 22vw, 130px);
    line-height: 1;
  }

  .auth-monolith-cross {
    left: 35%;
    font-size: 30px;
  }

  .auth-monolith-marquee {
    left: 8px;
    width: 25px;
  }

  .auth-monolith-marquee-track span {
    font-size: 13px;
  }

  .login-card,
  .register-card {
    grid-column: 1;
    grid-row: 2;
    min-height: calc(100dvh - 185px) !important;
    padding: 35px 22px 55px !important;
  }

  .login-card-head h2,
  .register-card-head h2 {
    font-size: 42px !important;
  }

  .register-form .form-row {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-monolith-marquee-track {
    animation: none;
  }
}

/* MONOLITH — TALER на всю высоту экрана */
@media (min-width: 761px) {
    .auth-monolith-wordmark {
        position: absolute !important;
        top: 50% !important;
        right: -0.14em !important;

        writing-mode: vertical-rl !important;
        text-orientation: mixed !important;

        font-family: Impact, "Arial Narrow", sans-serif !important;
        font-size: clamp(180px, 24vh, 340px) !important;
        font-weight: 900 !important;
        line-height: 0.8 !important;
        letter-spacing: -0.045em !important;

        transform: translateY(-50%) !important;
        white-space: nowrap !important;
    }
}


/* MONOLITH — TALER на всю высоту экрана */
@media (min-width: 761px) {
    .auth-monolith-wordmark {
        position: absolute !important;
        top: 50% !important;
        right: -0.14em !important;

        writing-mode: vertical-rl !important;
        text-orientation: mixed !important;

        font-family: Impact, "Arial Narrow", sans-serif !important;
        font-size: clamp(180px, 24vh, 340px) !important;
        font-weight: 900 !important;
        line-height: 0.8 !important;
        letter-spacing: -0.045em !important;

        transform: translateY(-50%) !important;
        white-space: nowrap !important;
    }
}


/* TALER — гигантская вертикальная надпись */
@media (min-width: 761px) {
    .auth-monolith-wordmark {
        font-size: clamp(280px, 39vh, 560px) !important;
        right: -0.14em !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        line-height: .8 !important;
    }
}


/* MONOLITH — текст под формой регистрации */
.register-card,
.register-card .register-form,
.register-card .register-form p,
.register-card .register-form p *,
.register-card .register-form small,
.register-card .register-form small * {
    color: #090909 !important;
    -webkit-text-fill-color: #090909 !important;
}

/* =====================================================
   TALER MONOLITH — LOGIN / REGISTER INPUT FIX
   ===================================================== */

input[type="email"],
input[type="password"],
input[type="text"] {
    background: #101010 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ff641f !important;
    border: 1px solid #333333 !important;
    border-radius: 0 !important;
    opacity: 1 !important;
}

input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
    color: #777777 !important;
    -webkit-text-fill-color: #777777 !important;
    opacity: 1 !important;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: #ff641f !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Chrome / Yandex Browser autofill */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #101010 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ff641f !important;
    border: 1px solid #333333 !important;
    transition: background-color 9999s ease-out 0s;
}


/* ==============================================
   TALER AUTH — MOBILE WHITE INPUT TEXT
   ============================================== */

@media (max-width: 900px) {

  .login-form input,
  .register-form input,
  .login-field input,
  .field input {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    caret-color: #FFFFFF !important;
  }

  .login-form input:focus,
  .register-form input:focus,
  .login-field input:focus,
  .field input:focus {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    caret-color: #FFFFFF !important;
  }

  .login-form input::placeholder,
  .register-form input::placeholder,
  .login-field input::placeholder,
  .field input::placeholder {
    color: #999999 !important;
    -webkit-text-fill-color: #999999 !important;
    opacity: 1 !important;
  }

  .login-form input:-webkit-autofill,
  .register-form input:-webkit-autofill,
  .login-field input:-webkit-autofill,
  .field input:-webkit-autofill {
    -webkit-text-fill-color: #FFFFFF !important;
    caret-color: #FFFFFF !important;
    transition: background-color 9999s ease-out 0s;
  }
}

/* ==========================================
   TALER MOBILE AUTH — HIGH CONTRAST
   ========================================== */

@media (max-width: 900px) {

  /* Названия полей над вводом */
  .login-form label,
  .register-form label,
  .login-field label,
  .field label {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    opacity: 1 !important;
    text-shadow: none !important;
  }

  /* Белые поля, чёрный текст */
  .login-form input:not([type="checkbox"]),
  .register-form input:not([type="checkbox"]),
  .login-field input:not([type="checkbox"]),
  .field input:not([type="checkbox"]) {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    caret-color: #000000 !important;
    opacity: 1 !important;
    border: 1px solid #888888 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color-scheme: light !important;
  }

  /* При нажатии на поле */
  .login-form input:not([type="checkbox"]):focus,
  .register-form input:not([type="checkbox"]):focus,
  .login-field input:not([type="checkbox"]):focus,
  .field input:not([type="checkbox"]):focus {
    background: #FFFFFF !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    caret-color: #000000 !important;
    border-color: #FF641F !important;
    outline: 1px solid #FF641F !important;
  }

  /* Подсказки */
  .login-form input::placeholder,
  .register-form input::placeholder,
  .login-field input::placeholder,
  .field input::placeholder {
    color: #666666 !important;
    -webkit-text-fill-color: #666666 !important;
    opacity: 1 !important;
  }

  /* Автозаполнение браузера */
  .login-form input:-webkit-autofill,
  .register-form input:-webkit-autofill,
  .login-field input:-webkit-autofill,
  .field input:-webkit-autofill,
  .login-form input:-webkit-autofill:focus,
  .register-form input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
    -webkit-text-fill-color: #000000 !important;
    caret-color: #000000 !important;
    color-scheme: light !important;
  }
}
