/* Pupgrade auth pages: login, signup, forgot-password, reset-password.
 * Pairs with marketing.css for brand + button styles. */

.auth-shell {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: 0 12px 40px rgba(31, 38, 34, 0.06);
}

.auth-card h1 {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--text);
}

.auth-card .auth-sub {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.auth-form input[type="email"],
.auth-form input[type="text"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 80, 69, 0.12);
}

.auth-form .field-hint {
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  margin-top: -2px;
}

/* Password input with the show/hide toggle anchored to the right edge. */
.pw-wrap {
  position: relative;
}
.pw-wrap input {
  padding-right: 78px;
}
.pw-toggle {
  position: absolute;
  right: 6px;
  bottom: 6px;
  height: 32px;
  padding: 0 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.pw-toggle:hover {
  background: var(--surface2);
  color: var(--accent);
}

.auth-form button[type="submit"] {
  margin-top: 6px;
  width: 100%;
}

.auth-form .forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}
.auth-form .forgot-row a {
  font-size: 0.84rem;
  color: var(--accent);
  text-decoration: none;
}
.auth-form .forgot-row a:hover {
  text-decoration: underline;
}

.auth-alt {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}
.auth-alt a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.auth-alt a:hover {
  text-decoration: underline;
}

/* Inline status messages (error / success). */
.auth-msg {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 16px;
  display: none;
}
.auth-msg.show { display: block; }
.auth-msg.error {
  background: rgba(220, 80, 60, 0.08);
  border: 1px solid rgba(220, 80, 60, 0.3);
  color: #a83a26;
}
.auth-msg.success {
  background: rgba(111, 164, 140, 0.12);
  border: 1px solid rgba(111, 164, 140, 0.35);
  color: #2c5d4a;
}

/* Strong-password indicator */
.pw-meter {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.pw-meter span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s;
}
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: #d96655; }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: #e07856; }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: #d4a24b; }
.pw-meter[data-score="4"] span:nth-child(-n+4) { background: var(--accent); }
