/*==============================================================
# APNS patient sign-in pages
# Sign in, New patient (create an account), Forgot your password
# and Reset your password all use this one stylesheet, so the four
# pages look and behave the same.
#
# The rules (brief-simple-for-everyone.md): Inter at 18px, nothing
# under 16px, 48px targets, body text at 7:1 or better, a visible
# focus ring, one column on phones, and the page scrolls normally --
# no fixed-height boxes that hide a field below a button (walkthrough
# B1, Sep 28, 2026: "Confirm Password" sat inside a 348px scroll box).
#
# Class names and ids that register_login.js selects are kept:
# .form-step, .active, .progressbar li, .inputs-wrapper, .buttons,
# .prev, .next, .password-toggle, .password-input, .otp-input,
# .code-input, .phone-otp, .field-error, #verifiedCheck, #emailError.
==============================================================*/

/* The colors and corners are the shared ones (public/assets/css/apns-tokens.css,
   loaded first by patient/auth/partials/head), so these pages match the
   portal behind them (2026-11-19). Until then this file set its own copy,
   which had drifted: a lighter card line, redder errors, rounder corners.
   Only the names the shared file does not have are set here, from it. */
:root {
  --apns-input-border: var(--apns-line);
  --apns-emergency-text: #AD0000;  /* the 911 number, a true red: 7.1:1 on the help line */
  --apns-danger-border: #F1C4C8;
  --apns-success-text: var(--apns-ok-text);
  --apns-success-bg: var(--apns-ok-bg);
  --apns-success-border: #B7E0C7;

  /* Older names still read by inline styles; mapped onto the brand. */
  --dark-purple: var(--apns-primary-dark);
  --medium-purple: var(--apns-primary);
  --light-purple2: #E4D4F2;
  --white: #ffffff;
  --gray-light: var(--apns-panel);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--apns-panel);
  color: var(--apns-text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 1.125rem;
  line-height: 1.5;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--apns-primary);
}

