/* ---------------------------------------------------------------------------
 * Unauthenticated auth-flow pages: reset-password.php, invite.php (#2329).
 *
 * These pages render outside the app shell — they don't load base-layout.css
 * (3.8k lines of nav/menu chrome they have no use for) and they don't load
 * js/core/theme.js, so :root[data-theme] is never set and there is no dark
 * variant to honour here.
 *
 * The --auth-clr-* tokens this file consumes are defined in
 * css/styles/tokens.css (#2333), which both pages link BEFORE this file.
 * ------------------------------------------------------------------------- */

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #eff3f8 0%, #f8fafc 100%);
  color: var(--auth-clr-text);
  min-height: 100vh;
}

/* Layout ------------------------------------------------------------------ */

.auth-wrap {
  margin: 48px auto;
  padding: 0 16px;
}

/* invite.php lists org/project access, so it needs the roomier measure */
.auth-wrap-narrow {
  max-width: 480px;
}

.auth-wrap-wide {
  max-width: 760px;
  margin-top: 32px;
  margin-bottom: 32px;
}

.auth-card {
  background: var(--auth-clr-surface);
  border: 1px solid var(--auth-clr-border);
  border-radius: var(--auth-radius-card);
  padding: 28px;
  box-shadow: var(--auth-shadow-card);
}

.auth-eyebrow {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--auth-clr-primary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Typography -------------------------------------------------------------- */

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.auth-card p {
  margin: 0 0 14px;
  color: var(--auth-clr-text-soft);
  font-size: 0.95rem;
}

.muted {
  color: var(--auth-clr-muted);
  font-size: 0.9rem;
}

.hidden {
  display: none;
}

/* Alerts ------------------------------------------------------------------ */

.alert {
  border-radius: var(--auth-radius);
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.alert-error {
  border: 1px solid var(--auth-clr-error-border);
  background: var(--auth-clr-error-bg);
  color: var(--auth-clr-error-text);
}

.alert-success {
  border: 1px solid var(--auth-clr-success-border);
  background: var(--auth-clr-success-bg);
  color: var(--auth-clr-success-text);
}

/* Inherits the success text colour so the link reads as part of the alert */
.alert-success .alert-link {
  color: inherit;
  font-weight: 600;
}

/* Forms ------------------------------------------------------------------- */

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.auth-form label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--auth-clr-text-soft);
  margin-bottom: -4px;
}

.auth-form input {
  min-height: 38px;
  border: 1px solid var(--auth-clr-border);
  border-radius: var(--auth-radius);
  padding: 0 10px;
  font-size: 0.95rem;
  box-sizing: border-box;
  width: 100%;
}

.auth-form input:disabled {
  background: var(--auth-clr-disabled-bg);
  color: var(--auth-clr-muted);
}

.auth-form button {
  margin-top: 4px;
  min-height: 42px;
  border: 0;
  border-radius: var(--auth-radius);
  background: var(--auth-clr-primary);
  color: var(--auth-clr-surface);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.auth-form button:hover {
  background: var(--auth-clr-primary-hover);
}

.auth-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Links ------------------------------------------------------------------- */

.back-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--auth-clr-primary);
  font-size: 0.88rem;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Invitation access summary (invite.php) ---------------------------------- */

.auth-access {
  border: 1px solid var(--auth-clr-border-soft);
  border-radius: var(--auth-radius);
  padding: 10px;
  margin-bottom: 14px;
  background: var(--auth-clr-surface-alt);
}

.auth-access ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.auth-access-entry {
  margin-bottom: 8px;
}
