/*! auth.css — формы входа/регистрации/профиля. */

.auth-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 600;
  text-align: center;
}
.auth-subtitle {
  margin: 0 0 24px;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.9rem;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field > label {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.auth-field input {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 14px;
  font-size: 0.95rem;
  font-family: inherit;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---------- Поле пароля с кнопкой показа ---------- */
.auth-field-password .password-input {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-field-password .password-input input {
  width: 100%;
  padding-right: 42px;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text-mute);
  cursor: pointer;
  padding: 0;
}
.password-toggle:hover { color: var(--accent); background: var(--surface); }
.password-toggle .icon { width: 18px; height: 18px; }

/* Индикатор силы пароля (register) */
.password-strength {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 6px;
}
.password-strength-bar {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}
.password-strength-bar.weak { background: var(--danger); }
.password-strength-bar.medium { background: var(--accent-3); }
.password-strength-bar.strong { background: var(--success); }

.auth-submit {
  background: var(--accent);
  color: #001824;
  border: 0;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 4px;
}
.auth-submit:hover { background: #33ccff; }

.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--text-mute);
}
.auth-footer a { color: var(--accent); }

/* Флэш-сообщения */
.auth-flash {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.88rem;
}
.auth-flash.ok    { background: rgba(40, 167, 69, 0.18); border: 1px solid #28a745; }
.auth-flash.error { background: rgba(220, 53, 69, 0.18); border: 1px solid #dc3545; }

/* ---------- Профиль ---------- */
.profile-wrap { padding: 70px 20px; }
.profile-card {
  max-width: 540px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
}
.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 18px;
  border: 2px solid var(--border);
}
.profile-name {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 600;
}
.profile-meta { color: var(--text-mute); font-size: 0.9rem; margin: 0 0 22px; }
.profile-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Загрузка аватара */
.avatar-upload { margin-top: 24px; border-top: 1px solid var(--border); padding-top: 22px; }
.avatar-upload label { font-size: 0.85rem; color: var(--text-dim); display: block; margin-bottom: 8px; }
.avatar-upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.avatar-upload-hint { font-size: 0.82rem; color: var(--text-mute); }
.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