a:hover {
  color: var(--apns-primary-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--apns-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffffff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.apns-skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1000;
  background: #ffffff;
  color: var(--apns-accent);
  font-weight: 700;
  padding: 12px 16px;
  border-radius: var(--apns-radius-control);
  transform: translateY(-200%);
}

.apns-skip-link:focus {
  transform: none;
}

/* ---------- Top bar: the logo and the way home ---------- */
.apns-signin-header {
  background: #ffffff;
  border-bottom: 1px solid var(--apns-panel-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.apns-signin-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.apns-signin-logo {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.apns-signin-logo img {
  display: block;
  height: 44px;
  width: auto;
}

.apns-signin-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 4px;
  color: var(--apns-primary);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Page layout ---------- */
.container {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 32px;
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

/* The form (named right-panel for the scripts' sake; it comes first). */
.right-panel {
  flex: 1 1 60%;
  min-width: 0;
  display: flex;
  justify-content: center;
}

/* The short "what you can do here" panel beside the form. */
.left-panel {
  flex: 0 1 38%;
  min-width: 0;
  align-self: flex-start;
  position: sticky;
  top: 24px;
  background: var(--apns-gradient);
  color: #ffffff;
  border-radius: var(--apns-radius-card);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.left-panel .apns-signin-brand {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.left-panel p {
  font-size: 1.125rem;
  line-height: 1.6;
}

.features {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

.features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1.0625rem;
}

.features li::before {
  content: "\2713";
  flex-shrink: 0;
  font-weight: 700;
  color: #ffffff;
}

@media (max-width: 767.98px) {
  .container {
    padding: 16px 16px 24px;
  }

  /* On a phone the form is the page: the marketing panel goes. */
  .left-panel {
    display: none;
  }

  .apns-signin-logo img {
    height: 38px;
  }
}

/* ---------- The card ---------- */
.form-card {
  width: 100%;
  max-width: 620px;
  background: #ffffff;
  border: 1px solid var(--apns-panel-border);
  border-radius: var(--apns-radius-card);
  box-shadow: 0 10px 30px rgba(76, 0, 109, .08);
  padding: 28px 28px 32px;
}

@media (max-width: 575.98px) {
  .form-card {
    padding: 20px 16px 24px;
    border-radius: 16px;
  }
}

/* The page's name in the portal's heading color and size (.pp-title,
   patient/index.css: 2rem, the dark purple), 2026-11-19. */
.apns-signin-title {
  color: var(--apns-primary-dark);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}

@media (max-width: 575.98px) {
  .apns-signin-title { font-size: 1.625rem; }
}

.apns-signin-lead {
  color: var(--apns-muted);
  font-size: 1.125rem;
  margin-bottom: 16px;
  max-width: 38rem;
}

/* The help line: the same place on every sign-in page. */
.apns-help-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  background: var(--apns-panel);
  border: 1px solid var(--apns-panel-border);
  border-radius: var(--apns-radius-control);
  padding: 2px 14px;
  margin-bottom: 20px;
  font-size: 1rem;
}

.apns-help-line__item {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 32px;
}

.apns-help-line__item i {
  color: var(--apns-accent);
}

.apns-help-line__emergency i {
  color: var(--apns-danger-text);
}

.apns-help-line a,
.apns-signin-footer a,
.apns-code-help a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 48px;
  padding: 0 6px;
  font-weight: 700;
  color: var(--apns-primary);
}

/* 911 sits right after "Call", one space away, and is red (owner, Oct 16,
   2026: it was centered in its 48px target). The target keeps its 48px;
   the spare width is on the right. */
.apns-help-line__emergency a {
  justify-content: flex-start;
  padding-left: 0;
  margin-left: -2px;
  color: var(--apns-emergency-text);
}

/* ---------- Messages ---------- */
.apns-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: var(--apns-radius-control);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.5;
}

.apns-alert > i {
  font-size: 1.25rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.apns-alert ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}

.apns-alert strong {
  display: block;
}

.apns-alert--error {
  background: var(--apns-danger-bg);
  border: 1px solid var(--apns-danger-border);
  color: #842029;
}

.apns-alert--success {
  background: var(--apns-success-bg);
  border: 1px solid var(--apns-success-border);
  color: #0F5132;
}

.apns-alert--info {
  background: var(--apns-panel);
  border: 1px solid var(--apns-panel-border);
  color: var(--apns-text);
}

/* ---------- Tabs: Sign in / New patient ----------
   Two outlined choices. The chosen one has a thick dark border, a light
   purple fill, a check mark and a bar under its word. Only the form's own
   button ("Sign in", "Continue", "Create my account") is filled purple:
   the chosen tab used to be the same filled purple as the "Sign in"
   button under the form (public walkthrough 2026-09-30, #3). */
.tab-switch {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.tab-switch button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 52px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--apns-input-border);
  border-radius: var(--apns-radius-control);
  background: #ffffff;
  color: var(--apns-accent);
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.tab-switch button:hover {
  background: var(--apns-panel);
  border-color: var(--apns-primary);
}

.tab-switch button.active {
  background: var(--apns-tint);
  border: 3px solid var(--apns-primary-dark);
  color: var(--apns-primary-dark);
  font-weight: 700;
  box-shadow: inset 0 -4px 0 var(--apns-primary-dark);
}

/* The check mark is decoration (aria-pressed says which one is chosen). */
.tab-switch button.active::before {
  content: "\2713";
  content: "\2713" / "";
  font-weight: 700;
}

/* ---------- Fields ---------- */
form#signInForm,
form#signUpForm,
.apns-simple-form {
  flex-direction: column;
}

.apns-simple-form {
  display: flex;
}

label,
.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--apns-text);
}

.apns-req {
  font-weight: 400;
  color: var(--apns-muted);
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--apns-input-border);
  border-radius: var(--apns-radius-control);
  background: #ffffff;
  color: var(--apns-text);
  font-family: inherit;
  font-size: 1.0625rem;
  line-height: 1.4;
  margin: 0;
}

input::placeholder {
  color: #6B6478;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--apns-primary);
  outline: 3px solid var(--apns-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffffff;
}

input.error,
input[aria-invalid="true"] {
  border: 2px solid var(--apns-danger-text) !important;
  background-color: #FFFBFB;
}

.input-group,
.form-group {
  position: relative;
  margin-bottom: 20px;
}

/* A field and what sits inside it (an icon, a Show button). The icon is
   decoration beside the label's words, never instead of them. */
.apns-input-wrap {
  position: relative;
}

.apns-input-wrap .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--apns-muted);
  pointer-events: none;
}

.apns-input-wrap .input-icon ~ input {
  padding-left: 46px;
}

