﻿body.tg-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fcf9f8;
  color: #1c1b1b;
}

.login-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: rgba(252, 249, 248, 0.82);
  backdrop-filter: blur(0.24rem);
}

.login-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 0.8rem;
  padding: 0 0.32rem;
}

.login-header__brand {
  color: #0d0d0d;
  font-size: 0.32rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.login-main {
  flex: 1 0 auto;
  display: flex;
  min-height: calc(100vh - 2.013333rem);
}

.login-visual {
  position: relative;
  flex: 0 0 55%;
  min-height: 7rem;
  overflow: hidden;
  background: #f6f3f2;
}

.login-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  opacity: 0.9;
  mix-blend-mode: multiply;
}

.login-visual__wash {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(252, 249, 248, 0.82) 100%);
}

.login-visual__copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: 5.2rem;
  padding: 0 0.64rem 0.64rem;
}

.login-visual__copy h1 {
  margin: 0 0 0.16rem;
  color: #0d0d0d;
  font-size: 0.32rem;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.login-visual__copy p {
  margin: 0;
  color: #4e4639;
  font-size: 0.24rem;
  line-height: 1.65;
  font-weight: 300;
}

.login-panel {
  flex: 0 0 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 0.64rem 0.96rem;
  background: #fcf9f8;
}

.login-card {
  width: min(100%, 4.84rem);
}

.login-card__header {
  margin-bottom: 0.32rem;
}

.login-card__header h2 {
  margin: 0 0 0.08rem;
  color: #0d0d0d;
  font-size: 0.4rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.login-card__header p {
  margin: 0;
  color: #4e4639;
  font-size: 0.213333rem;
  line-height: 1.55;
}

.login-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.08rem;
  margin-bottom: 0.16rem;
  padding: 0.06rem;
  border: 1px solid rgba(209, 197, 180, 0.55);
  border-radius: 0.04rem;
  background: rgba(255, 255, 255, 0.76);
}

.login-mode-switch__button {
  min-height: 0.42rem;
  border: 0;
  border-radius: 0.03rem;
  background: transparent;
  color: #7f7667;
  font-size: 0.186667rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.login-mode-switch__button.is-active {
  background: #c5a059;
  color: #ffffff;
}

.login-helper {
  margin-bottom: 0.24rem;
}

.login-helper p {
  margin: 0;
  color: #7f7667;
  font-size: 0.173333rem;
  line-height: 1.6;
}

.login-pane[hidden] {
  display: none !important;
}

.login-form {
  display: grid;
  gap: 0.24rem;
}

.login-fields {
  display: grid;
  gap: 0.16rem;
}

.login-field {
  position: relative;
}

.login-field input {
  display: block;
  width: 100%;
  min-height: 0.48rem;
  padding: 0.1rem 0;
  border: 0;
  border-bottom: 1px solid rgba(209, 197, 180, 0.55);
  border-radius: 0;
  background: transparent;
  color: #1c1b1b;
  font-size: 0.213333rem;
  line-height: 1.3;
  outline: none;
  box-shadow: none;
  transition: border-color 0.25s ease;
}

.login-field input::placeholder {
  color: #7f7667;
}

.login-field input:focus {
  border-color: #c5a059;
}

.login-field--password input {
  padding-right: 0.36rem;
}

.login-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.12rem;
  align-items: end;
}

.login-code-row__field {
  min-width: 0;
}

.login-code-row__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  min-height: 0.44rem;
  padding: 0 0.18rem;
  border: 1px solid rgba(197, 160, 89, 0.45);
  border-radius: 0.02rem;
  background: #ffffff;
  color: #8f6c21;
  font-size: 0.16rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.login-code-row__button:hover {
  border-color: #c5a059;
  background: #fff8ec;
}

.login-code-row__button:disabled {
  opacity: 0.6;
}

.login-eye {
  position: absolute;
  right: 0;
  top: 50%;
  display: inline-flex;
  width: 0.28rem;
  height: 0.28rem;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7f7667;
  transform: translateY(-50%);
  transition: color 0.25s ease;
}

.login-eye:hover {
  color: #c5a059;
}

.login-eye svg {
  width: 0.22rem;
  height: 0.22rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-form__meta {
  display: flex;
  justify-content: flex-start;
}

.login-form__meta a {
  color: #7f7667;
  font-size: 0.186667rem;
  transition: color 0.25s ease;
}

.login-form__meta a:hover {
  color: #c5a059;
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0.48rem;
  margin-top: 0.16rem;
  border: 0;
  border-radius: 0.02rem;
  background: #c5a059;
  color: #ffffff;
  font-size: 0.186667rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.login-submit:hover {
  opacity: 0.92;
  transform: translateY(-0.02rem);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.16rem;
  margin: 0.32rem 0 0.24rem;
}

.login-divider span {
  flex: 1 1 auto;
  height: 1px;
  background: #e5e2e1;
}

.login-divider em {
  flex: 0 0 auto;
  color: #7f7667;
  font-size: 0.213333rem;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-social {
  display: grid;
  gap: 0.12rem;
}

.login-social__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  min-height: 0.58rem;
  border: 1px solid rgba(209, 197, 180, 0.55);
  border-radius: 0.02rem;
  background: transparent;
  color: #1c1b1b;
  font-size: 0.266667rem;
  font-weight: 600;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.login-social__button:hover {
  border-color: rgba(197, 160, 89, 0.6);
  background: #ffffff;
}

.login-social__button svg {
  width: 0.2rem;
  height: 0.2rem;
  fill: currentColor;
}

.login-register {
  margin: 0.32rem 0 0;
  color: #4e4639;
  font-size: 0.186667rem;
  line-height: 1.5;
  text-align: center;
}

.login-register a {
  color: #c5a059;
  font-weight: 700;
  text-decoration: none;
}

.login-register a:hover {
  text-decoration: underline;
  text-underline-offset: 0.04rem;
}

.login-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.32rem;
  padding: 0.48rem;
  background: #0d0d0d;
  color: #ffffff;
  font-size: .2133rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-footer p {
  margin: 0;
}

.login-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.32rem;
}

.login-footer__links a {
  color: rgba(255, 255, 255, 0.42);
  transition: color 0.25s ease;
}

.login-footer__links a:hover {
  color: #c5a059;
}
