/**
 * ==========================================================================
 * MPSET.pro — Login Page Styles (pages/login.css)
 * ==========================================================================
 * Стили ТОЛЬКО для страницы входа/регистрации.
 * 
 * Что здесь находится:
 * - Уникальная двухколоночная компоновка (левая панель брендинга)
 * - Стили капчи (уникальный блок)
 * - Юридический блок с соглашениями
 * - Обёртка для поля пароля с иконкой "глаз"
 * - Анимации уведомлений
 * 
 * ВАЖНО:
 * - Базовые компоненты (кнопки, инпуты, уведомления) берутся из 02-components.css
 * - Утилиты (отступы, flex, grid) берутся из 03-utilities.css
 * - Здесь только то, что уникально для страницы авторизации
 * ==========================================================================
 */

/* ==========================================================================
   УНИКАЛЬНАЯ КОМПОНОВКА (две колонки)
   ========================================================================== */

/* Контейнер для всей страницы авторизации */
.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 960px;
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  margin: 16px;
}

/* Левая колонка — брендинг с градиентом */
.login-branding {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  padding: var(--space-12) var(--space-8);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Декоративный паттерн поверх градиента */
.branding-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--pattern-dots);
  opacity: 0.3;
  pointer-events: none;
}

/* Контент левой колонки (относительно паттерна) */
.branding-content {
  position: relative;
  z-index: 1;
}

/* Логотип */
.branding-logo {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-2);
}

.branding-tagline {
  font-size: var(--font-size-sm);
  opacity: 0.9;
}

/* Список возможностей */
.branding-features {
  margin-top: var(--space-12);
}

.branding-features h3 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-4);
}

.branding-features ul {
  list-style: none;
  padding: 0;
}

.branding-features li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-sm);
}

.branding-features li i {
  font-size: var(--font-size-sm);
}

/* Бейджи маркетплейсов */
.branding-badges {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-12);
}

.badge-white {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  backdrop-filter: blur(10px);
}

/* Правая колонка — форма */
.login-form-container {
  padding: var(--space-12) var(--space-10);
  background: var(--bg-card);
}

/* ==========================================================================
   ОБЩИЕ СТИЛИ ДЛЯ ПОЛЕЙ ФОРМЫ (исправление отступов)
   ========================================================================== */

/* Контейнер для поля формы — увеличен отступ снизу */
.form-field {
  margin-bottom: var(--space-6);  /* 24px вместо 16px — увеличил интервал */
}

/* Последнее поле перед опциями или кнопкой */
.form-field:last-of-type {
  margin-bottom: var(--space-6);
}

/* Стили для лейбла внутри формы */
.form-field .label {
  display: block;
  margin-bottom: var(--space-3);  /* 12px отступ между лейблом и полем */
}

/* ==========================================================================
   УНИКАЛЬНЫЕ КОМПОНЕНТЫ (только для страницы авторизации)
   ========================================================================== */

/* Обёртка для поля пароля (с кнопкой показать/скрыть) */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper .input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: var(--text-secondary);
}

/* Блок капчи — увеличен отступ снизу */
.captcha-wrapper {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.captcha-question {
  background: var(--gray-100);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  min-width: 100px;
  text-align: center;
}

.captcha-wrapper .input {
  flex: 1;
  min-width: 120px;
}

.captcha-refresh {
  width: 52px;
  height: 52px;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-refresh:hover {
  transform: rotate(180deg);
  border-color: var(--ozon-blue);
}

.captcha-refresh i {
  color: var(--ozon-blue);
  font-size: 18px;
}

/* Юридический блок (соглашения) — увеличен отступ сверху */
.legal-block {
  background: var(--gray-50);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-top: var(--space-6);     /* 24px отступ от капчи */
  margin-bottom: var(--space-8);  /* 32px отступ до кнопки */
}

.legal-item {
  margin-bottom: var(--space-4);
  align-items: flex-start;
}

.legal-item:last-child {
  margin-bottom: 0;
}

.legal-item span {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  line-height: 1.5;
}

.legal-item a {
  color: var(--ozon-blue);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
}

.legal-item a:hover {
  text-decoration: underline;
}

.legal-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--ozon-blue);
  margin-top: 2px;
  flex-shrink: 0;
}

/* Опции формы (чекбокс + ссылка забыли пароль) — увеличен отступ сверху */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-2);     /* небольшой отступ сверху */
  margin-bottom: var(--space-8);  /* 32px отступ до кнопки */
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--ozon-blue);
  margin: 0;
}

.forgot-link {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--ozon-blue);
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* Кнопка отправки формы — увеличен отступ сверху где нужно */
.button--full {
  margin-top: var(--space-2);
}

/* ==========================================================================
   АНИМАЦИИ (для уведомлений)
   ========================================================================== */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Уведомления поверх страницы (toast) */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
  max-width: 400px;
  animation: slideIn 0.3s ease;
}

/* ==========================================================================
   АДАПТИВНОСТЬ (для мобильных устройств)
   ========================================================================== */
@media (max-width: 768px) {
  .login-container {
    grid-template-columns: 1fr;
    margin: 0;
    border-radius: var(--radius-xl);
  }
  
  .login-branding {
    padding: var(--space-8) var(--space-6);
  }
  
  .login-form-container {
    padding: var(--space-8) var(--space-6);
  }
  
  .branding-features {
    margin-top: var(--space-6);
  }
  
  .branding-badges {
    margin-top: var(--space-6);
  }
  
  .captcha-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .captcha-question {
    text-align: center;
  }
  
  .captcha-refresh {
    align-self: center;
  }
  
  /* Уменьшаем отступы на мобильных */
  .form-field {
    margin-bottom: var(--space-5);  /* 20px вместо 24px */
  }
  
  .form-options {
    margin-bottom: var(--space-6);  /* 24px вместо 32px */
  }
  
  .legal-block {
    margin-top: var(--space-5);
    margin-bottom: var(--space-6);
  }
}

/* Глобальный фон для страницы авторизации */
body {
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin: 0;
  font-family: var(--font-family-base);
}