/* Auth pages — styled to match the deck. Inherits color variables and
 * the matrix/mood background from the deck's style.css; this file only
 * adds the form / card / oauth-row chrome that the deck doesn't have.
 *
 * Layout philosophy: a single centered "auth-card" with a max width
 * of ~420px, sitting on the existing moonlit-ocean mood. The matrix
 * canvas drifts behind it. Mobile-first — at < 480px the card stretches
 * to fill the viewport with sane padding.
 */

.auth-body { min-height: 100vh; display: flex; flex-direction: column; }
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.auth-shell {
  width: 100%;
  max-width: 420px;
}
.auth-card {
  background: rgba(6, 12, 22, 0.86);
  border: 1px solid rgba(91, 213, 199, 0.35);
  border-radius: 6px;
  padding: 28px 28px 24px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.auth-title {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 18px;
  letter-spacing: 0.08em;
  margin: 0 0 4px;
  color: var(--accent, #5bd5c7);
}
.auth-sub {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  margin: 0 0 22px;
  color: #9bb;
}

/* OAuth provider buttons. The disabled ("--pending") variant is what
 * ships in 11.0a — it makes the future state visible without
 * pretending it works. Active provider buttons (11.0b) reuse the
 * base .oauth-btn rule sans the --pending modifier. */
.auth-oauth {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(91, 213, 199, 0.08);
  border: 1px solid rgba(91, 213, 199, 0.4);
  color: var(--accent, #5bd5c7);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  text-transform: lowercase;
  transition: background 140ms, border-color 140ms;
}
.oauth-btn:hover:not(:disabled) {
  background: rgba(91, 213, 199, 0.18);
  border-color: var(--accent, #5bd5c7);
}
.oauth-btn--pending {
  opacity: 0.45;
  cursor: not-allowed;
  border-style: dashed;
}
.oauth-mark {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}
.auth-oauth-note {
  margin: 4px 0 0;
  font-size: 11px;
  color: #889;
  font-family: var(--mono, ui-monospace, monospace);
  text-align: center;
  font-style: italic;
}

/* "or" divider — single hairline split by the word. */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px;
  color: #678;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(120, 160, 180, 0.18);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.auth-label {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px;
  margin-top: 10px;
  color: #9ab;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.auth-optional { color: #678; font-style: italic; }
.auth-input {
  background: rgba(2, 6, 10, 0.72);
  border: 1px solid rgba(120, 160, 180, 0.3);
  color: var(--text, #e8eef0);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 4px;
  transition: border-color 140ms;
}
.auth-input:focus {
  border-color: var(--accent, #5bd5c7);
  outline: 2px solid rgba(91, 213, 199, 0.22);
  outline-offset: 0;
}
/* Marketing-opt-in checkbox row on /signup. Two-line layout:
 * checkbox + main label on line 1, dimmed hint text on line 2.
 * The hint clarifies that transactional mail (verify, reset) always
 * sends — answers the "wait, if I uncheck this, will I still get a
 * password reset?" question before they have to ask it. */
.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 10px 12px;
  background: rgba(91, 213, 199, 0.06);
  border: 1px solid rgba(91, 213, 199, 0.22);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  color: var(--text, #e8eef0);
  line-height: 1.5;
}
.auth-checkbox:hover {
  background: rgba(91, 213, 199, 0.1);
  border-color: rgba(91, 213, 199, 0.4);
}
.auth-checkbox input[type="checkbox"] {
  /* Bumped up a notch so it's easy to hit on mobile (default sizing
   * is about 13px which is below the recommended 16px tap target). */
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent, #5bd5c7);
  flex-shrink: 0;
  cursor: pointer;
}
.auth-checkbox-text { display: flex; flex-direction: column; gap: 2px; }
.auth-checkbox-hint {
  font-size: 11px;
  color: #889;
  font-style: italic;
}

.auth-submit {
  margin-top: 18px;
  padding: 11px 14px;
  background: rgba(91, 213, 199, 0.18);
  border: 1px solid var(--accent, #5bd5c7);
  color: var(--accent, #5bd5c7);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  border-radius: 4px;
  cursor: pointer;
  transition: background 140ms, color 140ms;
}
.auth-submit:hover {
  background: var(--accent, #5bd5c7);
  color: #06090a;
}

.auth-foot {
  margin: 18px 0 0;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  text-align: center;
  color: #9ab;
}
.auth-foot a { color: var(--accent, #5bd5c7); }
.auth-foot a:hover { text-decoration: underline; }

.auth-error {
  background: rgba(220, 80, 80, 0.14);
  border: 1px solid rgba(220, 80, 80, 0.55);
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 14px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  color: #ff9a9a;
}
.auth-ok {
  background: rgba(91, 213, 199, 0.12);
  border: 1px solid rgba(91, 213, 199, 0.6);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  color: var(--accent, #5bd5c7);
  line-height: 1.55;
}

/* ── auth-para: body-weight prose inside auth cards ── */
.auth-para {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  color: #9ab;
  line-height: 1.65;
  margin: 0 0 14px;
}
.auth-para a { color: var(--accent, #5bd5c7); }

/* ── secondary submit variant (resend / non-primary actions) ── */
.auth-submit--secondary {
  background: transparent;
  color: var(--accent, #5bd5c7);
  border: 1px solid rgba(91, 213, 199, 0.5);
}
.auth-submit--secondary:hover {
  background: rgba(91, 213, 199, 0.08);
  border-color: var(--accent, #5bd5c7);
}

/* ── Profile card ── */
.profile-card { max-width: 480px; }

.profile-section { margin-top: 22px; }
.profile-section-title {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #5a7a8a;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  flex-wrap: wrap;
}
.profile-label  { color: #5a7a8a; min-width: 60px; }
.profile-value  { color: #c0cdd6; }
.profile-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
}
.profile-badge--verified {
  background: rgba(91, 213, 199, 0.14);
  color: var(--accent, #5bd5c7);
  border: 1px solid rgba(91, 213, 199, 0.4);
}
.profile-form { margin-top: 18px; }
.profile-hint {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 11px;
  color: #5a7a8a;
  margin: 6px 0 0;
}
.profile-none {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  color: #5a7a8a;
  margin: 0;
}
.profile-link-list { list-style: none; margin: 0; padding: 0; }
.profile-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  border-bottom: 1px solid rgba(91, 213, 199, 0.08);
}
.profile-link-provider { color: var(--accent, #5bd5c7); min-width: 70px; }
.profile-link-email    { color: #c0cdd6; flex: 1; }
.profile-link-since    { color: #5a7a8a; font-size: 11px; }
.profile-reset-form    { margin-bottom: 6px; }

/* hidden deep-thought link — appears on hover/focus only */
.profile-deepthought {
  margin-top: 28px;
  text-align: right;
}
.profile-dt-link {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 10px;
  color: rgba(91, 213, 199, 0.12);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}
.profile-dt-link:hover,
.profile-dt-link:focus { color: rgba(91, 213, 199, 0.55); }

@media (max-width: 480px) {
  .auth-main { padding: 16px 10px; }
  .auth-card { padding: 22px 18px 20px; }
  .auth-title { font-size: 16px; }
  .auth-input, .auth-submit { font-size: 13px; }
  .auth-shell { max-width: 100%; }
}

/* ── Danger zone ────────────────────────────────────────────────── */
.profile-danger-zone {
  border-top: 1px solid rgba(248, 113, 113, 0.3);
  margin-top: 28px;
  padding-top: 18px;
}
.profile-danger-title {
  color: #f87171;
}
.profile-delete-btn {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f87171;
  background: transparent;
  border: 1px solid #f87171;
  padding: 9px 18px;
  cursor: pointer;
  border-radius: 2px;
  margin-top: 6px;
  transition: background 140ms, color 140ms;
}
.profile-delete-btn:hover,
.profile-delete-btn:focus {
  background: rgba(248, 113, 113, 0.12);
  outline: none;
}

/* ── Delete confirmation modal ──────────────────────────────────── */
@keyframes danger-flash {
  0%, 49%, 100% { opacity: 1; }
  50%, 99%      { opacity: 0.2; }
}

.delete-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.delete-modal-overlay[hidden] { display: none; }

.delete-modal {
  background: #0e0e0e;
  border: 1px solid #f87171;
  border-radius: 4px;
  padding: 28px 28px 24px;
  max-width: 460px;
  width: 100%;
}

.delete-modal-warning {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #f87171;
  text-align: center;
  margin: 0 0 16px;
  animation: danger-flash 1s step-end infinite;
}
@media (prefers-reduced-motion: reduce) {
  .delete-modal-warning { animation: none; }
}

.delete-modal-heading {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 16px;
  font-weight: 700;
  color: #e8e8e8;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.delete-modal-body {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.7;
  margin: 0 0 20px;
}
.delete-modal-body strong { color: #e8e8e8; }

.delete-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.delete-modal-confirm {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #0e0e0e;
  background: #f87171;
  border: 1px solid #f87171;
  padding: 9px 18px;
  cursor: pointer;
  border-radius: 2px;
  flex: 1;
  transition: background 140ms;
}
.delete-modal-confirm:hover,
.delete-modal-confirm:focus {
  background: #ef4444;
  border-color: #ef4444;
  outline: none;
}

.delete-modal-cancel {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #9ca3af;
  background: transparent;
  border: 1px solid #374151;
  padding: 9px 18px;
  cursor: pointer;
  border-radius: 2px;
  flex: 1;
  transition: border-color 140ms, color 140ms;
}
.delete-modal-cancel:hover,
.delete-modal-cancel:focus {
  border-color: #9ca3af;
  color: #e8e8e8;
  outline: none;
}
