:root {
  --primary: #524af1;
  --primary-hover: #3d38d0;
  --text-dark: #222;
  --bg-light: #f4f4f8;
  --white: #fff;
  --border-radius: 10px;
  --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  background-color: var(--bg-light);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.auth-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px 25px; /* ← Добавлен отступ по бокам */
  box-sizing: border-box;
}

.auth-title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 25px;
  color: var(--primary);
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-dark);
}

.auth-form input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  transition: border-color 0.3s, box-shadow 0.3s;
  background-color: #fff;
  color: #111827;
  font-size: 16px;
  box-sizing: border-box;
}
.is-invalid {
  border: 2px solid #e74c3c; /* ярко-красный */
  background-color: #fdecea; /* легкий красный фон */
}
.text-danger {
  color: #e74c3c; /* красный цвет текста */
}

.auth-form input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.btn {
  width: 100%;
  background-color: var(--primary);
  color: var(--white);
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: var(--primary-hover);
}

.auth-link {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}

.auth-link a {
  color: var(--primary);
  text-decoration: none;
}

.auth-link a:hover {
  text-decoration: underline;
}

.small {
  font-size: 0.875rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

/* Добавляем в конец файла */
.back-button {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.back-button:hover {
  background-color: var(--primary-hover);
  transform: translateX(-2px);
}

.back-button svg {
  width: 20px;
  height: 20px;
}

.google-auth {
  margin-top: 20px;
  text-align: center;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: bold;
  color: #444;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.google-btn:hover {
  background-color: #f1f1f1;
}

.google-btn img {
  width: 20px;
  height: 20px;
}

.oferta {
  display: flex;
  align-items: center;
  padding-left: 12px;
}

.oferta__text {
  font-size: 14px;
}

.oferta__checkbox {
  width: 16px !important;
  height: 16px;
  margin-right: 8px;
  cursor: pointer;
}

.register_btn {
  margin-top: 10px;
}

.oferta__text a {
  display: inline-block;
  position: relative;
  color: var(--primary);
  text-decoration: none;
}

.oferta__text a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 0.5px; /* Толщина underline */
  background-color: var(--primary);
  transition: width 0.3s ease;
}

.oferta__text a:hover::after {
  width: 100%;
}

.btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .back-button {
    top: 15px;
    left: 15px;
    width: 36px;
    height: 36px;
  }

  .oferta {
    padding-left: -16px;
  }
}

@media (max-width: 400px) {
  .oferta__text {
    font-size: 12px;
  }
}
