/* Cal.com-inspired 8px rhythm, ring shadows and restrained surfaces; teal clinical accent. */
:root{--ink:#202d2b;--muted:#667570;--teal:#08796b;--teal-dark:#075e54;--teal-soft:#edf8f4;--canvas:#f7f9f8;--line:#e2e8e5;--white:#fff;--amber:#8a5509;--amber-bg:#fff5dc;--red:#a12c31;--shadow:0 1px 5px -4px rgba(19,19,22,.7),0 0 0 1px rgba(34,42,53,.075),0 4px 8px rgba(34,42,53,.025);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--canvas);font-synthesis:none;font-size:14px;line-height:1.5}
*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}button:not(:disabled),a,input,textarea{transition:background .16s,border-color .16s,box-shadow .16s}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #1c9c8980;outline-offset:3px}[hidden]{display:none!important}a{color:inherit}p{margin:0 0 14px}h1,h2,h3{margin:0;font-weight:650}h1{font-size:30px;line-height:1.18;letter-spacing:-1px}h2{font-size:18px;line-height:1.35;letter-spacing:-.35px}h3{font-size:15px;line-height:1.4}fieldset{border:0;padding:0;margin:0;min-width:0}label{display:block;font-size:13px;font-weight:600;margin:17px 0 7px}label span{color:var(--muted);font-weight:400}input:not([type=checkbox]),textarea{display:block;width:100%;max-width:100%;border:1px solid #d7e0db;border-radius:8px;background:#fff;color:var(--ink);padding:11px 12px;box-shadow:0 1px 2px #172b2104}input::placeholder,textarea::placeholder{color:#84918b}input:not([type=checkbox]):focus,textarea:focus{border-color:#199a87;box-shadow:0 0 0 3px #08796b0d}input:not([type=checkbox]):disabled,fieldset:disabled textarea{background:#f5f7f6;color:var(--muted)}textarea{resize:vertical;min-height:76px;line-height:1.6}input[type=checkbox]{flex:0 0 auto;width:18px;height:18px;margin:2px 0 0;accent-color:var(--teal)}
.test-banner{position:sticky;top:0;z-index:50;padding:12px 18px;background:var(--amber-bg);border-bottom:1px solid #ebd6a4;color:#664508;font-size:10px;letter-spacing:.35px;display:flex;justify-content:center;align-items:center;gap:9px;text-align:center;line-height:1.5}.banner-symbol{border:1.5px solid currentColor;border-radius:50%;width:17px;height:17px;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;font-weight:800;font-size:11px}.banner-detail{display:none}.topbar{height:80px;background:#fff;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 18px;gap:12px}.brand{text-decoration:none;display:inline-flex;align-items:center;gap:10px;font-size:17px;font-weight:450;letter-spacing:-.6px;line-height:1.2;white-space:nowrap}.brand strong{font-weight:700}.brand small{display:block;font-size:8px;letter-spacing:1.4px;font-weight:600;color:var(--muted);margin-top:5px}.brand-mark{height:35px;width:35px;display:inline-flex;align-items:center;justify-content:center;background:var(--teal);color:#fff;font-weight:400;font-size:32px;border-radius:10px;line-height:1}.header-actions{display:flex;align-items:center;gap:4px}.session-label{display:none}.button{border:1px solid transparent;border-radius:8px;padding:11px 15px;min-height:44px;display:inline-flex;justify-content:center;align-items:center;gap:12px;font-weight:600;font-size:13px;line-height:1.35;text-decoration:none;text-align:center}.primary{background:var(--teal);color:#fff;box-shadow:0 2px 0 #ffffff14 inset,0 1px 2px #0a44331a}.primary:not(:disabled):hover{background:var(--teal-dark)}.secondary{background:#fff;color:#34453e;border-color:#dce3df;box-shadow:0 1px 2px #202d2b05}.secondary:not(:disabled):hover{background:#f3f8f5;border-color:#b6ccc1}.ghost{background:transparent;color:var(--muted)}.ghost:not(:disabled):hover{background:#eef4f1;color:var(--ink)}.compact{padding:9px 11px;font-size:12px}.full{width:100%}.text-button{border:0;padding:6px 0;min-height:32px;background:transparent;font-size:12px;font-weight:600;color:var(--teal);text-align:left}.text-button:not(:disabled):hover{text-decoration:underline}.page{max-width:1600px;margin:0 auto;padding:22px 16px 0}.notice{padding:14px 16px;border-radius:9px;border:1px solid #b8dbcd;background:#edf8f1;color:#205c45;margin-bottom:22px;font-size:13px;overflow-wrap:anywhere}.notice.error{background:#fff0ee;color:#8e2e30;border-color:#f0cac4}.eyebrow{display:block;font-size:9px;letter-spacing:1.4px;line-height:1.5;font-weight:700;color:var(--muted);margin-bottom:8px}.muted,.micro{color:var(--muted)}.micro{font-size:12px;line-height:1.65}.muted{font-size:13px;line-height:1.65}.pill{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:9999px;background:var(--teal-soft);border:1px solid #d4eae1;color:var(--teal-dark);font-size:10px;line-height:1.4;letter-spacing:.25px;font-weight:650;max-width:100%;text-align:center}.pill.neutral{background:#f1f4f2;border-color:#e1e7e3;color:#5b6c63}.pill.warning{background:var(--amber-bg);border-color:#ead3a0;color:var(--amber)}.status-dot{display:inline-block;width:6px;height:6px;background:#299882;border-radius:50%;flex-shrink:0}.card{border-radius:12px;background:#fff;box-shadow:var(--shadow);padding:20px;min-width:0}.card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.card-heading .eyebrow{margin-bottom:6px}.count{display:inline-flex;align-items:center;justify-content:center;height:25px;min-width:25px;padding:0 6px;background:#f0f5f2;color:#466053;border:1px solid #e3eae6;border-radius:7px;font-size:11px;font-weight:650}.count.amber{color:var(--amber);background:#fff8e8;border-color:#f0e3c4}.empty-message{padding:26px 0;text-align:center;font-size:12px;color:var(--muted);margin:0}.page-footer{margin-top:38px;padding:21px 0 24px;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;font-size:10px;color:#73827a}.page-footer span span{color:#a8b7ae;margin:0 6px}
.login-layout{max-width:1120px;margin:20px auto 42px;display:grid;gap:30px}.login-copy{padding:4px 0}.login-copy>.eyebrow{font-size:9px;margin-bottom:18px;letter-spacing:1.3px}.login-copy h1{font-size:35px;line-height:1.16;letter-spacing:-1.5px}.login-copy h1>span{color:var(--teal)}.lead{color:var(--muted);font-size:15px;line-height:1.75;margin-top:20px;max-width:440px}.login-card{margin-top:26px;padding:24px}.login-card h2{font-size:17px;margin-bottom:9px}.login-card .button{margin-top:10px;min-height:47px}.login-card .micro{margin:14px 0 0;font-size:11px}.login-footnote{margin:18px 0 0 3px;font-size:11px;line-height:1.8;color:#7d8b82}.intro-panel{background:#e9f4ee;border:1px solid #dcebe2;border-radius:16px;padding:28px 24px;position:relative;overflow:hidden}.intro-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.intro-top .pill{background:#f5faf7;color:#466655;border-color:#cfdfd4;font-size:8px;letter-spacing:.6px}.intro-cross{font-size:80px;line-height:.85;color:#b7d3c4;font-weight:200;margin-top:5px}.intro-panel>h2{font-size:26px;line-height:1.23;letter-spacing:-1px;margin:8px 0 28px;color:#284938}.intro-steps{list-style:none;margin:0;padding:0}.intro-steps li{display:flex;align-items:flex-start;gap:17px;border-top:1px solid #cee1d4;padding:20px 0}.intro-steps li>span{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:11px;color:#638570;padding-top:3px}.intro-steps h3{font-size:14px;color:#2e4f3c;margin-bottom:6px}.intro-steps p{font-size:12px;line-height:1.65;color:#627e6b;margin:0;max-width:270px}.intro-bottom{border-top:1px solid #cee1d4;padding-top:22px;margin-top:14px;display:flex;align-items:center;gap:9px;color:#5a7865;font-size:11px}
.workspace-heading{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;flex-direction:column;margin:6px 0 24px}.workspace-heading .eyebrow{font-size:9px;margin-bottom:8px}.workspace-heading h1{font-size:28px;letter-spacing:-.9px}.workspace-heading p{margin:8px 0 0;font-size:12px}.dashboard-grid{display:grid;gap:20px;align-items:start}.patient-sidebar{padding:19px 16px}.patient-sidebar h2{font-size:15px;letter-spacing:-.2px}.patient-sidebar>.micro{font-size:11px;margin-bottom:15px}.search-form{display:flex;gap:6px}.search-form input{min-width:0;padding:9px 10px;font-size:12px}.search-form .button{padding:9px 11px;font-size:11px;min-height:42px}.patient-sidebar>.text-button{margin:5px 0 10px}.patient-list{display:flex;flex-direction:column;gap:8px;max-height:260px;overflow-y:auto;padding:2px 1px 14px}.patient-item{display:flex;flex-direction:column;gap:7px;width:100%;text-align:left;padding:13px 12px;border:1px solid #e5ebe7;border-radius:8px;background:#fff;color:var(--ink)}.patient-item:not(:disabled):hover{background:#f5faf7;border-color:#accabd}.patient-item.active{background:#eef7f2;border-color:#94c7b2;box-shadow:inset 3px 0 var(--teal)}.patient-item:disabled{opacity:1;cursor:default}.patient-item-top{display:flex;justify-content:space-between;gap:12px;width:100%;align-items:center}.patient-item strong{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:14px;letter-spacing:.1px}.patient-item-action{font-size:9px;color:var(--teal);font-weight:600;white-space:nowrap}.patient-item-label{font-size:11px;color:var(--muted);overflow-wrap:anywhere}.patient-sidebar>.button{font-size:11px;margin-top:1px}.sidebar-note{padding:17px 2px 0;border-top:1px solid var(--line);margin-top:20px;color:var(--muted);font-size:10px;line-height:1.7}.sidebar-note strong{display:block;font-size:11px;font-weight:600;margin-bottom:4px;color:#53685c}.sidebar-note p{margin:0}.patient-workspace{min-width:0}.patient-focus{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:20px;position:relative}.patient-focus>div:first-child{flex:1;min-width:0}.patient-focus .eyebrow{font-size:9px;letter-spacing:1.2px;margin-bottom:7px}.patient-focus h2{font-size:22px;overflow-wrap:anywhere}.patient-focus .muted{font-size:12px;margin:3px 0 0;overflow-wrap:anywhere}.safety-info{width:100%;border-top:1px solid #edf0ee;padding-top:12px;display:flex;flex-wrap:wrap;gap:7px 18px;color:var(--muted);font-size:10px}.safety-info strong{font-weight:500;color:#56685c}.selection-empty{padding:75px 16px 90px;text-align:center;color:var(--muted)}.selection-empty h2{font-size:19px;color:#53685c;letter-spacing:-.4px}.selection-empty p{font-size:12px;line-height:1.8;margin:12px 0 0}.empty-cross{width:54px;height:54px;border-radius:15px;border:1px solid #dde8e0;background:#eef4f0;display:grid;place-items:center;margin:0 auto 22px;font-size:36px;line-height:1;color:#9ab7a6;font-weight:250}.desktop-break{display:none}.clinical-grid{display:grid;gap:20px;margin-top:20px;align-items:start}.editor-card,.review-card{padding:21px 19px}.mini-label{font-size:10px;color:#87938c;white-space:nowrap}.editor-card>.micro{font-size:11px;margin:12px 0 5px}.editor-card label{font-size:12px;margin-top:17px}.editor-card label span{font-size:10px}.editor-card textarea{font-size:12px;padding:10px 11px}.editor-meta{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:10px;color:#839087;margin:5px 0 12px}.editor-meta .text-button{font-size:10px}.stack-actions{display:grid;gap:8px}.editor-card .footnote{font-size:10px;padding-top:14px;border-top:1px solid #eef1ef;margin:17px 0 0;line-height:1.7}.review-card{display:flex;flex-direction:column;min-height:440px;background:#fdfefd}.review-symbol{height:31px;width:31px;display:grid;place-items:center;background:#eff7f2;border:1px solid #d7e9dd;border-radius:9px;color:#508269;font-weight:500}.review-mode{font-size:10px;color:var(--teal-dark);background:#eff7f2;border:1px solid #dbece1;padding:9px 11px;border-radius:7px;line-height:1.6;margin:5px 0 20px}.review-empty{display:flex;flex:1;flex-direction:column;text-align:center;align-items:center;justify-content:center;padding:25px 16px 36px;min-height:230px}.empty-lines{font-size:32px;line-height:1;color:#9eb3a5;border:1px solid #dfe8e1;background:#f4f8f5;border-radius:10px;width:46px;height:46px;display:grid;place-items:center;margin-bottom:18px}.review-empty h3{font-size:13px;color:#526959;max-width:230px}.review-empty p{font-size:11px;color:#859288;max-width:235px;line-height:1.8;margin:10px 0 0}.review-bottom{display:flex;align-items:center;gap:7px;border-top:1px solid #e9efea;padding-top:16px;margin-top:auto;font-size:10px;color:#839186}.review-bottom .status-dot{background:#92b7a0;width:5px;height:5px}.clinical-text{white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;font-size:12px;line-height:1.85}.review-text{padding:0 1px 18px}.review-disclaimer{border-left:2px solid #b4d7c0;padding:2px 0 2px 12px;margin:15px 0 20px;color:#64816c;font-size:10px}.review-disclaimer strong{font-size:11px;color:#466550}.review-disclaimer p{margin:5px 0 0;line-height:1.75}.review-card #save-review{margin-bottom:20px}.inline-warning{background:var(--amber-bg);border-radius:6px;padding:10px;color:var(--amber);font-size:11px}.records-grid{display:grid;gap:20px;margin-top:20px;align-items:start}.timeline-card,.drafts-card{padding:21px 19px}.records-grid .eyebrow{font-size:8px;letter-spacing:1.1px}.records-grid h2{font-size:17px}.records-grid .micro{font-size:10px}.records-list{margin-top:18px}.record{border-top:1px solid var(--line);padding:17px 0 5px}.record+.record{margin-top:18px}.record-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:5px;margin-bottom:12px}.record-heading time{font-size:9px;color:#89958d}.record-status{font-size:9px;font-weight:650;color:var(--teal);background:#edf7f0;border-radius:4px;padding:3px 6px}.record-status.draft{color:var(--amber);background:#fff5df}.record-text{font-size:11px;line-height:1.8}.record .button{font-size:11px;margin-top:17px}.records-list>.empty-message{font-size:11px;padding:25px 0 30px;border-top:1px dashed #e2e8e4}
/* Native dialogs retain focus trapping and keyboard semantics. */
dialog{border:0;border-radius:14px;background:#fff;color:var(--ink);width:calc(100% - 30px);max-width:480px;padding:24px;box-shadow:0 18px 65px #132d2340;max-height:calc(100dvh - 40px);overflow:auto}dialog::backdrop{background:#102f2966;backdrop-filter:blur(3px)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:14px}.dialog-heading h2{font-size:20px}.icon-button{border:1px solid #e3e9e5;width:38px;height:38px;flex-shrink:0;border-radius:8px;background:#fff;display:grid;place-items:center;font-size:23px;line-height:1;font-weight:300;color:#738179}.icon-button:not(:disabled):hover{background:#f1f6f3}.check-row{display:flex;align-items:flex-start;gap:11px;font-size:12px;font-weight:400;line-height:1.7;margin:20px 0}.check-row span{color:#4d6256}.form-error{background:#fff1ed;border:1px solid #f1d4cd;color:#a13b36;border-radius:7px;padding:11px 12px;font-size:12px;line-height:1.7}.dialog-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:9px;margin-top:22px}.confirm-patient{padding:15px 17px;background:#edf8f2;border:1px solid #cce6d7;border-radius:9px;margin:18px 0;display:flex;flex-direction:column;gap:5px}.confirm-patient .eyebrow{font-size:9px;margin:0;color:#527c63}.confirm-patient strong{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:25px;color:var(--teal-dark);overflow-wrap:anywhere}.confirm-patient>span:last-child{font-size:12px;color:#5c7d67;overflow-wrap:anywhere}.approval-preview{max-height:230px;overflow:auto;font-size:12px;padding:14px;border:1px solid #e5eae7;border-radius:8px}.audit-drawer{margin:0 0 0 auto;height:100dvh;max-height:100dvh;border-radius:14px 0 0 14px;max-width:470px;width:calc(100% - 18px);padding:26px 22px}.audit-drawer>.muted{font-size:12px}.audit-drawer>.pill{font-size:10px;margin-bottom:24px}.audit-list{margin-bottom:22px}.audit-item{padding:17px 0;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:5px;overflow-wrap:anywhere}.audit-item strong{font-size:12px;font-weight:600}.audit-item time{font-size:10px;color:#8a978f}.audit-item .micro{font-size:10px;margin:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:640px){.test-banner{font-size:10px}.banner-detail{display:inline;font-size:10px;font-weight:400;letter-spacing:0;opacity:.8}.topbar{padding:0 30px;height:84px}.brand{font-size:20px;gap:12px}.brand-mark{width:39px;height:39px}.brand small{font-size:8px;letter-spacing:1.8px}.header-actions{gap:12px}.session-label{display:inline;font-size:11px;color:var(--muted);max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.page{padding:32px 28px 0}.workspace-heading{flex-direction:row;align-items:center;margin-bottom:28px}.workspace-heading .pill{font-size:10px}.login-layout{margin-top:35px;gap:40px}.login-copy h1{font-size:45px}.login-card{max-width:430px}.intro-panel{padding:36px}.intro-panel>h2{font-size:30px}.clinical-grid,.records-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.patient-list{max-height:270px;display:grid;grid-template-columns:1fr 1fr}.patient-focus{padding:22px 24px}.patient-focus h2{font-size:25px}.desktop-break{display:initial}}
@media(min-width:1024px){.topbar{padding:0 40px}.page{padding:32px 36px 0}.login-layout{grid-template-columns:1.05fr .95fr;gap:70px;margin:45px auto 65px;align-items:center}.login-copy{padding:10px 0}.login-copy h1{font-size:46px;line-height:1.15}.login-copy>.eyebrow{font-size:9px;letter-spacing:1.6px}.lead{font-size:14px;line-height:1.8}.login-card{padding:25px 27px}.intro-panel{padding:40px 35px;min-height:540px}.intro-panel>h2{margin-top:19px;margin-bottom:30px}.intro-top .pill{font-size:8px}.intro-steps li{padding:24px 0}.intro-steps p{font-size:12px}.intro-bottom{margin-top:20px}.dashboard-grid{grid-template-columns:246px minmax(0,1fr);gap:24px}.patient-sidebar{position:sticky;top:24px}.patient-list{display:flex;max-height:480px}.workspace-heading h1{font-size:31px}.workspace-heading>.pill{align-self:center}.clinical-grid{grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)}.editor-card,.review-card,.timeline-card,.drafts-card{padding:24px 21px}.review-card{min-height:480px}.card-heading h2{font-size:18px}.patient-focus{padding:22px 24px}.safety-info{gap:24px;font-size:11px}.page-footer{font-size:10px;margin-top:50px}.selection-empty{padding:108px 16px 130px}.selection-empty h2{font-size:22px}.selection-empty p{font-size:13px}}
@media(min-width:1350px){.dashboard-grid{grid-template-columns:260px minmax(0,1fr);gap:28px}.patient-sidebar{padding:23px 20px}.clinical-grid,.records-grid{gap:24px;margin-top:24px}.editor-card,.review-card,.timeline-card,.drafts-card{padding:25px 24px}.editor-card textarea{font-size:13px}.clinical-text{font-size:13px}.record-text{font-size:12px}.review-card{min-height:510px}.login-layout{gap:95px}.login-copy h1{font-size:50px}.intro-panel{padding:42px}.intro-panel>h2{font-size:33px}}
@media(max-width:639px){input:not([type=checkbox]),textarea,.editor-card textarea{font-size:16px}.search-form input{font-size:16px}.banner-detail{display:none}.test-banner{position:sticky;padding:12px 12px;font-size:10px;gap:7px}.banner-symbol{width:15px;height:15px;font-size:10px}.topbar{height:76px}.brand small{font-size:7px;letter-spacing:1px}.header-actions{gap:3px}.header-actions .button{font-size:11px;padding:8px;min-height:40px}.intro-panel{display:none}.login-layout{margin-top:22px}.login-copy h1{font-size:34px;letter-spacing:-1.1px}.login-copy>.eyebrow{font-size:8px}.login-card{padding:22px 19px}.lead{font-size:14px;line-height:1.8}.login-footnote{font-size:10px}.page-footer{font-size:9px;flex-direction:column;line-height:1.8}.patient-focus h2{font-size:21px}.patient-focus>.pill{font-size:8px;padding:5px 8px}.patient-focus .eyebrow{font-size:8px}.editor-card label{font-size:13px}.card-heading h2{font-size:17px}.review-mode{font-size:11px}.review-empty p{font-size:12px}.clinical-text{font-size:13px}.patient-sidebar>.micro{font-size:12px}.patient-item-label{font-size:12px}.sidebar-note{font-size:11px}.record-heading time{font-size:10px}.record-status{font-size:10px}.records-grid .micro{font-size:11px}.record-text{font-size:12px}.editor-card>.micro{font-size:12px}.dialog-heading h2{font-size:18px}.dialog-actions .button{flex:1;min-width:110px}.review-card{min-height:390px}.safety-info{font-size:11px;line-height:1.6}.test-banner strong{font-size:inherit}.search-form .button{font-size:12px}.button{font-size:13px;min-height:46px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
@media print{body>*:not(.test-banner):not(.page){display:none}.patient-sidebar,.workspace-heading,.editor-card,.review-card,.drafts-card,.page-footer,dialog,.notice{display:none!important}.dashboard-grid,.records-grid{display:block}.card{box-shadow:none;border:1px solid #ddd}.test-banner{color:#000;background:#fff;border:2px solid #000}.page{padding:20px}.clinical-text{overflow:visible}}
