/* ============================================================
   WEB-CRM — Стили страницы входа/регистрации
   Версия: 2.0
   ============================================================ */

/* === ФОН СТРАНИЦЫ === */
.login-body {
  background: #f5f5fa;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto', sans-serif;
  overflow: hidden;
  position: relative;
}

.login-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 20px;
  z-index: 1;
}

/* === КАРТОЧКА ВХОДА === */
.login-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 48px 40px 40px;
  box-shadow: 
    0px 0px 66.5px 3.5px rgba(81, 69, 158, 0.09),
    0 20px 60px rgba(91, 79, 207, 0.08);
  position: relative;
  z-index: 2;
}

/* === ЛОГОТИП === */
.login-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #8b5cf6 0%, #5b4fcf 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(91, 79, 207, 0.35);
  transition: transform 0.3s ease;
}

.login-logo-icon:hover {
  transform: scale(1.05) rotate(-3deg);
}

/* === ЗАГОЛОВОК === */
.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 13px;
  color: #8a8aa8;
  margin: 0;
  font-weight: 400;
}

/* === ФОРМА === */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-field {
  display: flex;
  flex-direction: column;
}

.login-input {
  background: #ffffff;
  border: 1.5px solid #edeffa;
  color: #1a1a2e;
  box-shadow: 0 4px 14px rgb(91 79 207 / 8%);
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  width: 100%;
  outline: none;
  transition: all 0.2s;
  font-family: 'Roboto', sans-serif;
  box-sizing: border-box;
}

.login-input::placeholder {
  color: #b0b8c8;
}

.login-input:focus {
  border-color: #5b4fcf;
  box-shadow: 0 4px 14px rgb(91 79 207 / 18%);
}

/* Стили для select в форме регистрации */
select.login-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238798ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

select.login-input:focus {
  border-color: #5b4fcf;
  box-shadow: 0 4px 14px rgb(91 79 207 / 18%);
}

select.login-input option {
  color: #1a1a2e;
  padding: 8px;
}

/* === ПОЛЕ ПАРОЛЯ С КНОПКОЙ === */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

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

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #8a8aa8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  border-radius: 6px;
}

.password-toggle:hover {
  color: #5b4fcf;
  background: #f0edff;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* === ЗАПОМНИТЬ МЕНЯ / ЗАБЫЛИ ПАРОЛЬ === */
.login-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.remember-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #5b4fcf;
  cursor: pointer;
}

.remember-text {
  font-size: 13px;
  color: #6b7280;
  user-select: none;
}

.forgot-link {
  font-size: 13px;
  color: #5b4fcf;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #4a3fb8;
  text-decoration: underline;
}

/* === КНОПКА ВХОДА === */
.login-btn {
  margin-top: 8px;
  width: 100%;
  background: linear-gradient(135deg, #6d5ce7 0%, #5b4fcf 100%);
  color: white;
  font-weight: 600;
  font-size: 15px;
  padding: 16px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(91, 79, 207, 0.35);
  transition: all 0.25s ease;
  font-family: 'Roboto', sans-serif;
  letter-spacing: 0.3px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(91, 79, 207, 0.45);
  background: linear-gradient(135deg, #7d6ef0 0%, #6b5dd9 100%);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn.loading {
  pointer-events: none;
  opacity: 0.85;
}

.login-btn .spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* === РАЗДЕЛИТЕЛЬ === */
.login-divider {
  display: flex;
  align-items: center;
  margin: 28px 0 20px;
  color: #b0b8c8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #edeffa;
}

.login-divider span {
  padding: 0 16px;
}

/* === КНОПКА РЕГИСТРАЦИИ === */
.login-register-btn {
  width: 100%;
  background: #ffffff;
  color: #5b4fcf;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 24px;
  border-radius: 10px;
  border: 1.5px solid #edeffa;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Roboto', sans-serif;
  box-shadow: 0 4px 14px rgb(91 79 207 / 5%);
}

.login-register-btn:hover {
  border-color: #5b4fcf;
  background: #fafafe;
  box-shadow: 0 4px 14px rgb(91 79 207 / 12%);
}

/* === ДЕКОРАТИВНЫЕ ЭЛЕМЕНТЫ === */
.login-decoration {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.login-decoration-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(91, 79, 207, 0.08) 0%, transparent 70%);
  top: -100px;
  right: -80px;
  animation: float 8s ease-in-out infinite;
}

.login-decoration-2 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.06) 0%, transparent 70%);
  bottom: -60px;
  left: -60px;
  animation: float 10s ease-in-out infinite reverse;
}

.login-decoration-3 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
  top: 40%;
  left: -40px;
  animation: float 12s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 480px) {
  .login-card {
    padding: 40px 24px 32px;
    border-radius: 16px;
  }
  
  .login-title {
    font-size: 24px;
  }
  
  .login-logo-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }
  
  .login-logo-icon svg {
    width: 24px;
    height: 24px;
  }
}

/* === АНИМАЦИЯ ПОЯВЛЕНИЯ === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  animation: fadeInUp 0.5s ease-out;
}

/* === КУРСОРЫ === */
.login-btn,
.login-register-btn,
.password-toggle,
.forgot-link,
.remember-label,
.login-input,
select.login-input {
  cursor: pointer;
}

.login-input[type="text"],
.login-input[type="password"],
.login-input[type="email"] {
  cursor: text;
}