/* Auth shell stylesheet — extracted from docs/auth_pages.html mockup.
   Plain CSS (not Tailwind); the auth pages have their own centered-card
   layout independent of the main app shell. Fonts are self-hosted via
   @font-face (no CDN — see CLAUDE.md), copied from core/static/css/output.css
   with paths adjusted for this file's location. */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../fonts/DMSans-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../../fonts/DMSans-Italic.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../../fonts/DMSans-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../../fonts/DMSans-SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../../fonts/DMSans-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../fonts/DMSerifDisplay-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../../fonts/DMSerifDisplay-Italic.ttf') format('truetype');
}

:root {
  --bg:          #F7F5F2;
  --surface:     #FFFFFF;
  --border:      #E8E4DF;
  --text:        #111110;
  --text-body:   #3C3835;
  --text-muted:  #78716C;
  --text-subtle: #9A9A9A;
  --teal:        #2A7C6F;
  --teal-hover:  #226358;
  --teal-light:  #EAF4F2;
  --teal-mid:    #4A9E90;
  --caution:     #C2762A;
  --caution-bg:  #FEF3E2;
  --danger:      #B94040;
  --danger-bg:   #FAEAEA;
  --success:     #2A7C6F;
  --success-bg:  #EAF4F2;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-body);
  background: var(--bg);
  min-height: 100vh;
}

/* ── SHARED AUTH SHELL ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 60px;
}

.auth-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
  display: block;
  text-align: center;
}
.auth-logo span { color: var(--teal); }

.auth-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 36px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}

.auth-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.35rem;
  color: var(--text);
  margin-bottom: 6px;
  text-align: center;
}
.auth-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 24px;
}
.auth-sub a { color: var(--teal); text-decoration: underline; }
.auth-sub a:hover { color: var(--teal-hover); }

/* Form fields */
.field { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.field-input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
}
.field-input:focus { border-color: var(--teal-mid); background: #fff; }
.field-input.error { border-color: var(--danger); background: var(--danger-bg); }
.field-input::placeholder { color: var(--text-subtle); }
.field-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 5px;
  line-height: 1.5;
}
.field-error {
  font-size: 0.72rem;
  color: var(--danger);
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-error svg {
  width: 11px; height: 11px; stroke: currentColor; stroke-width: 2.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}

/* Password field wrapper */
.password-wrap { position: relative; }
.password-wrap .field-input { padding-right: 42px; }
.password-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 2px; display: flex; align-items: center; justify-content: center;
}
.password-toggle svg {
  width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.75;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.password-toggle:hover { color: var(--text); }

/* Password strength */
.strength-bar { display: flex; gap: 4px; margin-top: 8px; }
.strength-seg {
  height: 3px; flex: 1; border-radius: 99px;
  background: var(--border); transition: background 0.2s;
}
.strength-seg.weak { background: var(--danger); }
.strength-seg.fair { background: var(--caution); }
.strength-seg.strong { background: var(--teal); }
.strength-label {
  font-size: 0.7rem; color: var(--text-muted); margin-top: 4px;
}

/* Submit button */
.btn-primary {
  width: 100%;
  padding: 11px 20px;
  background: var(--teal);
  border: none;
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: background 0.12s;
  margin-top: 4px;
}
.btn-primary:hover { background: var(--teal-hover); }
.btn-primary:disabled {
  background: var(--text-subtle);
  cursor: not-allowed;
}

/* Secondary button (Phase 7b PR1 OTP resend). Same shape as primary
   but neutral coloring so the primary "Verify" CTA remains dominant. */
.btn-secondary {
  width: 100%;
  padding: 11px 20px;
  background: transparent;
  border: 1px solid var(--text-subtle);
  border-radius: 9px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn-secondary:hover { background: rgba(0,0,0,0.03); border-color: var(--text-muted); }

/* Spacing between the verify form and the resend form on otp_step.html */
.otp-resend-form { margin-top: 12px; }

/* Footer links */
.auth-footer {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
}
.auth-footer a {
  color: var(--teal); text-decoration: none; font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }

/* Terms clickwrap (server-enforced checkbox; UX-disabled submit) */
.terms-note {
  font-size: 0.72rem;
  color: var(--text-subtle);
  text-align: center;
  line-height: 1.6;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.terms-note a { color: var(--text-muted); text-decoration: underline; }
.terms-note a:hover { color: var(--text); }
.tos-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.78rem;
  color: var(--text-body);
  line-height: 1.5;
  margin: 4px 0 16px;
}
.tos-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--teal);
  flex-shrink: 0;
  cursor: pointer;
}
.tos-field a { color: var(--teal); text-decoration: underline; }
.tos-field a:hover { color: var(--teal-hover); }

/* Forgot-password link (login screen) */
.forgot-link {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  float: right;
  margin-top: -2px;
}
.forgot-link:hover { color: var(--teal); }

/* ── CHECK INBOX / VERIFICATION SENT SCREEN ── */
.inbox-icon {
  width: 64px; height: 64px;
  background: var(--teal-light);
  border: 2px solid var(--teal-mid);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.inbox-icon svg {
  width: 28px; height: 28px; stroke: var(--teal); stroke-width: 1.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.inbox-address {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  margin: 4px 0 16px;
}
.inbox-steps {
  list-style: none;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.inbox-steps li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal);
  font-size: 0.68rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.resend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.btn-resend {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--teal);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.btn-resend:hover { color: var(--teal-hover); }

/* ── PASSWORD RESET ── */
.alert-success {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  background: var(--success-bg);
  border: 1px solid var(--teal-mid);
  border-radius: 9px;
  font-size: 0.82rem;
  color: var(--teal);
  line-height: 1.5;
  margin-bottom: 18px;
}
.alert-success svg {
  width: 15px; height: 15px; stroke: currentColor; stroke-width: 2;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0; margin-top: 1px;
}
.alert-error {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  background: var(--danger-bg); border: 1px solid #E9A8A8;
  border-radius: 9px; font-size: 0.82rem; color: var(--danger);
  line-height: 1.5; margin-bottom: 16px;
}
.alert-error svg {
  width: 15px; height: 15px; stroke: currentColor; stroke-width: 2;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0; margin-top: 1px;
}
.back-row {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 20px;
  font-size: 0.8rem; color: var(--text-muted);
}
.back-row a {
  color: var(--teal); text-decoration: none; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.back-row a svg {
  width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.5;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
}
.back-row a:hover { text-decoration: underline; }

/* Name fields side by side (general helper) */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
