:root {
    color-scheme: light;
    --green-900: #18352d;
    --green-800: #174f3d;
    --green-700: #176b4d;
    --green-100: #dcece5;
    --green-50: #edf6f1;
    --ink: #18352d;
    --muted: #64736d;
    --canvas: #f5f8f6;
    --surface: #ffffff;
    --border: #dfe8e3;
    --amber: #e1a23a;
    --blue: #4f78a8;
    --danger: #a63d40;
    --shadow: 0 18px 45px rgba(24, 53, 45, 0.08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-size: 16px;
    line-height: 1.5;
}

button, input, select { font: inherit; }
a { color: inherit; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(1.85rem, 4vw, 2.65rem); line-height: 1.12; letter-spacing: -0.035em; }
h2 { margin-bottom: 6px; font-size: 1.06rem; }

.eyebrow {
    margin-bottom: 7px;
    color: var(--green-700);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-size: 1.08rem;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 13px;
    color: white;
    background: var(--green-700);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: -.03em;
}

.brand-mark-large { width: 68px; height: 68px; margin: 0 auto 22px; border-radius: 23px; font-size: 1.2rem; }

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 19px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-weight: 750;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.button:hover { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(23, 107, 77, .24); outline-offset: 2px; }
.button-primary { color: white; background: var(--green-700); box-shadow: 0 8px 20px rgba(23, 107, 77, .18); }
.button-primary:hover { background: var(--green-800); }
.button-secondary { border-color: var(--border); background: var(--surface); }
.button-compact { min-height: 40px; padding: 8px 13px; font-size: .78rem; }
.button-block { width: 100%; }

.icon-button {
    display: inline-grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: var(--ink);
    background: white;
    font-weight: 800;
}

.text-link { color: var(--green-700); font-weight: 750; text-decoration: none; }

.auth-shell {
    display: grid;
    min-height: 100vh;
    padding: 34px 20px;
    place-items: center;
    background:
        radial-gradient(circle at 14% 14%, rgba(225, 162, 58, .13), transparent 24rem),
        radial-gradient(circle at 88% 86%, rgba(23, 107, 77, .14), transparent 28rem),
        var(--canvas);
}

.auth-card {
    width: min(100%, 450px);
    padding: clamp(28px, 6vw, 46px);
    border: 1px solid var(--border);
    border-radius: 28px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow);
}

.auth-heading { margin-bottom: 28px; text-align: center; }
.auth-heading h1 { font-size: 2rem; }
.auth-heading p:last-child { margin: 0; color: var(--muted); }
.form-stack { display: grid; gap: 18px; }

.field { display: grid; gap: 7px; color: var(--ink); font-size: .9rem; font-weight: 700; }
.field small { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #d5e0da;
    border-radius: 13px;
    color: var(--ink);
    background: white;
    outline: none;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(23, 107, 77, .09); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 68px; }
.password-toggle { position: absolute; top: 6px; right: 7px; bottom: 6px; border: 0; color: var(--green-700); background: transparent; font-size: .82rem; font-weight: 800; }
.check-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .88rem; }
.check-row input { width: 18px; height: 18px; accent-color: var(--green-700); }
.privacy-note { margin: 24px 0 0; color: var(--muted); font-size: .78rem; text-align: center; }

.alert { margin-bottom: 18px; padding: 13px 15px; border-radius: 13px; font-size: .9rem; }
.alert-error { color: #7d2529; background: #fbe9e9; }
.alert-success { color: var(--green-800); background: var(--green-100); }
.alert ul { margin-bottom: 0; padding-left: 20px; }

.patient-header {
    display: flex;
    min-height: 74px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px max(20px, calc((100vw - 1160px) / 2));
    border-bottom: 1px solid var(--border);
    background: rgba(245, 248, 246, .93);
    backdrop-filter: blur(12px);
}
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-actions form { margin: 0; }
.user-greeting { color: var(--muted); font-size: .88rem; }

.patient-main { width: min(100% - 40px, 1160px); margin: 0 auto; padding: 50px 0 70px; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 32px; }
.welcome-row > div { max-width: 700px; }
.welcome-row p:last-child { max-width: 600px; margin-bottom: 0; color: var(--muted); }

.patient-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.patient-card {
    display: block;
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    transition: transform .18s ease, box-shadow .18s ease;
}
.patient-card-link { color: inherit; text-decoration: none; }
.patient-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.patient-card-head { display: flex; align-items: center; gap: 13px; }
.avatar { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--green-800); background: var(--green-100); font-weight: 850; }
.avatar-small { width: 36px; height: 36px; font-size: .8rem; }
.patient-title { min-width: 0; flex: 1; }
.patient-title h2 { overflow: hidden; margin: 0; text-overflow: ellipsis; white-space: nowrap; }
.patient-title p { margin: 2px 0 0; color: var(--muted); font-size: .78rem; }
.blood-chip { padding: 6px 9px; border-radius: 99px; color: var(--green-800); background: var(--green-50); font-size: .78rem; font-weight: 800; }
.patient-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; }
.patient-facts > div { padding: 12px; border-radius: 13px; background: var(--canvas); }
.patient-facts dt { color: var(--muted); font-size: .72rem; }
.patient-facts dd { margin: 3px 0 0; font-size: .88rem; font-weight: 750; }
.patient-card-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); }
.privacy-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-700); box-shadow: 0 0 0 4px var(--green-100); }
.card-arrow { color: var(--green-700); font-size: 1.5rem; }

.empty-card { padding: 54px 24px; border: 1px solid var(--border); border-radius: 24px; background: white; text-align: center; }
.empty-card p { color: var(--muted); }
.empty-icon { display: grid; width: 64px; height: 64px; margin: 0 auto 18px; place-items: center; border-radius: 21px; color: var(--green-700); background: var(--green-100); font-size: 2rem; }
.safety-banner { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 20px; border-radius: 18px; color: var(--green-800); background: var(--green-100); }
.safety-banner h2, .safety-banner p { margin-bottom: 0; }
.safety-banner p { margin-top: 3px; font-size: .88rem; }
.safety-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: white; background: var(--green-700); font-weight: 900; }

.patient-form-page { max-width: 850px; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--green-700); font-weight: 750; text-decoration: none; }
.form-card { padding: clamp(24px, 5vw, 44px); border: 1px solid var(--border); border-radius: 26px; background: white; box-shadow: var(--shadow); }
.form-heading { margin-bottom: 30px; }
.form-heading p:last-child { margin-bottom: 0; color: var(--muted); }
.profile-form { display: grid; gap: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-span-2 { grid-column: span 2; }
.form-section { padding-top: 26px; border-top: 1px solid var(--border); }
.form-section h2 { margin-bottom: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 8px; }

.care-context { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr); gap: 18px; align-items: end; padding: 18px; border-radius: 17px; background: var(--green-50); }
.care-context-note { display: flex; gap: 10px; color: var(--green-800); font-size: .82rem; }
.care-context-note span { font-size: 1.2rem; }
.care-context-note p { margin: 0; }

