/* Общие стили для страниц аутентификации */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #1a1c1a;
  --card-bg:     #1e2520;
  --card-border: #2a3330;
  --input-bg:    #141816;
  --input-border:#2c3a35;
  --input-focus: #00c853;
  --accent:      #00c853;
  --accent-dark: #009b3e;
  --text:        #e8ede9;
  --muted:       #7a9185;
  --error:       #ff5252;
  --radius:      14px;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
}

/* Карточка */
.card {
  width: 100%;
  max-width: 380px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 40px 36px 36px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* Логотип */
.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.logo-icon {
  width: 68px;
  height: 68px;
  background: var(--accent);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 200, 83, 0.3);
}

.logo-icon svg {
  width: 34px;
  height: 34px;
  fill: #fff;
}

/* Заголовок карточки */
.card-title {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 28px;
  color: var(--text);
  letter-spacing: -0.3px;
}

/* Поля формы */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 9px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
  color: var(--muted);
}

.form-group input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.12);
}

/* Сообщение об ошибке под полем */
.field-error {
  font-size: 12px;
  color: var(--error);
  margin-top: 5px;
  min-height: 16px;
  display: none;
}

.field-error.visible {
  display: block;
}

/* Поле с иконкой показа пароля */
.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-right: 42px;
}

.toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--muted);
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.toggle-pw:hover {
  color: var(--text);
}

.toggle-pw svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Кнопка отправки */
.btn-submit {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.2px;
}

.btn-submit:hover {
  background: var(--accent-dark);
}

.btn-submit:active {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Глобальное сообщение об ошибке/успехе */
.alert {
  font-size: 13px;
  text-align: center;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}

.alert.visible {
  display: block;
}

.alert.error {
  background: rgba(255, 82, 82, 0.12);
  color: var(--error);
  border: 1px solid rgba(255, 82, 82, 0.2);
}

.alert.success {
  background: rgba(0, 200, 83, 0.1);
  color: var(--accent);
  border: 1px solid rgba(0, 200, 83, 0.2);
}

/* Нижняя ссылка */
.footer-link {
  text-align: center;
  margin-top: 24px;
  font-size: 13px;
  color: var(--muted);
}

.footer-link a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.footer-link a:hover {
  text-decoration: underline;
}
