/**
 * Auth pages styles (login / register)
 */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(82, 136, 193, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(82, 136, 193, 0.06) 0%, transparent 40%);
}

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

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo .logo-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #5288c1, #3d6a9e);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 8px 24px rgba(82, 136, 193, 0.3);
}

.auth-logo h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.auth-logo p {
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

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

.auth-form input {
  padding: 14px 16px;
  font-size: 15px;
  border-radius: 10px;
}

.auth-form .btn {
  margin-top: 8px;
  padding: 14px;
  font-size: 15px;
  border-radius: 10px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-footer a {
  color: var(--text-link);
  font-weight: 500;
}

/* Avatar upload on register */
.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
  cursor: pointer;
  border: 2px dashed var(--border-light);
  transition: border-color var(--transition);
  position: relative;
}

.avatar-preview:hover {
  border-color: var(--accent);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-preview .placeholder-icon {
  font-size: 28px;
  color: var(--text-hint);
}

.avatar-upload label {
  color: var(--text-link);
  font-size: 13px;
  cursor: pointer;
}

.avatar-upload input[type="file"] {
  display: none;
}

/* Error message */
.auth-error {
  background: rgba(229, 57, 53, 0.15);
  color: #ef5350;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  display: none;
}

.auth-error.show {
  display: block;
}

/* Loading state on button */
.btn.loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}

.btn.loading .btn-text {
  visibility: hidden;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}


/* Privacy consent — ровное выравнивание чекбокса и текста */
.privacy-consent-group {
  margin-top: 12px;
  margin-bottom: 4px;
}
.privacy-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  margin: 0;
  font-weight: 400;
}
.privacy-consent-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 2px 0 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--accent, #5288c1);
  cursor: pointer;
}
.privacy-consent-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary, #8b9bab);
  padding-top: 1px;
}
.privacy-consent-text a {
  color: var(--accent, #6ab2f2);
  text-decoration: underline;
}
