.upload-form{margin:14px 0;padding:12px;border:1px dashed #7dd3fc;border-radius:12px;background:#f0f9ff}
.document-pending{border-left:4px solid #f59e0b}
.document-verified{border-left:4px solid #16a34a}
.document-rejected{border-left:4px solid var(--red)}
.download{display:inline-flex;border:1px solid var(--blue);border-radius:8px;padding:7px 10px;color:var(--blue);font-size:12px;font-weight:800;text-decoration:none;margin-top:7px}
.file-picker{position:relative}.file-picker input[type=file]{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}.file-control{display:block;width:100%;margin-top:7px;padding:11px;border:1px solid var(--blue);border-radius:10px;color:var(--blue);text-align:center;background:#fff}.file-picker small{display:block;margin-top:7px;color:var(--muted);font-weight:400}.upload-action{background:var(--teal)}
.next-steps{border-top:4px solid var(--teal);background:#f0fdfa}.next-steps h3{margin-bottom:10px}.step-grid{display:grid;gap:9px;margin-bottom:12px}.step-grid div{background:#fff;border:1px solid #ccfbf1;border-radius:12px;padding:11px}.step-grid span{width:24px;height:24px;border-radius:8px;background:var(--teal);color:#fff;display:grid;place-items:center;font-weight:900;margin-bottom:7px}.step-grid b{display:block}.step-grid p{margin:4px 0 0}.inline-pharmacy{margin-top:10px}
.item.priority-high{border-left:4px solid #f59e0b}.item.priority-high .tag{background:#fef3c7;color:#92400e}.item.priority-critical{border-left:4px solid var(--red);background:#fff1f2}.item.priority-critical .tag{background:#ffe4e6;color:var(--red)}
.privacy-preview{background:#f0f9ff;border:1px solid #bae6fd;border-radius:12px;padding:11px;margin-top:14px}.privacy-preview p{font-size:12px;color:var(--muted);margin:8px 0 0}
.modal-layer{position:fixed;inset:0;z-index:100;background:rgba(15,23,42,.58);display:flex;align-items:flex-end;justify-content:center;padding:16px;backdrop-filter:blur(4px)}.modal-layer[hidden]{display:none}.modal-card{width:min(430px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:22px 22px 16px 16px;padding:22px;box-shadow:0 24px 70px rgba(15,23,42,.3)}.modal-card h2{font-size:22px;margin-bottom:8px}.modal-icon{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:#e0f2fe;font-size:23px;margin-bottom:12px}
.permission-row{display:grid;grid-template-columns:22px 1fr auto;align-items:flex-start;gap:10px;padding:12px;margin:9px 0;border:1px solid var(--line);border-radius:13px;background:#fff;font-weight:400}.permission-row input{width:19px;height:19px;margin:2px 0 0;accent-color:var(--teal)}.permission-row span b,.permission-row span small{display:block}.permission-row span small{color:var(--muted);font-size:11px;margin-top:3px}.permission-row em{font-style:normal;font-size:10px;font-weight:800;color:#166534;background:#dcfce7;border-radius:99px;padding:3px 7px}.permission-row.locked{background:#f0fdfa;border-color:#99f6e4}.privacy-fineprint{font-size:11px;color:var(--muted);margin-top:12px}.privacy-center form>button{margin-top:8px}.privacy-shield{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:#dcfce7;color:#166534;font-weight:900}
.consent-summary{background:#f0f9ff;border:1px solid #bae6fd;border-radius:12px;padding:12px;margin:12px 0}.consent-summary p{margin:2px 0;font-size:12px}.secondary-neutral{width:100%;margin-top:9px;background:#fff;color:var(--blue);border:1px solid #7dd3fc}.text-button{width:100%;margin-top:5px;background:transparent;color:var(--muted)}.consent-card{border-left:4px solid var(--teal)}.consent-card.revoked,.consent-card.expired{border-left-color:#94a3b8;background:#f8fafc}.scope-pills{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0}.scope-pills span{font-size:10px;padding:4px 7px;border-radius:99px;background:#e0f2fe;color:var(--blue);font-weight:700}.privacy-ok{color:#166534;font-weight:700}.privacy-warning{color:#92400e;font-weight:700}
@media (min-width:700px){.modal-layer{align-items:center}.modal-card{border-radius:22px}}
.brand-copy{min-width:0}.account-tools{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:5px;flex-wrap:wrap}.account-tools #logout{margin-left:0;padding:8px 9px;font-size:11px}.language-picker{display:flex;align-items:center;gap:5px;margin:0;font-size:10px;color:var(--muted)}.language-picker select{width:auto;min-width:58px;margin:0;padding:7px 22px 7px 7px;border-radius:9px;font-size:11px;font-weight:800}.clinical-language-note{font-size:11px;color:#475569;background:#f8fafc;border:1px solid var(--line);border-radius:10px;padding:8px 10px}.shell:lang(zh),html[lang="zh-CN"] body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei","Segoe UI",sans-serif}@media(max-width:360px){.language-picker>span{display:none}.account-tools #logout{max-width:68px;overflow:hidden;text-overflow:ellipsis}}

.accessibility-toggle,.header-message{position:relative;display:grid;grid-template-columns:auto auto;align-items:center;justify-content:center;gap:3px;min-height:42px;margin:0;padding:6px 9px;border:1px solid #bae6fd;border-radius:12px;background:#fff;color:var(--blue);box-shadow:none}
.accessibility-toggle>span,.header-message>span{font-size:15px;line-height:1;font-weight:950;color:var(--blue)}
.accessibility-toggle small,.header-message small{display:block;font-size:11px;line-height:1.1;font-weight:850;color:var(--blue)}
.accessibility-toggle.active{border-color:var(--teal);background:#ecfdf5;color:var(--teal)}
.accessibility-toggle.active>span,.accessibility-toggle.active small{color:var(--teal)}
.header-message{padding-right:12px}
.header-message[hidden]{display:none}
.account-tools #logout[hidden]{display:none}
.message-badge{position:absolute;right:-5px;top:-7px;display:flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border:2px solid #fff;border-radius:999px;background:#dc2626;color:#fff;font-size:11px;line-height:1;font-weight:900}
.logout-icon{display:none}

/* Patient mobile hierarchy and touch ergonomics */
body{font-size:15px;line-height:1.55}
.shell{padding:12px 14px calc(88px + env(safe-area-inset-bottom));overflow-x:hidden}
header{min-height:46px;margin-bottom:12px}
header .brand{width:40px;height:40px;border-radius:12px}
header strong{font-size:15px;line-height:1.2}

.card,.hero{border-radius:18px;padding:16px;margin-bottom:12px}
.hero{padding:18px 16px 16px;box-shadow:0 8px 24px rgba(7,89,133,.12)}
.hero{display:flex;min-width:0;height:auto;min-height:0;overflow:visible;flex-direction:column}
.hero>p{font-size:13px;line-height:1.3;margin-bottom:6px;font-weight:750;letter-spacing:.01em}
.hero h1{position:static;max-width:100%;max-height:none;margin:0 0 16px;font-size:clamp(22px,6.7vw,27px);line-height:1.2;letter-spacing:-.025em;overflow:visible;overflow-wrap:anywhere;text-wrap:balance}
.hero-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.hero-actions button{position:static;width:100%;min-width:0;min-height:48px;height:auto;padding:12px 10px;border-radius:13px;font-size:14px;line-height:1.25;overflow:visible;overflow-wrap:anywhere;white-space:normal}

button{min-height:46px;padding:12px 15px;border-radius:12px;font-size:14px;line-height:1.25;touch-action:manipulation}
input,select,textarea{min-height:48px;padding:12px 13px;border-radius:12px;font-size:16px}
textarea{min-height:92px}
.quick-actions{display:grid;grid-template-columns:1fr;gap:9px}
.quick-actions button{width:100%;min-width:0;min-height:48px}

.profile-summary{padding:15px 16px}
.profile-summary h2{margin:0 0 3px;font-size:20px;line-height:1.25}
.profile-summary .profile-role{display:inline-flex;margin:0 0 8px;padding:3px 9px;border-radius:999px;background:#e0f2fe;color:var(--blue);font-size:12px;font-weight:800}
.profile-summary>p:last-child{margin:0;color:#475569;font-size:13px;line-height:1.55}

.privacy-center{padding:15px}
.privacy-center .section-head{align-items:flex-start}
.privacy-center .eyebrow{margin-bottom:3px;font-size:13px}
.privacy-center h2{font-size:19px;line-height:1.3}
.privacy-center>.muted{margin-bottom:12px;font-size:12.5px;line-height:1.5}
.privacy-shield{width:38px;height:38px;flex:0 0 38px;border-radius:13px}
.permission-row{grid-template-columns:24px minmax(0,1fr) auto;gap:10px;margin:8px 0;padding:11px 12px;border-radius:14px;align-items:center}
.permission-row input{width:21px;height:21px;margin:0}
.permission-row span b{font-size:14px;line-height:1.3}
.permission-row span small{font-size:11.5px;line-height:1.45}
.permission-row em{align-self:start;font-size:10px}
.privacy-center form>button{min-height:50px;margin-top:12px;font-size:14px}

.view>h2{margin-bottom:7px;font-size:20px;line-height:1.3}
.item{padding:14px;border-radius:15px}
.item h3{font-size:15px;line-height:1.35}
.item p,.muted{font-size:12.5px;line-height:1.55}
.list{gap:10px}

nav{width:min(430px,100%);min-height:72px;grid-template-columns:repeat(5,minmax(0,1fr));padding:7px 7px calc(7px + env(safe-area-inset-bottom));gap:4px;box-shadow:0 -8px 24px rgba(15,23,42,.08)}
nav button{min-width:0;min-height:56px;padding:9px 3px;border-radius:14px;font-size:15px;font-weight:850;line-height:1.15;white-space:normal}
nav button.active{background:#dff2ff;color:#03638f}

.modal-card form>button{min-height:50px}

@media(max-width:374px){
  .shell{padding-inline:11px}
  .hero h1{font-size:21px}
  .hero-actions{grid-template-columns:1fr}
  .hero-actions button{min-height:46px}
  nav button{font-size:14px;padding-inline:1px}
  .permission-row{grid-template-columns:22px minmax(0,1fr) auto;padding-inline:10px}
}

/* Persistent large-text mode for low-vision and presbyopic users. */
html.large-text body{font-size:18px;line-height:1.65}
html.large-text .shell{max-width:480px;padding-bottom:calc(102px + env(safe-area-inset-bottom))}
html.large-text button{min-height:54px;padding:14px 16px;font-size:17px;line-height:1.35}
html.large-text input,html.large-text select,html.large-text textarea{min-height:56px;font-size:18px;line-height:1.45}
html.large-text .hero h1{font-size:clamp(27px,7.5vw,34px);line-height:1.25}
html.large-text .hero>p,html.large-text .profile-summary>p:last-child{font-size:16px}
html.large-text .view>h2{font-size:24px}
html.large-text .item h3,html.large-text .permission-row span b{font-size:18px}
html.large-text .item p,html.large-text .muted,html.large-text .permission-row span small,html.large-text .clinical-language-note{font-size:16px;line-height:1.65}
html.large-text .tag,html.large-text .status,html.large-text .permission-row em{font-size:13px}
html.large-text nav{width:min(480px,100%);min-height:86px}
html.large-text nav button{min-height:68px;padding:10px 2px;font-size:17px}
html.large-text .accessibility-toggle,html.large-text .header-message{min-height:48px;padding:7px 10px}
html.large-text .accessibility-toggle small,html.large-text .header-message small{font-size:13px}

@media(max-width:390px){
  .brand-copy span{display:none}
  .language-picker>span{display:none}
  .account-tools{gap:4px}
  .accessibility-toggle,.header-message{padding-inline:7px}
  .account-tools #logout{display:grid;place-items:center;width:44px;min-width:44px;min-height:44px;padding:0;border-radius:12px}
  .account-tools #logout .logout-icon{display:block;color:#fff;font-size:21px;line-height:1}
  .account-tools #logout .logout-label{display:none}
  html[lang="fr"] .hero h1,html[lang="en"] .hero h1{font-size:clamp(21px,6.1vw,25px);hyphens:auto}
  html.large-text[lang="fr"] .hero h1,html.large-text[lang="en"] .hero h1{font-size:clamp(25px,7vw,30px)}
}

@media(min-width:400px){
  .hero{padding:19px 18px 17px}
  .card{padding:17px}
  .quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .quick-actions button:last-child:nth-child(odd){grid-column:1/-1}
}
