/* The sign-in pages (Dr Shah 08-Oct-2026; index.php signin_shell, login.js). Loaded only on those pages (body.signin).
   Computer: the clinic panel (navy) on the left, the form on the right. Phone (under 860px): full screen — a clinic band on top, the form
   below it, fingerprint as the main button; on a computer the password is the main button and fingerprint a quieter one under it. */
body.signin { background: #fff; min-height: 100vh; min-height: 100dvh; }
.sgwrap { display: grid; grid-template-columns: minmax(320px, 40%) 1fr; min-height: 100vh; min-height: 100dvh; }
body:has(.envbar) .sgwrap { min-height: calc(100dvh - 30px); }

/* ---- the clinic panel ---- */
.sgside { background: #0F2233; color: #DCE6EE; padding: 40px 44px; display: flex; flex-direction: column; gap: 28px; justify-content: space-between; }
.sgenv { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 3px 10px; border-radius: 6px; color: #fff; }
.sgenv-live { background: #1F7A4D; } .sgenv-test { background: #C2410C; } .sgenv-local { background: #475569; }
.sgbrand { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.sgbrand .scrcmark { margin-bottom: 6px; }
.sgname { margin: 0; font-size: 26px; line-height: 1.25; font-weight: 600; color: #fff; max-width: 15em; text-wrap: balance; }
.sgday { margin: 0; font-size: 14px; color: #9FB3C2; }
.sgnotes { list-style: none; margin: 0 0 auto; padding: 0; display: grid; gap: 10px; font-size: 14px; color: #C9D6DF; }
.sgnotes li { display: flex; align-items: center; gap: 10px; }
.sgnotes li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #D9A441; flex: none; }

/* ---- the form side ---- */
.sgmain { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 32px 24px; gap: 28px; }
.signin.authpage main.auth { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 380px; margin: 0; padding: 0; background: none; box-shadow: none; border: 0; border-radius: 0; }
.signin .auth .authbrand { align-items: flex-start; text-align: left; margin: 0 0 4px; gap: 4px; }
.signin .auth .authbrand .scrcmark { display: none; }   /* the mark is in the clinic panel */
.signin .auth .authbrand h1 { font-size: 26px; letter-spacing: 0; font-weight: 700; color: #0F2233; }
.signin .auth .authbrand .sub { font-size: 14px; color: #5D6B7A; margin: 0; }
.signin .auth p { margin: 0; }
.signin .auth form { display: flex; flex-direction: column; gap: 14px; }
.signin .auth label { font-size: 13px; color: #334155; margin: 0; }
.signin .auth label > input, .signin .sgpwbox input { font-size: 16px; min-height: 46px; padding: 10px 12px; border-radius: 9px; border-color: #C9D3DB; margin-top: 5px; }
.signin .auth button { width: 100%; margin: 4px 0 0; min-height: 48px; font-size: 16px; border-radius: 10px; }
.signin .auth button:disabled { opacity: .7; cursor: progress; }
.signin .auth .err { background: #FDECEA; color: #8F1D14; border-radius: 9px; padding: 10px 12px; font-weight: 500; font-size: 14px; }
.signin .auth .ok { background: #E5F4EC; color: #14532D; border-radius: 9px; padding: 12px 14px; font-size: 15px; }
.signin .auth .authfoot { text-align: left; margin: 0; }
.sgfoot { font-size: 12.5px; color: #7A8894; margin: 0; text-align: center; }
.sglinks { display: flex; justify-content: space-between; gap: 12px; }
a.sglink { color: #0B6B63; font-weight: 600; font-size: 14px; text-decoration: none; }
a.sglink:hover, a.sglink:focus-visible { text-decoration: underline; }

/* Show / Hide + Caps Lock (login.js) */
.sgpwbox { position: relative; display: block; }
.sgpwbox input { display: block; padding-right: 72px !important; }
.signin .auth .sgeye { position: absolute; right: 6px; top: 50%; transform: translateY(calc(-50% + 2.5px)); width: auto; min-height: 34px; margin: 0; padding: 0 12px;
  font-size: 13px; font-weight: 600; background: transparent; border: 0; color: #0B6B63; border-radius: 7px; }
.signin .auth .sgeye:hover { background: #E3F3F1; }
.sgcaps { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: #8A5300; background: #FFF4D6; border-radius: 6px; padding: 2px 8px; }

/* the names used on this computer (login.js) */
.sgwho { display: flex; flex-wrap: wrap; gap: 8px; }
.signin .auth .sgname { width: auto; min-height: 38px; margin: 0; padding: 4px 12px 4px 4px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: #0F2233; border: 1px solid #C9D3DB; border-radius: 99px; }
.signin .auth .sgname:hover { background: #F2FAF9; border-color: #0D7A71; }
.signin .auth .sgname.on { background: #E3F3F1; border-color: #0D7A71; }
.sgname i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: #E3F3F1; color: #0B6B63; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.sgname.on i { background: #0D7A71; color: #fff; }
.sgname .sgx { margin-left: 2px; color: #626F7B; font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px; }
.sgname .sgx:hover { color: #8F1D14; background: #FDECEA; }
.signin .auth .sgother { padding: 4px 14px; color: #5D6B7A; border-style: dashed; }

/* fingerprint / face (passkey.php pk_login_html): computer = a quieter button under the form */
.signin .auth .pkbox { order: 5; display: flex; flex-direction: column; gap: 10px; }
.signin .auth .pkbox[hidden] { display: none; }
.signin .auth .pkbox::before { content: "or"; text-align: center; font-size: 13px; color: #626F7B; }
.signin .auth #pkgo { background: #fff; color: #0B6B63; border: 1px solid #9CCFCA; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 0; }
.signin .auth #pkgo:hover { background: #F2FAF9; border-color: #0D7A71; }
.signin .auth .pkor { display: none; }
.signin .auth .sglinks { order: 4; }

@media (max-width: 1024px) {
  .sgwrap { display: block; }
  .sgside { padding: 18px 16px 20px; gap: 14px; }
  .sgbrand { margin: 0; flex-direction: row; align-items: center; gap: 12px; }
  .sgbrand .scrcmark { margin: 0; flex: none; }
  .sgname { font-size: 17px; }
  .sgday { display: none; }
  .sgnotes { display: none; }
  .sgmain { padding: 24px 16px 20px; justify-content: flex-start; min-height: calc(100dvh - 160px); }
  .signin.authpage main.auth { max-width: 480px; flex: 1; }
  .sgfoot { margin-top: auto; }
  /* phone: fingerprint first and main */
  .signin .auth .pkbox { order: 1; }
  .signin .auth .pkbox::before { display: none; }
  .signin .auth #pkgo { background: #0D7A71; color: #fff; border-color: #0D7A71; min-height: 56px; font-size: 17px; }
  .signin .auth .pkor { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #626F7B; margin-top: 4px; }
  .signin .auth .pkor::before, .signin .auth .pkor::after { content: ""; flex: 1; height: 1px; background: #E2E8EC; }
  .signin .auth .authbrand { order: 0; } .signin .auth .err { order: 0; } .signin .auth form { order: 2; } .signin .auth .sglinks { order: 3; }
}
@media (prefers-reduced-motion: no-preference) { .signin .auth button { transition: background-color .15s, border-color .15s; } }
@media (max-width: 1024px) { body:has(.envbar) .sgmain { padding-bottom: 96px; } }   /* the TEST / LOCAL bar sits on the bottom edge of a phone */