/* Patient record and household sharing */
.record-page { max-width: 1160px; }
.record-hero { display: flex; align-items: center; gap: 18px; padding: 25px; border: 1px solid var(--border); border-radius: 23px; background: white; }
.avatar-large { width: 62px; height: 62px; font-size: 1.25rem; }
.record-identity { min-width: 0; flex: 1; }
.record-identity h1 { margin-bottom: 3px; font-size: clamp(1.65rem, 3vw, 2.2rem); }
.record-identity p:last-child { margin: 0; color: var(--muted); font-size: .85rem; }
.record-nav { display: flex; gap: 5px; margin: 18px 0; padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: white; }
.record-nav button { display: inline-flex; min-height: 42px; align-items: center; gap: 7px; padding: 8px 15px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: .82rem; font-weight: 750; }
.record-nav button:hover { color: var(--green-800); background: var(--green-50); }
.record-nav button[aria-selected="true"] { color: white; background: var(--green-700); box-shadow: 0 5px 13px rgba(23, 107, 77, .18); }
.record-nav button span { display: inline-grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border-radius: 99px; color: inherit; background: rgba(100, 115, 109, .1); font-size: .67rem; }
.record-nav button[aria-selected="true"] span { background: rgba(255, 255, 255, .18); }
.record-panels { display: grid; }
.record-panels > [hidden] { display: none; }
.record-section, .sharing-panel, .shared-section { padding: 24px; border: 1px solid var(--border); border-radius: 20px; background: white; }
.sharing-panel { position: static; }
.sharing-panel > p:not(.eyebrow) { color: var(--muted); font-size: .84rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 1.12rem; }
.section-heading .eyebrow { margin-bottom: 3px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.summary-item { padding: 14px; border-radius: 14px; background: var(--canvas); }
.summary-item span, .summary-item strong { display: block; }
.summary-item span { color: var(--muted); font-size: .7rem; }
.summary-item strong { margin-top: 4px; font-size: .9rem; }
.summary-emphasis { color: white; background: var(--green-700); }
.summary-emphasis span { color: rgba(255, 255, 255, .75); }
.summary-emphasis strong { font-size: 1.2rem; }
.clinical-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.clinical-summary { display: flex; gap: 11px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; }
.clinical-summary h3, .clinical-summary p { margin: 0; }
.clinical-summary h3 { font-size: .82rem; }
.clinical-summary p { margin-top: 3px; color: var(--muted); font-size: .73rem; }
.clinical-icon { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--green-700); background: var(--green-100); font-size: .67rem; font-weight: 900; }
.record-count, .status-chip { padding: 5px 8px; border-radius: 99px; color: var(--green-800); background: var(--green-50); font-size: .7rem; font-weight: 800; }
.timeline { display: grid; }
.timeline-item { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; top: 18px; bottom: -4px; left: 5px; width: 1px; background: var(--border); }
.timeline-dot { z-index: 1; width: 11px; height: 11px; margin-top: 6px; border: 3px solid var(--green-100); border-radius: 50%; background: var(--green-700); }
.timeline-card { margin-bottom: 17px; padding: 15px; border-radius: 14px; background: var(--canvas); }
.timeline-card > p { margin-bottom: 7px; font-size: .8rem; }
.timeline-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.timeline-heading h3, .timeline-heading p { margin: 0; }
.timeline-heading h3 { font-size: .88rem; }
.timeline-heading p { color: var(--muted); font-size: .7rem; }
.observation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.observation-grid > div { padding: 8px; border-radius: 9px; background: white; }
.observation-grid dt { color: var(--muted); font-size: .65rem; }
.observation-grid dd { margin: 2px 0 0; font-size: .78rem; font-weight: 750; }
.empty-inline { padding: 30px 15px; color: var(--muted); text-align: center; }
.empty-inline div { font-size: 1.7rem; }
.empty-inline h3 { margin: 7px 0 3px; color: var(--ink); font-size: .9rem; }
.empty-inline p { margin: 0; font-size: .78rem; }
.active-shares, .household-access { margin-top: 24px; padding-top: 19px; border-top: 1px solid var(--border); }
.active-shares h3, .household-access h3 { margin: 0 0 12px; font-size: .82rem; }
.active-share { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.active-share strong, .active-share span { display: block; }
.active-share strong { font-size: .73rem; }
.active-share span { color: var(--muted); font-size: .66rem; }
.text-button-danger { padding: 3px; border: 0; color: var(--danger); background: transparent; font-size: .7rem; font-weight: 800; }
.sharing-note { display: flex; gap: 9px; margin-top: 16px; padding: 12px; border-radius: 12px; color: var(--green-800); background: var(--green-50); }
.sharing-note p { margin: 0; font-size: .71rem; }
.household-heading { display: flex; align-items: center; justify-content: space-between; }
.small-action { border: 0; color: var(--green-700); background: transparent; font-size: .72rem; font-weight: 800; }
.caregiver-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.caregiver-row strong, .caregiver-row span { display: block; }
.caregiver-row strong { font-size: .72rem; }
.caregiver-row span { color: var(--muted); font-size: .63rem; }
.caregiver-row .avatar { width: 34px; height: 34px; }
.share-result { margin-bottom: 18px; padding: 20px; border: 1px solid #b9d9ca; border-radius: 18px; background: var(--green-50); }
.share-result h2 { margin-bottom: 4px; }
.share-result p:last-child { margin-bottom: 14px; color: var(--muted); font-size: .8rem; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { min-width: 0; flex: 1; padding: 11px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.share-dialog { width: min(92vw, 540px); padding: 0; border: 0; border-radius: 23px; color: var(--ink); box-shadow: 0 30px 90px rgba(20, 45, 37, .28); }
.share-dialog::backdrop { background: rgba(15, 36, 30, .55); backdrop-filter: blur(3px); }
body.has-dialog-open { overflow: hidden; }
body.has-dialog-open::before { content: ""; position: fixed; inset: 0; z-index: 999; background: rgba(15, 36, 30, .55); backdrop-filter: blur(3px); }
.share-dialog.dialog-fallback-open { position: fixed; inset: 50% auto auto 50%; z-index: 1000; display: block; max-height: min(90vh, 900px); margin: 0; overflow: auto; transform: translate(-50%, -50%); }
.share-dialog form { padding: 25px; }
.share-dialog > form > p { color: var(--muted); font-size: .84rem; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dialog-heading h2 { margin: 0; font-size: 1.3rem; }
.dialog-close { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 10px; background: white; font-size: 1.25rem; }
.scope-list, .permission-list { display: grid; gap: 8px; margin: 20px 0; padding: 0; border: 0; }
.scope-list legend, .permission-list legend { margin-bottom: 8px; font-size: .8rem; font-weight: 800; }
.scope-list label, .permission-list label { display: flex; gap: 11px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.scope-list input, .permission-list input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green-700); }
.scope-list strong, .scope-list small, .permission-list strong, .permission-list small { display: block; }
.scope-list strong, .permission-list strong { font-size: .8rem; }
.scope-list small, .permission-list small { color: var(--muted); font-size: .68rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.permission-callout { display: flex; gap: 11px; align-items: flex-start; margin: 15px 0; padding: 13px; border-radius: 13px; color: var(--green-800); background: var(--green-50); }
.permission-callout input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green-700); }
.permission-callout strong, .permission-callout small { display: block; }
.permission-callout strong { font-size: .8rem; }
.permission-callout small { margin-top: 2px; font-size: .68rem; }
.section-intro { margin: -6px 0 18px; color: var(--muted); font-size: .8rem; }
.medication-list { display: grid; gap: 10px; }
.medication-card { padding: 15px; border: 1px solid var(--border); border-radius: 15px; background: var(--canvas); }
.medication-main { display: flex; gap: 11px; }
.medication-main h3, .medication-main p { margin: 0; }
.medication-main h3 { font-size: .9rem; }
.medication-main h3 span { color: var(--muted); font-weight: 600; }
.medication-main p { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.medication-symbol { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; color: white; background: var(--green-700); font-size: .69rem; font-weight: 900; }
.medication-meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 12px; color: var(--muted); font-size: .67rem; }
.source-chip { padding: 5px 8px; border-radius: 99px; color: #765019; background: #faedcf; font-size: .67rem; font-weight: 800; }
.nda-chip, .unlisted-chip { padding: 5px 8px; border-radius: 99px; font-size: .64rem; font-weight: 800; }
.nda-chip { color: var(--green-800); background: var(--green-100); }
.unlisted-chip { color: var(--muted); background: #e8edeb; }
.status-completed, .status-stopped { color: var(--muted); background: #e8edeb; }
.medication-provenance { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); color: var(--muted); font-size: .67rem; }
.medication-dialog { width: min(94vw, 720px); }
.medication-form-grid { margin-top: 18px; }
.pharmacy-entry-form { margin-top: 22px; padding: 18px; border: 1px solid #d5e6dc; border-radius: 16px; background: var(--green-50); }
.pharmacy-entry-form .form-heading { margin-bottom: 0; }
.pharmacy-entry-form .button { margin-top: 18px; }
.medication-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.medication-actions form { margin: 0; }
.photo-button { position: relative; overflow: hidden; }
.photo-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.medication-provenance a { color: var(--green-700); font-weight: 750; }
.scan-review-page { max-width: 1100px; }
.scan-review-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.scan-review-header > div { max-width: 700px; }
.scan-review-header p:last-child { margin: 0; color: var(--muted); }
.review-required { padding: 7px 10px; border-radius: 99px; color: #765019; background: #faedcf; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.scan-review-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.scan-photo-panel, .scan-confirm-panel { padding: 20px; border: 1px solid var(--border); border-radius: 20px; background: white; }
.scan-photo-panel img { display: block; width: 100%; max-height: 520px; object-fit: contain; border-radius: 14px; background: var(--canvas); }
.scan-safety-note { margin-top: 15px; padding: 13px; border-radius: 13px; color: #6f511f; background: #fbf1dc; }
.scan-safety-note p { margin: 3px 0 0; font-size: .75rem; }
.ocr-details { margin-top: 13px; font-size: .78rem; }
.ocr-details summary { color: var(--green-700); font-weight: 800; }
.ocr-details pre { overflow: auto; max-height: 230px; padding: 12px; border-radius: 12px; white-space: pre-wrap; color: var(--muted); background: var(--canvas); font: .72rem/1.5 ui-monospace, monospace; }
.confirmation-check { display: flex; gap: 10px; margin-top: 18px; padding: 13px; border-radius: 13px; color: var(--green-800); background: var(--green-50); }
.confirmation-check p { margin: 0; font-size: .75rem; }
.drug-picker { display: grid; gap: 9px; }
.drug-picker > .field { gap: 5px; }
.drug-picker > .field small { color: var(--muted); font-size: .68rem; font-weight: 500; }
.drug-search-status { color: var(--muted); font-size: .7rem; }
.drug-search-results { display: grid; max-height: 245px; overflow-y: auto; gap: 6px; }
.drug-result { display: grid; width: 100%; gap: 2px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.drug-result:hover, .drug-result:focus-visible { border-color: var(--green-700); background: var(--green-50); outline: none; }
.drug-result strong { font-size: .78rem; }
.drug-result span, .drug-result small { color: var(--muted); font-size: .68rem; }
.selected-drug { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px 12px; border: 1px solid #9ac8b5; border-radius: 12px; color: var(--green-800); background: var(--green-50); }
.selected-drug > span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: white; background: var(--green-700); font-weight: 900; }
.selected-drug strong, .selected-drug small { display: block; }
.selected-drug strong { font-size: .77rem; }
.selected-drug small { margin-top: 2px; color: var(--muted); font-size: .66rem; }
.selected-drug button { border: 0; color: var(--green-700); background: transparent; font-size: .7rem; font-weight: 800; cursor: pointer; }
.unlisted-drug { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 12px; cursor: pointer; }
.unlisted-drug input { margin-top: 3px; accent-color: var(--green-700); }
.unlisted-drug strong, .unlisted-drug small { display: block; }
.unlisted-drug strong { font-size: .72rem; }
.unlisted-drug small { margin-top: 2px; color: var(--muted); font-size: .65rem; line-height: 1.4; }

/* Shared doctor record */
.shared-shell { display: grid; min-height: 100vh; padding: 35px 18px; place-items: center; background: radial-gradient(circle at top, rgba(23,107,77,.13), transparent 28rem), var(--canvas); }
.shared-access-card { width: min(100%, 500px); padding: clamp(26px, 6vw, 44px); border: 1px solid var(--border); border-radius: 26px; background: white; box-shadow: var(--shadow); text-align: center; }
.shared-access-card > p:not(.eyebrow):not(.privacy-note) { color: var(--muted); }
.shared-access-card .form-stack { margin-top: 23px; text-align: left; }
.scope-preview { margin: 20px 0; padding: 13px; border-radius: 13px; background: var(--green-50); }
.scope-preview strong { font-size: .78rem; }
.scope-preview p { margin: 3px 0 0; color: var(--green-800); font-size: .75rem; }
.shared-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px max(18px, calc((100vw - 950px) / 2)); border-bottom: 1px solid var(--border); background: white; }
.shared-expiry { padding: 7px 10px; border-radius: 99px; color: #865c17; background: #faedcf; font-size: .72rem; font-weight: 750; }
.shared-record-main { width: min(100% - 36px, 1100px); margin: 0 auto; padding: 28px 0 60px; }
.shared-nav { position: sticky; top: 0; z-index: 20; display: flex; gap: 6px; margin: 0 0 18px; padding: 8px; overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: rgba(255, 255, 255, .94); }
.shared-nav a { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: .82rem; font-weight: 750; text-decoration: none; }
.shared-nav a[aria-current="page"] { color: white; background: var(--green-700); }
.shared-section, .shared-add { scroll-margin-top: 76px; }
.shared-brief { display: grid; gap: 8px; }
.shared-brief p { margin: 0; }
.shared-brief .is-alert { padding: 10px 12px; border-radius: 12px; background: #fbf6e8; }
.shared-reason { margin: 12px 0 0; font-size: .98rem; }
.shared-vitals { margin: 6px 0 0; color: var(--muted); }
.shared-visit-note { margin-top: 12px; }
.shared-med-lines { display: grid; margin: 0; padding: 0; list-style: none; }
.shared-med-lines li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.shared-past, .shared-add { margin-top: 14px; }
.shared-past summary, .shared-add summary { cursor: pointer; font-weight: 750; }
.shared-add form { margin-top: 14px; }
.shared-add .button { margin-top: 14px; }
.shared-visit-workspace { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.shared-visit-index { display: grid; gap: 8px; position: sticky; top: 68px; }
.shared-visit-index button { display: grid; gap: 2px; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: white; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.shared-visit-index button.is-selected { border-color: var(--green-700); background: var(--green-50); }
.shared-visit-index strong { font-size: .86rem; }
.shared-visit-index small { color: var(--muted); font-size: .72rem; }
@media (max-width: 800px) {
    .shared-visit-workspace { grid-template-columns: 1fr; }
    .shared-visit-index { position: static; display: flex; overflow-x: auto; }
    .shared-visit-index button { flex: 0 0 220px; }
}
.shared-record-intro { margin-bottom: 24px; }
.shared-record-intro p:last-child { color: var(--muted); }
.shared-section { margin-top: 18px; }
.shared-patient-meta, .shared-share-line { color: var(--muted); }
.shared-share-line { margin-top: 6px; font-size: .84rem; }
.shared-glance { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.shared-glance article { padding: 14px 16px; border-radius: 14px; background: var(--canvas); }
.shared-glance h3 { margin: 0; color: var(--muted); font-size: .72rem; font-weight: 750; }
.shared-glance p { margin: 4px 0 0; font-size: .95rem; }
.shared-glance .is-alert { background: #fbf6e8; }
.shared-visit-list, .shared-med-group .medication-list { display: grid; gap: 12px; }
.shared-visit { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--canvas); }
.shared-visit header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.shared-visit h3 { margin: 2px 0; font-size: 1rem; }
.shared-visit-kicker, .shared-visit-meta { margin: 0; color: var(--muted); font-size: .78rem; }
.shared-follow { margin: 12px 0 0; color: var(--muted); font-size: .78rem; }
.shared-visit-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 14px 0 0; }
.shared-visit-facts dt { color: var(--muted); font-size: .68rem; }
.shared-visit-facts dd { margin: 2px 0 0; font-size: .88rem; }
.shared-visit-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.shared-visit-note { padding: 12px 14px; border-radius: 12px; background: white; }
.shared-visit-note h4 { margin: 0 0 6px; font-size: .72rem; letter-spacing: .03em; text-transform: uppercase; }
.shared-visit-note p, .shared-visit-note li { margin: 0 0 4px; font-size: .86rem; }
.shared-med-group { margin-top: 8px; }
.shared-med-group + .shared-med-group { margin-top: 18px; }
.shared-med-group h3 { margin: 0 0 8px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 700px) {
    .shared-glance, .shared-visit-facts, .shared-visit-columns { grid-template-columns: 1fr; }
}
.shared-clinical-grid { grid-template-columns: 1fr 1fr; }
.shared-disclaimer { margin-top: 18px; padding: 16px; border-radius: 14px; color: #6f511f; background: #fbf1dc; }
.shared-disclaimer p { margin: 3px 0 0; font-size: .78rem; }

/* Analytics dashboard */
.dashboard-surface { background: #f2f5f3; }
.dashboard-shell { display: grid; min-height: 100vh; grid-template-columns: 250px minmax(0, 1fr); }
.dashboard-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 24px 18px; color: #eaf3ee; background: var(--green-900); }
.dashboard-brand { padding: 0 10px; color: white; }
.dashboard-brand .brand-mark { color: var(--green-900); background: #e7b451; }
.dashboard-nav { display: grid; gap: 5px; margin-top: 46px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 12px; color: #bad0c7; font-size: .9rem; font-weight: 650; text-decoration: none; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(255, 255, 255, .1); }
.nav-item span { width: 20px; text-align: center; }
.sidebar-user { display: grid; grid-template-columns: 36px minmax(0, 1fr) 38px; gap: 10px; align-items: center; margin-top: auto; padding: 16px 10px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.sidebar-user strong, .sidebar-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: .79rem; }
.sidebar-user span { color: #9fb9ae; font-size: .7rem; }
.icon-button-dark { width: 36px; height: 36px; border-color: rgba(255,255,255,.12); color: white; background: rgba(255,255,255,.08); }
.dashboard-main { min-width: 0; padding: 35px clamp(20px, 4vw, 54px) 60px; }
.dashboard-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.dashboard-topbar h1 { margin-bottom: 4px; font-size: clamp(1.8rem, 3vw, 2.35rem); }
.dashboard-topbar p:last-child { margin-bottom: 0; color: var(--muted); }
.date-pill, .panel-note, .live-chip { padding: 7px 10px; border: 1px solid var(--border); border-radius: 99px; color: var(--muted); background: white; font-size: .72rem; white-space: nowrap; }
.menu-button { display: none; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 18px; }
.metric-card { padding: 19px; border: 1px solid var(--border); border-radius: 18px; background: white; }
.metric-card p { margin: 13px 0 2px; color: var(--muted); font-size: .79rem; }
.metric-card strong { display: block; font-size: 1.65rem; line-height: 1.15; letter-spacing: -.03em; }
.metric-card > span { color: var(--muted); font-size: .7rem; }
.metric-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 11px; font-weight: 900; }
.metric-icon-1 { color: var(--green-700); background: var(--green-100); }
.metric-icon-2 { color: #95681d; background: #faedcf; }
.metric-icon-3 { color: var(--blue); background: #e4edf6; }
.metric-icon-4 { color: #7b5a91; background: #eee5f4; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 18px; margin-top: 18px; }
.shared-with-me { margin-bottom: 18px; }
.shared-account-list { display: grid; gap: 8px; }
.shared-account-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 11px; border: 1px solid var(--border); border-radius: 13px; color: var(--ink); text-decoration: none; }
.shared-account-row:hover { border-color: var(--green-700); background: var(--green-50); }
.shared-account-row strong, .shared-account-row span, .shared-account-row small { display: block; }
.shared-account-row div > span, .shared-account-row small { color: var(--muted); font-size: .7rem; }
.share-recipient-grid { margin: 16px 0; }
.qr-share-preview { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 18px; align-items: center; margin: 20px 0; padding: 16px; border: 1px solid var(--border); border-radius: 17px; background: var(--canvas); }
.qr-share-preview img { width: 128px; height: 128px; border-radius: 10px; background: white; }
.qr-share-preview strong, .qr-share-preview span { display: block; }
.qr-share-preview span { margin: 4px 0 12px; color: var(--muted); font-size: .75rem; }
.qr-dialog { width: min(94vw, 720px); }
.qr-dialog-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: center; }
.qr-code-wrap { padding: 13px; border: 1px solid var(--border); border-radius: 16px; background: white; text-align: center; }
.qr-code-wrap img { display: block; width: 100%; }
.qr-code-wrap small { color: var(--muted); font-size: .68rem; }
.qr-steps ol { margin: 10px 0 12px; padding-left: 20px; color: var(--muted); font-size: .8rem; line-height: 1.8; }
.qr-steps p { padding: 10px; border-radius: 10px; color: var(--green-800); background: var(--green-50); font-size: .72rem; }
.pin-settings-form { display: grid; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.pin-settings-form strong, .pin-settings-form small { display: block; }
.pin-settings-form small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.qr-consent-card { text-align: left; }
.qr-consent-card > .brand-mark, .qr-consent-card > .eyebrow, .qr-consent-card > h1, .qr-consent-card > p { margin-left: auto; margin-right: auto; text-align: center; }
.provider-account-note { display: flex; gap: 10px; align-items: center; margin: 18px 0; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.provider-account-note strong, .provider-account-note small { display: block; }
.provider-account-note small { margin-top: 4px; color: var(--muted); font-size: .75rem; }
.consent-lock { display: grid; width: 48px; height: 48px; margin: 0 auto 12px; place-items: center; border-radius: 50%; color: white; background: var(--green-700); font-size: 1.3rem; font-weight: 900; }
.consent-summary { display: grid; gap: 0; margin: 20px 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.consent-summary div { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.consent-summary div:last-child { border-bottom: 0; }
.consent-summary dt { color: var(--muted); font-size: .7rem; }
.consent-summary dd { margin: 0; font-size: .75rem; font-weight: 750; }
.pin-approval-form > small { color: var(--muted); font-size: .68rem; }
.chart-panel { min-width: 0; padding: 22px; border: 1px solid var(--border); border-radius: 19px; background: white; }
.chart-panel-wide { min-height: 335px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.panel-heading h2 { margin: 0; font-size: 1rem; }
.panel-heading .eyebrow { margin-bottom: 3px; font-size: .65rem; }
.line-chart-wrap { width: 100%; overflow: hidden; }
.line-chart { display: block; width: 100%; height: auto; min-height: 245px; }
.chart-grid-line { stroke: #e5ebe8; stroke-width: 1; }
.trend-line { fill: none; stroke: var(--green-700); stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.trend-area { fill: none; stroke: rgba(23, 107, 77, .1); stroke-width: 16; }
.trend-point { fill: white; stroke: var(--green-700); stroke-width: 3; }
.chart-label { fill: var(--muted); font-size: 12px; }
.chart-value { fill: var(--ink); font-size: 12px; font-weight: 750; }
.donut-layout { display: grid; gap: 22px; place-items: center; }
.donut { display: grid; width: 156px; height: 156px; place-items: center; border-radius: 50%; background: conic-gradient(var(--segments)); }
.donut::before { content: ""; grid-area: 1 / 1; width: 102px; height: 102px; border-radius: 50%; background: white; }
.donut > div { z-index: 1; grid-area: 1 / 1; text-align: center; }
.donut strong, .donut span { display: block; }
.donut strong { font-size: 1.5rem; }
.donut span { color: var(--muted); font-size: .7rem; }
.legend-list { display: grid; width: 100%; gap: 9px; margin: 0; padding: 0; list-style: none; }
.legend-list li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; font-size: .78rem; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }
.bar-chart { display: grid; gap: 15px; }
.bar-label { display: flex; justify-content: space-between; margin-bottom: 5px; font-size: .76rem; }
.bar-label strong { font-variant-numeric: tabular-nums; }
.bar-track { height: 8px; overflow: hidden; border-radius: 99px; background: #ebf0ed; }
.bar-track span { display: block; height: 100%; border-radius: inherit; background: var(--green-700); }
.live-chip { display: inline-flex; align-items: center; gap: 6px; }
.live-chip span { width: 6px; height: 6px; border-radius: 50%; background: var(--green-700); }
.activity-list { display: grid; }
.activity-row { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.activity-row:last-child { border-bottom: 0; }
.activity-row strong, .activity-row span { display: block; }
.activity-row strong { font-size: .78rem; }
.activity-row span { margin-top: 2px; color: var(--muted); font-size: .68rem; }
.activity-mark { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--green-100); box-shadow: inset 0 0 0 2px var(--green-700); }
.empty-copy { color: var(--muted); font-size: .82rem; }

/* Role-separated clinical workspace */
.clinical-main { max-width: 1500px; }
.clinical-role-banner { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; padding: 18px 20px; border: 1px solid #a8d3c1; border-radius: 18px; color: var(--green-900); background: linear-gradient(120deg, var(--green-50), white); }
.clinical-role-banner strong, .clinical-role-banner p { display: block; margin: 0; }
.clinical-role-banner p { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.visit-home-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.visit-home-steps li { padding: 6px 10px; border: 1px solid #d5e5dc; border-radius: 999px; background: white; color: var(--muted); font-size: .78rem; font-weight: 750; }
.visit-home-steps li.is-yours { border-color: var(--green-700); color: white; background: var(--green-700); }
.clinical-role-icon, .clinical-scan-icon { display: grid; place-items: center; flex: 0 0 auto; color: white; background: var(--green-700); font-weight: 900; }
.clinical-role-icon { width: 46px; height: 46px; border-radius: 14px; }
.clinical-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-card .metric-text { overflow: hidden; font-size: 1rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.clinical-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); gap: 18px; align-items: start; }
.clinical-side-stack { display: grid; gap: 18px; }
.clinical-empty { display: grid; min-height: 190px; place-items: center; align-content: center; padding: 25px; border: 1px dashed var(--border); border-radius: 15px; text-align: center; }
.clinical-empty > span { display: grid; width: 42px; height: 42px; margin-bottom: 10px; place-items: center; border-radius: 50%; color: var(--green-700); background: var(--green-100); }
.clinical-empty p { max-width: 430px; margin: 5px 0 0; color: var(--muted); font-size: .76rem; }
.clinical-scan-icon { width: 52px; height: 52px; margin-bottom: 18px; border-radius: 15px; font-size: 1.3rem; }
.scan-guide h2 { margin: 3px 0 12px; font-size: 1.15rem; }
.scan-guide ol { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.shared-account-row.compact { grid-template-columns: 34px minmax(0, 1fr) auto; }

@media (max-width: 1050px) {
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .chart-panel-wide { min-height: auto; }
    .clinical-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    h1 { font-size: 1.75rem; }
    .patient-header { min-height: 66px; }
    .user-greeting { display: none; }
    .patient-main { width: min(100% - 28px, 1160px); padding-top: 32px; }
    .welcome-row { align-items: stretch; flex-direction: column; }
    .welcome-row .button { align-self: flex-start; }
    .patient-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .care-context { grid-template-columns: 1fr; }
    .form-span-2 { grid-column: auto; }
    .form-grid > div:empty { display: none; }
    .form-actions { align-items: stretch; flex-direction: column-reverse; }
    .record-hero { align-items: flex-start; flex-wrap: wrap; }
    .record-hero .button { width: 100%; }
    .summary-grid { grid-template-columns: 1fr 1fr; }
    .clinical-summary-grid { grid-template-columns: 1fr; }
    .copy-row { align-items: stretch; flex-direction: column; }
    .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
    .scan-review-header { align-items: flex-start; flex-direction: column; }
    .scan-review-layout { grid-template-columns: 1fr; }
    .qr-dialog-layout { grid-template-columns: 1fr; }
    .qr-code-wrap { width: min(100%, 300px); margin: 0 auto; }
    .clinical-metrics { grid-template-columns: 1fr; }
    .clinical-role-banner { align-items: flex-start; }

    .dashboard-shell { display: block; }
    .dashboard-sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: 250px; transform: translateX(-100%); transition: transform .2s ease; }
    .dashboard-sidebar.is-open { transform: translateX(0); box-shadow: 20px 0 50px rgba(0,0,0,.2); }
    .dashboard-main { padding: 24px 16px 45px; }
    .dashboard-topbar { align-items: flex-start; }
    .dashboard-topbar .date-pill { display: none; }
    .menu-button { display: inline-grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: white; }
}

@media (max-width: 480px) {
    .header-actions .text-link { display: none; }
    .patient-facts { grid-template-columns: 1fr; }
    .record-nav { overflow-x: auto; }
    .summary-grid { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .metric-card { padding: 15px; }
    .metric-card strong { font-size: 1.4rem; }
    .chart-panel { padding: 17px; }
    .line-chart { min-height: 200px; }
    .qr-share-preview { grid-template-columns: 92px minmax(0, 1fr); }
    .qr-share-preview img { width: 92px; height: 92px; }
    .consent-summary div { grid-template-columns: 1fr; gap: 2px; }
}

.consent-wizard-card { width: min(100%, 680px); }
.listen-button, .handoff-button, .assisted-button { min-height: 64px; font-size: 1.05rem; }
.listen-button { width: 100%; margin-bottom: 16px; border: 0; border-radius: 14px; color: var(--green-900); background: var(--green-100); font-weight: 800; }
.live-step { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.choice-card, .scope-choice { margin: 10px 0; }
.scope-choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 14px; }
.scope-choice strong, .scope-choice small { display: block; }
.scope-choice small { color: var(--muted); font-size: .75rem; }
.scope-choice input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--green-700); }
.yes-no { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.choice-button, .pin-key { min-height: 72px; border-radius: 14px; font-size: 1.15rem; font-weight: 800; }
.choice-button { border: 2px solid transparent; }
.choice-yes { color: white; background: var(--green-700); }
.choice-no { color: var(--danger); background: white; border-color: var(--danger); }
.choice-button.is-selected, .filter-chip.is-selected { outline: 3px solid var(--ink); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 16px; }
.pin-key { border: 1px solid var(--border); background: white; }
.pin-key-muted { color: var(--muted); font-size: .95rem; }
.pin-dots { display: flex; gap: 8px; justify-content: center; margin: 8px 0 4px; }
.pin-dots span { width: 14px; height: 14px; border: 2px solid var(--green-700); border-radius: 50%; }
.pin-dots span.is-filled { background: var(--green-700); }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 12px; }
.filter-chip { min-height: 44px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: white; font-weight: 750; }
.filter-chip.is-selected { color: white; background: var(--green-700); }
.private-status, .visit-entry-form, .biometric-setup { margin-top: 22px; }
.treatment-heading { margin: 18px 0 8px; font-size: .95rem; }
.visit-filters .field { min-width: min(100%, 240px); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.record-page { width: min(100% - 32px, 1240px); }
.record-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.record-toolbar .back-link { margin: 0; }
.record-toolbar-actions { display: flex; align-items: center; gap: 8px; }
.record-menu { position: relative; }
.record-menu summary { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--border); border-radius: 12px; background: white; list-style: none; cursor: pointer; font-size: 1.25rem; }
.record-menu summary::-webkit-details-marker { display: none; }
.record-menu[open] > :not(summary) { position: absolute; right: 0; z-index: 5; display: block; width: 180px; margin-top: 6px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: white; text-align: left; text-decoration: none; box-shadow: var(--shadow); }
.record-page .record-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }
.record-page h1 { margin-bottom: 4px; font-size: 1.7rem; }
.record-identity { min-width: min(100%, 260px); }
.record-identity p:last-child { margin: 0; color: var(--muted); font-size: .86rem; }
.fact-pills { display: flex; flex: 1 1 520px; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.fact-pill { display: flex; align-items: center; gap: 10px; min-width: 168px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 16px; background: #fbfefc; }
.fact-pill small, .fact-pill em { display: block; color: var(--muted); font-size: .72rem; font-style: normal; }
.fact-pill strong { display: block; font-size: .95rem; }
.fact-icon, .visit-kind-icon, .phone-glyph, .phone-row-icon { display: grid; place-items: center; flex: 0 0 auto; background-repeat: no-repeat; }
.fact-icon::before, .visit-kind-icon::before, .phone-glyph::before, .phone-row-icon::before { content: ""; width: 20px; height: 20px; background-color: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.fact-icon { width: 36px; height: 36px; border-radius: 50%; }
.fact-blood { color: #c44755; background-color: #fde8ea; --icon: url("icons/droplet.svg"); }
.fact-allergy { color: #c4881a; background-color: #fff4df; --icon: url("icons/user.svg"); }
.fact-condition { color: #3d7ea6; background-color: #e7f4fb; --icon: url("icons/lungs.svg"); }
.fact-pregnancy { color: #176b4d; background-color: #e5f6ee; --icon: url("icons/pregnant.svg"); }
.record-page .record-nav { gap: 2px; margin: 6px 0 16px; padding: 0; overflow-x: auto; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.record-page .record-nav button { border-radius: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; white-space: nowrap; box-shadow: none; }
.record-page .record-nav button[aria-selected="true"] { color: var(--green-700); background: transparent; box-shadow: none; border-bottom-color: var(--green-700); }
.record-page .record-nav button span { color: var(--green-800); background: var(--green-100); }
.record-page .record-nav button[aria-selected="true"] span { color: white; background: var(--green-700); }
.visit-workspace { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.visit-workspace .filter-row { flex-wrap: nowrap; }
.visit-workspace .filter-chip { min-height: 32px; padding: 3px 8px; font-size: .72rem; }
.visit-list-pane, .visit-detail { padding: 18px; border: 1px solid var(--border); border-radius: 20px; background: white; }
.visit-list-pane h2 { margin-bottom: 12px; }
.visit-workspace .filter-chip.is-selected { outline: 0; color: white; background: var(--green-700); }
.visit-tool-row { display: flex; gap: 8px; align-items: end; margin-bottom: 10px; }
.visit-tool-row .field { flex: 1; margin: 0; }
.hospital-chip { white-space: nowrap; }
.visit-search input { width: 100%; margin-bottom: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.visit-list { display: flex; flex-direction: column; gap: 8px; }
.visit-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: white; text-align: left; cursor: pointer; }
.visit-row.is-selected { border-color: var(--green-700); background: #f3faf6; }
.visit-row-copy { display: flex; min-width: 0; flex-direction: column; }
.visit-row-copy strong { font-size: .92rem; }
.visit-row-copy small { color: var(--muted); font-size: .75rem; }
.visit-chevron { color: var(--muted); font-size: 1.2rem; }
.visit-kind-icon { width: 40px; height: 40px; border-radius: 12px; }
.visit-kind-maternity { color: #c43b73; background-color: #fde7f0; --icon: url("icons/pregnant.svg"); }
.visit-kind-general { color: #176b4d; background-color: #e7f6ee; --icon: url("icons/calendar.svg"); }
.visit-kind-dental { color: #4f78a8; background-color: #e7f2fb; --icon: url("icons/dental.svg"); }
.visit-kind-optical { color: #6b4fa8; background-color: #f3eefe; --icon: url("icons/glasses.svg"); }
.visit-kind-laboratory { color: #3d7ea6; background-color: #e8f4fb; --icon: url("icons/flask-conical.svg"); }
.visit-kind-imaging { color: #556b86; background-color: #eef3f8; --icon: url("icons/image.svg"); }
.visit-detail-head { display: flex; align-items: flex-start; gap: 12px; }
.visit-detail-head p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.visit-detail-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.visit-detail-title h2 { margin: 0; }
.visit-full-record { margin-left: auto; }
.status-finished { color: var(--green-800); background: #e5f6ee; }
.detail-subnav { display: flex; gap: 4px; margin: 16px 0; overflow-x: auto; border-bottom: 1px solid var(--border); }
.detail-subnav button { flex: 1 0 auto; padding: 8px 4px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; white-space: nowrap; font-size: .68rem; font-weight: 750; text-align: center; }
.detail-subnav button[aria-selected="true"] { color: var(--green-700); border-bottom-color: var(--green-700); }
.detail-split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; }
.detail-card, .note-card { padding: 14px; border-radius: 16px; }
.detail-card { border: 1px solid var(--border); }
.detail-card h3, .note-card h3 { margin: 0 0 10px; font-size: .92rem; }
.detail-card-soft { background: #f7fbf8; }
.visit-facts { margin: 0; }
.visit-facts div { display: grid; grid-template-columns: 140px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .84rem; }
.visit-facts dt { color: var(--muted); }
.visit-facts dd { margin: 0; }
.observation-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.observation-tiles article { position: relative; padding: 10px 10px 10px 36px; border-radius: 12px; background: white; }
.observation-tiles span, .observation-tiles em { display: block; color: var(--muted); font-size: .72rem; font-style: normal; }
.observation-tiles strong { font-size: .92rem; white-space: nowrap; }
.observation-tiles em { color: var(--green-700); }
.observation-tiles article::before { content: ""; position: absolute; top: 12px; left: 10px; width: 18px; height: 18px; border-radius: 50%; background: #e7f6ee center / 12px no-repeat; }
.detail-notes { display: grid; grid-template-columns: 1.15fr 1.15fr .8fr; gap: 12px; margin-top: 12px; }
.note-findings { background: #eef4fb; }
.note-plan { background: #fbf6e8; }
.note-follow { border: 1px solid var(--border); background: white; }
.note-card p, .note-card li { margin: 0 0 6px; font-size: .84rem; }
.note-follow strong { display: block; margin-bottom: 8px; }
.visit-add { margin-top: 14px; }
.visit-add summary { cursor: pointer; color: var(--green-700); font-weight: 750; }
.visit-add form { margin-top: 12px; }
@media (max-width: 980px) {
    .visit-workspace, .detail-split, .detail-notes, .fact-pills { display: grid; grid-template-columns: 1fr; }
    .visit-full-record { margin-left: 0; }
}
@media (max-width: 480px) {
    .yes-no, .pin-pad { gap: 8px; }
    .choice-button, .pin-key, .listen-button { min-height: 64px; }
}

.phone-app { display: none; }
.portal-home { background: #f3f7f4; }
.portal-home .phone-app { display: block; min-height: 100dvh; max-width: 480px; margin: 0 auto; padding-bottom: 88px; }
.portal-home .phone-tabbar { left: 50%; right: auto; width: min(480px, 100%); transform: translateX(-50%); }
.record-phone.phone-open .patient-header,
.record-phone.phone-open .record-toolbar,
.record-phone.phone-open .record-hero,
.record-phone.phone-open .record-nav,
.record-phone.phone-open .record-panels { display: none; }
.record-phone.phone-open { background: #f3f7f4; }
.record-phone.phone-open .patient-main { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 0 88px; }
.record-phone.phone-open .phone-app { display: block; min-height: 100dvh; }
.record-phone.phone-open .phone-tabbar { left: 50%; right: auto; width: min(480px, 100%); transform: translateX(-50%); }
.phone-app [hidden] { display: none !important; }
.phone-brandbar, .phone-top { display: flex; align-items: center; gap: 10px; min-height: 56px; }
.phone-logo { color: var(--green-800); font-weight: 850; font-size: 1.15rem; }
.phone-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--green-700); color: white; font-size: .72rem; font-weight: 850; }
.phone-hero h1 { margin: 4px 0 6px; font-size: 1.65rem; line-height: 1.15; }
.phone-hero p { margin: 0 0 14px; color: var(--muted); }
.phone-identity { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; }
.phone-identity article { display: grid; justify-items: center; gap: 2px; text-align: center; }
.phone-identity .ui-icon { color: var(--green-700); }
a.phone-row, a.phone-patient, .phone-brandbar a.avatar { color: inherit; text-decoration: none; }
.phone-brandbar .avatar { width: 34px; height: 34px; border-radius: 50%; font-size: .85rem; }
.phone-top .button { width: auto; height: auto; min-height: 36px; padding: 6px 12px; font-size: .85rem; }
.phone-identity small, .phone-family small { color: var(--muted); font-size: .7rem; }
.phone-family { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.phone-family a, .phone-family button { display: grid; justify-items: center; gap: 2px; min-width: 76px; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: none; }
.phone-family .avatar { width: 46px; height: 46px; }
.phone-add-tile .avatar { color: white; background: var(--green-700); font-size: 1.4rem; }
.phone-rel { margin-left: auto; padding: 4px 10px; border-radius: 99px; background: #e5f6ee; color: var(--green-800); font-size: .75rem; font-weight: 800; }
.phone-subnav { display: flex; gap: 16px; margin-bottom: 12px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.phone-subnav button { flex: 0 0 auto; padding: 10px 0; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 750; }
.phone-subnav button.is-selected { color: var(--green-700); border-bottom-color: var(--green-700); }
.phone-note-plain { margin-top: 12px; padding: 14px; border-radius: 16px; background: #f4f7f5; color: var(--muted); font-size: .84rem; }
.phone-brandbar button, .phone-top button { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-size: 1.3rem; }
.phone-brandbar button[aria-label="Notifications"], .phone-top button[aria-label="Back"], .phone-top button[aria-label="More"] { font-size: 0; }
.phone-brandbar button[aria-label="Notifications"]::before, .phone-top button[aria-label="Back"]::before, .phone-top button[aria-label="More"]::before { content: ""; width: 22px; height: 22px; background-color: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.phone-brandbar button[aria-label="Notifications"] { --icon: url("icons/bell.svg"); }
.phone-top button[aria-label="Back"] { --icon: url("icons/chevron-left.svg"); }
.phone-top button[aria-label="More"] { --icon: url("icons/dots-vertical.svg"); }
.phone-top h1, .phone-brandbar { flex: 1; }
.phone-top h1 { margin: 0; font-size: 1.15rem; }
.phone-patient, .phone-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; margin: 0 0 8px; padding: 14px; border: 0; border-radius: 16px; background: white; text-align: left; }
.phone-patient { border: 1px solid var(--border); }
.phone-patient strong, .phone-row strong { display: block; }
.phone-patient small, .phone-row small, .phone-muted { display: block; color: var(--muted); font-size: .78rem; }
.phone-label { margin: 18px 0 8px; font-size: .95rem; }
.phone-section-head { display: flex; align-items: center; justify-content: space-between; }
.phone-section-head h2 { margin: 0; font-size: .95rem; }
.phone-section-head button { border: 0; background: transparent; color: var(--green-700); font-weight: 750; }
.phone-keygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.phone-keygrid article { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; padding: 12px; border-radius: 16px; background: white; }
.phone-keygrid small { color: var(--muted); font-size: .72rem; }
.phone-keygrid .fact-icon, .phone-glyph { grid-row: span 2; }
.phone-chevron { display: block; width: 18px; height: 18px; color: #8aa094; font-size: 0; background-color: currentColor; -webkit-mask: url("icons/chevron-right.svg") center / contain no-repeat; mask: url("icons/chevron-right.svg") center / contain no-repeat; }
.phone-add { width: calc(100% - 0px); margin: 4px 0 12px; }
.phone-chips { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; }
.phone-app .filter-chip { min-height: 36px; }
.phone-app .filter-chip.is-selected { outline: 0; }
.phone-status { margin-left: 6px; padding: 2px 8px; border-radius: 99px; font-size: .68rem; font-style: normal; font-weight: 800; }
.phone-status-ongoing { color: var(--green-800); background: #e5f6ee; }
.phone-status-resolved { color: #66756e; background: #eef2f0; }
.phone-condition-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.phone-note, .phone-triggers { padding: 14px; border-radius: 16px; }
.phone-note { background: #f3faf6; white-space: pre-line; }
.phone-triggers { margin-top: 14px; background: #fbf6e8; }
.phone-triggers p { margin: 4px 0 0; }
.phone-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.phone-facts dt { color: var(--muted); }
.phone-facts dd { margin: 0; }
.phone-row-static { grid-template-columns: auto minmax(0, 1fr); cursor: default; }
.phone-row-static:has(.phone-chevron) { grid-template-columns: minmax(0, 1fr) auto; }
.phone-search input { width: 100%; margin-bottom: 10px; padding: 12px 12px 12px 40px; border: 1px solid var(--border); border-radius: 12px; background: white url("icons/search.svg") 12px center / 18px no-repeat; }
.phone-glyph, .phone-row-icon { width: 40px; height: 40px; border-radius: 12px; color: var(--green-700); background-color: #e7f6ee; }
.phone-glyph-lungs { color: #3d7ea6; background-color: #e7f4fb; --icon: url("icons/lungs.svg"); }
.phone-glyph-glucose { color: #c43b73; background-color: #fde7f0; --icon: url("icons/heart.svg"); }
.phone-row-shield { color: #176b4d; background-color: #e7f6ee; --icon: url("icons/shield-check.svg"); }
.phone-row-alert { color: #c4881a; background-color: #fff4df; --icon: url("icons/alert-triangle.svg"); }
.phone-glyph-drop { color: #c44755; background-color: #fde8ea; --icon: url("icons/droplet.svg"); }
.phone-glyph-pill, .phone-row-medications { color: #176b4d; background-color: #e7f6ee; --icon: url("icons/pill.svg"); }
.phone-row-calendar { color: #176b4d; background-color: #e7f6ee; --icon: url("icons/calendar.svg"); }
.phone-row-visits { --icon: url("icons/heart.svg"); }
.phone-row-conditions { --icon: url("icons/heart-pulse.svg"); }
.phone-row-laboratory { --icon: url("icons/flask-conical.svg"); }
.phone-row-imaging { --icon: url("icons/image.svg"); }
.phone-row-documents { --icon: url("icons/file-text.svg"); }
.phone-row-immunizations { --icon: url("icons/shield-check.svg"); }
.phone-row-sharing { --icon: url("icons/share-2.svg"); }
.ui-icon { display: block; width: 22px; height: 22px; background-color: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.icon-house { --icon: url("icons/house.svg"); }
.icon-list { --icon: url("icons/list.svg"); }
.icon-plus { --icon: url("icons/plus.svg"); }
.icon-heart { --icon: url("icons/heart.svg"); }
.icon-ellipsis { --icon: url("icons/ellipsis.svg"); }
.icon-users { --icon: url("icons/users.svg"); }
.icon-pin { --icon: url("icons/map-pin.svg"); }
.icon-shield { --icon: url("icons/shield-check.svg"); }
.icon-search { --icon: url("icons/search.svg"); }
.icon-user { --icon: url("icons/user.svg"); }
.icon-bell { --icon: url("icons/bell.svg"); }
.icon-calendar { --icon: url("icons/calendar.svg"); }
.icon-flask { --icon: url("icons/flask-conical.svg"); }
.icon-pill { --icon: url("icons/pill.svg"); }
.icon-qr { --icon: url("icons/qr-code.svg?v=2"); }
.icon-camera { --icon: url("icons/camera.svg"); }
.icon-lock { --icon: url("icons/lock.svg"); }
.icon-info { --icon: url("icons/info.svg"); }
.icon-clipboard { --icon: url("icons/clipboard.svg"); }
.icon-clipboard-list { --icon: url("icons/clipboard-list.svg"); }
.icon-clipboard-check { --icon: url("icons/clipboard-check.svg"); }
.icon-stethoscope { --icon: url("icons/stethoscope.svg"); }
.icon-arrow { --icon: url("icons/arrow-right.svg"); }
.icon-pencil { --icon: url("icons/pencil.svg"); }
.icon-check { --icon: url("icons/check.svg"); }
.icon-file { --icon: url("icons/file.svg"); }
.icon-file-text { --icon: url("icons/file-text.svg"); }
.icon-plus-square { --icon: url("icons/square-plus.svg"); }
.icon-alert { --icon: url("icons/alert-triangle.svg"); }
.icon-chevron { --icon: url("icons/chevron-right.svg"); }
.icon-chevron-left { --icon: url("icons/chevron-left.svg"); }
.icon-chevron-down { --icon: url("icons/chevron-down.svg"); }
.icon-image { --icon: url("icons/image.svg"); }
.icon-zap { --icon: url("icons/zap.svg"); }
.icon-id { --icon: url("icons/id-card.svg"); }
.icon-book { --icon: url("icons/book-open.svg"); }
.icon-bulb { --icon: url("icons/lightbulb.svg"); }
.icon-flag { --icon: url("icons/flag.svg"); }
.icon-phone { --icon: url("icons/phone.svg"); }
.icon-gender { --icon: url("icons/gender.svg"); }
/* Clinical workspace uses the phone layout at every width. */
.clinical-surface { background: #f3f7f4; }
.clinical-surface .dashboard-sidebar,
.clinical-surface .menu-button { display: none; }
.clinical-surface .dashboard-shell { display: block; min-height: 100dvh; background: #f3f7f4; }
.clinical-surface .dashboard-main { width: min(480px, 100%); margin: 0 auto; padding: 16px 16px 108px; }
.clinical-surface .dashboard-topbar { display: flex; flex-wrap: wrap; align-items: flex-start; margin-bottom: 16px; }
.clinical-surface .dashboard-topbar h1 { font-size: 1.7rem; }
.clinical-surface .clinical-grid,
.clinical-surface .clinical-side-stack { display: contents; }
.clinical-surface [data-clinical-screen] { display: block; scroll-margin-top: 12px; }
.clinical-surface .clinical-account { display: block; margin-top: 16px; }
.clinical-surface .clinical-metrics { grid-template-columns: 1fr; }
.clinical-tabbar { position: fixed; z-index: 30; bottom: 0; left: 50%; display: grid; width: min(480px, 100%); grid-template-columns: repeat(4, 1fr); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #e4d78a; background: #f4efb4; transform: translateX(-50%); }
.clinical-tabbar a { display: grid; justify-items: center; gap: 2px; color: #5d6b4a; font-size: .68rem; font-weight: 750; text-decoration: none; }
.clinical-tabbar a[aria-current="page"] { color: var(--green-800); }
.icon-calendar { --icon: url("icons/calendar.svg"); }
.phone-tabbar { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #e4d78a; background: #f4efb4; }
.phone-tabbar button { display: grid; justify-items: center; gap: 2px; border: 0; background: transparent; color: #5d6b4a; font-size: .68rem; font-weight: 750; }
.phone-tabbar button .ui-icon { width: 22px; height: 22px; }
.phone-tabbar button[aria-current="page"] { color: var(--green-800); }
.phone-screen { padding: 8px 16px 24px; }
@media (max-width: 860px) {
    .record-phone .patient-header,
    .record-phone .record-toolbar,
    .record-phone .record-hero,
    .record-phone .record-nav,
    .record-phone .record-panels { display: none; }
    .record-phone .patient-main { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 0 88px; }
    .record-phone { background: #f3f7f4; }
    .phone-app { display: block; min-height: 100dvh; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
.visit-choice, .visit-workspace { text-align: left; }
.visit-progress { list-style: none; margin: 12px 0; padding: 0; }
.visit-progress li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid #e4e7ec; }
.visit-progress small, .visit-progress p { grid-column: 1 / -1; color: #667085; margin: 0; }
.visit-progress .is-done strong, .visit-progress .is-done span { color: #0a7a32; }
.visit-progress .is-pending span { color: #667085; }
.visit-status { color: #0a7a32; font-weight: 700; }
.visit-action, .visit-step-form { margin: 0 0 14px; }
.visit-step-form h3 { margin: 16px 0 8px; }
.visit-step-form textarea, .visit-step-form input:not([type="checkbox"]) { width: 100%; }
.visit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.visit-fields .is-wide { grid-column: 1 / -1; }
.visit-checks { display: grid; gap: 8px; margin-bottom: 14px; }
.visit-check { display: flex; gap: 8px; align-items: center; font-weight: 650; }
.visit-result { margin: 0 0 12px; padding: 0; border: 0; }
.visit-result legend { font-weight: 750; }
.visit-summary-line { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #f3f7f4; }

/* Patient home, matched to the PatientBook mobile reference. */
.patient-home-v2 { min-height: 100dvh; margin: 0; background: #10201d; color: #142e2a; }
.patient-home-app { position: relative; width: min(100%, 480px); min-height: 100dvh; margin: 0 auto; padding-bottom: 106px; overflow: hidden; background: #fbf8f0; }
.patient-home-screen { min-height: 100dvh; padding: 0 16px 28px; }
.patient-home-screen[hidden] { display: none !important; }
.patient-home-app [hidden] { display: none !important; }
.patient-home-hero { position: relative; height: 222px; margin: 0 -16px; padding: 56px 18px 22px; overflow: hidden; background: #075447; color: #fff; }
.patient-home-hero::before, .patient-home-hero::after { position: absolute; content: ""; pointer-events: none; border: 2px solid rgb(255 255 255 / 9%); border-radius: 50%; }
.patient-home-hero::before { top: -107px; right: -77px; width: 246px; height: 246px; box-shadow: 0 0 0 22px rgb(255 255 255 / 0%), 0 0 0 24px rgb(255 255 255 / 8%), 0 0 0 45px rgb(255 255 255 / 0%), 0 0 0 47px rgb(255 255 255 / 7%); }
.patient-home-hero::after { right: -51px; bottom: -102px; width: 234px; height: 170px; background: linear-gradient(135deg, transparent 44%, rgb(29 134 110 / 55%) 45%); }
.patient-home-topline { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.patient-home-topline > div:first-child { display: grid; gap: 1px; }
.patient-home-topline > div:first-child > span { font-size: .93rem; font-weight: 550; }
.patient-home-topline h1 { margin: 0; color: #fff; font-size: 1.78rem; line-height: 1.05; letter-spacing: -.035em; }
.patient-home-tools { display: flex; align-items: center; gap: 12px; }
.patient-home-bell, .patient-home-avatar { position: relative; display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgb(255 255 255 / 35%); border-radius: 50%; background: rgb(255 255 255 / 12%); color: #fff; }
.patient-home-bell .ui-icon { width: 21px; height: 21px; }
.patient-home-bell i { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border: 1px solid #075447; border-radius: 50%; background: #f7bd50; }
.patient-home-avatar { border: 2px solid #f2b64d; background: #fff; color: #075447; font-size: .95rem; font-weight: 850; }
.patient-home-content { position: relative; z-index: 2; display: grid; gap: 17px; margin-top: -93px; }
.patient-home-alert { margin: 0; }
.access-request-card { display: grid; gap: 12px; padding: 16px 17px 17px; border: 1px solid #eee9df; border-radius: 25px; background: #fff; box-shadow: 0 12px 28px rgb(23 46 39 / 10%); }
.access-request-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #79500b; font-size: .85rem; font-weight: 750; }
.access-request-tag { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 12px; border-radius: 99px; background: #fff2d7; color: #85550c; font-size: .72rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; }
.access-request-progress { height: 7px; overflow: hidden; border-radius: 99px; background: #f2ead9; }
.access-request-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f5bd52, #e89b30); }
.access-request-person { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; }
.access-provider-avatar { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 50%; background: #dcf0e9; color: #075447; font-size: 1.05rem; font-weight: 800; }
.access-request-person > div { display: grid; gap: 3px; }
.access-request-person strong { color: #172d29; font-size: 1rem; line-height: 1.3; }
.access-request-person span:not(.access-provider-avatar) { color: #63736d; font-size: .83rem; }
.access-request-review { display: flex; min-height: 48px; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 16px; background: #08745e; color: #fff; font-weight: 800; text-align: center; text-decoration: none; }
.access-request-review:hover { background: #065c4c; color: #fff; }
.patient-qr-card { position: relative; display: block; min-height: 175px; padding: 17px; overflow: hidden; border-radius: 26px; background: linear-gradient(130deg, #0b584c, #0c6b57 70%, #0b806b); color: #fff; text-decoration: none; box-shadow: 0 14px 26px rgb(7 68 56 / 15%); }
.patient-qr-card::before { position: absolute; inset: 0; content: "+   +   +   +   +\A   +   +   +   +\A +   +   +   +   +"; white-space: pre; color: rgb(255 255 255 / 8%); font-size: 18px; font-weight: 800; line-height: 26px; letter-spacing: 6px; pointer-events: none; }
.patient-qr-brand, .patient-qr-content { position: relative; z-index: 1; }
.patient-qr-brand { display: flex; align-items: center; gap: 8px; color: #dcebe6; font-size: .8rem; }
.patient-qr-brand > span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; background: #f5bd52; color: #263a31; font-size: .68rem; font-weight: 900; }
.patient-qr-content { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-top: 9px; }
.patient-qr-identity { display: grid; align-content: end; gap: 2px; min-width: 0; }
.patient-qr-identity > strong { overflow: hidden; font-size: 1.25rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.patient-qr-identity > span { color: #e2f0eb; font-size: .91rem; letter-spacing: .035em; }
.patient-qr-identity > small { width: fit-content; margin-top: 5px; padding: 3px 9px; border-radius: 99px; background: rgb(255 255 255 / 15%); color: #fff; font-size: .7rem; font-weight: 700; }
.patient-qr-image-wrap { display: grid; width: 98px; height: 98px; place-items: center; padding: 5px; border-radius: 10px; background: #fff; }
.patient-qr-image-wrap img { display: block; width: 100%; height: 100%; }
.patient-qr-card-expanded { min-height: 210px; padding: 20px; }
.patient-qr-card-expanded .patient-qr-content { margin-top: 18px; }
.patient-qr-card-expanded .patient-qr-image-wrap { width: 132px; height: 132px; }
.patient-qr-privacy { display: flex; gap: 8px; align-items: flex-start; margin: 14px 2px; color: #516c62; font-size: .83rem; }
.patient-qr-privacy .ui-icon { flex: 0 0 20px; color: #08745e; }
.patient-home-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin: 0 -2px; }
.patient-home-actions > a, .patient-home-actions > button { display: grid; justify-items: center; gap: 6px; padding: 0 2px; border: 0; background: transparent; color: #172d29; font: inherit; font-size: .78rem; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; }
.home-action-icon { position: relative; display: grid; width: 58px; height: 58px; place-items: center; border-radius: 21px; }
.home-action-icon .ui-icon { width: 23px; height: 23px; }
.action-share { background: #fff1d2; color: #986300; }
.action-family { background: #dff2eb; color: #08745e; }
.action-family b { position: absolute; top: 12px; right: 12px; font-size: .82rem; }
.action-vaccine { background: #eee8f8; color: #6650a1; }
.action-card { background: #e4f0fa; color: #316c9c; }
.icon-drop { --icon: url("icons/droplet.svg"); }
.icon-card { --icon: url("icons/id-card.svg"); }
.icon-book { --icon: url("icons/book-open.svg"); }
.icon-arrow { --icon: url("icons/arrow-right.svg"); }
.action-share .ui-icon { transform: rotate(-45deg); }
.vaccine-reminder-card { display: grid; grid-template-columns: 54px minmax(0, 1fr) 48px; gap: 12px; align-items: center; min-height: 79px; padding: 11px 13px; border: 1px solid #f0ebe1; border-radius: 24px; background: #fff; box-shadow: 0 10px 24px rgb(23 46 39 / 8%); color: inherit; text-decoration: none; }
.vaccine-reminder-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 17px; background: #eee8f8; color: #6650a1; }
.vaccine-reminder-icon .ui-icon { width: 23px; height: 23px; }
.vaccine-reminder-copy { display: grid; gap: 2px; }
.vaccine-reminder-copy small { color: #684a92; font-size: .69rem; font-weight: 850; letter-spacing: .065em; }
.vaccine-reminder-copy strong { font-size: .94rem; }
.vaccine-reminder-status { display: grid; width: 43px; height: 43px; place-items: center; border: 4px solid #eee8f8; border-top-color: #7753a4; border-radius: 50%; color: #684a92; font-size: .8rem; font-weight: 850; }
.home-screen-heading { padding: 28px 2px 18px; }
.home-screen-heading .eyebrow { margin: 0 0 5px; color: #08745e; font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.home-screen-heading h1 { margin: 0; font-size: 1.75rem; letter-spacing: -.035em; }
.home-screen-heading > p:last-child { margin: 6px 0 0; color: #64756e; font-size: .91rem; }
.patient-home-record-links { display: grid; gap: 10px; }
.patient-home-record-link { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 68px; padding: 12px; border: 1px solid #e9ece7; border-radius: 18px; background: #fff; color: inherit; font: inherit; text-align: left; text-decoration: none; }
.patient-home-record-link > .ui-icon, .patient-family-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: #e0f0e9; color: #08745e; }
.patient-home-record-link > span:nth-child(2) { display: grid; gap: 3px; }
.patient-home-record-link small { color: #657770; font-size: .77rem; }
.access-empty-card { display: grid; justify-items: center; gap: 8px; padding: 28px 20px; border: 1px solid #e9ece7; border-radius: 22px; background: #fff; text-align: center; }
.access-empty-card > .ui-icon { width: 32px; height: 32px; color: #08745e; }
.access-empty-card p { max-width: 280px; margin: 0; color: #657770; font-size: .87rem; }
.access-shares-heading { margin: 24px 2px 10px; }
.access-shares-heading h2 { margin: 0; font-size: 1.08rem; }
.access-shares-heading a { color: #08745e; font-size: .84rem; font-weight: 800; text-decoration: none; }
.access-request-card-compact { margin-bottom: 16px; }
.family-add-button { margin-top: 14px; }
.patient-home-empty { display: grid; justify-items: center; gap: 10px; padding: 24px 20px; border-radius: 24px; background: #fff; text-align: center; }
.patient-home-empty h2, .patient-home-empty p { margin: 0; }
.patient-home-empty p { color: #657770; font-size: .9rem; }
.patient-home-tabbar { position: fixed; z-index: 30; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 16px; display: grid; width: min(calc(100% - 32px), 394px); height: 76px; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; margin: 0 auto; padding: 5px; border: 2px solid #064c40; border-radius: 40px; background: #075447; box-shadow: 0 10px 24px rgb(17 61 51 / 22%); }
.patient-home-tabbar button { position: relative; display: grid; min-width: 0; min-height: 58px; align-content: center; justify-items: center; gap: 4px; border: 0; border-radius: 28px; background: transparent; color: #d7ebe4; font: inherit; font-size: .7rem; font-weight: 720; line-height: 1.1; }
.patient-home-tabbar button .ui-icon { width: 21px; height: 21px; }
.patient-home-tabbar button[aria-current="page"]:not(.patient-home-qr-tab) { background: #fff; color: #075447; }
.patient-home-tabbar button:focus-visible { outline: 3px solid #f1b748; outline-offset: 2px; }
.patient-home-tabbar .patient-home-qr-tab { z-index: 1; width: 60px; height: 60px; justify-self: center; margin-top: -28px; border: 3px solid #fff; border-radius: 50%; outline: 3px solid #f1b748; background: #f1b748; color: #263a31; box-shadow: 0 3px 9px rgb(0 0 0 / 16%); }
.patient-home-qr-tab .ui-icon { width: 27px !important; height: 27px !important; }
.patient-home-qr-tab small { position: absolute; bottom: -26px; color: #fff; font-size: .68rem; font-weight: 780; white-space: nowrap; }
@media (min-width: 520px) {
    .patient-home-app { box-shadow: 0 0 36px rgb(0 0 0 / 17%); }
    .patient-home-tabbar { left: 50%; right: auto; transform: translateX(-50%); }
}
@media (max-width: 360px) {
    .patient-home-content { gap: 13px; }
    .access-request-card { padding: 13px; }
    .patient-qr-card { padding: 14px; }
    .patient-qr-image-wrap { width: 86px; height: 86px; }
    .home-action-icon { width: 52px; height: 52px; }
    .patient-home-tabbar { right: 10px; left: 10px; width: calc(100% - 20px); }
}
.patient-home-tabbar button:not(.patient-home-qr-tab) { transition: background-color .18s ease, color .18s ease; }

/* My book overview. */
.my-book-header { position: relative; height: 144px; margin: 0 -16px; padding: 56px 18px 16px; overflow: visible; border-radius: 0 0 25px 25px; background: #075447; color: #fff; }
.my-book-header::before, .my-book-header::after { position: absolute; content: ""; pointer-events: none; border: 2px solid rgb(255 255 255 / 9%); border-radius: 50%; }
.my-book-header::before { top: -96px; right: -43px; width: 218px; height: 218px; box-shadow: 0 0 0 20px rgb(255 255 255 / 0%), 0 0 0 22px rgb(255 255 255 / 7%); }
.my-book-header::after { left: -35px; bottom: -33px; width: 136px; height: 72px; background: rgb(34 131 106 / 48%); }
.my-book-header h1 { position: relative; z-index: 1; margin: 0; color: #fff; font-size: 1.75rem; letter-spacing: -.035em; }
.my-book-search { position: absolute; z-index: 2; right: 16px; bottom: -24px; left: 16px; display: flex; min-height: 54px; align-items: center; gap: 11px; padding: 0 16px; border-radius: 19px; background: #fff; color: #66766f; box-shadow: 0 8px 20px rgb(22 46 38 / 10%); }
.my-book-search .ui-icon { flex: 0 0 20px; width: 20px; height: 20px; }
.my-book-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #172d29; font: inherit; font-size: .95rem; }
.my-book-search input::placeholder { color: #75837e; opacity: 1; }
.my-book-search:focus-within { outline: 3px solid rgb(8 116 94 / 28%); }
.my-book-content { position: relative; z-index: 1; display: grid; gap: 14px; padding-top: 42px; }
.my-book-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.my-book-stats a { display: grid; min-height: 62px; grid-template-columns: 38px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 10px; border-radius: 20px; background: #fff; color: #172d29; text-decoration: none; box-shadow: 0 7px 17px rgb(23 46 39 / 6%); }
.book-stat-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 13px; }
.book-stat-icon .ui-icon { width: 20px; height: 20px; }
.stat-condition { color: #af382c; background: #fde9e6; }
.stat-medicine { color: #956008; background: #fff1d7; }
.stat-allergy { color: #08745e; background: #def1e9; }
.my-book-stats a > span:last-child { display: grid; min-width: 0; gap: 0; }
.my-book-stats strong { font-size: 1.05rem; line-height: 1.1; }
.my-book-stats small { overflow: hidden; color: #66766f; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.my-book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.my-book-card { position: relative; display: grid; min-width: 0; min-height: 72px; grid-template-columns: 46px minmax(0, 1fr); gap: 11px; align-items: center; padding: 11px 13px; overflow: hidden; border: 1px solid rgb(31 58 48 / 4%); border-radius: 22px; background: #fff; color: #172d29; text-decoration: none; box-shadow: 0 8px 18px rgb(23 46 39 / 7%); }
.my-book-card::after { position: absolute; top: -27px; right: -21px; width: 74px; height: 74px; content: ""; border-radius: 50%; opacity: .65; pointer-events: none; }
.my-book-card > * { position: relative; z-index: 1; }
.book-card-icon { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgb(33 72 58 / 8%); border-radius: 16px; background: rgb(255 255 255 / 68%); color: #08745e; }
.book-card-icon .ui-icon { width: 22px; height: 22px; }
.book-card-copy { display: grid; min-width: 0; gap: 2px; }
.book-card-copy strong { font-size: .88rem; line-height: 1.13; }
.book-card-copy small { overflow: hidden; color: #697972; font-size: .73rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.book-card-condition { background: #fff; }
.book-card-condition::after { background: #fde8e6; }
.book-card-condition .book-card-icon { color: #a9362c; background: #fff0ee; }
.book-card-visits::after { background: #e5f0fb; }
.book-card-visits .book-card-icon { color: #2d6994; background: #f0f6fc; }
.book-card-medicines::after { background: #fff0d8; }
.book-card-medicines .book-card-icon { color: #96640c; background: #fff9ed; }
.book-card-lab::after { background: #dff2eb; }
.book-card-lab .book-card-icon { color: #08745e; background: #eff9f5; }
.book-card-immunizations::after { background: #eee8f8; }
.book-card-immunizations .book-card-icon { color: #68529e; background: #f5f1fb; }
.book-card-documents::after { background: #ecf0ee; }
.book-card-documents .book-card-icon { color: #4c635a; background: #f6f8f7; }
.book-card-history::after { background: #f6eddd; }
.book-card-history .book-card-icon { color: #806629; background: #fbf6eb; }
.book-card-badge { position: absolute; top: 10px; right: 8px; padding: 3px 7px; border-radius: 99px; background: #f5bd52; color: #714b0b; font-size: .62rem; font-weight: 850; }
.my-book-more { display: grid; min-height: 72px; place-items: center; padding: 10px; border: 2px dashed #d6ddd8; border-radius: 22px; color: #65756e; font-size: .82rem; text-align: center; }
.my-book-no-results { margin: 2px 0; color: #687871; font-size: .88rem; text-align: center; }
.my-book-latest { display: grid; min-height: 62px; grid-template-columns: 38px minmax(0, 1fr) 24px; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 20px; background: #fff; color: #172d29; text-decoration: none; box-shadow: 0 8px 18px rgb(23 46 39 / 7%); }
.my-book-latest .book-card-icon { width: 36px; height: 36px; border-radius: 13px; background: #e3f2eb; }
.my-book-latest .book-card-icon .ui-icon { width: 19px; height: 19px; }
.my-book-latest-copy { display: grid; min-width: 0; gap: 2px; }
.my-book-latest-copy small { color: #567166; font-size: .66rem; font-weight: 850; letter-spacing: .04em; }
.my-book-latest-copy strong { overflow: hidden; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
.my-book-result-check { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: #2776ec; color: #fff; }
.my-book-result-check .ui-icon { width: 15px; height: 15px; }
.my-book-latest-empty { grid-template-columns: 38px minmax(0, 1fr) 20px; }
.icon-clock { --icon: url("icons/calendar.svg"); }
.icon-search { --icon: url("icons/search.svg"); }
@media (max-width: 360px) {
    .my-book-stats { gap: 6px; }
    .my-book-stats a { grid-template-columns: 32px minmax(0, 1fr); gap: 6px; padding: 7px; }
    .book-stat-icon { width: 32px; height: 32px; }
    .my-book-card { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; padding: 10px; }
    .book-card-icon { width: 40px; height: 40px; }
}
.visit-progress .is-current strong { color: var(--green-800); }
@media (max-width: 700px) { .visit-fields { grid-template-columns: 1fr; } }

.doc-surface { background: #f4f7f5; --green-700: #08754F; --green-800: #066343; }
.doc-app { width: min(420px, 100%); min-height: 100dvh; margin: 0 auto; padding: 16px 16px 148px; background: #f7faf8; color: #122B2A; }
.doc-screen { display: none; }
.doc-screen.is-current { display: block; }
.doc-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.doc-brand, .doc-top { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 14px; }
.doc-brand strong, .doc-top strong { font-size: 1.05rem; }
.doc-brand-end { display: flex; align-items: center; gap: 10px; margin-left: auto; color: #344054; }
.doc-brand .avatar, .avatar-small { width: 34px; height: 34px; font-size: .85rem; }
.avatar-lg { width: 72px; height: 72px; margin: 0 auto 8px; background: #e7f6ee; color: #0f766e; }
.avatar-lg .ui-icon { width: 32px; height: 32px; }
.doc-top a, .doc-top button { display: grid; width: 32px; height: 32px; place-items: center; border: 0; background: transparent; color: inherit; text-decoration: none; cursor: pointer; }
.doc-top .doc-pill, .doc-top .doc-draft { width: auto; height: auto; margin-left: auto; }
.doc-hello { margin: 8px 0 0; color: #657576; }
.doc-app h1 { margin: 0 0 4px; font-size: 1.7rem; }
.doc-role, .doc-kicker, .doc-label { margin: 0 0 12px; color: #657576; }
.doc-scan, .doc-choice { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; width: 100%; min-height: 44px; margin: 0 0 10px; padding: 14px; border: 1px solid #e4e7ec; border-radius: 12px; background: white; color: inherit; text-align: left; cursor: pointer; }
.doc-scan { border: 0; background: #EAF7F0; }
.doc-choice.is-primary { border: 0; background: #EAF7F0; }
.doc-text-link { display: block; min-height: 44px; margin: -4px 0 12px; padding: 0; border: 0; background: none; color: #08754F; font-weight: 750; text-align: left; text-decoration: none; cursor: pointer; }
.doc-choice.is-alert { border: 0; background: #fff4f2; }
.doc-choice small, .doc-scan small, .doc-people small, .doc-timeline small, .doc-pair small, .doc-next small, .doc-visit p { display: block; margin: 0; color: #667085; font-weight: 650; }
.doc-qr { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: #08754F; color: white; }
.doc-qr .ui-icon { width: 22px; height: 22px; }
.doc-qr-lg { width: 64px; height: 64px; margin: 8px auto 12px; }
.doc-section-head { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 8px; }
.doc-section-head h2, .doc-app h2 { margin: 0; font-size: 1rem; }
.doc-section-head button, .doc-draft { border: 0; background: transparent; color: #0f766e; font-weight: 750; cursor: pointer; }
.doc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.doc-stats article, .doc-pair article { padding: 14px 10px; border-radius: 16px; background: white; text-align: center; }
.doc-stats strong { display: block; font-size: 1.8rem; }
.doc-stats .is-teal strong { color: #0f766e; }
.doc-stats .is-orange strong { color: #ea580c; }
.doc-stats .is-blue strong { color: #2563eb; }
.doc-stats span { color: #667085; font-size: .78rem; font-weight: 700; }
.doc-tasks, .doc-people, .doc-next, .doc-timeline { list-style: none; margin: 0; padding: 0; }
.doc-tasks li, .doc-people li { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #e4e7ec; }
.doc-people a, .doc-next button, .doc-next a { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; width: 100%; border: 0; background: transparent; color: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.doc-people a { grid-template-columns: auto 1fr auto; }
.doc-status { padding: 4px 8px; border-radius: 999px; font-style: normal; font-size: .72rem; font-weight: 750; }
.doc-status.is-live, .doc-status.is-draft { background: #EAF7F0; color: #08754F; }
.doc-status.is-done { background: #f2f4f7; color: #667085; }
.doc-work { list-style: none; margin: 0; padding: 0 0 12px; }
.doc-work li { border-bottom: 1px solid #e4e7ec; }
.doc-work a, .doc-work .doc-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; padding: 12px 0; color: inherit; text-decoration: none; }
.doc-work .doc-copy { min-width: 0; }
.doc-work .doc-copy strong, .doc-work .doc-copy small { display: block; }
.doc-work .doc-copy small { margin-top: 2px; color: #657576; font-weight: 650; line-height: 1.35; }
.doc-work .doc-status { justify-self: end; white-space: nowrap; }
.doc-ico { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border-radius: 12px; background: #e7f6ee; color: #0f766e; }
.doc-ico .ui-icon, .doc-step .ui-icon, .doc-saved .ui-icon { width: 18px; height: 18px; }
.doc-ico.is-warn, .doc-next .is-warn { background: #fffaeb; color: #b54708; }
.doc-empty { color: #657576; }
.doc-tabbar { position: fixed; z-index: 40; bottom: max(10px, env(safe-area-inset-bottom)); left: 50%; display: grid; width: min(392px, calc(100% - 24px)); grid-template-columns: repeat(4, 1fr); align-items: stretch; gap: 4px; padding: 6px; border: 1px solid #d7e5df; border-radius: 24px; background: #f4efb4; box-shadow: 0 10px 30px rgba(18, 43, 42, .14); transform: translateX(-50%); }
.doc-tabbar button, .doc-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 58px; border: 0; border-radius: 18px; background: transparent; color: #657576; font-size: .72rem; font-weight: 750; line-height: 1; text-decoration: none; cursor: pointer; }
.doc-tabbar .ui-icon { width: 22px; height: 22px; }
.doc-scan-tab { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 12px; background: #08754F; color: #fff; }
.doc-scan-tab .ui-icon { width: 18px; height: 18px; }
.doc-tabbar [aria-current="page"] { background: #EAF7F0; color: #08754F; }
.doc-found { margin-bottom: 16px; text-align: center; }
.doc-active { margin: 0 0 12px; padding: 14px; border-radius: 16px; background: #f8fafc; }
.doc-active header { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; }
.doc-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 999px; background: #12b76a; }
.doc-pill { padding: 4px 8px; border-radius: 999px; background: #e7f6ee; color: #0f766e; font-style: normal; font-size: .72rem; font-weight: 750; }
.doc-fold summary { list-style: none; }
.doc-fold summary::-webkit-details-marker { display: none; }
.doc-patient { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 18px; }
.doc-timeline li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; position: relative; padding: 0 0 16px; }
.doc-timeline li:not(:last-child)::before { content: ""; position: absolute; top: 28px; bottom: 0; left: 13px; width: 2px; background: #e4e7ec; }
.doc-timeline .is-done::before { background: #12b76a; }
.doc-step { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 999px; background: #eef2f6; color: #667085; font-size: .8rem; font-weight: 750; }
.doc-timeline .is-done .doc-step { background: #12b76a; color: white; }
.doc-timeline .is-current .doc-step { background: #2563eb; color: white; }
.doc-timeline .is-current strong { color: #2563eb; }
.doc-detail { margin-top: 4px; }
.doc-detail summary { color: #0f766e; font-weight: 750; cursor: pointer; }
.doc-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.doc-pair article { text-align: left; }
.doc-pair .doc-ico { margin-bottom: 8px; }
.doc-pair .is-tests .doc-ico { background: #f4f3ff; color: #6938ef; }
.doc-pair .is-allergy .doc-ico { background: #fef3f2; color: #d92d20; }
.doc-note { display: flex; gap: 8px; margin: 0 0 12px; padding: 12px; border-radius: 14px; background: #eff8ff; color: #175cd3; }
.doc-note .ui-icon { flex: 0 0 auto; width: 18px; height: 18px; }
.doc-visit { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin: 0 0 8px; padding: 12px; border-radius: 16px; background: white; }
.doc-visit .doc-ico { color: white; }
.tone-blue .doc-ico { background: #175cd3; }
.tone-pink .doc-ico { background: #dd2590; }
.tone-red .doc-ico { background: #d92d20; }
.tone-purple .doc-ico { background: #6938ef; }
.tone-teal .doc-ico { background: #0f766e; }
.doc-form fieldset { margin: 0 0 12px; padding: 0; border: 0; }
.doc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-chips legend, .doc-label { width: 100%; margin-bottom: 8px; font-weight: 750; }
.doc-chips label { position: relative; }
.doc-chips input { position: absolute; opacity: 0; }
.doc-chips span { display: inline-block; padding: 8px 12px; border: 1px solid #e4e7ec; border-radius: 999px; background: white; font-weight: 700; }
.doc-chips label:has(input:checked) span { border-color: #0f766e; background: #e7f6ee; color: #0f766e; }
.doc-chips .is-unwell:has(input:checked) span { border-color: #fda29b; background: #fef3f2; color: #b42318; }
.doc-acc { margin: 0; padding: 0; border-top: 1px solid #e4e7ec; background: transparent; }
.doc-acc summary { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px 0; cursor: pointer; list-style: none; }
.doc-acc summary::-webkit-details-marker { display: none; }
.doc-form textarea, .doc-form input:not([type="radio"]):not([type="checkbox"]) { width: 100%; }
.doc-saved { margin: 18px 0 22px; text-align: center; }
.doc-saved > span { display: grid; width: 72px; height: 72px; margin: 0 auto 12px; place-items: center; border-radius: 999px; background: #e7f6ee; color: #12b76a; }
.doc-saved .ui-icon { width: 32px; height: 32px; }
.doc-next { margin: 0 0 16px; }
.doc-next li { padding: 10px 0; border-bottom: 1px solid #e4e7ec; }
.doc-back { display: block; margin-top: 8px; color: #1d2939; font-weight: 750; text-align: center; text-decoration: none; }
.doc-scan-panel video { width: 100%; max-height: 240px; border-radius: 16px; background: #111; object-fit: cover; }
.shared-record-main:has(.doc-flow) { width: min(420px, 100%); padding-bottom: 120px; }
.shared-record-main:has(.doc-flow) > :not(.doc-flow),
body:has(.doc-flow) .shared-header { display: none; }
body:has(.doc-flow) { background: #f7faf8; }

body.doc-surface:has(.scan-app) { background: #eef6f4; }
.scan-app { padding: 8px 16px 32px; background: #eef6f4; color: #122B2A; }
.scan-head { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; min-height: 48px; margin: 0 0 6px; }
.scan-head h1 { margin: 0; font-size: 1.45rem; font-weight: 750; letter-spacing: 0; }
.scan-head a, .scan-info { display: grid; width: 36px; height: 36px; place-items: center; border: 0; background: transparent; color: #122B2A; text-decoration: none; }
.scan-info { justify-self: end; border: 1.5px solid #c9d7d2; border-radius: 999px; cursor: pointer; }
.scan-info .ui-icon, .scan-head a .ui-icon { width: 18px; height: 18px; }
.scan-about { max-width: 320px; padding: 14px 16px; border: 0; border-radius: 16px; color: #122B2A; }
.scan-about p { margin: 0; }
.scan-intro { margin: 0 0 14px; color: #6d7c78; font-size: .92rem; line-height: 1.45; }
.scan-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.scan-mode { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 78px; padding: 8px 4px; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 1px 2px rgba(18, 43, 42, .05); color: #1b2c2a; font-size: .68rem; font-weight: 750; line-height: 1.15; text-align: center; cursor: pointer; }
.scan-mode .ui-icon { width: 20px; height: 20px; }
.scan-mode[aria-pressed="true"] { background: #d8f6e6; color: #08754F; box-shadow: none; }
.scan-app [hidden] { display: none !important; }
.scan-well, .scan-shot { position: relative; overflow: hidden; }
.scan-well { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 248px; padding: 46px 16px 16px; border-radius: 22px; background: radial-gradient(circle at 50% 40%, #1a6652, #0e3f34 72%); color: #fff; }
.scan-shot { min-height: 214px; margin-bottom: 12px; border-radius: 18px; background: #f4faf7; }
.scan-well video, .scan-shot video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.scan-tool { position: absolute; z-index: 3; top: 12px; left: 12px; display: grid; width: 36px; height: 36px; place-items: center; border: 0; background: transparent; color: #fff; cursor: pointer; }
.scan-tool-end { right: 12px; left: auto; }
.scan-tool .ui-icon { width: 22px; height: 22px; }
.scan-brackets, .scan-corners { position: absolute; z-index: 2; pointer-events: none; }
.scan-brackets { position: relative; inset: auto; width: min(210px, 80%); height: 124px; margin: 0 auto 8px; }
.scan-shot .scan-corners { inset: 10px; }
.scan-brackets span, .scan-corners span { position: absolute; width: 34px; height: 34px; border: 3px solid #fff; }
.scan-corners span { border-color: #14a37a; border-width: 4px; border-radius: 2px; }
.scan-brackets span:nth-child(1), .scan-corners span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.scan-brackets span:nth-child(2), .scan-corners span:nth-child(2) { top: 0; right: 0; border-bottom: 0; border-left: 0; }
.scan-brackets span:nth-child(3), .scan-corners span:nth-child(3) { bottom: 0; left: 0; border-top: 0; border-right: 0; }
.scan-brackets span:nth-child(4), .scan-corners span:nth-child(4) { right: 0; bottom: 0; border-top: 0; border-left: 0; }
.scan-qr-mark { position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; width: 72px; height: 72px; place-items: center; border-radius: 8px; background: repeating-conic-gradient(#fff 0% 25%, transparent 0% 50%) 0 0 / 12px 12px; transform: translate(-50%, -58%); }
.scan-qr-mark .ui-icon { width: 72px; height: 72px; }
.scan-view.is-live .scan-qr-mark, .scan-view.is-live .scan-idcard, .scan-view.is-live .scan-mrz { visibility: hidden; }
.scan-caption { position: relative; z-index: 2; margin: 0; padding: 2px 12px 0; text-align: center; }
.scan-caption strong, .scan-lead strong { display: block; margin-bottom: 4px; font-size: 1.02rem; }
.scan-caption span { display: block; color: rgba(255, 255, 255, .82); font-size: .86rem; }
.scan-lead { margin: 0 0 12px; text-align: center; }
.scan-lead span { display: block; color: #6d7c78; font-size: .9rem; line-height: 1.35; }
.scan-status { min-height: 0; margin: 8px 0 0; color: #08754F; font-size: .82rem; font-weight: 700; text-align: center; }
.scan-status:empty { display: none; }
.scan-secure, .scan-tip, .scan-upload, .scan-paste { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.scan-secure, .scan-tip, .scan-upload { margin-top: 12px; padding: 14px; border-radius: 18px; background: #fff; }
.scan-secure-ico, .scan-tip-ico, .scan-paste-ico, .scan-upload-ico { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 999px; background: #e7f6ee; color: #08754F; }
.scan-secure strong, .scan-tip strong, .scan-paste strong, .scan-upload strong, .scan-secure small, .scan-tip small, .scan-paste small, .scan-upload small { display: block; }
.scan-secure small, .scan-tip small, .scan-paste small, .scan-upload small { margin-top: 2px; color: #6d7c78; font-weight: 650; line-height: 1.35; }
.scan-paste { grid-template-columns: auto 1fr; margin: 0 0 8px; }
.scan-upload { grid-template-columns: auto 1fr auto; cursor: pointer; }
.scan-or { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin: 14px 0; color: #8aa099; font-size: .75rem; font-weight: 750; letter-spacing: .04em; }
.scan-or::before, .scan-or::after { content: ""; height: 1px; background: #d7e3de; }
.scan-control { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; min-height: 52px; padding: 0 12px; border: 1px solid #e3eeea; border-radius: 14px; background: #fff; }
.scan-control input, .scan-control select { width: 100%; min-height: 48px; border: 0; background: transparent; color: #122B2A; font: inherit; outline: none; }
.scan-control input::placeholder { color: #9aabb0; }
.scan-control .ui-icon { width: 18px; height: 18px; color: #6d7c78; }
.scan-control button { display: grid; width: 36px; height: 36px; place-items: center; border: 0; background: transparent; color: #6d7c78; cursor: pointer; }
.scan-code { grid-template-columns: 1fr auto; }
.scan-fallback { margin-bottom: 12px; }
.scan-go { display: grid; grid-template-columns: 24px 1fr 24px; gap: 8px; align-items: center; width: 100%; min-height: 54px; margin-top: 14px; padding: 0 16px; border: 0; border-radius: 16px; background: #08754F; color: #fff; font-size: 1rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.scan-go .ui-icon { width: 20px; height: 20px; }
.scan-go span:nth-child(2) { text-align: center; }
.scan-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.scan-pills button { min-height: 40px; border: 0; border-radius: 999px; background: #fff; color: #3d514c; font-size: .78rem; font-weight: 750; cursor: pointer; }
.scan-pills button[aria-pressed="true"] { background: #d8f6e6; color: #08754F; }
.scan-idcard { position: absolute; z-index: 1; inset: 28px 22px; display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: #f7f1e4; box-shadow: 0 8px 18px rgba(18, 43, 42, .12); }
.scan-idcard-top { display: grid; grid-template-columns: 28px 1fr 22px; gap: 8px; align-items: center; padding: 8px 10px; background: #f3e7cf; text-align: center; }
.scan-idcard-top strong, .scan-idcard-top small { display: block; }
.scan-idcard-top strong { font-size: .62rem; letter-spacing: .04em; }
.scan-idcard-top small { color: #6d5b3a; font-size: .55rem; letter-spacing: .08em; }
.scan-crest { width: 26px; height: 26px; border-radius: 999px; background: radial-gradient(circle at 50% 40%, #f6d36b, #b45309 60%, #111 61%); }
.scan-flag { display: grid; width: 18px; height: 12px; overflow: hidden; border-radius: 2px; }
.scan-flag i { display: block; height: 4px; }
.scan-flag i:nth-child(1) { background: #111; }
.scan-flag i:nth-child(2) { background: #fcd116; }
.scan-flag i:nth-child(3) { background: #d90000; }
.scan-idcard-body { display: grid; grid-template-columns: 58px 1fr; gap: 8px; align-items: center; padding: 10px; }
.scan-portrait { height: 72px; border-radius: 6px; background: linear-gradient(#d7c4a3, #b08968); }
.scan-idlines { display: grid; gap: 1px; }
.scan-idlines small { color: #8a734e; font-size: .55rem; letter-spacing: .04em; }
.scan-idlines b { font-size: .78rem; }
.scan-mrz { position: absolute; z-index: 1; right: 18px; bottom: 28px; left: 18px; padding: 8px; border-radius: 6px; background: rgba(255, 255, 255, .92); color: #24312e; font-family: ui-monospace, monospace; font-size: .62rem; line-height: 1.35; }
.scan-mrz span { display: block; overflow: hidden; white-space: nowrap; }
.scan-shot-pass { background: linear-gradient(#d9e2ea, #c5d0da); }
.scan-mrz-entry { display: grid; gap: 6px; margin-top: 8px; color: #122B2A; font-weight: 750; }
.scan-mrz-entry textarea, .scan-result textarea { width: 100%; padding: 12px; border: 1px solid #e3eeea; border-radius: 14px; font: inherit; }
.scan-details h2, .scan-result h2 { margin: 0 0 4px; font-size: 1.2rem; }
.scan-details > p, .scan-result > p { margin: 0 0 12px; color: #6d7c78; }
.scan-field { display: block; margin: 0 0 12px; font-size: .92rem; font-weight: 750; }
.scan-field .scan-control { margin-top: 6px; }
.scan-field > span[aria-hidden] { color: #08754F; }
.scan-split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 10px; }
.scan-auth { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; }
.scan-auth legend { width: 100%; margin-bottom: 6px; font-weight: 750; }
.scan-auth label { position: relative; }
.scan-auth input { position: absolute; opacity: 0; }
.scan-auth span { display: inline-block; padding: 8px 12px; border-radius: 999px; background: #fff; font-weight: 700; }
.scan-auth label:has(input:checked) span { background: #d8f6e6; color: #08754F; }
.scan-result { margin-top: 18px; }
.scan-warning { margin: 12px 0 0; color: #b54708; font-weight: 700; }
.scan-control select { appearance: none; }

.ph-surface { background: #e7f3ee; color: #0f172a; }
.ph-app { width: min(420px, 100%); min-height: 100dvh; margin: 0 auto; padding: 14px 16px 140px; background: #f4fbf8; }
.ph-app [hidden] { display: none !important; }
.ph-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ph-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.ph-mark { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 999px; background: #0b8f5b; color: #fff; }
.ph-mark .ui-icon { width: 22px; height: 22px; }
.ph-brand { min-width: 0; }
.ph-brand strong, .ph-brand small { display: block; }
.ph-brand strong { font-size: 1.05rem; }
.ph-brand small { font-size: .68rem; white-space: nowrap; }
.ph-brand small, .ph-account small, .ph-scan small, .ph-choices small, .ph-shortcuts small, .ph-row small, .ph-note small, .ph-lead { color: #64748b; font-weight: 650; }
.ph-top-end { display: flex; align-items: center; gap: 12px; }
.ph-bell, .ph-account { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.ph-bell { position: relative; width: 42px; height: 42px; justify-content: center; }
.ph-bell i { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #ef4444; color: #fff; font-style: normal; font-size: .65rem; line-height: 16px; }
.ph-account > span:nth-child(2) { min-width: 0; max-width: 92px; }
.ph-account small { display: none; }
.ph-account strong { display: block; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.ph-account small { display: none; }
.ph-account strong { font-size: .85rem; }
.ph-avatar, .ph-letter { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 999px; background: #0b8f5b; color: #fff; font-weight: 750; }
.ph-icon { display: block; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--ph) center / contain no-repeat; mask: var(--ph) center / contain no-repeat; }
.ph-icon-bell { --ph: url("pharmacy/icons/bell.svg"); }
.ph-icon-chevron { --ph: url("pharmacy/icons/chevron-right.svg"); }
.ph-icon-scan { --ph: url("pharmacy/icons/scan-qr.svg"); }
.ph-icon-prescription { --ph: url("pharmacy/icons/prescription.svg"); }
.ph-icon-pill { --ph: url("pharmacy/icons/pill.svg"); }
.ph-icon-users { --ph: url("pharmacy/icons/users.svg"); }
.ph-icon-clock { --ph: url("pharmacy/icons/clock.svg"); }
.ph-icon-records { --ph: url("pharmacy/icons/file-text.svg"); }
.ph-icon-search { --ph: url("pharmacy/icons/search.svg"); }
.ph-icon-arrow { --ph: url("pharmacy/icons/arrow-right.svg"); }
.ph-icon-info { --ph: url("pharmacy/icons/info.svg"); }
.ph-icon-home { --ph: url("pharmacy/icons/home.svg"); }
.ph-icon-activity { --ph: url("pharmacy/icons/activity.svg"); }
.ph-icon-user { --ph: url("pharmacy/icons/user.svg"); }
.ph-hero { position: relative; display: flex; align-items: center; min-height: 132px; margin-bottom: 12px; padding: 14px; overflow: hidden; border-radius: 18px; background: linear-gradient(90deg, #e7f8ef 0%, #f3fbf7 55%, #e5f6f1 100%); }
.ph-hero p { position: relative; z-index: 1; max-width: 190px; margin: 0; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .88); font-size: .92rem; font-weight: 700; line-height: 1.35; }
.ph-hero img { position: absolute; right: 0; bottom: -6px; width: 132px; height: auto; mix-blend-mode: multiply; }
.ph-scan { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; width: 100%; min-height: 78px; margin: 0 0 18px; padding: 12px 14px; border: 0; border-radius: 18px; background: linear-gradient(90deg, #0a8a58, #08764c); color: #fff; text-align: left; cursor: pointer; }
.ph-scan strong, .ph-scan small { display: block; }
.ph-scan small { color: rgba(255, 255, 255, .82); }
.ph-scan-badge, .ph-scan-go { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; }
.ph-scan-badge { background: rgba(255, 255, 255, .16); }
.ph-scan-go { border-radius: 999px; background: rgba(255, 255, 255, .18); }
.ph-screen > h2, .ph-choices + h2 { margin: 8px 0 10px; font-size: 1.05rem; }
.ph-screen > h2 { margin-top: 0; }
.ph-choices { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 10px; }
.ph-choices button, .ph-shortcuts button { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; width: 100%; min-height: 84px; padding: 12px; border: 0; border-radius: 16px; background: #fff; color: inherit; text-align: left; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); cursor: pointer; }
.ph-choices button:first-child { background: #f4f7ff; }
.ph-choices button:last-child { background: #fff8ee; }
.ph-choices strong, .ph-shortcuts strong, .ph-row strong, .ph-note strong { display: block; }
.ph-choice-ico, .ph-short-ico { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; }
.ph-choice-ico.is-rx { background: #e7eeff; color: #3b6fd8; }
.ph-choice-ico.is-otc { background: #fff1df; color: #f59e0b; }
.ph-shortcuts { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
.ph-short-ico.is-green { background: #e7f8ef; color: #0b8f5b; }
.ph-short-ico.is-blue { background: #e8f1ff; color: #3b82f6; }
.ph-short-ico.is-slate { background: #eef2ff; color: #64748b; }
.ph-panel { padding: 8px 14px 6px; border-radius: 18px; background: #fff; }
.ph-panel header, .ph-panel h2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ph-panel h2 { margin: 8px 0; font-size: 1.05rem; }
.ph-panel h2 .ph-icon { display: inline-block; width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; color: #64748b; }
.ph-panel header button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: #0b8f5b; font-weight: 750; cursor: pointer; }
.ph-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; min-height: 64px; padding: 10px 0; border-top: 1px solid #eef3f1; color: inherit; text-decoration: none; }
.ph-visit, .ph-badge { grid-column: 2; justify-self: start; }
.ph-letter.is-green { background: #dcfce7; color: #15803d; }
.ph-letter.is-blue { background: #dbeafe; color: #1d4ed8; }
.ph-letter.is-pink { background: #fce7f3; color: #be185d; }
.ph-letter.is-purple { background: #ede9fe; color: #6d28d9; }
.ph-visit strong, .ph-visit small { display: block; }
.ph-visit strong { font-size: .92rem; }
.ph-badge { padding: 6px 10px; border-radius: 999px; font-size: .75rem; font-weight: 750; }
.ph-badge.is-dispensed { background: #dcfce7; color: #15803d; }
.ph-badge.is-otc { background: #ffedd5; color: #c2410c; }
.ph-empty { margin: 8px 0 12px; color: #64748b; }
.ph-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 14px; border-radius: 16px; background: #eef8f3; }
.ph-note .ph-icon { flex: 0 0 auto; margin-top: 2px; color: #0b8f5b; }
.ph-lead { margin: 0 0 12px; }
.ph-search { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; margin: 0 0 14px; padding: 6px 8px 6px 12px; border-radius: 14px; background: #fff; }
.ph-search input { min-height: 44px; border: 0; background: transparent; font: inherit; outline: none; }
.ph-search button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 12px; background: #0b8f5b; color: #fff; font-weight: 750; cursor: pointer; }
.ph-camera { position: relative; display: grid; min-height: 220px; place-items: center; margin-bottom: 12px; overflow: hidden; border-radius: 18px; background: #0e3f34; color: #fff; text-align: center; }
.ph-camera video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-camera p { position: relative; z-index: 1; margin: 0; padding: 12px; }
.ph-tabbar { position: fixed; z-index: 40; bottom: 0; left: 50%; display: grid; width: min(420px, 100%); grid-template-columns: repeat(5, 1fr); align-items: end; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: linear-gradient(90deg, #0b7a68, #14988a); box-shadow: 0 -8px 24px rgba(11, 90, 80, .18); transform: translateX(-50%); }
.ph-tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border: 0; border-radius: 16px; background: transparent; color: rgba(255, 255, 255, .82); font-size: .72rem; font-weight: 750; cursor: pointer; }
.ph-tabbar [aria-current="page"] { background: rgba(255, 255, 255, .16); color: #fff; }
.ph-tab-scan { color: #fff; }
.ph-scan-fab { display: grid; width: 56px; height: 56px; margin-top: -26px; place-items: center; border-radius: 999px; background: #fff; color: #0b7a68; box-shadow: 0 8px 16px rgba(8, 70, 62, .22); }
.ph-scan-fab .ph-icon { width: 26px; height: 26px; }

