/* Scoped sign-in UI. Public navigation and private panel styles stay independent. */
.auth-page,.auth-card {--auth-ink:#29251f;--auth-muted:#6d655a;--auth-bg:#f8f5ef;--auth-surface:#fff;--auth-soft:#f3eee5;--auth-line:#e3dcd0;--auth-accent:#805e2b;--auth-danger:#a12e24;font:15px/1.6 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--auth-ink);letter-spacing:0;}
.auth-page {margin:0;min-height:100svh;display:flex;flex-direction:column;background:var(--auth-bg);color-scheme:light;}
.auth-page *,.auth-card * {box-sizing:border-box;}
.auth-page [hidden],.auth-card [hidden] {display:none!important;}
.auth-page a,.auth-card a {color:var(--auth-accent);text-underline-offset:4px;}
.auth-page :focus-visible,.auth-card :focus-visible {outline:3px solid #b58b4b;outline-offset:4px;}
.auth-page-header {display:flex;align-items:center;justify-content:space-between;gap:24px;width:min(1120px,calc(100% - 48px));min-height:88px;margin:0 auto;}
.auth-site-brand {display:flex;align-items:center;gap:12px;color:var(--auth-ink)!important;text-decoration:none;font-size:14px;font-weight:650;line-height:1.4;}
.auth-site-brand img {border-radius:50%;flex:none;object-fit:contain;}
.auth-site-brand small {display:block;color:var(--auth-muted);font-size:12px;font-weight:400;margin-top:3px;}
.auth-back {display:flex;gap:10px;align-items:center;min-height:44px;text-decoration:none;font-size:13px;white-space:nowrap;}
.auth-back span {font-size:21px;}
.auth-skip {position:fixed;top:8px;left:12px;z-index:3000;padding:10px 16px;background:#fff;transform:translateY(-160%);}
.auth-skip:focus {transform:none;}
.auth-page .auth-layout,.patient-panel .patient-auth.auth-card {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:min(1040px,calc(100% - 48px));max-width:1040px;min-height:0;margin:28px auto 36px;padding:0;gap:0;align-items:stretch;border:1px solid var(--auth-line);border-radius:22px;background:var(--auth-surface);box-shadow:0 16px 60px #38291608;overflow:hidden;}
.auth-card .auth-brand-panel,.patient-panel .auth-card .patient-auth-brand {padding:42px;background:var(--auth-soft);border-right:1px solid var(--auth-line);text-align:left;}
.auth-card .auth-eyebrow,.auth-card .patient-eyebrow {color:var(--auth-accent);font-size:11px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;margin:0 0 16px!important;}
.auth-card .auth-brand-panel h1,.patient-panel .auth-card .patient-auth-brand h1 {font-size:clamp(27px,2.6vw,36px);font-weight:650;line-height:1.18;letter-spacing:-1.2px;margin:0 0 18px;color:var(--auth-ink);}
.auth-card .auth-tagline,.patient-panel .auth-card .patient-auth-tagline {font-size:28px;font-weight:450;line-height:1.3;letter-spacing:-.6px;color:var(--auth-accent);max-width:280px;margin:0 0 20px!important;}
.auth-card .auth-description,.patient-panel .auth-card .patient-auth-description {font-size:14px;line-height:1.8;color:var(--auth-muted);max-width:320px;margin:0 0 26px;}
.auth-benefits {list-style:none;padding:0;margin:30px 0;display:grid;gap:22px;}
.auth-benefits li {display:flex;align-items:flex-start;gap:14px;}
.auth-benefit-icon {display:grid;place-items:center;width:34px;height:34px;flex:none;border:1px solid #d9ccba;border-radius:10px;font-size:11px;color:var(--auth-accent);}
.auth-benefits strong {display:block;font-size:14px;font-weight:650;line-height:1.4;}
.auth-benefits small {display:block;font-size:12px;line-height:1.65;color:var(--auth-muted);margin-top:4px;}
.auth-same-account {font-size:12px;color:var(--auth-muted);padding-top:20px;border-top:1px solid var(--auth-line);margin:28px 0 0;}
.auth-card .auth-form-panel,.patient-panel .auth-card .patient-auth-content {padding:40px 44px;border:0;border-radius:0;background:var(--auth-surface);min-width:0;}
.auth-card .auth-form-panel h2,.patient-panel .auth-card .patient-auth-content>[data-auth-title] {color:var(--auth-ink);font-size:28px;line-height:1.25;letter-spacing:-.6px;font-weight:650;margin:0 0 10px;}
.auth-card .auth-form-lead,.auth-card [data-auth-lead] {color:var(--auth-muted);font-size:14px;line-height:1.7;margin:0 0 26px;}
.auth-card form {display:grid;gap:18px;margin:0;}
.auth-card form>label {display:grid;gap:8px;font-size:13px;line-height:1.5;font-weight:600;color:var(--auth-ink);margin:0;}
.auth-card input:not([type=checkbox]) {width:100%;min-width:0;height:50px;font:400 16px/1.5 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:12px 14px;color:var(--auth-ink);background:var(--auth-surface);border:1px solid var(--auth-line);border-radius:9px;box-shadow:none;box-sizing:border-box;}
.auth-card input::placeholder {color:#8d8579;opacity:1;}
.auth-card input:focus {border-color:var(--auth-accent);}
.auth-card label small {font-size:12px;color:var(--auth-muted);font-weight:400;}
.auth-card .auth-password {display:block;position:relative;min-width:0;}
.auth-card .auth-password input {padding-right:78px;}
.auth-card .auth-password-toggle {position:absolute;right:4px;top:4px;height:42px;min-height:42px;min-width:64px;padding:0 10px;border:0;border-radius:6px;background:transparent;box-shadow:none;color:var(--auth-accent);font:600 12px/1.4 Inter,Arial,sans-serif;cursor:pointer;}
.auth-card .auth-password-toggle:hover {background:var(--auth-soft);}
.auth-card .auth-submit,.auth-card .patient-primary {width:100%;min-height:50px;border:1px solid var(--auth-accent);border-radius:9px;padding:12px 20px;background:var(--auth-accent);box-shadow:none;color:#fff;font:650 14px/1.5 Inter,Arial,sans-serif;cursor:pointer;text-decoration:none;text-align:center;}
.auth-card .auth-submit:hover,.auth-card .patient-primary:hover {background:#68491e;border-color:#68491e;}
.auth-card button:disabled {opacity:.6;cursor:wait;}
.auth-card .auth-feedback:empty,.auth-card [data-message]:empty {display:none;}
.auth-card .auth-feedback,.auth-card [data-message].patient-message {width:100%;max-width:none;margin:0!important;padding:12px 14px;border:1px solid var(--auth-line);border-radius:8px;background:var(--auth-soft);font-size:13px;line-height:1.7;white-space:pre-line;overflow-wrap:anywhere;color:var(--auth-ink);}
.auth-card .auth-feedback.is-error,.auth-card [data-message].is-error {color:var(--auth-danger);background:#fff5f2;border-color:#ebc3b9;}
.auth-form-panel>.auth-feedback:not(:empty) {margin-bottom:20px!important;}
.auth-card .auth-forgot {justify-self:center;min-height:44px;padding:4px 8px;border:0;background:transparent;color:var(--auth-accent);font:500 12px/1.5 Inter,Arial,sans-serif;text-decoration:underline;text-underline-offset:4px;cursor:pointer;}
.auth-card .auth-reset-note {margin:0;font-size:12px;line-height:1.75;color:var(--auth-muted);}
.auth-card .auth-alternatives {display:none;}
.auth-card .auth-alternatives:has([data-passkey-login]) {display:grid;gap:16px;}
.auth-or {display:flex;align-items:center;gap:14px;color:var(--auth-muted);font-size:12px;text-align:center;}
.auth-or::before,.auth-or::after {content:"";height:1px;background:var(--auth-line);flex:1;}
.auth-card [data-passkey-login] {display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;margin:0;padding:12px;border:1px solid var(--auth-line);border-radius:9px;background:var(--auth-surface);box-shadow:none;color:var(--auth-ink);font:600 13px/1.5 Inter,Arial,sans-serif;cursor:pointer;}
.auth-card [data-passkey-login]:hover {background:var(--auth-soft);}
.patient-panel .auth-card [data-passkey-login] {margin:0;}
.auth-account-link {font-size:13px;text-align:center;color:var(--auth-muted);margin:22px 0 0;}
.auth-account-link a {font-weight:650;margin-left:4px;}
.auth-card .auth-install {border-top:1px solid var(--auth-line);padding-top:16px;margin-top:24px;text-align:center;}
.auth-card .auth-install:empty {display:none;}
.auth-card .auth-install .mobile-app-install-inline {display:inline-flex;align-items:center;justify-content:center;margin:0;min-height:44px;padding:8px 14px;border:0;border-radius:7px;background:var(--auth-soft);color:var(--auth-accent);font-size:12px;}
.auth-page-footer {display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;width:min(1040px,calc(100% - 48px));margin:auto auto 0;padding:16px 0 26px;color:var(--auth-muted);font-size:11px;}
.auth-page-footer nav {display:flex;gap:22px;flex-wrap:wrap;}
.auth-page-footer a {color:var(--auth-muted);}
.patient-panel .auth-card .patient-auth-logo {width:48px;height:48px;border-radius:50%;margin:0 0 24px;}
.patient-panel .auth-card .patient-auth-benefits {margin:28px 0 0;font-size:13px;gap:16px;color:var(--auth-muted);}
.patient-panel .auth-card .patient-auth-switch {display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;margin:24px 0 0;padding:20px 0 0;border-top:1px solid var(--auth-line);font-size:13px;}
.patient-panel .auth-card .patient-auth-switch p {margin:0;}
.patient-panel .auth-card .patient-auth-switch>a {width:auto;min-height:44px;padding:6px 0;border:0;background:transparent;font-size:13px;color:var(--auth-accent);text-decoration:underline;}
.auth-card .patient-text {color:var(--auth-accent);padding:2px 0;min-height:36px;font-size:12px!important;}
.auth-card .patient-first-order {font-size:12px;line-height:1.8;margin:18px 0 0;}
.auth-card [data-auth-feedback]:has([data-message]:not(:empty)) {margin-bottom:18px;}
html[data-theme=dark] .auth-card {--auth-ink:#f7efe3;--auth-muted:#bdb09e;--auth-surface:#18140f;--auth-soft:#211b14;--auth-line:#4b3c29;--auth-accent:#dec08b;--auth-danger:#f0b7aa;}
html[data-theme=dark] .auth-card .patient-primary {background:#805e2b;border-color:#805e2b;color:#fff;}
html[data-theme=dark] .auth-card [data-message].is-error {background:#38201b;border-color:#754438;}
.app-mode .auth-page-header,.app-mode .auth-page-footer {display:none;}
.app-mode .auth-page .auth-layout {margin-top:24px;margin-bottom:24px;}
@media(max-width:850px){
 .auth-card .auth-brand-panel,.patient-panel .auth-card .patient-auth-brand {padding:32px;}
 .auth-card .auth-form-panel,.patient-panel .auth-card .patient-auth-content {padding:32px;}
 .auth-card .auth-tagline,.patient-panel .auth-card .patient-auth-tagline {font-size:24px;}
}
@media(max-width:700px){
 .auth-page-header {width:calc(100% - 36px);min-height:78px;gap:12px;}
 .auth-site-brand {font-size:12px;gap:10px;}
 .auth-site-brand img {width:36px;height:36px;}
 .auth-site-brand small {font-size:11px;}
 .auth-back {font-size:12px;}
 .auth-back span {display:none;}
 .auth-page .auth-layout,.patient-panel .patient-auth.auth-card {display:block;width:min(460px,calc(100% - 32px));margin:14px auto 26px;border-radius:17px;}
 .auth-card .auth-brand-panel,.patient-panel .auth-card .patient-auth-brand {padding:23px 26px;border-right:0;border-bottom:1px solid var(--auth-line);}
 .auth-card .auth-eyebrow,.auth-card .patient-eyebrow,.auth-card .auth-description,.patient-panel .auth-card .patient-auth-description,.auth-card .auth-benefits,.patient-panel .auth-card .patient-auth-benefits,.auth-card .auth-same-account {display:none;}
 .auth-card .auth-brand-panel h1,.patient-panel .auth-card .patient-auth-brand h1 {font-size:24px;letter-spacing:-.6px;margin:0 0 6px;}
 .auth-card .auth-tagline,.patient-panel .auth-card .patient-auth-tagline {font-size:14px;line-height:1.6;letter-spacing:0;max-width:none;margin:0!important;}
 .auth-tagline br {display:none;}
 .patient-panel .auth-card .patient-auth-logo {width:32px;height:32px;margin:0 0 14px;}
 .auth-card .auth-form-panel,.patient-panel .auth-card .patient-auth-content {padding:26px;}
 .auth-card .auth-form-panel h2,.patient-panel .auth-card .patient-auth-content>[data-auth-title] {font-size:25px;}
 .auth-card .auth-form-lead,.auth-card [data-auth-lead] {font-size:13px;margin-bottom:22px;}
 .auth-card .auth-install {margin-top:20px;padding-top:12px;}
 .auth-page-footer {width:calc(100% - 40px);font-size:10px;padding:8px 0 20px;gap:8px;justify-content:center;text-align:center;}
 .auth-page-footer>span {display:none;}
 .auth-card .patient-name-fields {grid-template-columns:1fr;}
}
@media(max-width:360px){
 .auth-site-brand {font-size:11px;}.auth-site-brand small {font-size:10px;}.auth-site-brand img {width:30px;height:30px;}.auth-back {font-size:11px;}
 .auth-card .auth-brand-panel,.patient-panel .auth-card .patient-auth-brand,.auth-card .auth-form-panel,.patient-panel .auth-card .patient-auth-content {padding:22px;}
}
