/* auth.css — login / register / forgot / reset schermen */

.auth-box {
  max-width: 420px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--color-bg-elev);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.auth-box__title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-fg);
  margin-bottom: 1.25rem;
}

.auth-box__intro {
  color: var(--color-fg-muted);
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.auth-box__footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: .875rem;
  color: var(--color-fg-muted);
}

.auth-box__footer a {
  color: var(--color-primary);
  text-decoration: none;
}

.auth-box__footer a:hover {
  text-decoration: underline;
}

/* ── Alert ───────────────────────────────────────────────────────────── */

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.auth-alert[hidden] { display: none; }

.auth-alert--error {
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-danger) 35%, transparent);
  color: var(--color-danger);
}

.auth-alert--success {
  background: color-mix(in srgb, var(--color-success) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-success) 35%, transparent);
  color: var(--color-success);
}

/* ── Fields ──────────────────────────────────────────────────────────── */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}

.auth-field__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-fg);
}

.auth-field__link {
  font-size: .8rem;
  font-weight: 400;
  color: var(--color-fg-muted);
  text-decoration: none;
}

.auth-field__link:hover { color: var(--color-primary); }

.auth-field__input-wrap {
  position: relative;
}

.auth-field__input {
  width: 100%;
  padding: .5rem .75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-fg);
  font: inherit;
  font-size: .9375rem;
  transition: border-color .15s, box-shadow .15s;
}

.auth-field__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.auth-field__input-wrap .auth-field__input {
  padding-right: 2.5rem;
}

.auth-field__input.is-invalid {
  border-color: var(--color-danger);
}

.auth-field__error {
  font-size: .8rem;
  color: var(--color-danger);
  min-height: 1.1em;
}

/* ── Password toggle ─────────────────────────────────────────────────── */

.auth-pwd-toggle {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-fg-muted);
  padding: .25rem;
  line-height: 0;
  transition: color .15s;
}

.auth-pwd-toggle:hover { color: var(--color-fg); }

/* ── Strength bar ────────────────────────────────────────────────────── */

.auth-strength {
  display: flex;
  align-items: center;
  gap: .5rem;
  height: .25rem;
  margin-top: .125rem;
}

.auth-strength__bar {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  background: var(--color-border);
  position: relative;
  overflow: hidden;
}

.auth-strength__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  width: var(--strength, 0%);
  background: var(--strength-color, var(--color-border));
  transition: width .25s, background .25s;
}

.auth-strength__label {
  font-size: .75rem;
  color: var(--color-fg-muted);
  white-space: nowrap;
  min-width: 3.5rem;
}

/* ── Submit button ───────────────────────────────────────────────────── */

.auth-submit {
  width: 100%;
  padding: .625rem 1rem;
  background: var(--color-primary);
  color: var(--color-primary-fg);
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  margin-top: .25rem;
}

.auth-submit:hover { background: var(--color-primary-dk); }

.auth-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}
