/* ============================================================
   AUTH CARD — centered card for auth forms
   Width: 440px max, with header / body / footer sections.
   ============================================================ */

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}

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

.auth-card__header {
  padding: var(--space-6) var(--space-6) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (max-width: 720px) {
  .auth-card__header {
    padding: var(--space-5) var(--space-4) var(--space-2);
  }
}

.auth-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.auth-card__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: var(--leading-tight);
}

.auth-card__subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-snug);
}

.auth-card__body {
  padding: var(--space-3) var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

@media (max-width: 720px) {
  .auth-card__body {
    padding: var(--space-3) var(--space-4) var(--space-4);
  }
}

.auth-card__footer {
  padding: var(--space-4) var(--space-6);
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
}

.auth-card__footer-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--weight-semibold);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.auth-card__footer-link:hover {
  text-decoration: underline;
}

/* Submit button — full width */
.auth-card__submit {
  width: 100%;
  justify-content: center;
}

/* Inline link inside card body (e.g. "Forgot password?") */
.auth-card__inline-link {
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
}

.auth-card__inline-link:hover {
  text-decoration: underline;
}

/* Field-label row with right-aligned link (used for password "forgot?") */
.auth-card__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}

/* Terms checkbox row */
.auth-card__terms {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-snug);
  cursor: pointer;
}

.auth-card__terms input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.auth-card__terms input[type="checkbox"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.auth-card__terms input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 4px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-card__terms a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--weight-medium);
}

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

/* Big icon for status pages (verify email, success states) */
.auth-card__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--color-primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-1);
  color: var(--color-primary);
}

.auth-card__icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.auth-card__icon--success {
  background: var(--color-success-subtle);
  color: var(--color-success);
}

.auth-card__icon--warn {
  background: var(--color-warning-subtle);
  color: var(--color-warning);
}

/* Centered text variant for status pages */
.auth-card--centered .auth-card__header,
.auth-card--centered .auth-card__body {
  text-align: center;
}

.auth-card--centered .auth-card__icon {
  margin-top: var(--space-2);
}

/* Email "highlight" inside subtitle (for verify-email) */
.auth-card__email-highlight {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: -0.01em;
}

/* ============================================================
   DEMO ACCOUNTS — prototype-only login helper
   ============================================================ */
.demo-accounts {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border-subtle);
}

.demo-accounts__label {
  font-size: 10px;
  font-weight: var(--weight-semibold);
  color: var(--text-tertiary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin: 0 0 var(--space-2);
  text-align: center;
}

.demo-accounts__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.demo-accounts__btn {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.demo-accounts__btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

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

.demo-accounts__btn svg {
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-left: auto;
}

.demo-accounts__btn:hover svg {
  color: var(--color-primary);
}

.demo-accounts__avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  flex-shrink: 0;
}

.demo-accounts__avatar--user  {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.demo-accounts__avatar--admin {
  background: color-mix(in srgb, #dc2626 12%, var(--bg-surface));
  color: #dc2626;
}

.demo-accounts__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.demo-accounts__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

.demo-accounts__email {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.demo-accounts__hint {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  margin: var(--space-3) 0 0;
}

.demo-accounts__hint code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

/* Login error banner (shown on bad credentials) */
.auth-card__error {
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--admin-accent-subtle, color-mix(in srgb, #dc2626 12%, var(--bg-surface)));
  color: var(--admin-accent-text, #dc2626);
  border: 1px solid color-mix(in srgb, #dc2626 25%, transparent);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-3);
}
.auth-card__error::before {
  content: "⚠";
  font-size: var(--text-md);
}

/* Success / info banner (e.g. after registration completes) */
.auth-card__banner {
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: color-mix(in srgb, var(--color-success, #16a34a) 10%, var(--bg-surface));
  color: var(--color-success-text, #15803d);
  border: 1px solid color-mix(in srgb, var(--color-success, #16a34a) 25%, transparent);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin-bottom: var(--space-3);
  line-height: 1.4;
}
.auth-card__banner::before {
  content: "✓";
  font-size: var(--text-md);
  flex-shrink: 0;
}