.apns-help {
  display: block;
  margin-top: 6px;
  color: var(--apns-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.field-error,
.apns-field-error {
  display: block;
  margin-top: 6px;
  color: var(--apns-danger-text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.field-error:empty,
.apns-field-error:empty {
  display: none;
}

.text-danger {
  color: var(--apns-danger-text);
}

/* ---------- Show / Hide password ---------- */
.password-wrapper {
  position: relative;
}

.password-wrapper input,
.password-wrapper .password-input,
.apns-input-wrap.has-toggle input {
  padding-right: 104px;
}

.toggle-password-btn,
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  min-width: 88px;
  height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--apns-panel-border);
  border-radius: 10px;
  background: var(--apns-panel);
  color: var(--apns-accent);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
}

.toggle-password-btn:hover,
.password-toggle:hover {
  background: var(--apns-tint);
}

.signup-password-field .password-wrapper {
  margin-bottom: 0;
}

.password-input::-ms-reveal,
.password-input::-ms-clear,
input[type="password"]::-ms-reveal {
  display: none;
}

/* The password rules, shown before typing, ticking as the patient types. */
.apns-pw-rules {
  list-style: none;
  padding: 12px 14px;
  margin: 10px 0 0;
  display: grid;
  gap: 6px;
  background: var(--apns-panel);
  border: 1px solid var(--apns-panel-border);
  border-radius: var(--apns-radius-control);
  font-size: 1rem;
}

.apns-pw-rules__title {
  font-weight: 600;
}

.apns-pw-rules li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.apns-pw-rules .apns-pw-mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--apns-input-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: transparent;
}

.apns-pw-rules .apns-pw-state {
  margin-left: auto;
  font-weight: 600;
  color: var(--apns-muted);
}

.apns-pw-rules li.is-met .apns-pw-mark {
  background: var(--apns-success-text);
  border-color: var(--apns-success-text);
  color: #ffffff;
}

.apns-pw-rules li.is-met .apns-pw-state {
  color: var(--apns-success-text);
}

/* ---------- Sign-in extras ---------- */
form#signInForm .forgot-password,
.forgot-password {
  margin: -4px 0 20px;
}

.forgot-password a,
.apns-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--apns-primary);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Buttons ---------- */
.apns-btn-primary,
form#signInForm button[type="submit"],
.apns-simple-form button[type="submit"],
.buttons .next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--apns-radius-control);
  background: var(--apns-gradient);
  color: #ffffff;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(76, 0, 109, .22);
}

.apns-btn-primary:hover,
form#signInForm button[type="submit"]:hover,
.apns-simple-form button[type="submit"]:hover,
.buttons .next:hover {
  background: var(--apns-primary);
  color: #ffffff;
}

button:disabled,
.apns-btn-primary[aria-busy="true"] {
  opacity: .75;
  cursor: progress;
}

/* Quieter second choice: outline. */
.apns-btn-outline,
.buttons .prev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 10px 20px;
  border: 2px solid var(--apns-accent);
  border-radius: var(--apns-radius-control);
  background: #ffffff;
  color: var(--apns-accent);
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.apns-btn-outline:hover,
.buttons .prev:hover {
  background: var(--apns-panel);
  color: var(--apns-primary-dark);
}

/* "Send me a code": a real button with words, not a hidden trigger. */
.apns-btn-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 20px;
  margin-top: 12px;
  border: 2px solid var(--apns-primary-dark);
  border-radius: var(--apns-radius-control);
  background: var(--apns-primary-dark);
  color: #ffffff;
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
}

.apns-btn-code:hover {
  background: var(--apns-primary);
  border-color: var(--apns-primary);
}

.apns-btn-code[hidden] {
  display: none;
}

@media (max-width: 575.98px) {
  .apns-btn-code {
    width: 100%;
  }
}

.apns-link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--apns-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.apns-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: apns-spin .8s linear infinite;
  flex-shrink: 0;
}

@keyframes apns-spin {
  to { transform: rotate(360deg); }
}

/* ---------- The new-patient steps ---------- */
.progressbar-wrapper {
  margin-bottom: 16px;
}

.progressbar {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  counter-reset: step;
}

