/* Signed-out pages (sign in, register, password reset, invitations):
   one quiet centred card on the page background. */

.auth-page {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  padding: 2rem;
  background: var(--surface-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
}

.auth-card.is-wide {
  max-width: 640px;
}

.auth-header {
  margin-bottom: 1.5rem;
}

.auth-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.auth-header p {
  margin: 0;
  color: var(--text-secondary);
}

.auth-card .form-label {
  font-weight: var(--font-medium);
}

.auth-card .btn-primary.w-100 {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.auth-aside-link {
  font-size: 0.93rem;
  font-weight: var(--font-medium);
}

.auth-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-secondary);
  text-align: center;
  color: var(--text-secondary);
}

.auth-footer a {
  font-weight: var(--font-medium);
}

/* Register: plain sections divided by thin rules */
.auth-section + .auth-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-secondary);
}

.auth-section-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: var(--font-semibold);
}

/* Key-value details, e.g. an invitation */
.auth-details {
  margin: 0 0 1.5rem;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
}

.auth-details > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.85rem;
}

.auth-details > div + div {
  border-top: 1px solid var(--border-secondary);
}

.auth-details dt {
  font-weight: var(--font-normal);
  color: var(--text-secondary);
}

.auth-details dd {
  margin: 0;
  font-weight: var(--font-medium);
  text-align: right;
  overflow-wrap: anywhere;
}

/* One-time code */
.code-input {
  letter-spacing: 0.5em;
  font-size: 1.6rem;
  font-weight: var(--font-medium);
  font-variant-numeric: tabular-nums;
}

/* Password checks */
.password-strength {
  margin-bottom: 0.5rem;
}

.strength-bar {
  height: 4px;
  background-color: var(--surface-active);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.strength-fill {
  height: 100%;
  width: 0;
  transition: width 0.3s, background-color 0.3s;
  border-radius: 2px;
}

.strength-fill.weak { background-color: var(--danger); }
.strength-fill.medium { background-color: var(--warning); }
.strength-fill.strong { background-color: var(--success); }

.strength-text {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.password-requirements {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.86rem;
}

.password-requirements li,
.password-requirements .requirement {
  color: var(--text-secondary);
  font-size: 0.86rem;
  transition: color 0.2s;
}

.password-requirements li.valid,
.password-requirements .requirement.met,
.password-requirements .requirement.met i {
  color: var(--success);
}

.password-requirements li.valid i::before {
  content: "\F26B";
}

.password-match {
  font-size: 0.86rem;
}

.password-match.match { color: var(--success); }
.password-match.no-match { color: var(--danger); }

@media (max-width: 575.98px) {
  .auth-page {
    align-items: flex-start;
    padding: 0.5rem 0 1.5rem;
  }

  .auth-card {
    padding: 1.5rem 1.15rem;
  }
}

.auth-card .btn-link {
  color: var(--accent-primary);
  text-decoration: none;
}

.auth-card .btn-link:hover {
  color: var(--accent-hover);
}
