/* ========================================
   AUTH — Авторизация / Регистрация
   ======================================== */

.auth-main {
  justify-content: center;
}

.auth-panel {
  width: 100%;
  max-width: 540px;
  border-radius: 48px;
  margin: 0 auto;
}

.auth-title {
  font-family: 'Onest', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: var(--black);
}

.auth-subtitle {
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray-text);
  margin-top: 8px;
}

.auth-success-icon {
  text-align: center;
  padding: 8px 0 16px;
}

.auth-link {
  font-family: 'Onest', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--gray-text);
  text-align: center;
  transition: color 0.2s;
}

.auth-link:hover {
  color: var(--black);
}

/* Кнопка submit (button и a-ссылка) */
.auth-submit-btn {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--red-btn);
  border-radius: 24px;
  font-family: 'Onest', sans-serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--white);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  box-sizing: border-box;
}

.auth-submit-btn:hover {
  background: #c91212;
}

/* Вторичная кнопка-ссылка */
a.auth-link-btn {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-light);
  border-radius: 24px;
  font-family: 'Onest', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--black);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}

a.auth-link-btn:hover {
  background: #e0e0e0;
}

.auth-messages {
  padding: 12px 0;
}

.auth-message {
  font-family: 'Onest', sans-serif;
  font-size: 14px;
  margin: 4px 0;
}

.auth-message--error {
  color: #e74c3c;
}

.auth-message--success {
  color: #4CAF50;
}

/* --- Табы --- */
.auth-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 0;
}

/* --- Формы --- */
/* Tabbed forms: hidden by default, shown with .active */
.auth-tabs ~ .auth-form {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.auth-tabs ~ .auth-form.active {
  display: flex;
}

/* Standalone forms (no tabs, e.g. password reset): always visible */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Поле ввода --- */
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-input {
  width: 100%;
  height: 56px;
  padding: 0 24px;
  background: var(--gray-light);
  border: none;
  border-radius: 32px;
  outline: none;
  font-family: 'Onest', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--black);
  transition: box-shadow 0.2s;
}

.auth-input::placeholder {
  color: var(--gray-text);
}

.auth-input:focus {
  box-shadow: 0 0 0 2px var(--red-btn);
}

/* --- Ошибки авторизации --- */
.auth-errors {
  background: #fff0f0;
  border: 1px solid #e74c3c;
  border-radius: 16px;
  padding: 12px 16px;
}

.auth-error {
  font-family: 'Onest', sans-serif;
  font-size: 14px;
  color: #e74c3c;
  margin: 4px 0;
}

/* --- Ссылка «Забыли пароль» --- */
.auth-forgot {
  font-family: 'Onest', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--red-btn);
  align-self: flex-end;
  transition: opacity 0.2s;
}

.auth-forgot:hover {
  opacity: 0.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .auth-panel {
    border-radius: 32px;
  }

  .auth-input {
    height: 48px;
    padding: 0 16px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .auth-panel {
    border-radius: 24px;
  }
}
