/* Sign in, sign up and password screens. Tokens match the tracker page. */
:root {
  --bg: #EDF0EF; --card: #FFFFFF; --ink: #16202B; --soft: #5B6872; --faint: #8B959C;
  --line: #DBE1DF; --line-soft: #EDF0EF; --field: #F8FAF9;
  --green: #14614A; --green-ink: #0E4A38; --green-bg: #E4EDE9;
  --red: #9A342B; --red-bg: #F6E7E4;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body.auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

.auth-shell {
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

/* left: brand and example figures */
.auth-aside {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 32px 36px;
  background: var(--green-bg);
  border-right: 1px solid var(--line);
}
.wordmark { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.aside-copy { margin-top: auto; }
.aside-lede { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 22px; max-width: 18ch; }
.aside-preview { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 14px; }
.ap-label { font-size: 12px; color: var(--soft); margin-bottom: 4px; }
.ap-num { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.ap-num span { font-size: 14px; font-weight: 500; color: var(--soft); letter-spacing: 0; margin: 0 6px 0 4px; }
.ap-rows { margin-top: 12px; }
.ap-rows div { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--soft); padding: 4px 0; }
.ap-rows .ap-total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; color: var(--ink); font-weight: 600; font-size: 13.5px; }
.ap-rows .ap-total span:last-child { color: var(--green); }
.ap-caption { font-size: 11px; color: var(--faint); margin-top: 10px; }
.aside-foot { font-size: 12px; color: var(--soft); margin: auto 0 0; }

/* right: the form */
.auth-main { padding: 48px 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.auth-mobile-mark { display: none; margin-bottom: 28px; }
.auth-main h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
.lede { color: var(--soft); margin: 0 0 24px; max-width: 40ch; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink); margin-bottom: 5px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-link { font-size: 12.5px; }
.field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.field input:hover { border-color: #C8D0CD; }
.field input:focus { outline: none; border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px rgba(20, 97, 74, .14); }
.hint { font-size: 12px; color: var(--soft); margin: 5px 0 0; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle {
  position: absolute; top: 5px; right: 5px; height: 30px; padding: 0 10px;
  font: inherit; font-size: 12px; font-weight: 500; color: var(--soft);
  background: transparent; border: none; border-radius: 6px; cursor: pointer;
}
.pw-toggle:hover { background: var(--line-soft); color: var(--ink); }
.pw-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }

.btn-primary {
  height: 42px; margin-top: 4px;
  font: inherit; font-size: 14.5px; font-weight: 600; color: #fff;
  background: var(--green); border: 1px solid var(--green); border-radius: 8px; cursor: pointer;
}
.btn-primary:hover { background: var(--green-ink); }
.btn-primary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

a { color: var(--green); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 3px; }

.switch { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line-soft); color: var(--soft); }

.flash { border-radius: 8px; padding: 10px 12px; margin-bottom: 18px; font-size: 13px; }
.flash ul { margin: 0; padding-left: 18px; }
.flash-alert { background: var(--red-bg); color: var(--red); }
.flash-notice { background: var(--green-bg); color: var(--green-ink); }

@media (max-width: 760px) {
  body.auth { place-items: start center; padding-top: 24px; }
  .auth-shell { grid-template-columns: 1fr; max-width: 440px; }
  .auth-aside { display: none; }
  .auth-mobile-mark { display: block; }
  .auth-main { padding: 28px 22px 26px; }
}
