
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4caf50;
}

input:checked + .slider:before {
  transform: translateX(18px);
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
}

/* --- Форма входа --- */
.login-form {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* --- Заголовок формы входа --- */
.login-form h2 {
  color: #2d3748;
  font-weight: 600;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

/* --- Группа элементов формы входа --- */
.login-form .form-group {
  margin-bottom: 1.5rem;
}

/* --- Поля ввода формы входа --- */
.login-form input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  color: #2d3748;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.login-form input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: white;
}

.login-form input::placeholder {
  color: #a0aec0;
}

/* --- Кнопка входа --- */
.login-form .btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* --- Сообщение об ошибке входа --- */
.flash-message {
  background: rgba(239, 68, 68, 0.1);
  color: #e53e3e;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid #e53e3e;
  font-weight: 500;
}

/* --- Адаптивность формы входа --- */
@media (max-width: 480px) {
  .login-container {
    padding: 1rem;
  }

  .login-form {
    padding: 2rem 1.5rem;
  }

  .login-form h2 {
    font-size: 1.5rem;
  }

  .login-form input {
    padding: 0.875rem 1rem;
  }

  .login-form .btn-primary {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}