.progressbar li {
  position: relative;
  text-align: center;
  color: var(--apns-muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
}

.progressbar li::before {
  content: counter(step);
  counter-increment: step;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 6px;
  border: 2px solid var(--apns-input-border);
  border-radius: 50%;
  background: #ffffff;
  color: var(--apns-muted);
  font-weight: 700;
}

.progressbar li.active {
  color: var(--apns-accent);
  font-weight: 700;
}

.progressbar li.active::before {
  background: var(--apns-primary-dark);
  border-color: var(--apns-primary-dark);
  color: #ffffff;
}

@media (max-width: 420px) {
  .progressbar li {
    font-size: 1rem;
  }
}

.step-content {
  position: relative;
}

.form-step {
  display: none;
  flex-direction: column;
}

.form-step.active {
  display: flex;
}

/* No inner scroll box: every field is on the page, and the page scrolls. */
.inputs-wrapper {
  max-height: none;
  overflow: visible;
  padding: 0;
}

.step-badge {
  color: var(--apns-accent);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 8px 0 18px;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

@media (min-width: 576px) {
  .buttons {
    flex-direction: row-reverse;
    justify-content: flex-start;
  }

  .buttons .next {
    flex: 2 1 0;
  }

  .buttons .prev {
    flex: 1 1 0;
    width: auto;
  }
}

.info-alert {
  background: var(--apns-panel);
  border: 1px solid var(--apns-panel-border);
  border-radius: var(--apns-radius-control);
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 1rem;
}

/* Consent boxes: the whole row is the target. */
.form-check-wrapper {
  border: 1px solid var(--apns-panel-border);
  border-radius: var(--apns-radius-control);
  background: var(--apns-panel);
  margin-bottom: 14px;
}

.form-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  min-height: 56px;
  margin: 0;
}

.form-check-input {
  flex-shrink: 0;
  width: 26px !important;
  min-height: 0;
  height: 26px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--apns-primary-dark);
  cursor: pointer;
}

.form-check-label {
  margin: 0;
  font-weight: 600;
  color: var(--apns-text);
  cursor: pointer;
}

.form-check-label span {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  color: var(--apns-muted);
  font-size: 1rem;
}

/* The last step: what happens when the button is pressed. */
.finish-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 16px 8px 24px;
}

.finish-step .checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--apns-panel);
  border: 3px solid var(--apns-primary);
}

