/* The sign-in, create-account and password pages, in the product's own
   palette (constructor_web/src/styles/tokens.css - the "Editorial" palette
   the client PDF uses). v121.057: the founder, on the live site - "i want
   the sign up screen to be much closer in theme to the rest of the goal
   builder website in terms of colors borders, text". These pages are
   server-rendered (app/templates/auth/*.html), outside the React front end,
   so the tokens are repeated here rather than imported. Bootstrap stays
   loaded for its spacing utilities; everything visual is set below. */

:root {
  --paper: #FAF7F2;
  --surface: #FFFFFF;
  --surface-2: #F3EEE6;
  --hair: #E6DFD3;
  --ink: #0F172A;
  --muted: #5B6472;
  --teal: #0F766E;
  --teal-tint: #E3F4F1;
  --teal-ink: #0F5F59;
  --navy: #1E3A5F;
  --navy-tint: #E8EEF6;
  --amber: #B45309;
  --amber-tint: #FBEFD9;
  --amber-ink: #8F4207;
  --crimson: #B91C1C;
  --crimson-tint: #FBE9E9;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 20px rgba(30, 58, 95, 0.07);
}

html, body { height: auto; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 32px 28px;
  width: 100%;
  max-width: 440px;
}
@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
}

.auth-logo { margin: 0 0 14px; text-align: center; }
.auth-logo img { height: 56px; width: auto; display: block; margin: 0 auto; }

.auth-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 4px;
  text-align: center;
}
.auth-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 22px;
  text-align: center;
}

.form-label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.form-label .text-muted { color: var(--muted) !important; font-weight: 400; }
.form-control {
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--sans);
  /* v121.058: 16px, not 15 - iPhone Safari zooms the page into any focused
     input under 16px, and the sign-in form is the first thing a phone sees. */
  font-size: 16px;
  padding: 10px 12px;
  box-shadow: none;
}
.form-control:focus {
  background: var(--surface);
  border-color: var(--teal);
  color: var(--ink);
  box-shadow: 0 0 0 3px var(--teal-tint);
  outline: none;
}
.form-control::placeholder { color: #9AA3AF; }
.form-text, .password-hint { color: var(--muted); font-size: 13px; margin-top: 4px; }
.pw-rules { color: var(--muted); font-size: 13px; margin: 6px 0 0; padding-left: 18px; }

.btn-primary-custom {
  background: var(--teal);
  border: 1px solid var(--teal);
  color: #fff;
  width: 100%;
  padding: 11px 14px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary-custom:hover { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.btn-primary-custom:focus-visible { outline: 3px solid var(--teal-tint); outline-offset: 2px; }

.btn-google {
  background: var(--surface);
  border: 1px solid var(--hair);
  color: var(--ink);
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn-google:hover { background: var(--surface-2); color: var(--ink); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin: 18px 0;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--hair); }

.alert-custom, .alert-error, .alert-success {
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--hair);
  background: var(--surface-2);
  color: var(--ink);
}
.alert-error { background: var(--crimson-tint); border-color: #F1C9C9; color: var(--crimson); }
.alert-success { background: var(--teal-tint); border-color: #BFE3DE; color: var(--teal-ink); }

.first-run-banner {
  background: var(--navy-tint);
  border: 1px solid #CBD8EA;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--navy);
}
.first-run-banner strong { color: var(--navy); display: block; margin-bottom: 2px; }

.sent-banner {
  background: var(--teal-tint);
  border: 1px solid #BFE3DE;
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  color: var(--ink);
}
.sent-banner.warn { background: var(--amber-tint); border-color: #EBD3A9; }
.sent-banner.bad { background: var(--crimson-tint); border-color: #F1C9C9; }
.sent-banner .icon { font-size: 28px; margin-bottom: 6px; }
.sent-banner p { color: var(--ink); font-size: 14px; margin: 0; }

.remember-row { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.remember-row input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--teal); }
.remember-row label { color: var(--muted); font-size: 14px; cursor: pointer; margin: 0; }

.register-link, .login-link { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.register-link a, .login-link a, .auth-link { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 2px; }
.register-link a:hover, .login-link a:hover, .auth-link:hover { text-decoration: none; }
.auth-link { font-size: 14px; }
