/* Sign-in and pharmacy registration pages, including mobile form layout. */

* {
  box-sizing: border-box;
}
:root {
  --navy: #0e1a2d;
  --navy-soft: #12314a;
  --ink: #172b3d;
  --muted: #607482;
  --green: #20aa9a;
  --green-dark: #147e73;
  --gold: #d9a916;
  --line: #cfe0e4;
  --paper: #ffffff;
  --canvas: #eef8fa;
  --error: #a22d25;
}
html,
body {
  min-height: 100%;
}
body {
  margin: 0;
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(18, 49, 74, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 49, 74, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.site-bar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(24px, 5vw, 72px);
  background: rgba(14, 26, 45, 0.96);
  color: #fff;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: #fff;
  color: var(--navy);
  font-size: 22px;
  font-weight: 800;
}
.site-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  color: #f3ca4a;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}
.site-link:hover {
  background: var(--gold);
  color: var(--navy);
}
.page-shell {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(480px, 0.92fr);
}
.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(40px, 4.5vw, 66px);
  overflow: hidden;
}
.brand-panel::after {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 7%;
  height: 1px;
  background: var(--line);
  content: "";
}
.brand-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}
.eyebrow {
  margin: 0 0 22px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.brand-copy h1 {
  max-width: 620px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(44px, 4.2vw, 60px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0;
}
.brand-copy h1 strong {
  color: var(--green);
}
.brand-copy > p:last-of-type {
  max-width: 540px;
  margin: 20px 0 0;
  color: var(--navy-soft);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.5;
}
.queue-visual {
  position: relative;
  z-index: 1;
  width: min(470px, 100%);
  margin-top: 28px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 40px rgba(14, 26, 45, 0.08);
}
.queue-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  color: var(--navy-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.live-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--green-dark);
}
.live-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}
.queue-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 37px;
  padding: 0 12px;
  border-top: 1px solid #dce8ea;
  color: var(--navy-soft);
  font-size: 14px;
}
.queue-count {
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.brand-foot {
  display: none;
}
.auth-panel {
  display: grid;
  align-items: center;
  min-width: 0;
  padding: clamp(32px, 5vw, 78px);
  background: rgba(255, 255, 255, 0.5);
  border-left: 1px solid var(--line);
}
main {
  width: min(470px, 100%);
  margin: auto;
  padding: clamp(30px, 4vw, 48px);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(14, 26, 45, 0.12);
}
main.registration-page {
  width: min(780px, 100%);
}
header {
  margin-bottom: 32px;
}
header .section-label {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}
header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
}
header p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
section {
  padding: 0;
}
form {
  display: grid;
  gap: 16px;
}
.registration-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.registration-form > .wide,
.registration-form > button,
.registration-form > .error {
  grid-column: 1 / -1;
}
.form-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.form-group + .form-group {
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.form-group legend {
  width: 100%;
  margin: 0 0 17px;
  padding: 0;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}
.form-grid .wide {
  grid-column: 1 / -1;
}
label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}
.optional {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.field-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}
.agreement-intro {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.review-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 11px 14px;
  border-left: 4px solid var(--gold);
  background: #fff9e6;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}
.review-progress strong { color: #765b00; }
.document-review-section + .document-review-section { margin-top: 20px; }
.document-review-section h3 {
  margin: 0 0 9px;
  color: var(--navy);
  font-size: 15px;
}
.document-review-list {
  display: grid;
  gap: 7px;
}
.document-review-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 60px;
  padding: 9px 12px;
  border: 1px solid #c5d8dc;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}
.document-review-row:hover {
  border-color: var(--green-dark);
  background: #f3faf8;
}
.document-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #abc5ca;
  border-radius: 50%;
  color: var(--navy-soft);
  font-size: 12px;
  font-weight: 800;
}
.document-name { min-width: 0; }
.document-name strong,
.document-name small {
  display: block;
}
.document-name strong {
  color: var(--navy);
  font-size: 13px;
}
.document-name small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.document-state {
  min-width: 58px;
  padding: 5px 7px;
  border: 1px solid #c5d8dc;
  color: var(--navy-soft);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}
.document-review-row.is-reviewed {
  border-color: #8fc8ba;
  background: #edf8f5;
}
.document-review-row.is-reviewed .document-index {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}
.document-review-row.is-reviewed .document-state {
  border-color: #8fc8ba;
  color: var(--green-dark);
}
.package-review-row {
  margin-bottom: 20px;
  min-height: 76px;
}
.package-review-row .document-index {
  border-radius: 4px;
  background: #eef6f7;
}
.package-document {
  padding-top: 42px;
  border-top: 2px solid #9fbfc4;
}
.package-document + .package-document {
  margin-top: 48px;
}
.package-document-meta {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.package-introduction {
  margin-bottom: 46px;
}
.signature-fields {
  margin: 18px 0;
}
.agreement-check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  margin-top: 11px;
  padding: 12px;
  border: 1px solid #b9d5d1;
  background: #f2faf8;
  font-weight: 550;
  line-height: 1.45;
}
.agreement-check input {
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  accent-color: var(--green-dark);
}
.agreement-check input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.legal-review-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-width: none;
  height: min(860px, calc(100dvh - 32px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid #91adb5;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(7, 22, 35, 0.32);
}
.legal-review-dialog::backdrop { background: rgba(7, 22, 35, 0.74); }
.legal-review-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
}
.legal-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 18px 22px;
  background: var(--navy);
  color: #fff;
}
.legal-review-head span {
  color: #7ee0d4;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.legal-review-head h2 {
  margin: 4px 0 2px;
  color: #fff;
  font-size: 22px;
}
.legal-review-head p {
  margin: 0;
  color: #b9cfda;
  font-size: 12px;
}
.dialog-close {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  min-height: 38px;
  padding: 0;
  border: 1px solid #597285;
  background: transparent;
  color: #fff;
  font-size: 27px;
  line-height: 1;
}
.dialog-close:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.application-cover {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
  background: #f1f8fa;
}
.application-cover > div > span {
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.application-cover h3 {
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 16px;
}
.application-cover dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
}
.application-cover dl div { min-width: 0; }
.application-cover dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.application-cover dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
}
.legal-review-scroll {
  overflow-y: auto;
  padding: 26px clamp(20px, 5vw, 58px) 44px;
  overscroll-behavior: contain;
}
.completion-note {
  margin-bottom: 28px;
  padding: 13px 15px;
  border-left: 4px solid var(--green);
  background: #edf8f5;
  color: #315c56;
  font-size: 13px;
  line-height: 1.5;
}
.legal-copy {
  width: 100%;
  max-width: 820px;
  margin: auto;
  overflow-wrap: anywhere;
  font: 15px/1.68 Georgia, "Times New Roman", serif;
}
.legal-copy ul,
.legal-copy ol {
  padding-left: 24px;
}
.legal-copy h1,
.legal-copy h2,
.legal-copy h3 {
  color: var(--navy);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
.legal-copy h1 {
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--green);
  font-size: 28px;
}
.legal-copy h2 { margin: 34px 0 12px; font-size: 21px; }
.legal-copy h3 { margin: 24px 0 10px; font-size: 17px; }
.legal-copy table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}
.legal-copy th,
.legal-copy td {
  padding: 9px 10px;
  border: 1px solid #cbdadd;
  text-align: left;
  vertical-align: top;
}
.legal-copy th { background: #eef6f7; color: var(--navy); }
.legal-copy pre {
  overflow-x: auto;
  padding: 13px;
  border: 1px solid #d4e1e3;
  background: #f7fafb;
  white-space: pre-wrap;
  font: 13px/1.55 ui-monospace, Consolas, monospace;
}
.legal-review-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 13px 18px;
  border-top: 1px solid #c5d8dc;
  background: #f7fafb;
}
.legal-review-footer > span { color: var(--muted); font-size: 12px; }
.legal-review-footer label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.legal-review-footer input {
  width: 18px;
  height: 18px;
  accent-color: var(--green-dark);
}
.legal-review-footer button { min-width: 92px; }
.document-loading,
.document-error {
  padding: 30px;
  color: var(--muted);
  text-align: center;
}
.document-error { color: var(--error); }
input:not([type="checkbox"]) {
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid #9fb4ba;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font:
    16px -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
input:focus {
  outline: 3px solid rgba(20, 125, 115, 0.18);
  border-color: var(--green);
}
button,
.button-link {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid var(--green-dark);
  border-radius: 4px;
  background: var(--green-dark);
  color: #fff;
  font:
    800 14px -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  text-decoration: none;
  cursor: pointer;
}
button:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
}
.button-link.secondary {
  margin-top: 12px;
  background: #fff;
  color: var(--green-dark);
}
.button-link.secondary:hover {
  background: #edf7f4;
}
.remember {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 400;
}
.remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}
.alternate {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}
.forgot-link {
  margin-top: -5px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  text-decoration: none;
}
.error {
  margin: 0;
  padding: 11px 12px;
  border-left: 4px solid var(--error);
  background: #fff0ee;
  color: #78231d;
  font-size: 14px;
  line-height: 1.4;
}
.success {
  margin: 0 0 24px;
  padding: 12px 14px;
  border-left: 4px solid var(--green);
  background: #e9f6f2;
  color: #18584f;
  font-size: 14px;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .site-bar {
    min-height: 68px;
    padding: 0 24px;
  }
  .page-shell {
    grid-template-columns: 1fr;
  }
  .brand-panel {
    min-height: auto;
    padding: 42px 28px 34px;
    text-align: center;
  }
  .brand-panel::after {
    display: none;
  }
  .brand-copy {
    margin: auto;
  }
  .brand-copy h1 {
    max-width: 660px;
    font-size: 40px;
  }
  .brand-copy > p:last-of-type,
  .queue-visual,
  .brand-foot {
    display: none;
  }
  .auth-panel {
    min-height: calc(100vh - 240px);
    padding: 28px 28px 56px;
    border-left: 0;
  }
}
@media (max-width: 600px) {
  .site-bar {
    min-height: 62px;
    padding: 0 18px;
  }
  .wordmark {
    font-size: 19px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }
  .site-link {
    padding: 6px 10px;
    font-size: 10px;
  }
  .brand-panel {
    padding: 30px 20px 25px;
  }
  .brand-copy h1 {
    font-size: 31px;
    line-height: 1.08;
  }
  .eyebrow {
    margin-bottom: 10px;
  }
  .auth-panel {
    min-height: auto;
    padding: 14px 14px 42px;
    align-items: start;
  }
  main {
    padding: 28px 20px;
  }
  header {
    margin-bottom: 24px;
  }
  header h2 {
    font-size: 29px;
  }
  .registration-form {
    grid-template-columns: 1fr;
  }
  .registration-form > .wide,
  .registration-form > button,
  .registration-form > .error {
    grid-column: auto;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  .document-review-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }
  .document-state {
    grid-column: 2;
    justify-self: start;
  }
  .legal-review-dialog {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .legal-review-head {
    padding: 14px 16px;
  }
  .legal-review-head h2 {
    font-size: 18px;
  }
  .application-cover {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 10px 16px;
  }
  .application-cover dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .legal-review-scroll {
    padding: 20px 16px 36px;
  }
  .legal-copy h1 {
    font-size: 23px;
  }
  .legal-review-footer {
    grid-template-columns: 1fr auto;
    gap: 9px;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  }
  .legal-review-footer > span {
    grid-column: 1 / -1;
  }
}
