.document-shell,.document-body{min-width:0}.document-scroll{background:#f6f8f9}.document-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:20px;max-width:1600px;margin:0 auto;padding:20px 24px 36px}.document-editor,.document-preview-panel{min-width:0;background:#fff;border:1px solid #e5eaec;border-radius:18px;box-shadow:0 2px 14px rgba(26,52,58,.035)}.document-editor{padding:22px}.document-section-heading{display:flex;align-items:flex-start;gap:11px}.document-section-heading--spaced{margin-top:28px;padding-top:23px;border-top:1px solid #edf0f1}.document-step{display:grid;place-items:center;flex:none;width:26px;height:26px;border-radius:9px;background:#e9f5f6;color:#39818a;font-size:12px;font-weight:800}.document-section-heading h2{margin:0;color:#202b30;font-size:16px;font-weight:800;line-height:1.4}.document-section-heading p{margin:3px 0 0;color:#849095;font-size:12px;line-height:1.5}.document-field{display:flex;flex-direction:column;gap:7px;min-width:0;margin-top:18px}.document-field>label{color:#4b5960;font-size:12px;font-weight:750}.document-field :is(input,select,textarea){box-sizing:border-box;width:100%;min-height:44px;padding:10px 12px;border:1px solid #dce4e7;border-radius:11px;outline:0;background:#fff;color:#26343a;font:inherit;font-size:13px;transition:border-color .15s,box-shadow .15s}.document-field :is(input,select,textarea):focus{border-color:#6eb0ba;box-shadow:0 0 0 3px rgba(110,176,186,.17)}.document-field :is(input,textarea)::placeholder{color:#a4afb4}.document-field textarea{min-height:255px;resize:vertical;line-height:1.6}.document-field-row{display:grid;grid-template-columns:minmax(0,1fr) 188px;gap:12px}.document-date-field input[type=date]{min-width:0;max-width:100%}.document-patient-field{position:relative}.document-search-wrap{position:relative}.document-search-wrap svg{position:absolute;top:13px;left:12px;color:#90a0a6;pointer-events:none}.document-search-wrap input{padding-left:38px}.document-results{position:absolute;z-index:20;top:calc(100% + 7px);left:0;right:0;max-height:235px;overflow:auto;padding:5px;border:1px solid #dce4e7;border-radius:12px;background:#fff;box-shadow:0 16px 40px rgba(26,52,58,.17)}.document-results button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;padding:9px 10px;border:0;border-radius:8px;background:#fff;color:#26343a;font:inherit;text-align:left;cursor:pointer}.document-results button:hover,.document-results button:focus-visible{background:#edf7f8;outline:0}.document-results button strong{font-size:13px}.document-results button span,.document-result-message{color:#839096;font-size:11px}.document-result-message{padding:12px}.document-selected-patient{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 12px;border:1px solid #a8d2d8;border-radius:11px;background:#f3fafb}.document-selected-patient div{display:flex;flex-direction:column;gap:2px;min-width:0}.document-selected-patient strong{overflow:hidden;color:#284e55;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.document-selected-patient span{color:#6c858a;font-size:11px}.document-selected-patient button{flex:none;padding:7px 9px;border:0;border-radius:7px;background:#e0f0f2;color:#337681;font:inherit;font-size:11px;font-weight:800;cursor:pointer}.document-paper-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:18px}.document-paper-options button{display:flex;flex-direction:column;gap:3px;min-height:74px;padding:13px;border:1px solid #dce4e7;border-radius:12px;background:#fff;color:#34434a;font:inherit;text-align:left;cursor:pointer}.document-paper-options button.is-active{border-color:#6eb0ba;background:#f0f9fa;box-shadow:0 0 0 2px rgba(110,176,186,.12)}.document-paper-options strong{font-size:13px;font-weight:800}.document-paper-options span{color:#8b969b;font-size:11px;line-height:1.4}.document-character-count{align-self:flex-end;margin-top:-2px;color:#9aa6aa;font-size:10px}.document-error{margin:16px 0 0;padding:10px 12px;border-radius:9px;background:#fff1f1;color:#a52b2b;font-size:12px}.document-actions{display:flex;gap:10px;margin-top:20px}.document-button{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:42px;padding:0 16px;border:1px solid transparent;border-radius:10px;font:inherit;font-size:12px;font-weight:800;cursor:pointer}.document-button--primary{background:#5ba4af;color:#fff}.document-button--primary:hover{background:#478e9a}.document-button--secondary{border-color:#c8dfe3;background:#f3fafb;color:#367b86}.document-button--secondary:hover{background:#e4f2f4}.document-button:disabled{opacity:.55;cursor:not-allowed}.document-preview-panel{position:sticky;top:20px;overflow:hidden}.document-preview-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:14px 17px;border-bottom:1px solid #e9eff1}.document-preview-heading>div{display:flex;flex-direction:column;gap:2px}.document-preview-heading strong{color:#26343a;font-size:13px}.document-preview-heading span{color:#8c999e;font-size:11px}.document-preview-updating{padding:5px 8px;border-radius:99px;background:#ecf6f7;color:#3d818b!important;font-size:10px;font-weight:700}.document-preview-frame{display:block;width:100%;height:min(78vh,920px);min-height:580px;border:0;background:#e4e8e9}.document-preview-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;height:min(78vh,920px);min-height:580px;padding:24px;color:#a5b5ba;text-align:center}.document-preview-empty strong{margin-top:16px;color:#536971;font-size:15px}.document-preview-empty p{max-width:250px;margin:6px 0 0;color:#98a6ab;font-size:12px;line-height:1.5}@media(max-width:1050px){.document-layout{grid-template-columns:minmax(0,1fr);max-width:760px}.document-preview-panel{position:static}.document-preview-frame,.document-preview-empty{height:720px;min-height:0}}@media(max-width:640px){.document-layout{gap:14px;padding:12px 12px 28px}.document-editor,.document-preview-panel{border-radius:15px}.document-editor{padding:17px}.document-field-row{grid-template-columns:1fr}.document-field-row .document-field{margin-top:14px}.document-paper-options{gap:8px}.document-paper-options button{padding:11px;min-height:83px}.document-actions{position:sticky;bottom:0;z-index:5;display:grid;grid-template-columns:1fr 1fr;margin:20px -17px -17px;padding:11px 17px 15px;border-top:1px solid #e9eff1;border-radius:0 0 15px 15px;background:#fff}.document-button{padding:0 7px}.document-preview-frame,.document-preview-empty{height:590px}}
.document-clinical-note,.document-incomplete-note{margin:14px 0 0;padding:11px 12px;border-radius:10px;font-size:12px;line-height:1.5}.document-clinical-note{background:#eef6f7;color:#476b72}.document-incomplete-note{background:#fff8e9;color:#9a6523}.document-template-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}.document-template-fields .document-field{margin-top:13px}.document-template-fields input[type=date]{min-width:0}@media(max-width:640px){.document-template-fields{grid-template-columns:1fr}}

/* Keep document creation in the shared page and card design language. */
.document-scroll{background:transparent}
.document-layout{grid-template-columns:repeat(2,minmax(0,1fr));max-width:none;gap:16px;padding:2px 1px 12px}
.document-editor,.document-preview-panel{border:1px solid rgba(0,0,0,.055);border-radius:20px;box-shadow:0 1px 2px rgba(26,42,46,.035)}
.document-editor{padding:24px}
.document-preview-panel{top:16px}
.document-section-heading{gap:12px}
.document-section-heading--spaced{margin-top:26px;padding-top:24px;border-top-color:#edf0f1}
.document-step{width:32px;height:32px;border-radius:11px;background:#eaf5f7;color:#347e88;font-size:13px}
.document-section-heading h2{color:#1d1d1f;font-size:16px;font-weight:700;letter-spacing:-.02em}
.document-section-heading p{color:#7b8490;font-size:12px}
.document-field{gap:7px;margin-top:17px}
.document-field>label{color:#5b656c;font-size:12px;font-weight:700}
.document-field :is(input,select,textarea){min-height:44px;border-color:#e2e7e9;border-radius:11px;background:#f9fbfb;color:#1d1d1f;font-size:14px;font-weight:500}
.document-field :is(input,select,textarea):focus{border-color:#6eb0ba;box-shadow:0 0 0 3px rgba(110,176,186,.16)}
.document-field-row{grid-template-columns:minmax(0,1.6fr) minmax(180px,.8fr);gap:12px}
.document-field textarea{min-height:280px;line-height:1.6}
.document-selected-patient{border-color:#b8d9de;border-radius:12px;background:#f3fafb}
.document-selected-patient button{border-radius:9px}
.document-paper-options{gap:12px}
.document-paper-options button{min-height:84px;padding:14px;border-color:#e2e7e9;border-radius:14px;background:#f9fbfb}
.document-paper-options button.is-active{border-color:#6eb0ba;background:#f0f9fa;box-shadow:0 0 0 2px rgba(110,176,186,.12)}
.document-paper-options strong{color:#273a40;font-size:13px;font-weight:700}
.document-paper-options span{color:#7f8d93;font-size:11px}
.document-actions{flex-wrap:wrap;gap:9px;margin-top:22px;padding-top:20px;border-top:1px solid #edf0f1}
.document-button{min-height:44px;padding:0 17px;border-radius:999px;font-size:13px;font-weight:700}
.document-button--primary{background:#6eb0ba;color:#fff}
.document-button--primary:hover{background:#4f97a1}
.document-button--secondary{border-color:#e2e7e9;background:#fff;color:#4f5960}
.document-button--secondary:hover{border-color:#bddbe0;background:#f1f8f9;color:#347e88}
.document-preview-heading{padding:17px 20px;border-bottom-color:#edf0f1}
.document-preview-heading strong{color:#1d1d1f;font-size:15px;font-weight:700}
.document-preview-heading span{color:#7b8490;font-size:12px}
.document-preview-empty{color:#8a969c}
.document-preview-empty>svg{box-sizing:content-box;padding:15px;border-radius:16px;background:#eef6f7;color:#579ca7}
.document-preview-empty strong{color:#1d1d1f;font-weight:700}
.document-preview-empty p{color:#8a969c;font-size:13px}
.document-button:focus-visible,.document-paper-options button:focus-visible,.document-selected-patient button:focus-visible,.document-field :is(input,select,textarea):focus-visible{outline:2px solid #4f97a1;outline-offset:2px}
.dark .document-editor,.dark .document-preview-panel{border-color:rgba(255,255,255,.08);background:#1c1c1e;box-shadow:none}
.dark .document-section-heading h2,.dark .document-preview-heading strong,.dark .document-preview-empty strong,.dark .document-paper-options strong{color:#f5f5f7}
.dark .document-section-heading p,.dark .document-preview-heading span,.dark .document-preview-empty,.dark .document-preview-empty p,.dark .document-paper-options span{color:#9ca7ac}
.dark .document-section-heading--spaced,.dark .document-actions,.dark .document-preview-heading{border-color:#323a3c}
.dark .document-step,.dark .document-preview-empty>svg{background:#20363a;color:#a2dbe2}
.dark .document-field>label{color:#c8d2d5}
.dark .document-field :is(input,select,textarea),.dark .document-paper-options button,.dark .document-button--secondary{border-color:#394346;background:#24292a;color:#f5f5f7}
.dark .document-field :is(input,textarea)::placeholder{color:#849197}
.dark .document-paper-options button.is-active,.dark .document-selected-patient{border-color:#416d74;background:#1e383c}
.dark .document-selected-patient strong{color:#d4f0f3}
.dark .document-selected-patient span{color:#a2bdc2}
.dark .document-preview-frame{background:#2b3335}
@media(max-width:1050px){.document-layout{grid-template-columns:minmax(0,1fr);max-width:760px}.document-preview-panel{position:static}}
@media(max-width:640px){.document-layout{gap:12px;padding:0 0 12px}.document-editor,.document-preview-panel{border-radius:18px}.document-editor{padding:16px}.document-field-row{grid-template-columns:minmax(0,1fr)}.document-field :is(input,select,textarea){font-size:16px}.document-actions{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:21px 0 0;padding:17px 0 0;border-radius:0;background:transparent}.document-actions .document-button--primary{grid-column:1/-1}.document-button{min-width:0;padding:0 8px}.document-preview-heading{padding:15px 16px}}
.dark .document-search-wrap svg{color:#9aafb4}
.dark .document-results{border-color:#394346;background:#24292a;box-shadow:0 16px 40px rgba(0,0,0,.3)}
.dark .document-results button{background:#24292a;color:#f5f5f7}
.dark .document-results button:hover,.dark .document-results button:focus-visible{background:#20363a}
.dark .document-results button span,.dark .document-result-message,.dark .document-character-count{color:#9ca7ac}
.dark .document-selected-patient button{background:#2b4a50;color:#c7e9ed}
.dark .document-clinical-note{background:#20363a;color:#bbd5d9}
.dark .document-incomplete-note{background:#3c3323;color:#f0d29b}
.dark .document-error{background:#40292b;color:#ffb9b9}
.dark .document-archive-notice{background:#1d3b34;color:#a7dfc9}
.dark .document-archive-notice a{color:#a2dbe2}
.document-template-edit-toggle{display:inline-flex;align-items:center;gap:7px;margin-top:14px;padding:8px 12px;border:1px dashed #a8d2d8;border-radius:10px;background:#f7fbfc;color:#367b86;font:inherit;font-size:12px;font-weight:800;cursor:pointer}.document-template-edit-toggle:hover{background:#e9f5f6}.document-template-badge{margin-left:8px;padding:2px 7px;border-radius:999px;background:#fff4dc;color:#946200;font-size:10px;font-weight:800}.document-template-editor{margin-top:16px;padding:16px;border:1px solid #c8dfe3;border-radius:14px;background:#f8fcfc}.document-template-editor-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.document-template-editor-head>div{display:flex;flex-direction:column;gap:3px;min-width:0}.document-template-editor-head strong{color:#284e55;font-size:14px}.document-template-editor-head span{color:#6c858a;font-size:11px;line-height:1.5}.document-template-close{flex:none;padding:7px 9px;border:0;border-radius:7px;background:#e0f0f2;color:#337681;font:inherit;font-size:11px;font-weight:800;cursor:pointer}.document-template-help{margin:10px 0 0;color:#6c7a80;font-size:11px;line-height:1.6}.document-template-help code{padding:1px 4px;border-radius:4px;background:#e9f0f2;font-size:11px}.document-template-language{min-width:0;margin:16px 0 0;padding:4px 14px 14px;border:1px solid #dce4e7;border-radius:12px;background:#fff}.document-template-language legend{padding:0 6px;color:#202b30;font-size:13px;font-weight:800}.document-template-language .document-field textarea{min-height:190px}.document-template-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.document-template-chips button{padding:5px 8px;border:1px solid #d5e7ea;border-radius:999px;background:#f3fafb;color:#3f7480;font:inherit;font-size:11px;cursor:pointer}.document-template-chips button:hover{background:#e4f2f4}.document-template-language-actions{display:flex;justify-content:flex-end;margin-top:12px}.document-template-message{margin:16px 0 0;padding:10px 12px;border-radius:9px;background:#eef8f2;color:#2c6b47;font-size:12px}
@media (max-width:640px){.document-template-editor{padding:12px}.document-template-language{padding:4px 10px 12px}}
.dark .document-template-editor{border-color:#2f4a50;background:#18262a}.dark .document-template-language{border-color:#2f4a50;background:#1d2c30}.dark .document-template-language legend,.dark .document-template-editor-head strong{color:#e3eef0}.dark .document-template-editor-head span,.dark .document-template-help{color:#9fb3b8}.dark .document-template-help code{background:#26393e;color:#cfe3e6}.dark .document-template-chips button,.dark .document-template-close,.dark .document-template-edit-toggle{border-color:#35555c;background:#203338;color:#a2dbe2}.dark .document-template-message{background:#1d3b34;color:#a7dfc9}.dark .document-template-badge{background:#3c3323;color:#f0d29b}