.finish-step .checkmark svg {
  width: 40px;
  height: 40px;
  stroke: var(--apns-primary-dark);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.finish-step h2 {
  color: var(--apns-accent);
  font-size: 1.5rem;
  font-weight: 700;
}

.finish-step p {
  color: var(--apns-text);
  font-size: 1.0625rem;
  max-width: 30rem;
}

/* ---------- Email and phone checks ---------- */
.email-wrapper {
  margin-bottom: 20px;
}

.email-group {
  margin-bottom: 0;
}

.email-input-wrapper,
.phone-input-wrapper {
  position: relative;
  width: 100%;
}

.email-input-wrapper input {
  padding-right: 120px;
}

#verifiedCheck,
.verified-icon {
  display: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  gap: 6px;
  color: var(--apns-success-text);
  font-size: 1rem;
  font-weight: 700;
  pointer-events: none;
}

.phone-verification-group {
  margin-bottom: 20px;
}

.phone-input-wrapper .iti {
  width: 100%;
}

.phone-input-wrapper .iti input {
  width: 100%;
}

.iti {
  width: 100%;
}

.iti__country-list {
  font-size: 1rem;
  max-width: calc(100vw - 48px);
}

/* The code card */
.otp-card {
  margin: 16px 0 20px;
  padding: 18px 16px;
  background: var(--apns-panel);
  border: 1px solid var(--apns-panel-border);
  border-radius: var(--apns-radius-control);
}

.otp-card .otp-title {
  color: var(--apns-accent);
  font-size: 1.1875rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.otp-card p,
.otp-header small {
  color: var(--apns-text);
  font-size: 1rem;
}

.otp-card .otp-sent-to {
  overflow-wrap: anywhere;
}

.otp-wrapper {
  display: flex;
  gap: 8px;
  margin: 16px 0 8px;
}

.otp-wrapper .code-input,
.otp-wrapper .phone-otp {
  flex: 1 1 0;
  min-width: 0;
  max-width: 56px;
  width: auto !important;
  height: 60px !important;
  min-height: 0;
  padding: 0;
  border: 2px solid var(--apns-input-border) !important;
  border-radius: var(--apns-radius-control) !important;
  background: #ffffff !important;
  color: var(--apns-text);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.otp-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
}

.otp-timer {
  color: var(--apns-muted);
  font-size: 1rem;
}

.otp-timer strong {
  color: var(--apns-text);
}

.apns-code-help {
  margin-top: 8px;
  color: var(--apns-muted);
  font-size: 1rem;
}

.dynamic-date {
  width: 100%;
}

.cal-input-icon {
  display: none;
}

/* ---------- Footer: the emergency line ---------- */
.apns-signin-footer {
  background: #ffffff;
  border-top: 1px solid var(--apns-panel-border);
  padding: 16px;
  text-align: center;
  font-size: 1rem;
  color: var(--apns-text);
}

.apns-signin-footer p + p {
  margin-top: 4px;
  color: var(--apns-muted);
}

.apns-signin-footer i {
  color: var(--apns-danger-text);
}

.apns-signin-footer a {
  color: var(--apns-danger-text);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Public walkthrough 2026-09-29, #7 and #15: password toggles at 48px with
   their words; the checklist marks at a readable size. */
.toggle-password-btn, .password-toggle, .password-toggle-btn { min-height: 48px; min-width: 48px; font-size: 1rem; }
.apns-pw-rules .apns-pw-mark { font-size: 1rem; }

/* "Remember my email on this device" (public walkthrough 2026-09-29, #6).
   min-height: 0 undoes the 52px text-box floor, which made the box's row
   taller than its 48px target. */
.apns-remember { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: .25rem 0; }
.apns-remember input { width: 24px; height: 24px; min-height: 0; margin: 0; flex: 0 0 24px; accent-color: #6A3F8F; }
.apns-remember label { margin: 0; font-size: 1rem; font-weight: 500; cursor: pointer; }

/* The privacy notice link under its consent box: outside the label, so
   tapping it opens the notice in a new tab and does not tick the box
   (public walkthrough 2026-09-30, #1). */
.apns-consent-link {
  margin: -6px 0 0;
  padding: 0 16px 8px 56px;
  font-size: 1rem;
}

.apns-consent-link a {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
  min-height: 48px;
  color: var(--apns-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.apns-consent-link .apns-new-tab {
  font-weight: 400;
}

/* The help line's place on the sign-in page (public walkthrough
   2026-09-30, #2). On a 1366 x 768 laptop the help line wrapped to two
   48px rows above the form and pushed "Sign in" to 755px, below the
   fold. From 992px it moves into the panel beside the form, and the
   spacing above the button tightens, so the button is well above 768px.
   Below 992px it stays at the top of the card. The other sign-in pages
   pass no place, so their help line shows at every width. */
.apns-help-line--in-panel {
  display: none;
}

.left-panel .apns-help-line {
  flex-direction: column;
  gap: 0;
  margin: 4px 0 0;
  padding: 4px 14px;
  color: var(--apns-text);
}

@media (min-width: 992px) {
  .apns-help-line--in-card {
    display: none;
  }

  .apns-help-line--in-panel {
    display: flex;
  }

  .container {
    padding-top: 16px;
  }

  .form-card {
    padding: 24px 28px 28px;
  }

  .tab-switch {
    margin-bottom: 16px;
  }

  form#signInForm .input-group {
    margin-bottom: 16px;
  }

  form#signInForm .forgot-password {
    margin: -4px 0 12px;
  }
}

/* "Show password" stays out of the way of the box it belongs to
   (walkthrough 2026-10-01, B3). On a 375px phone the 170px button sat in
   the middle of the 309px Password box: a tap where the box looked
   tappable pressed "Show password" instead, the cursor stayed in "Email
   address", and the password went onto the end of the address in plain
   text. The box kept only 104px of room on its right, so typed text also
   ran under the button.

   Sign in and New patient (the "Show password" buttons on this page):
   from 576px the button sits inside the right end of the box, a fixed
   176px wide so "Show" and "Hide" do not change its size, and the box
   keeps 176 + 6 (its inset) + 14px clear for the text. Below 576px the
   button leaves the box and sits under it, so the whole box is the
   Password field. These come after the 48px rule above on purpose. */
#signInForm .toggle-password-btn,
#signUpForm .password-toggle {
  min-width: 176px;
  white-space: nowrap;
}

#signInForm .password-wrapper input,
#signUpForm .apns-input-wrap.has-toggle input {
  padding-right: 196px;
}

@media (max-width: 575.98px) {
  #signInForm .password-wrapper input,
  #signUpForm .apns-input-wrap.has-toggle input {
    padding-right: 14px;
  }

  #signInForm .toggle-password-btn,
  #signUpForm .password-toggle {
    position: static;
    transform: none;
    margin-top: 8px;
    min-width: 0;
    height: auto;
  }

  /* The lock icon stays in the middle of the 52px box, not the middle of
     the box and the button together. */
  #signInForm .password-wrapper > .input-icon {
    top: 26px;
  }
}
