/* ==========================================================================
   Auth Page Styles (Login / Register)
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  overflow-y: auto;
  background:
    radial-gradient(ellipse at top left, var(--color-primary-light) 0%, transparent 50%),
    var(--color-bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2xl);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-header .nav-logo {
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.auth-header h1 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-xs);
}

.auth-header p {
  font-size: var(--text-sm);
}

.auth-form .btn {
  width: 100%;
  margin-top: var(--space-sm);
}

.auth-footer {
  text-align: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border-light);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.auth-footer a {
  font-weight: 600;
}

.auth-alert {
  margin-bottom: var(--space-lg);
}

/* Password field with show/hide toggle */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: var(--space-sm);
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.password-toggle:hover {
  color: var(--color-text);
  background: var(--color-border-light);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Pad the password input so it doesn't sit under the toggle button */
.password-field .form-input {
  padding-right: 3rem;
}

/* Password strength indicator */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: var(--space-sm);
}

.password-strength-bar {
  flex: 1;
  height: 4px;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.password-strength-bar.active { background: var(--color-danger); }
.password-strength-bar.medium { background: var(--color-warning); }
.password-strength-bar.strong { background: var(--color-success); }

/* Text equivalent of the strength bars (for screen readers and
   colour-blind users — the bars alone would fail WCAG 1.4.1). */
.password-strength-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
  min-height: 1em;
}

.password-strength-label.strength-weak { color: var(--color-danger-dark); }
.password-strength-label.strength-fair { color: var(--color-warning-dark); }
.password-strength-label.strength-good { color: var(--color-success-dark); }
.password-strength-label.strength-strong { color: var(--color-success-dark); }
