/**
 * Страницы входа и регистрации (только внешние стили, без inline в шаблонах).
 * Переменные определены в main.css
 */
.auth-page--login {
  color: var(--color-text-main);
}

.auth-page--register {
  color: var(--color-text-alt);
}

* {
  box-sizing: border-box;
}

.auth-page {
  margin: 0;
  min-height: 100vh;
}

/* --- Login --- */
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.login-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1dc6b0 0%, #4f8cf2 56%, #8d7af1 100%);
}

.login-hero .hero-content {
  text-align: center;
  color: #fff;
}

.login-hero .hero-logo {
  width: 78px;
  height: 78px;
  margin: 0 auto 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-size: 34px;
}

.login-hero .hero-title {
  margin: 0;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.2;
}

.login-hero .hero-subtitle {
  margin: 14px 0 48px;
  font-size: 26px;
  opacity: 0.95;
}

.hero-bars {
  width: 280px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
}

.hero-bar {
  width: 20px;
  border-radius: 10px 10px 0 0;
  background: rgba(255, 255, 255, 0.35);
}

.hero-bar:nth-child(1) {
  height: 42px;
}

.hero-bar:nth-child(2) {
  height: 54px;
}

.hero-bar:nth-child(3) {
  height: 34px;
}

.hero-bar:nth-child(4) {
  height: 62px;
}

.hero-bar:nth-child(5) {
  height: 46px;
}

.hero-bar:nth-child(6) {
  height: 58px;
}

.hero-bar:nth-child(7) {
  height: 66px;
}

.login-side {
  background: var(--color-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 520px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 34px 34px 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.login-card .card-title {
  margin: 0 0 10px;
  font-size: 38px;
  font-weight: 700;
}

.login-card .card-subtitle {
  margin: 0 0 28px;
  color: var(--color-text-muted);
  font-size: 18px;
}

/* --- Register --- */
.register-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.register-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #7f78ef 0%, #3f8ff1 42%, #1db5c7 70%, #14c8b2 100%);
}

.register-hero .hero-content {
  width: 460px;
  max-width: 100%;
  color: #fff;
}

.register-hero .hero-logo {
  width: 78px;
  height: 78px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-size: 34px;
}

.register-hero .hero-title {
  margin: 0 0 10px;
  text-align: left;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
}

.register-hero .hero-subtitle {
  margin: 0 0 30px;
  text-align: left;
  font-size: 31px;
  font-weight: 600;
  line-height: 1.2;
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.96);
  font-size: 13px;
}

.feature-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.3);
  font-size: 12px;
}

.register-side {
  background: var(--color-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.register-card {
  width: 100%;
  max-width: 520px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 34px 34px 28px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.register-card .card-title {
  margin: 0 0 8px;
  font-size: 42px;
  font-weight: 700;
}

.register-card .card-subtitle {
  margin: 0 0 22px;
  color: var(--color-text-muted);
  font-size: 16px;
}

/* --- Общие элементы форм --- */
.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.auth-page--register .form-label {
  margin: 0 0 8px;
  font-size: 14px;
}

.form-field {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--color-input-border);
  background: var(--color-input-bg);
  font-size: 15px;
}

.auth-page--login .form-field {
  margin-bottom: 18px;
}

.auth-page--register .form-field {
  margin-bottom: 14px;
}

.password-wrap {
  position: relative;
}

.auth-page--login .password-wrap .form-field {
  margin-bottom: 16px;
  padding-right: 42px;
}

.auth-page--register .password-wrap .form-field {
  padding-right: 42px;
}

.password-eye {
  position: absolute;
  top: 13px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--color-text-light);
  font-size: 16px;
  cursor: pointer;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 14px;
}

.remember-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
}

.terms {
  margin: 2px 0 14px;
  color: var(--color-text-light);
  font-size: 12px;
  line-height: 1.4;
}

.link {
  color: var(--color-link);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.submit-btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(
    90deg,
    var(--color-brand-start) 0%,
    var(--color-brand-end) 100%
  );
  color: var(--color-white);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(70, 130, 247, 0.22);
}

.auth-page--login .divider {
  margin: 20px 0 18px;
}

.auth-page--register .divider {
  margin: 18px 0 16px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-light);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.signup,
.signin {
  margin: 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

.alert {
  color: var(--color-danger-dark);
  font-size: 14px;
}

.auth-page--login .alert {
  margin: 0 0 16px;
}

.auth-page--register .alert {
  margin: 0 0 12px;
}

@media (max-width: 980px) {
  .login-layout,
  .register-layout {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: 38vh;
    padding: 28px 20px;
  }

  .login-hero .hero-title {
    font-size: 36px;
  }

  .login-hero .hero-subtitle {
    margin-bottom: 30px;
    font-size: 20px;
  }

  .register-hero {
    min-height: 40vh;
    padding: 26px 20px;
  }

  .register-hero .hero-content {
    width: 100%;
    max-width: 620px;
  }

  .register-hero .hero-title {
    font-size: 40px;
  }

  .register-hero .hero-subtitle {
    font-size: 24px;
  }
}
